/* ==========================================================================
   Sign in. Same language as the dashboard (CLAUDE.md §5A): solid navy brand
   side (no gradient), one statement, a quiet product preview, and a calm form
   with designed error and loading states.
   ========================================================================== */

.page-auth { background: var(--tb-surface); }
.au { flex: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; }

/* Brand side */
.au-brand {
    position: relative; overflow: hidden; display: flex; flex-direction: column;
    padding: 40px 56px; background: var(--tb-primary); color: var(--tb-on-strong);
}
.au-logo { display: flex; align-items: baseline; gap: 10px; }
.au-logo__name { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.au-logo__tag { font-size: 12px; font-weight: 500; opacity: .72; }
.au-brand__body { margin-top: auto; max-width: 520px; position: relative; z-index: 1; }
.au-statement { color: var(--tb-on-strong); font-size: 44px; line-height: 1.08; font-weight: 700; letter-spacing: -.035em; text-wrap: balance; }
.au-sub { margin-top: 18px; font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, .78); max-width: 420px; }
.au-brand__foot { margin-top: 40px; font-size: 12.5px; color: rgba(255, 255, 255, .6); position: relative; z-index: 1; }

/* Product preview: an abstract outline of the dashboard, no figures */
.au-preview {
    margin-top: 48px; width: min(560px, 100%); padding: 24px; border-radius: 16px;
    background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .10);
    display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1;
}
.au-preview__line { display: block; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .16); }
.au-preview__line--lg { width: 62%; height: 14px; background: rgba(255, 255, 255, .28); }
.au-preview__line--md { width: 44%; }
.au-preview__panel { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .10); background: rgba(255, 255, 255, .03); }
.au-preview__col { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.au-preview__col + .au-preview__col { border-left: 1px solid rgba(255, 255, 255, .10); }
.au-preview__num { display: block; width: 46px; height: 22px; border-radius: 5px; background: rgba(255, 255, 255, .32); }
.au-preview__bar { display: flex; gap: 2px; height: 10px; margin-top: 4px; }
.au-preview__bar i { display: block; border-radius: 3px; }
.au-preview__bar i:first-child { background: rgba(74, 222, 128, .70); }
.au-preview__bar i:last-child { flex: 1; background: rgba(245, 181, 71, .45); }
.au-preview__row { display: block; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .10); }
.au-preview__row + .au-preview__row { width: 70%; }

/* Form side */
.au-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 32px 24px; }
.au-card { width: 100%; max-width: 380px; margin: auto 0; }
.au-logo--mobile { display: none; color: var(--tb-primary); margin-bottom: 40px; }
.au-logo--mobile .au-logo__tag { color: var(--tb-text-muted); opacity: 1; }
.au-title { font-size: 32px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.au-lead { margin-top: 8px; font-size: 15px; color: var(--tb-text-muted); }
.au-form { margin-top: 32px; display: flex; flex-direction: column; gap: 20px; }

.au-field { display: flex; flex-direction: column; gap: 8px; }
.au-label { font-size: 13px; font-weight: 600; color: var(--tb-text-strong); }
.au-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.au-link { font-size: 13px; font-weight: 600; }
.au-input {
    width: 100%; height: 48px; padding: 0 14px; border-radius: var(--tb-radius-control);
    border: 1px solid var(--tb-border-strong); background: var(--tb-surface);
    font: 400 15px var(--tb-font); color: var(--tb-text-strong);
    transition: border-color .15s, box-shadow .15s;
}
.au-input:hover { border-color: var(--tb-border-hover); }
.au-input:focus { outline: none; border-color: var(--tb-royal); box-shadow: 0 0 0 3px rgba(23, 105, 210, .16); }
.au-field.is-invalid .au-input { border-color: var(--tb-danger); }
.au-field.is-invalid .au-input:focus { box-shadow: 0 0 0 3px rgba(217, 45, 32, .14); }
.au-err { font-size: 13px; font-weight: 500; color: var(--tb-danger-ink); }

.au-pass { position: relative; }
.au-pass .au-input { padding-right: 72px; }
.au-pass__toggle {
    position: absolute; top: 4px; right: 4px; height: 40px; min-width: 60px; padding: 0 12px;
    border: 0; border-radius: 8px; background: transparent; cursor: pointer;
    font: 600 13px var(--tb-font); color: var(--tb-royal);
}
.au-pass__toggle:hover { background: var(--tb-ice-2); }

.au-submit { margin-top: 8px; width: 100%; min-height: 48px; font-size: 15px; position: relative; }
.au-spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #FFFFFF; animation: au-spin .7s linear infinite; }
.au-submit.is-loading { pointer-events: none; background: var(--tb-primary-hover); }
.au-submit.is-loading .au-spinner { display: inline-block; }
@keyframes au-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .au-spinner { animation-duration: 1.6s; } }

.au-alert { margin-top: 24px; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--tb-radius-control); background: var(--tb-danger-soft); color: var(--tb-danger-ink); font-size: 14px; font-weight: 500; }
.au-alert .ic { margin-top: 1px; }

.au-foot { margin-top: 32px; font-size: 12.5px; color: var(--tb-text-muted); }

/* Tablet: narrower brand side, preview hidden */
@media (max-width: 1100px) {
    .au { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .au-brand { padding: 36px 40px; }
    .au-statement { font-size: 36px; }
    .au-preview { display: none; }
}
/* Phone: the form only, with the logo above it */
@media (max-width: 760px) {
    .au { grid-template-columns: 1fr; }
    .au-brand { display: none; }
    .au-logo--mobile { display: flex; }
    .au-main { justify-content: flex-start; padding: 32px 20px 20px; }
    .au-card { margin: 0; }
    .au-foot { margin-top: auto; padding-top: 32px; }
}
