/* ═══ Shared Auth Page Styles ═══════════════════════════════ */
:root {
    --bg:         #F7F6F3;
    --card:       #FFFFFF;
    --ink:        #18181B;
    --ink-soft:   #3F3F46;
    --muted:      #71717A;
    --muted-soft: #A1A1AA;
    --line:       #E5E4E0;
    --line-lit:   #D4D4D0;
    --accent:     #2563EB;
    --success:    #16A34A;
    --success-bg: #F0FDF4;
    --success-ln: #86EFAC;
    --err:        #B91C1C;
    --err-bg:     #FEF2F2;
    --err-line:   #FCA5A5;
    --fnt:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    min-height: 100%;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--fnt);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.stage {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px 60px;
}

/* Hero banner */
.hero {
    width: 100%;
    max-width: 820px;
    margin: 32px 0 -48px;
    background: linear-gradient(135deg, #0d1f3c 0%, #162d52 60%, #1a3a6b 100%);
    border-radius: 16px;
    padding: 44px 40px 72px;
    color: #fff;
    text-align: center;
    box-shadow: 0 10px 40px rgba(13,31,60,.25);
    animation: rise .4s cubic-bezier(.2,.8,.2,1);
}
.hero-wordmark {
    font-weight: 700;
    font-size: clamp(38px, 6vw, 56px);
    letter-spacing: .14em;
    line-height: 1;
}
.hero-accent {
    height: 3px;
    width: 120px;
    margin: 14px auto 12px;
    background: linear-gradient(90deg, #1a7fe8, #00d4ff);
    border-radius: 2px;
}
.hero-tag {
    font-size: 13px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255,255,255,.7);
}

.card {
    width: 100%;
    max-width: 440px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 36px 36px 28px;
    box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 4px 12px rgba(0,0,0,.03);
    animation: rise .35s cubic-bezier(.2,.8,.2,1);
    position: relative;
    z-index: 2;
}
.card h1 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -.015em;
    margin-bottom: 6px;
}
.card .sub {
    color: var(--muted);
    margin-bottom: 28px;
    font-size: 14px;
}

.errorbox, .successbox, .infobox {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 22px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid;
}
.errorbox   { background: var(--err-bg);     color: var(--err);     border-color: var(--err-line); }
.successbox { background: var(--success-bg); color: var(--success); border-color: var(--success-ln); }
.infobox    { background: #EFF6FF;           color: #1E40AF;        border-color: #BFDBFE; }
.errorbox svg, .successbox svg, .infobox svg { flex-shrink: 0; margin-top: 1px; }
.errorbox ul, .successbox ul { list-style: none; font-weight: 500; }
.errorbox li + li, .successbox li + li { margin-top: 3px; }

.field { margin-bottom: 16px; }
.field-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}
.field label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
}
.field-aside a {
    font-size: 12px;
    color: var(--muted);
    text-decoration: none;
    transition: color .15s;
}
.field-aside a:hover {
    color: var(--accent);
    text-decoration: underline;
}
.field input[type=text],
.field input[type=email],
.field input[type=password] {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--line-lit);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    padding: 10px 12px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.field input:hover { border-color: var(--muted-soft); }
.field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.field input::placeholder { color: var(--muted-soft); }

.val-err {
    display: block;
    font-size: 12px;
    color: var(--err);
    margin-top: 5px;
}
.val-err:empty { display: none; }

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    margin: 18px 0 24px;
    font-size: 13px;
    color: var(--ink-soft);
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
    width: 16px; height: 16px;
    border: 1.5px solid var(--line-lit);
    background: var(--card);
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
    transition: border-color .15s, background .15s;
}
.check:hover .box { border-color: var(--muted); }
.check input:checked + .box {
    background: var(--ink);
    border-color: var(--ink);
}
.check input:checked + .box::after {
    content: '';
    position: absolute;
    left: 4px; top: 1px;
    width: 5px; height: 9px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.submit {
    display: block;
    width: 100%;
    padding: 11px 18px;
    background: var(--ink);
    color: #fff;
    border: 1px solid var(--ink);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, transform .08s;
}
.submit:hover { background: #000; }
.submit:active { transform: translateY(1px); }
.submit.secondary {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-lit);
}
.submit.secondary:hover {
    background: var(--bg);
    border-color: var(--muted-soft);
}

.backlink {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
}
.backlink a {
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: 500;
    transition: color .15s;
}
.backlink a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.fineprint {
    margin-top: 24px;
    font-size: 11px;
    color: var(--muted-soft);
    text-align: center;
}

/* Dilbert strip of the day */
.dilbert-card {
    width: 100%;
    max-width: 820px;
    margin-top: 28px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 16px 20px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 4px 12px rgba(0,0,0,.03);
    animation: rise .5s cubic-bezier(.2,.8,.2,1) .1s both;
}
.dilbert-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}
.dilbert-card img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

/* Status icon in center (for Register disabled / Lockout / AccessDenied) */
.status-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.status-icon .circle {
    width: 64px; height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--err-bg);
    color: var(--err);
}
.status-icon .circle.info    { background: #EFF6FF; color: #1E40AF; }
.status-icon .circle.success { background: var(--success-bg); color: var(--success); }
.status-icon .circle svg { width: 32px; height: 32px; }

.card.text-center h1,
.card.text-center .sub {
    text-align: center;
}
.card.text-center { padding: 40px 36px 32px; }

@keyframes rise {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

@media (max-width: 500px) {
    .card { padding: 28px 22px 22px; }
}
