/* ======================================================================
   02-AUTH  -  Loading, brand and sign-in layouts
   ====================================================================== */

/* Loading, brand, and sign-in layouts. */
.loading-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--muted); }
.loading-screen strong { color: var(--ink); letter-spacing: .1em; font-size: 13px; }
.loading-screen p { font-size: 13px; }
.page-loading { display: grid; justify-items: center; gap: 14px; padding: 90px 0; color: var(--muted); }
.page-loading p { font-size: 14px; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--blue-pale); border-top-color: var(--blue); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand-mark { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 9px; color: white; background: var(--blue); }
.brand-initial { font-family: "Crimson Pro", Georgia, serif; font-size: 25px; font-weight: 700; line-height: 1; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand b, .brand small { display: block; }
.brand b { font-size: 14px; letter-spacing: .07em; }
.wordmark { font-weight: 800; letter-spacing: .02em !important; text-transform: none; }
.wordmark span { color: var(--blue); font-size: 1.3em; font-weight: 900; margin-right: 0; }
.brand b.wordmark { font-size: 20px; }
.sidebar .wordmark span { color: #8db4ff; }
.loading-screen .wordmark { font-size: 22px; letter-spacing: .02em; }
.brand-link { cursor: pointer; }
.material-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pick-item { display: block; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 7px; background: white; text-align: left; cursor: pointer; }
.pick-item:hover { border-color: var(--blue); background: var(--blue-pale); }
.pick-item b, .pick-item small { display: block; overflow-wrap: anywhere; }
.pick-item b { font-size: 13px; }
.pick-item small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.picker-body { align-content: start; }
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap input { padding-right: 44px !important; }
.pw-toggle { position: absolute; top: 0; right: 0; height: 100%; width: 42px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.pw-toggle:hover { color: var(--blue); }
.pick-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.pick-search { flex: 1 1 220px; min-width: 0; min-height: 40px; padding: 0 12px; border: 1px solid #cfd8e3; border-radius: 8px; font-size: 13px; }
.pick-search:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-pale); outline: 0; }
.question-pick label[hidden] { display: none; }
.questionnaire-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px; }
.format-field { min-width: 220px; }
.questionnaire-actions .hint { flex: 1 1 100%; }
.download-group { display: inline-flex; align-items: center; gap: 6px; }
.download-group select { min-height: 32px; padding: 0 8px; border: 1px solid #cfd8e3; border-radius: 7px; background: white; font-size: 11px; }
.download-group .btn { min-height: 32px; padding: 0 10px; font-size: 11px; }
.file-row > div { min-width: 0; overflow-wrap: anywhere; }
.brand small { color: #95a8c0; font-size: 10px; margin-top: 2px; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(390px, 1fr) minmax(450px, .94fr); background: #f3f1e9; }
.login-story { padding: 40px clamp(28px, 6vw, 92px); display: flex; flex-direction: column; color: white; background: var(--navy-dark); position: relative; overflow: hidden; }
.login-story .brand { position: relative; z-index: 1; }
.login-copy { max-width: 520px; margin: clamp(78px, 10vh, 118px) 0 0; position: relative; z-index: 1; }
.login-copy h1 { max-width: 500px; margin: 0; font-family: "Crimson Pro", Georgia, serif; font-size: clamp(44px, 4.2vw, 60px); font-weight: 600; line-height: 1.02; letter-spacing: -.02em; }
.login-art { display: block; position: relative; z-index: 0; flex: none; width: min(100%, 560px); height: auto; margin: auto -16px -4px auto; overflow: visible; }
.trust { display: grid; gap: 19px; margin-top: 40px; }
.trust div { display: grid; grid-template-columns: 25px 1fr; gap: 12px; color: #8db4ff; }
.trust strong, .trust small { display: block; }
.trust strong { color: white; font-size: 13px; }
.trust small { color: #9bacc0; font-size: 11px; margin-top: 3px; }
.login-footer { color: #73859c; font-size: 10px; }
.login-panel { display: grid; place-items: center; padding: 42px; background: #f3f1e9; }
.login-box { width: min(440px, 100%); padding: 38px 36px 30px; border: 1px solid #e1ddd2; border-radius: 8px; background: #fffefa; box-shadow: 0 16px 38px rgba(22, 43, 60, .08); }
.login-box .mobile-brand { display: none; }
.login-box h2 { font-family: "Crimson Pro", Georgia, serif; font-size: 38px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 10px; line-height: 1.08; }
.login-box > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.login-form { display: grid; gap: 17px; margin-top: 26px; }
.login-form .field input { min-height: 48px; border-radius: 4px; }
.login-form .btn-full { min-height: 48px; border-radius: 5px; background: var(--navy); }
.login-form .btn-full:hover { background: var(--blue-dark); }
.login-paper { transform-box: fill-box; transform-origin: center; animation: login-paper-rise 700ms cubic-bezier(.16, 1, .3, 1) both; }
@keyframes login-paper-rise { from { transform: translateY(28px); } to { transform: translateY(0); } }
.login-copy { animation: login-quote-appear 520ms ease-out 160ms both; }
@keyframes login-quote-appear { from { opacity: 0; } to { opacity: 1; } }
.login-box { animation: login-form-appear 520ms ease-out 320ms both; }
@keyframes login-form-appear { from { opacity: 0; } to { opacity: 1; } }
.login-check { stroke-dasharray: 12; stroke-dashoffset: 12; animation: login-check-write 320ms cubic-bezier(.16, 1, .3, 1) 520ms both; }
@keyframes login-check-write { to { stroke-dashoffset: 0; } }
.login-form > button[type="submit"][disabled]::after { content: ""; flex: none; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: login-submit-spin .72s linear infinite; }
@keyframes login-submit-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .login-paper { animation: none; transform: none; }
  .login-copy, .login-box { animation: none; opacity: 1; }
  .login-check { animation: none; stroke-dashoffset: 0; }
  .login-form > button[type="submit"][disabled]::after { display: none; animation: none; }
}
.field { display: flex; flex-direction: column; gap: 7px; color: #30445d; font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; border: 1px solid #cbd6de; border-radius: 6px; background: white; outline: 0; padding: 0 12px; font-size: 13px; color: var(--ink); }
.field textarea { min-height: 100px; padding: 11px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-pale); }
.hint { color: var(--muted); font-size: 12px; font-weight: 450; }
.btn { min-height: 40px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 0 15px; border: 1px solid transparent; border-radius: 7px; background: var(--blue); color: white; font-size: 13px; font-weight: 650; transition: background-color .16s ease, border-color .16s ease, color .16s ease; }
.btn:hover { background: var(--blue-dark); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-secondary { color: var(--ink); background: white; border-color: #cbd6de; }
.btn-secondary:hover { background: #f5f7fa; }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #a91f30; }
.btn-ghost { border: 0; color: var(--muted); background: transparent; }
.btn-ghost:hover { color: var(--blue-dark); background: var(--blue-pale); }
.btn-full { width: 100%; min-height: 46px; }
.login-error, .form-error { border-radius: 8px; padding: 10px 12px; color: var(--red); background: var(--red-pale); font-size: 12px; }
.login-help { margin-top: 22px; padding-top: 16px; border-top: 1px solid #e8e4da; text-align: left; font-size: 12px; color: var(--muted); line-height: 1.5; }
