:root { --bg: #020617; --card: #0f172a; --border: #1e293b; --accent: #38bdf8; --danger: #ef4444; --success: #10b981; --warning: #f59e0b; --brand: #1e8dc0; }
* { box-sizing: border-box; }
body { background: var(--bg); color: #f8fafc; font-family: 'Segoe UI', Inter, system-ui, sans-serif; margin: 0; padding: 25px; }
.muted { color: #475569; font-size: 12px; }
small { font-size: 10px; color: #475569; }

/* Sign-in */
body.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.login-card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 2px solid var(--brand); }
.brand-name { color: var(--brand); font-weight: 600; font-size: 14px; }
.brand-title { font-size: 22px; font-weight: 700; color: #e2e8f0; }
.login-card label { display: block; font-size: 12px; color: #94a3b8; margin-bottom: 14px; }
.login-card input { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; background: #020617; border: 1px solid #334155; border-radius: 8px; color: #f8fafc; font-size: 14px; }
.login-card input:focus { outline: none; border-color: var(--accent); }
.login-card .code-input { font-family: Consolas, monospace; font-size: 20px; letter-spacing: 4px; width: 160px; }
.login-card button { width: 100%; margin-top: 6px; padding: 11px; background: #0b5c8e; color: #fff; border: none; border-radius: 8px; font-weight: 700; font-size: 14px; cursor: pointer; }
.login-card button:hover { background: #0d6ea9; }
.login-error { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.4); color: #fecaca; padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.login-foot { margin-top: 16px; font-size: 11px; color: #475569; text-align: center; }

/* Emergency banner */
#emergency-banner { display: none; position: static; margin: -25px -25px 20px; background: var(--danger); color: #fff; text-align: center; padding: 15px; font-size: 18px; font-weight: 900; letter-spacing: 1px; z-index: 9999; box-shadow: 0 4px 20px rgba(239,68,68,.6); animation: siren 1s infinite; }
@keyframes siren { 0% { background: #ef4444; } 50% { background: #7f1d1d; } 100% { background: #ef4444; } }

/* Header */
.header-bar { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 25px; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.header-left { display: flex; align-items: center; gap: 14px; }
.header-left h1 { margin: 0; font-size: 20px; }
.header-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sub { font-size: 12px; color: #64748b; margin-top: 5px; }
#link-status { font-size: 12px; margin-top: 4px; }
.status-ok { color: #64748b; }
.status-bad { color: var(--danger); font-weight: 700; }
body.stale #monitor-body { opacity: .45; filter: grayscale(.6); transition: opacity .3s; }
.user-box { display: inline-flex; align-items: center; gap: 8px; color: #94a3b8; font-size: 13px; margin-left: 6px; padding-left: 12px; border-left: 1px solid var(--border); }

.btn { border: none; padding: 10px 16px; border-radius: 6px; cursor: pointer; font-weight: 700; color: #fff; }
.btn-warn { background: var(--warning); color: #000; }
.btn-ok { background: var(--success); }
.btn-danger { background: var(--danger); }
.btn-small { background: #1e293b; color: #e2e8f0; border: 1px solid #334155; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 11px; font-weight: 600; }
.btn-small:hover { border-color: var(--accent); }
.btn-small.danger:hover { border-color: var(--danger); color: #fecaca; }

/* Cards */
.dashboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 25px; }
.stat-card { background: var(--card); padding: 20px; border-radius: 12px; border: 1px solid var(--border); min-height: 100px; transition: .3s; }
.stat-card:hover { border-color: var(--accent); }
.stat-label { color: #94a3b8; font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; margin-bottom: 10px; display: block; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--accent); }
.stat-value.warn { font-size: 18px; color: var(--warning); }
.card-sub { font-size: 11px; color: #64748b; margin-top: 10px; }
.num-danger { color: var(--danger); font-weight: bold; font-size: 14px; }
.num-ok { color: var(--success); font-weight: bold; font-size: 14px; }
.defenses { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.defenses > div { display: flex; justify-content: space-between; font-size: 13px; font-weight: bold; }
.defenses i { color: #64748b; margin-right: 5px; }
.user-tag { color: var(--accent); font-weight: bold; font-size: 13px; display: block; margin-bottom: 4px; }
.sys-users { border-top: 1px solid #1e293b; margin-top: 8px; padding-top: 8px; font-size: 11px; color: var(--success); }

.panel { background: var(--card); border-radius: 12px; border: 1px solid var(--border); overflow: hidden; margin-bottom: 25px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
th { background: #1e293b; color: #94a3b8; padding: 12px 15px; text-transform: uppercase; font-size: 10px; }
td { padding: 10px 15px; border-bottom: 1px solid #1e293b; font-family: monospace; }
.w60 { width: 60px; } .w100 { width: 100px; } .w180 { width: 180px; }

.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.mt25 { margin-top: 25px; }
.box-terminal { background: #000; padding: 15px; font-family: Consolas, monospace; font-size: 11px; overflow: auto; border: 1px solid var(--border); line-height: 1.4; border-radius: 6px; height: 200px; white-space: pre-wrap; word-break: break-word; }
#terminal { color: var(--success); }
#mem-box { color: var(--accent); white-space: pre; }
#terminal { white-space: pre; }
#error-ticker { color: var(--warning); }
#audit-box { color: var(--success); white-space: normal; }
#traffic-box { color: var(--danger); white-space: normal; }
#slow-query-box, #ssh-box, #web-box { white-space: normal; }
.audit-entry, .attack-line, .slow-line { margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px dotted #1e293b; }
.audit-entry { display: flex; justify-content: space-between; }
.map-link { color: var(--accent); text-decoration: none; font-size: 9px; }
.map-link:hover { text-decoration: underline; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: .3; } 100% { opacity: 1; } }
.blink { animation: pulse 2s infinite; }
.glow-recent { color: #fff !important; text-shadow: 0 0 8px var(--accent), 0 0 12px var(--accent); font-weight: 800; }
.t-time { color: #64748b; font-size: 10px; } .t-user { color: var(--warning); font-weight: bold; } .t-sep { color: #475569; }
.t-ip { color: var(--danger); } .t-geo { color: #94a3b8; font-size: 10px; } .t-db { color: var(--accent); } .t-sql { color: #cbd5e1; font-size: 10px; }
.light-on { color: var(--success); } .light-off { color: var(--danger); }

/* MySQL access panel */
.access-wrap { padding: 14px 16px; }
.access-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dotted #1e293b; font-size: 13px; }
.access-row:last-child { border-bottom: none; }
.access-ip { font-family: monospace; font-size: 14px; color: var(--accent); }
.access-row .access-ip { min-width: 150px; }
.access-note { color: #64748b; font-size: 11px; flex: 1; }
.access-you { color: var(--success); font-weight: 700; }
.access-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12px; color: #94a3b8; }
.access-foot input { background: #020617; border: 1px solid #334155; color: #e2e8f0; border-radius: 6px; padding: 6px 8px; font-family: monospace; width: 150px; }
.push-right { margin-left: auto; }
.access-help { color: #64748b; font-size: 11px; margin-top: 10px; line-height: 1.5; }
.footer { text-align: center; color: #334155; font-size: 11px; margin-top: 30px; }

@media (max-width: 700px) { body { padding: 12px; } .push-right { margin-left: 0; } #emergency-banner { margin: -12px -12px 16px; } }

/* --- Users / My account / setup pages --- */
.nav-link { color: #cbd5e1; text-decoration: none; font-size: 13px; font-weight: 600; padding: 8px 10px; border-radius: 6px; border: 1px solid transparent; }
.nav-link:hover, .nav-link.active { border-color: #334155; background: #0f172a; color: #fff; }
.viewer-note { color: #94a3b8; font-size: 12px; border: 1px solid #334155; padding: 6px 10px; border-radius: 6px; }
.inline-form { display: inline; margin: 0; }
.page { max-width: 1100px; margin: 0 auto; }
.page.narrow { max-width: 620px; }
.page .panel { padding: 18px 20px; }
.panel-title { font-weight: 700; font-size: 14px; margin-bottom: 12px; color: #e2e8f0; }
.panel-title i { color: var(--accent); margin-right: 6px; }
.panel p { color: #94a3b8; font-size: 13px; line-height: 1.5; margin: 0 0 10px; }
.count { background: #1e293b; color: #94a3b8; font-size: 11px; padding: 2px 8px; border-radius: 10px; margin-left: 6px; }
.flash { padding: 12px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.flash.ok { background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.4); color: #a7f3d0; }
.flash.err { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.4); color: #fecaca; }
.link-panel { border-color: var(--accent); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; background: #020617; border: 1px solid #334155; color: #e2e8f0; border-radius: 6px; padding: 8px 10px; font-family: monospace; font-size: 12px; }
.row-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.row-form label, .stack-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #94a3b8; }
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.row-form input, .row-form select, .stack-form input { background: #020617; border: 1px solid #334155; color: #f8fafc; border-radius: 8px; padding: 9px 11px; font-size: 14px; min-width: 220px; }
.row-form input:focus, .stack-form input:focus, .row-form select:focus { outline: none; border-color: var(--accent); }
.code-input.small { font-family: Consolas, monospace; font-size: 18px; letter-spacing: 3px; width: 140px; min-width: 0; }
.btn-brand { background: #0b5c8e; }
.btn-brand:hover { background: #0d6ea9; }
.btn-link { display: block; text-align: center; margin-top: 14px; padding: 11px; background: #0b5c8e; color: #fff; border-radius: 8px; font-weight: 700; text-decoration: none; }
.btn-small[disabled] { opacity: .35; cursor: not-allowed; }
.users-table td { font-family: inherit; font-size: 13px; vertical-align: middle; }
.users-table .right, .right { text-align: right; }
.users-table .actions { white-space: nowrap; }
.users-table .actions .btn-small { margin-left: 4px; }
.role { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 10px; }
.role-admin { background: rgba(56,189,248,.15); color: var(--accent); }
.role-viewer { background: rgba(148,163,184,.15); color: #cbd5e1; }
.tag { font-size: 10px; color: var(--success); border: 1px solid rgba(16,185,129,.4); border-radius: 8px; padding: 1px 6px; margin-left: 4px; }
.hint { color: #64748b; font-size: 12px; line-height: 1.5; }
.lead { color: #cbd5e1; font-size: 13px; line-height: 1.55; margin: 0 0 16px; }
.login-card.wide { max-width: 520px; }
.setup-step { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; color: #e2e8f0; margin: 18px 0 10px; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #0b5c8e; color: #fff; font-size: 12px; }
.qr-wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 6px; }
.qr { width: 180px; height: 180px; background: #fff; border-radius: 8px; padding: 6px; }
.setup-key { flex: 1; min-width: 200px; font-size: 12px; color: #94a3b8; line-height: 1.6; }
.setup-key code { display: block; margin: 6px 0; font-size: 15px; color: #f8fafc; background: #020617; border: 1px solid #334155; border-radius: 6px; padding: 8px; letter-spacing: 1px; word-break: break-all; }
.setup-key .hint { display: block; }

/* =====================================================================
   2.0 dashboard
   ===================================================================== */
:root { --text: #e2e8f0; --dim: #94a3b8; --faint: #64748b; --line: #1e293b; --orange: #f97316; }
body.dash { padding: 20px 24px 30px; }
body.dash #emergency-banner { margin: -20px -24px 18px; }
body.stale #monitor-body { opacity: .5; filter: grayscale(.5); transition: opacity .3s; }

/* Status strip */
.status-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: -6px 0 16px; }
.overall { font-size: 15px; font-weight: 700; padding: 8px 14px; border-radius: 8px; background: var(--card); border: 1px solid var(--border); }
.overall.s-ok { color: var(--success); border-color: rgba(16,185,129,.35); }
.overall.s-warning { color: var(--warning); border-color: rgba(245,158,11,.4); }
.overall.s-critical { color: #fecaca; background: rgba(239,68,68,.15); border-color: rgba(239,68,68,.5); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--border); color: var(--dim); font-size: 12px; padding: 6px 10px; border-radius: 16px; cursor: pointer; font-family: inherit; max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill b { color: var(--text); font-weight: 600; }
.pill:hover { border-color: #334155; }
.pill.p-warning { border-color: rgba(245,158,11,.45); }
.pill.p-critical { border-color: rgba(239,68,68,.6); background: rgba(239,68,68,.1); }
.sdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.sdot.s-ok { background: var(--success); }
.sdot.s-warning { background: var(--warning); }
.sdot.s-critical { background: var(--danger); box-shadow: 0 0 6px var(--danger); animation: pulse 1.4s infinite; }
.sdot.s-unknown, .sdot.s-none { background: #475569; }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tabs button { background: none; border: none; border-bottom: 2px solid transparent; color: var(--dim); font: inherit; font-size: 14px; font-weight: 600; padding: 10px 16px; cursor: pointer; margin-bottom: -1px; }
.tabs button i { margin-right: 6px; color: var(--faint); }
.tabs button:hover { color: #fff; }
.tabs button.on { color: #fff; border-bottom-color: var(--accent); }
.tabs button.on i { color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.on { display: block; animation: fadein .2s; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.tab-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin: -6px 0 14px; }
.tab-actions:empty { display: none; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 10px; padding: 14px 16px 12px; min-height: 112px; display: flex; flex-direction: column; }
.tile-label { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; }
.tile-value { font-size: 28px; font-weight: 800; color: var(--text); margin: 6px 0 2px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile-value small { font-size: 14px; color: var(--faint); font-weight: 600; }
.tile-spark { height: 30px; margin: 2px 0 4px; }
.tile-spark:empty { display: none; }
.tile-sub { font-size: 11px; color: var(--faint); margin-top: auto; overflow: hidden; text-overflow: ellipsis; }
.tile.lvl-ok { border-left-color: var(--success); }
.tile.lvl-warning { border-left-color: var(--warning); }
.tile.lvl-warning .tile-value { color: var(--warning); }
.tile.lvl-critical { border-left-color: var(--danger); background: linear-gradient(90deg, rgba(239,68,68,.08), var(--card) 60%); }
.tile.lvl-critical .tile-value { color: #fca5a5; }

/* Cards */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid2 > .card { margin-bottom: 0; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.card-title { font-size: 13px; font-weight: 700; color: var(--text); }
.card-title i { color: var(--accent); margin-right: 6px; }
.card-note { font-size: 11px; color: var(--faint); margin-left: auto; }
.card-link { margin-left: auto; font-size: 12px; color: var(--accent); text-decoration: none; }
.card-link:hover { text-decoration: underline; }
.card-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.card-foot:empty { display: none; }
.card select { margin-left: auto; background: #020617; border: 1px solid #334155; color: var(--text); border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 12px; }
.empty { color: var(--faint); font-size: 12px; padding: 10px 0; }
.mono-cloud { font-family: Consolas, monospace; font-size: 11px; color: #fca5a5; line-height: 1.8; word-spacing: 6px; max-height: 220px; overflow: auto; }
.tall { height: auto; min-height: 80px; max-height: 320px; }
.nowrap { white-space: nowrap; }
code { font-family: Consolas, monospace; font-size: 11px; color: #cbd5e1; background: #020617; padding: 1px 5px; border-radius: 4px; }

/* Data tables inside cards */
.dtable { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: auto; }
.dtable th { background: none; color: var(--faint); font-size: 10px; text-transform: uppercase; letter-spacing: .8px; padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 700; }
.dtable td { padding: 7px 8px; border-bottom: 1px solid var(--line); font-family: inherit; vertical-align: top; color: #cbd5e1; }
.dtable tr:last-child td { border-bottom: none; }
.dtable tbody tr:hover td { background: rgba(56,189,248,.04); }
.dtable .right { text-align: right; white-space: nowrap; }
.dtable a { color: var(--accent); text-decoration: none; }
.dtable .muted { font-size: 11px; }
.sql { font-family: Consolas, monospace; font-size: 11px; color: #cbd5e1; word-break: break-word; }
.t-ok { color: var(--success); } .t-warning, .t-warn { color: var(--warning); } .t-critical, .t-crit { color: #f87171; } .t-none { color: inherit; }

/* Horizontal bars (countries, DB sizes) */
.hbars { display: flex; flex-direction: column; gap: 7px; }
.hbar { display: grid; grid-template-columns: minmax(70px, 160px) 1fr 70px; align-items: center; gap: 10px; font-size: 12px; }
.hbar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #cbd5e1; }
.hbar-t { height: 8px; background: #020617; border-radius: 4px; overflow: hidden; }
.hbar-t i { display: block; height: 100%; background: linear-gradient(90deg, #0b5c8e, var(--accent)); border-radius: 4px; }
.hbar-v { text-align: right; color: var(--dim); font-variant-numeric: tabular-nums; }

/* Charts */
.chart { min-height: 190px; position: relative; }
.chart-svg { display: block; overflow: visible; }
.chart-svg .grid { stroke: #1e293b; stroke-width: 1; }
.chart-svg .axis { fill: #64748b; font-size: 10px; font-family: inherit; }
.chart-svg .hover-line { stroke: #475569; stroke-width: 1; stroke-dasharray: 3 3; }
.range-btns { margin-left: auto; display: inline-flex; border: 1px solid #334155; border-radius: 6px; overflow: hidden; }
.range-btns button { background: none; border: none; color: var(--faint); font: inherit; font-size: 11px; padding: 4px 9px; cursor: pointer; }
.range-btns button + button { border-left: 1px solid #334155; }
.range-btns button.on { background: #1e293b; color: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--dim); margin-bottom: 4px; }
.legend i, .tooltip i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.tooltip { display: none; position: fixed; z-index: 1000; pointer-events: none; background: #020617; border: 1px solid #334155; border-radius: 6px; padding: 8px 10px; font-size: 12px; color: var(--text); box-shadow: 0 8px 24px rgba(0,0,0,.5); max-width: 320px; }
.tooltip b { display: block; margin-bottom: 4px; color: #fff; }

/* Events */
.events { display: flex; flex-direction: column; }
.ev { display: grid; grid-template-columns: 92px 18px 1fr; gap: 8px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.ev:last-child { border-bottom: none; }
.ev-time { color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev i { color: var(--faint); text-align: center; }
.ev-msg { color: #cbd5e1; word-break: break-word; }
.ev.sev-warning i { color: var(--warning); }
.ev.sev-critical i { color: var(--danger); }
.ev.sev-critical .ev-msg { color: #fecaca; }
.ev.sev-ok i { color: var(--success); }

/* Alerts */
.alerts-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.alert-row { display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border-radius: 8px; border: 1px solid; font-size: 13px; margin-bottom: 8px; }
.alerts-list .alert-row { margin-bottom: 0; }
.alert-row i { margin-top: 2px; }
.alert-row.sev-critical { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.5); color: #fecaca; }
.alert-row.sev-critical i { color: var(--danger); }
.alert-row.sev-warning { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.4); color: #fde68a; }
.alert-row.sev-warning i { color: var(--warning); }
.alert-row .hint { color: inherit; opacity: .75; }
.sev { font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 7px; border-radius: 8px; background: #1e293b; color: var(--dim); }
.sev.sev-critical { background: rgba(239,68,68,.2); color: #fca5a5; }
.sev.sev-warning { background: rgba(245,158,11,.18); color: #fcd34d; }
.sev.sev-ok { background: rgba(16,185,129,.18); color: #6ee7b7; }

/* Settings forms */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; margin: 12px 0 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--dim); }
.form-grid input, .form-grid select { background: #020617; border: 1px solid #334155; color: #f8fafc; border-radius: 8px; padding: 9px 11px; font-size: 14px; width: 100%; font-family: inherit; }
.form-grid input:focus, .form-grid select:focus { outline: none; border-color: var(--accent); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #cbd5e1; margin: 6px 0; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.unlock-panel { border-color: rgba(245,158,11,.45); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.kv b { color: var(--text); font-weight: 600; }
.mail-list { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; font-size: 11px; }

@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
    body.dash { padding: 12px; } body.dash #emergency-banner { margin: -12px -12px 14px; }
    .tabs button { padding: 9px 10px; font-size: 13px; } .tabs button i { margin-right: 0; }
    .tile-value { font-size: 22px; } .hbar { grid-template-columns: 90px 1fr 60px; }
    .dtable { display: block; overflow-x: auto; }
}
.alerts-more { font-size: 12px; color: var(--dim); text-decoration: none; padding: 2px 4px; }
.alerts-more:hover { color: #fff; }
.alerts-list .alert-row { padding: 9px 14px; }
#sec-known .audit-entry { font-family: Consolas, monospace; font-size: 12px; color: #cbd5e1; padding: 6px 0; margin: 0; border-bottom: 1px solid var(--line); }
