:root {
    --navy: #10182b;
    --navy-2: #17233d;
    --blue: #3157d5;
    --blue-dark: #2443aa;
    --cyan: #0da7c2;
    --green: #168a5b;
    --amber: #c47a12;
    --red: #d33f49;
    --ink: #172033;
    --muted: #6c778d;
    --line: #dce2ec;
    --surface: #fff;
    --canvas: #f3f5f9;
    --shadow: 0 12px 34px rgba(24, 38, 68, .08);
    --radius: 14px;
}
* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--canvas); }
body { margin: 0; min-height: 100vh; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { min-height: 72px; display: flex; align-items: center; gap: 28px; padding: 0 32px; color: #fff; background: var(--navy); box-shadow: 0 5px 24px rgba(7, 15, 34, .2); }
.brand { color: #fff; display: flex; align-items: center; gap: 12px; min-width: 230px; }
.brand:hover { text-decoration: none; }
.brand span:last-child { display: flex; flex-direction: column; }
.brand small, .account small { color: #9eabc4; font-size: 11px; font-weight: 500; }
.brand-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(145deg, #5279f4, #2643ac); font-weight: 900; letter-spacing: -.06em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.brand-mark.large { width: 58px; height: 58px; font-size: 20px; border-radius: 16px; }
.nav { display: flex; align-items: center; gap: 6px; flex: 1; }
.nav a { color: #cbd4e6; padding: 11px 10px; border-radius: 8px; font-size: 14px; font-weight: 650; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.07); text-decoration: none; }
.account { display: flex; align-items: center; gap: 10px; }
.account-link { color: #fff; display: flex; align-items: center; gap: 9px; }
.account-link > span:last-child { display: flex; flex-direction: column; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #2b3958; font-weight: 800; }
.icon-button { border: 0; width: 36px; height: 36px; color: #fff; background: #2a3856; border-radius: 9px; cursor: pointer; font-size: 17px; }
.icon-button:hover { background: var(--red); }
.node-strip { min-height: 32px; display: flex; justify-content: center; align-items: center; gap: 8px; color: #dbe2f1; background: var(--navy-2); font-size: 11px; letter-spacing: .08em; font-weight: 800; }
.node-strip.mirror { background: #174865; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #33d48d; box-shadow: 0 0 0 4px rgba(51,212,141,.13); }
.container { width: min(1480px, calc(100% - 48px)); margin: 34px auto 70px; }
.page-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 24px; }
.page-head h1 { margin: 4px 0 6px; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.04em; }
.page-head p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--blue); font-size: 11px; font-weight: 850; letter-spacing: .14em; margin: 0 0 6px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat { display: flex; align-items: center; gap: 15px; padding: 21px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; font-size: 22px; font-weight: 900; }
.stat-icon.blue { color: #3157d5; background: #eaf0ff; }.stat-icon.cyan { color: #0789a0; background: #e3f8fb; }
.stat-icon.green { color: #168a5b; background: #e4f7ef; }.stat-icon.amber { color: #a86308; background: #fff1d9; }
.stat div { display: flex; flex-direction: column; }.stat strong { font-size: 27px; line-height: 1; }.stat small { color: var(--muted); margin-top: 6px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-head, .form-panel { padding: 22px 24px; }.panel h2, .panel-head h2 { margin: 0 0 5px; font-size: 19px; }.panel p, .panel-head p { color: var(--muted); margin: 0; font-size: 14px; line-height: 1.55; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 365px; gap: 20px; align-items: start; }
.form-panel { position: sticky; top: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { color: #566079; background: #f8f9fc; text-align: left; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
th, td { padding: 14px 16px; border-top: 1px solid #e8ecf3; vertical-align: middle; }
tbody tr:hover { background: #fbfcff; }
.row-sub { display: block; color: var(--muted); margin-top: 4px; max-width: 420px; }
.empty { color: var(--muted); text-align: center; padding: 34px; }
.badge { display: inline-flex; align-items: center; white-space: nowrap; padding: 5px 8px; border-radius: 999px; background: #eef1f6; color: #566078; font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.badge.active, .badge.success, .badge.delivered { color: #08754a; background: #ddf6eb; }
.badge.revoked, .badge.critical, .badge.failed { color: #ad2630; background: #fde6e8; }
.badge.superseded, .badge.warning, .badge.retired { color: #97600d; background: #fff0d6; }
.badge.info, .badge.public_only { color: #2851ba; background: #e5edff; }
.badge.neutral { color: #59647b; background: #edf0f5; }
.stack { display: grid; gap: 15px; margin-top: 22px; }
label { display: grid; gap: 6px; color: #3a455c; font-size: 12px; font-weight: 750; }
label small { color: var(--muted); font-weight: 500; }
input, textarea, select { width: 100%; border: 1px solid #cbd3e1; background: #fff; color: var(--ink); border-radius: 9px; padding: 10px 11px; font: inherit; font-size: 14px; outline: none; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: #5878da; box-shadow: 0 0 0 3px rgba(49,87,213,.12); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 0; border-radius: 9px; padding: 11px 15px; cursor: pointer; font-weight: 800; font-size: 13px; }
.button:hover { text-decoration: none; transform: translateY(-1px); }
.button.primary { color: #fff; background: var(--blue); box-shadow: 0 7px 16px rgba(49,87,213,.22); }.button.primary:hover { background: var(--blue-dark); }
.button.light { color: var(--blue); background: #eef3ff; }.button.danger { color: #fff; background: var(--red); }.button.small { padding: 8px 10px; }.button.full { width: 100%; }
.inline-form { display: flex; min-width: 260px; gap: 7px; }
.credential-box { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 18px; align-items: center; padding: 22px; margin-bottom: 20px; border: 1px solid #8da5ec; background: #edf2ff; border-radius: var(--radius); }
.credential-box h2 { margin: 3px 0; }.credential-box textarea { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; background: #10182b; color: #dce5fb; }
.narrow { max-width: 720px; padding: 28px; margin: 0 auto; }
.success-state { display: flex; gap: 16px; align-items: center; }.success-state > span { display: grid; place-items: center; width: 48px; height: 48px; background: #ddf6eb; color: var(--green); border-radius: 50%; font-size: 24px; font-weight: 900; }
.steps { color: var(--muted); line-height: 1.7; }.secret { display: inline-block; padding: 6px 8px; background: #eff2f7; color: var(--ink); font-size: 15px; letter-spacing: .1em; }
.wrap { overflow-wrap: anywhere; }.top-gap { margin-top: 24px; }
.security-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.security-panel { overflow: visible; }
.security-form { padding: 0 24px 24px; margin-top: 0; }
.security-form > .stack:first-child { margin-top: 0; }
.totp-setup { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: center; margin-top: 20px; }
.qr-card { display: grid; justify-items: center; gap: 10px; padding: 10px; background: #f7f9fc; border: 1px solid var(--line); border-radius: 12px; }
.qr-card img { display: block; width: 240px; height: 240px; max-width: 100%; background: #fff; border-radius: 8px; }
.manual-key { min-width: 0; display: grid; gap: 12px; align-content: center; }
.manual-key .secret { overflow-wrap: anywhere; letter-spacing: .08em; }
.manual-key details code { display: block; margin-top: 8px; font-size: 11px; }
.two-factor-intro { display: flex; gap: 16px; align-items: center; padding: 18px; background: #eef3ff; border: 1px solid #d6e0ff; border-radius: 12px; }
.two-factor-intro > span { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; color: #fff; background: var(--blue); border-radius: 50%; font-weight: 900; }
.two-factor-intro h2 { margin: 0 0 5px; }
.danger-zone { padding: 14px; border: 1px solid #f0c5c9; background: #fff8f8; border-radius: 10px; }
.danger-zone summary { color: #a5252e; cursor: pointer; font-weight: 800; }
.danger-zone p { margin-top: 10px; }
.compact-form { padding-top: 18px; border-top: 1px solid var(--line); }
.integrity { padding: 10px 14px; border-radius: 10px; font-size: 13px; font-weight: 800; }.integrity.ok { color: #08754a; background: #ddf6eb; }.integrity.bad { color: #ad2630; background: #fde6e8; }
.info-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 20px; }.info-grid .panel { padding: 25px; }.big-mode { display: inline-block; margin: 18px 0 9px; padding: 8px 12px; border-radius: 8px; background: var(--navy); color: #fff; font-weight: 900; letter-spacing: .1em; }
dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px; font-size: 13px; } dt { color: var(--muted); } dd { margin: 0; }
.key-card { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; padding: 15px 0; border-top: 1px solid var(--line); }.key-card code { grid-column: 1/-1; overflow-wrap: anywhere; color: var(--muted); }.key-card small { color: var(--muted); }
.login-page { display: grid; place-items: center; padding: 28px; color: #fff; background: radial-gradient(circle at 10% 10%, #263b70 0, transparent 38%), linear-gradient(135deg, #0c1427, #17284d); }
.login-shell { width: min(980px, 100%); display: grid; grid-template-columns: 1.1fr .8fr; gap: 70px; align-items: center; }
.login-intro h1 { max-width: 600px; margin: 12px 0 18px; font-size: clamp(38px, 5vw, 62px); line-height: 1; letter-spacing: -.055em; }.login-intro > p:not(.eyebrow) { max-width: 580px; color: #b8c5dd; font-size: 17px; line-height: 1.6; }
.trust-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 25px; }.trust-list span { padding: 7px 10px; color: #cdd8ec; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.09); border-radius: 8px; font-size: 12px; }
.login-card { color: var(--ink); background: rgba(255,255,255,.98); border: 1px solid rgba(255,255,255,.4); border-radius: 20px; padding: 34px; box-shadow: 0 30px 70px rgba(0,0,0,.28); }.login-card h2 { margin: 2px 0 7px; font-size: 29px; }.muted { color: var(--muted); }.node-label { color: var(--muted); text-align: center; font-size: 11px; margin: 18px 0 0; }
.alert { padding: 11px 13px; margin: 18px 0 0; border-radius: 9px; font-size: 13px; }.page-head + .alert { margin: 0 0 18px; }.alert.error { color: #a5252e; background: #fde7e9; border: 1px solid #f7c7cb; }.alert.success { color: #08754a; background: #ddf6eb; border: 1px solid #bce8d5; }
.error-page { text-align: center; }.error-symbol { display: grid; place-items: center; width: 55px; height: 55px; margin: 0 auto 15px; border-radius: 50%; color: #fff; background: var(--red); font-size: 30px; font-weight: 900; }
footer { display: flex; justify-content: space-between; width: min(1480px, calc(100% - 48px)); margin: 0 auto 28px; color: #8b94a6; font-size: 11px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (max-width: 1100px) {
    .topbar { flex-wrap: wrap; padding: 14px 20px; }.nav { order: 3; flex-basis: 100%; overflow-x: auto; }.stats-grid { grid-template-columns: repeat(2, 1fr); }.split { grid-template-columns: 1fr; }.form-panel { position: static; }.credential-box { grid-template-columns: 1fr; }.info-grid, .security-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .container { width: min(100% - 24px, 1480px); margin-top: 22px; }.topbar { gap: 12px; }.brand { min-width: 0; flex: 1; }.account-link > span:last-child { display: none; }.nav a { padding: 8px; font-size: 12px; }.stats-grid { grid-template-columns: 1fr; }.page-head { align-items: start; flex-direction: column; }.form-grid, .totp-setup { grid-template-columns: 1fr; }.login-shell { grid-template-columns: 1fr; gap: 30px; }.login-intro h1 { font-size: 40px; }.login-page { display: block; }.inline-form { min-width: 220px; }.node-strip { padding: 7px 12px; text-align: center; }
}
