/* ============================================================
   Auth pages — sign in, awaiting approval
   ------------------------------------------------------------
   Standalone. These pages load outside the Filament shell, so
   they carry their own layer rather than depending on office.css
   plus four overrides. Prefixed .au-.
   ============================================================ */

:root {
    --au-ink:        #101828;
    --au-muted:      #667085;
    --au-faint:      #98a2b3;
    --au-surface:    #ffffff;
    --au-bg:         #f4f6f8;
    --au-border:     #e4e8ee;
    --au-border-2:   #d3dae2;
    --au-primary:    #0e9f6e;
    --au-primary-d:  #057a55;
    --au-danger:     #b42318;
    --au-danger-bg:  #fef3f2;
    --au-panel:      #0f172a;
    --au-radius:     18px;
    --au-ring:       0 0 0 4px rgba(14,159,110,.15);
    --au-shadow:     0 2px 4px rgba(16,24,40,.03),
                     0 20px 44px -12px rgba(16,24,40,.14);
}

@media (prefers-color-scheme: dark) {
    :root {
        --au-ink:      #f2f4f7;
        --au-muted:    #98a2b3;
        --au-faint:    #667085;
        --au-surface:  #151b24;
        --au-bg:       #0b0f16;
        --au-border:   #222a35;
        --au-border-2: #2d3746;
        --au-danger-bg:#3a1512;
        --au-shadow:   0 2px 4px rgba(0,0,0,.3), 0 20px 44px -12px rgba(0,0,0,.55);
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100dvh;
    background: var(--au-bg);
    color: var(--au-ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ---------- two-panel frame ---------- */
.au {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
}

/* Left: brand. Carries the dark navy from the app sidebar so the
   login page reads as the same product, not a bolted-on gate. */
.au-panel {
    position: relative;
    background:
        radial-gradient(120% 100% at 0% 0%, #16304a 0%, transparent 55%),
        radial-gradient(90% 90% at 100% 100%, #0b3b2c 0%, transparent 50%),
        var(--au-panel);
    color: #fff;
    padding: 56px 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.au-panel::after {
    content: '';
    position: absolute;
    right: -140px; bottom: -160px;
    width: 420px; height: 420px;
    border-radius: 50%;
    background: rgba(14,159,110,.14);
    filter: blur(8px);
}

.au-panel-top { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.au-panel-logo {
    width: 44px; height: 44px; border-radius: 12px;
    object-fit: contain; background: rgba(255,255,255,.08); padding: 5px;
}
.au-panel-name { font-size: 16px; font-weight: 750; letter-spacing: -.01em; }

.au-panel-mid { position: relative; z-index: 1; max-width: 440px; }
.au-panel-head {
    font-size: clamp(26px, 1.4rem + 1.1vw, 38px);
    font-weight: 750; line-height: 1.18; letter-spacing: -.03em;
    margin: 0 0 14px;
}
.au-panel-sub { font-size: 15px; line-height: 1.6; color: #9fb0c4; margin: 0 0 30px; }

.au-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 13px; }
.au-point { display: flex; align-items: flex-start; gap: 11px; font-size: 13.5px; color: #cbd5e1; }
.au-point-dot {
    flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px;
    border-radius: 999px; background: rgba(14,159,110,.20); color: #34d399;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800;
}

.au-panel-foot { position: relative; z-index: 1; font-size: 12px; color: #64748b; }

/* Right: the form. */
.au-form-side {
    display: flex; align-items: center; justify-content: center;
    padding: 40px 24px;
}
.au-box { width: 100%; max-width: 396px; }

.au-mobile-brand { display: none; text-align: center; margin-bottom: 26px; }
.au-mobile-brand img { width: 60px; height: 60px; object-fit: contain; margin-bottom: 10px; }
.au-mobile-brand h1 { font-size: 19px; font-weight: 750; margin: 0; letter-spacing: -.02em; }
.au-mobile-brand p  { font-size: 12.5px; color: var(--au-muted); margin: 3px 0 0; }

.au-title { font-size: 23px; font-weight: 750; letter-spacing: -.025em; margin: 0 0 5px; }
.au-lede  { font-size: 13.5px; color: var(--au-muted); margin: 0 0 26px; line-height: 1.5; }

.au-card {
    background: var(--au-surface);
    border: 1px solid var(--au-border);
    border-radius: var(--au-radius);
    box-shadow: var(--au-shadow);
    padding: 26px 24px;
}

/* ---------- fields ---------- */
.au-field { margin-bottom: 16px; }
.au-label {
    display: block; font-size: 12.5px; font-weight: 650;
    color: var(--au-ink); margin-bottom: 6px;
}

.au-input {
    width: 100%; font-size: 14px; padding: 11px 13px;
    border: 1px solid var(--au-border-2); border-radius: 11px;
    background: var(--au-surface); color: var(--au-ink);
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.au-input::placeholder { color: var(--au-faint); }
.au-input:focus { outline: none; border-color: var(--au-primary); box-shadow: var(--au-ring); }
.au-input.is-bad { border-color: var(--au-danger); box-shadow: 0 0 0 4px rgba(180,35,24,.10); }

/* Password field with a reveal control sitting inside it. */
.au-pw { position: relative; }
.au-pw .au-input { padding-right: 46px; }
.au-reveal {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    border: 0; background: transparent; cursor: pointer;
    padding: 7px 9px; border-radius: 8px; font-size: 15px; line-height: 1;
    color: var(--au-muted);
}
.au-reveal:hover { background: var(--au-bg); }

.au-help { font-size: 11.5px; color: var(--au-faint); margin: 6px 0 0; line-height: 1.45; }

.au-check {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--au-ink); margin-bottom: 20px; cursor: pointer;
}
.au-check input { width: 15px; height: 15px; accent-color: var(--au-primary); cursor: pointer; }

/* ---------- alert ---------- */
.au-alert {
    display: flex; gap: 9px; align-items: flex-start;
    background: var(--au-danger-bg);
    border: 1px solid rgba(180,35,24,.22);
    color: var(--au-danger);
    border-radius: 11px; padding: 11px 13px; margin-bottom: 18px;
    font-size: 12.5px; font-weight: 550; line-height: 1.45;
}
.au-alert-mark { flex-shrink: 0; font-weight: 800; }

/* ---------- button ---------- */
.au-btn {
    width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 14.5px; font-weight: 650; font-family: inherit;
    padding: 13px 18px; min-height: 48px;
    border: 0; border-radius: 12px; cursor: pointer;
    background: var(--au-primary); color: #fff;
    box-shadow: 0 1px 2px rgba(16,24,40,.12);
    transition: background .15s, transform .1s, opacity .15s;
}
.au-btn:hover:not(:disabled)  { background: var(--au-primary-d); }
.au-btn:active:not(:disabled) { transform: translateY(1px); }
.au-btn:focus-visible { outline: none; box-shadow: var(--au-ring); }
.au-btn:disabled { opacity: .7; cursor: progress; }

.au-spin {
    width: 15px; height: 15px; border-radius: 999px;
    border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
    animation: au-spin .7s linear infinite;
}
@keyframes au-spin { to { transform: rotate(360deg); } }

/* ---------- links ---------- */
.au-links {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-top: 18px; flex-wrap: wrap;
}
.au-link {
    font-size: 12.5px; color: var(--au-muted); text-decoration: none;
    border-bottom: 1px solid transparent; padding-bottom: 1px;
}
.au-link:hover { color: var(--au-primary-d); border-bottom-color: currentColor; }

.au-foot {
    text-align: center; font-size: 11.5px; color: var(--au-faint);
    margin: 20px 0 0; line-height: 1.55;
}

/* ---------- pending / message page ---------- */
.au-note {
    background: var(--au-surface); border: 1px solid var(--au-border);
    border-radius: var(--au-radius); box-shadow: var(--au-shadow);
    padding: 32px 26px; text-align: center;
}
.au-note-icon { font-size: 34px; margin-bottom: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .au { grid-template-columns: 1fr; }
    .au-panel { display: none; }
    .au-mobile-brand { display: block; }
    .au-form-side { padding: 32px 20px; align-items: flex-start; }
    .au-box { margin-top: 8px; }
}

@media (max-width: 420px) {
    .au-card { padding: 22px 18px; border-radius: 14px; }
    .au-title { font-size: 21px; }
}

@supports (padding: max(0px)) {
    .au-form-side { padding-bottom: max(40px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}
