/* CAP Net Manager: sign-in, activation, password and status pages.
   Same tokens as style.css, without Bootstrap. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --bg: #edf0f4; --surface: #fff; --surface2: #f5f7fa; --line: #dce2ea; --line-strong: #c3ccd8;
    --ink: #0f1b2d; --ink-2: #46566c; --ink-3: #718097;
    --navy: #0b1f45; --navy-ink: #c9d5ea;
    --blue: #1f4e9e; --blue-hover: #173f84; --focus: rgba(31,78,158,.28);
    --magenta: #a3206e; --ok: #1d7a4c; --ok-soft: #e2f3e9; --bad: #b42318; --bad-soft: #fbe9e7;
    --warn: #92560a; --warn-soft: #fcf0da; --warn-line: #e0a23a;
    --font-body: 'Public Sans', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
    --font-mono: 'B612 Mono', 'SFMono-Regular', Consolas, monospace;
    color-scheme: light;
}
[data-theme="dark"] {
    --bg: #0a111d; --surface: #111a29; --surface2: #162133; --line: #243149; --line-strong: #34445f;
    --ink: #e4eaf3; --ink-2: #a6b3c7; --ink-3: #7a8aa2;
    --navy: #070d19; --navy-ink: #aebcd6;
    --blue: #6b98f0; --blue-hover: #8aaef4; --focus: rgba(107,152,240,.38);
    --magenta: #e56bb3; --ok: #4cc38a; --ok-soft: #11301f; --bad: #f27a6f; --bad-soft: #3a1714;
    --warn: #f0b04a; --warn-soft: #35260c; --warn-line: #b7801f;
    color-scheme: dark;
}
html, body { min-height: 100%; }
body {
    background: var(--bg); color: var(--ink);
    font-family: var(--font-body); font-size: 15px; line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.mono { font-family: var(--font-mono); }

/* Split layout (sign-in) */
.auth-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-panel {
    position: relative; overflow: hidden; isolation: isolate;
    background: var(--navy); color: #fff;
    padding: 40px 48px;
    display: flex; flex-direction: column;
}
.auth-panel .rose { position: absolute; z-index: -1; width: 720px; height: 720px; right: -260px; bottom: -220px; color: #e56bb3; opacity: .3; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 16px; }
.auth-brand img { width: 44px; height: 44px; border-radius: 11px; background: #fff; object-fit: cover; }
.auth-panel h1 { margin-top: auto; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -.025em; max-width: 14ch; }
.auth-panel p.lede { margin-top: 14px; color: var(--navy-ink); font-size: 16px; max-width: 42ch; }
.auth-clock { margin-top: 32px; display: flex; gap: 28px; }
.auth-clock dt { font-size: 12.5px; color: var(--navy-ink); font-weight: 600; }
.auth-clock dd { font-family: var(--font-mono); font-size: 26px; line-height: 1.2; }
.auth-clock .z dd { color: #f39ccb; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
@media (max-width: 860px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-panel { padding: 24px 22px 26px; }
    .auth-panel h1 { margin-top: 26px; font-size: 28px; }
    .auth-panel .rose { width: 420px; height: 420px; right: -170px; bottom: -190px; }
    .auth-clock { margin-top: 18px; }
    .auth-clock dd { font-size: 20px; }
    .auth-main { padding: 28px 18px 40px; align-items: flex-start; }
}

/* Centered layout (other pages) */
.auth-center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 18px; }

.auth-card { width: 100%; max-width: 420px; }
.auth-card.is-boxed { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.auth-card .logo-sm { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; background: #fff; border: 1px solid var(--line); margin-bottom: 18px; }
.auth-card h2 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.auth-card .sub { color: var(--ink-2); margin: 6px 0 22px; }

.id-line {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 10px 14px; margin-bottom: 18px;
    border-radius: 8px; background: var(--surface2); border: 1px solid var(--line);
}
.id-line .lbl { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.id-line .val { font-family: var(--font-mono); font-size: 16px; font-weight: 700; }

.field { margin-bottom: 16px; }
label, .label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
input[type=text], input[type=password], input[type=email] {
    display: block; width: 100%;
    min-height: 44px; padding: 10px 13px;
    font-family: var(--font-body); font-size: 16px;
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: 8px;
    outline: none; -webkit-appearance: none;
    transition: border-color .12s, box-shadow .12s;
}
input.callsign, input.callsign-input { font-family: var(--font-mono); text-transform: uppercase; }
input::placeholder { color: var(--ink-3); text-transform: none; font-family: var(--font-body); }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--focus); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label-row a { font-size: 13.5px; }

.btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; min-height: 46px; padding: 10px 16px; margin-top: 6px;
    font-family: var(--font-body); font-size: 15.5px; font-weight: 600;
    background: var(--blue); color: #fff;
    border: none; border-radius: 8px; cursor: pointer;
    transition: background-color .12s;
}
[data-theme="dark"] .btn { color: #06101f; }
.btn:hover { background: var(--blue-hover); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.is-inline { display: inline-flex; width: auto; }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--surface2); }

.msg { display: flex; gap: 10px; padding: 11px 14px; border-radius: 10px; font-size: 14.5px; margin-bottom: 16px; line-height: 1.5; }
.msg.is-error { background: var(--bad-soft); color: var(--ink); border: 1px solid rgba(180,35,24,.25); }
.msg.is-error::before { content: '!'; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--bad); color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.msg.is-ok { background: var(--ok-soft); border: 1px solid rgba(29,122,76,.25); }
.msg.is-ok::before { content: '✓'; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #fff; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.msg.is-warn { background: var(--warn-soft); border: 1px solid var(--warn-line); }

.strength { height: 5px; background: var(--line); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.strength > div { height: 100%; width: 0; border-radius: 3px; transition: width .2s, background-color .2s; }
.checks { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 13.5px; color: var(--ink-3); }
.checks li::before { content: '○'; margin-right: 6px; }
.checks li.ok { color: var(--ok); }
.checks li.ok::before { content: '✓'; }
.hint { font-size: 13px; color: var(--ink-3); margin-top: 6px; min-height: 1.2em; }

.foot-links { margin-top: 20px; font-size: 14px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fine { margin-top: 26px; font-size: 12.5px; color: var(--ink-3); }

.theme-btn {
    position: fixed; top: 14px; right: 14px; z-index: 10;
    width: 38px; height: 38px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-strong);
    cursor: pointer; font-size: 16px;
}
.theme-btn:hover { color: var(--ink); }
.status-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 16px; }
.status-icon.is-warn { background: var(--warn-soft); color: var(--warn); }
.status-icon.is-bad { background: var(--bad-soft); color: var(--bad); }
.status-icon.is-ok { background: var(--ok-soft); color: var(--ok); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
