/* Ledgerly — sign-in screen */
:root {
    --a-ink: #0f172a; --a-muted: #64748b; --a-line: #e2e8f0;
    --a-brand: #0f766e; --a-brand-2: #14b8a6; --a-night: #0b1424;
    --a-danger: #dc2626;
}
* { box-sizing: border-box; }
body.auth { margin: 0; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--a-ink); background: #fff; -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
.auth-shell { display: flex; min-height: 100vh; }

/* ---------- Brand panel ---------- */
.auth-hero { position: sticky; top: 0; height: 100vh; min-height: 640px; overflow: hidden; flex: 0 0 52%; flex-direction: column; justify-content: space-between;
    padding: 2.75rem 3.5rem; color: #e2e8f0;
    background: radial-gradient(120% 90% at 0% 0%, #12304a 0%, var(--a-night) 55%) , var(--a-night); }
.auth-hero-grid { position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(148,163,184,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.07) 1px, transparent 1px);
    background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 40%, #000 25%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 25%, transparent 75%); }
.auth-hero-glow { position: absolute; width: 560px; height: 560px; right: -180px; bottom: -200px; border-radius: 50%;
    background: radial-gradient(circle, rgba(20,184,166,.35), rgba(20,184,166,0) 65%); filter: blur(10px); pointer-events: none; }
.auth-hero > :not(.auth-hero-grid):not(.auth-hero-glow) { position: relative; z-index: 1; }

.auth-brand { display: flex; align-items: center; gap: .65rem; font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; color: #fff; }
.auth-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #fff; font-weight: 800;
    background: linear-gradient(135deg, var(--a-brand-2), var(--a-brand)); box-shadow: 0 6px 20px rgba(20,184,166,.35), inset 0 1px 0 rgba(255,255,255,.25); }

.auth-hero-body { max-width: 520px; }
.auth-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 600; color: #5eead4; margin-bottom: 1rem; }
.auth-headline { font-size: clamp(2.2rem, 3.4vw, 3.1rem); line-height: 1.08; font-weight: 700; letter-spacing: -.035em; color: #fff; margin: 0 0 1.1rem; }
.auth-headline span { background: linear-gradient(90deg, #5eead4, #a7f3d0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-lede { color: #94a3b8; font-size: 1.02rem; line-height: 1.6; margin-bottom: 2.25rem; max-width: 440px; }

.auth-preview { border-radius: 18px; padding: 1.25rem 1.35rem 1.1rem; max-width: 420px;
    background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
    border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 60px -20px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transform: rotate(-1.2deg); }
.auth-preview-head { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: #94a3b8; }
.auth-pill { font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: .2rem .55rem; border-radius: 999px;
    color: #5eead4; background: rgba(45,212,191,.12); border: 1px solid rgba(45,212,191,.25); }
.auth-preview-value { font-size: .95rem; font-weight: 700; letter-spacing: -.03em; color: #94a3b8; margin: .35rem 0 .25rem; font-variant-numeric: tabular-nums; }
.auth-preview-value span { font-size: 1.85rem; color: #fff; margin-left: .2rem; }
.auth-spark { width: 100%; height: 64px; display: block; margin: .25rem 0 .75rem; }
.auth-preview-rows { display: flex; gap: 1.5rem; font-size: .8rem; color: #94a3b8; }
.auth-preview-rows strong { color: #e2e8f0; font-weight: 600; margin-left: .3rem; font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .4rem; }
.dot-in { background: #2dd4bf; } .dot-out { background: #f59e0b; }

.auth-features { list-style: none; padding: 0; margin: 2.25rem 0 0; display: grid; gap: .7rem; }
.auth-features li { display: flex; align-items: center; gap: .7rem; color: #cbd5e1; font-size: .92rem; }
.auth-features i { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: #5eead4;
    background: rgba(45,212,191,.1); border: 1px solid rgba(45,212,191,.18); font-size: .85rem; }
.auth-hero-foot { font-size: .78rem; color: #64748b; }

/* ---------- Form side ---------- */
.auth-main { flex: 1; display: grid; place-items: center; padding: 2.5rem 1.5rem;
    background: radial-gradient(80% 60% at 100% 0%, #f0fdfa 0%, #fff 60%); }
.auth-card { width: 100%; max-width: 400px; animation: authIn .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes authIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.auth-brand-mobile { color: var(--a-ink); margin-bottom: 2.5rem; }
.auth-title { font-size: 1.85rem; font-weight: 700; letter-spacing: -.03em; margin: 0 0 .35rem; }
.auth-sub { color: var(--a-muted); margin-bottom: 2rem; }

.auth-alert { display: flex; gap: .6rem; align-items: flex-start; padding: .8rem .95rem; border-radius: 12px; font-size: .9rem; margin-bottom: 1.4rem;
    color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; animation: authShake .35s ease; }
.auth-alert i { margin-top: .05rem; }
.auth-alert-ok { color: #065f46; background: #ecfdf5; border-color: #a7f3d0; animation: none; }
@keyframes authShake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.auth-field { margin-bottom: 1.15rem; }
.auth-field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .45rem; color: #334155; }
.auth-hint { font-size: .78rem; color: var(--a-muted); cursor: help; border-bottom: 1px dotted #cbd5e1; }
.auth-input { position: relative; display: flex; align-items: center; }
.auth-input > i { position: absolute; left: .95rem; color: #94a3b8; pointer-events: none; transition: color .15s; }
.auth-input input { width: 100%; height: 48px; padding: 0 2.9rem 0 2.6rem; font: inherit; font-size: .95rem; color: var(--a-ink);
    background: #fff; border: 1px solid var(--a-line); border-radius: 12px; outline: none;
    box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: border-color .15s, box-shadow .15s; }
.auth-input input::placeholder { color: #b6c0cd; }
.auth-input input:hover { border-color: #cbd5e1; }
.auth-input input:focus { border-color: var(--a-brand-2); box-shadow: 0 0 0 4px rgba(20,184,166,.15); }
.auth-input:focus-within > i { color: var(--a-brand); }
.auth-input input[aria-invalid="true"], .was-validated .auth-input input:invalid { border-color: #fca5a5; box-shadow: 0 0 0 4px rgba(220,38,38,.08); }
.auth-eye { position: absolute; right: .45rem; width: 36px; height: 36px; border: 0; border-radius: 9px; background: transparent; color: #94a3b8; }
.auth-eye:hover { background: #f1f5f9; color: var(--a-ink); }
.auth-eye:focus-visible { outline: 2px solid var(--a-brand-2); outline-offset: 1px; }
.auth-caps { margin-top: .45rem; font-size: .8rem; color: #b45309; }

.auth-check { display: flex; align-items: center; gap: .6rem; font-size: .88rem; color: #475569; cursor: pointer; margin: .4rem 0 1.6rem; user-select: none; }
.auth-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.auth-checkbox { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; border: 1px solid #cbd5e1; background: #fff; transition: all .15s; }
.auth-checkbox i { font-size: .95rem; color: #fff; opacity: 0; transform: scale(.6); transition: all .15s; }
.auth-check input:checked + .auth-checkbox { background: var(--a-brand); border-color: var(--a-brand); }
.auth-check input:checked + .auth-checkbox i { opacity: 1; transform: none; }
.auth-check input:focus-visible + .auth-checkbox { box-shadow: 0 0 0 4px rgba(20,184,166,.2); }

.auth-submit { position: relative; width: 100%; height: 50px; border: 0; border-radius: 12px; font: inherit; font-weight: 600; font-size: .98rem; color: #fff;
    background: linear-gradient(180deg, #14907f, var(--a-brand)); box-shadow: 0 10px 24px -8px rgba(15,118,110,.55), inset 0 1px 0 rgba(255,255,255,.18);
    transition: transform .15s, box-shadow .15s, filter .15s; }
.auth-submit:hover { filter: brightness(1.06); box-shadow: 0 14px 28px -8px rgba(15,118,110,.6), inset 0 1px 0 rgba(255,255,255,.18); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(20,184,166,.3); }
.auth-submit i { transition: transform .15s; margin-left: .25rem; }
.auth-submit:hover i { transform: translateX(3px); }
.auth-spinner { display: none; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: authSpin .7s linear infinite; }
.auth-submit.is-loading .auth-submit-label { visibility: hidden; }
.auth-submit.is-loading .auth-spinner { display: block; }
.auth-submit:disabled { cursor: progress; }
@keyframes authSpin { to { transform: rotate(360deg); } }

.auth-secure { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: 1.75rem; font-size: .78rem; color: #94a3b8; }

@media (prefers-reduced-motion: reduce) { .auth-card, .auth-alert { animation: none; } .auth-preview { transform: none; } }
/* Shorter laptop screens: keep everything in view */
@media (max-height: 860px) { .auth-features { display: none; } .auth-lede { margin-bottom: 1.6rem; } }
@media (max-height: 720px) { .auth-preview { display: none; } }
@media (max-width: 991.98px) { .auth-main { align-items: start; padding-top: 3rem; } }

/* Uploaded logo */
.auth-logo { display: inline-grid; place-items: center; }
.auth-logo img { max-height: 40px; max-width: 180px; object-fit: contain; }
.auth-logo-dark { padding: .4rem .7rem; border-radius: 12px; background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
