:root {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1f232c;
  --border: #2a2f3a;
  --text: #e7e9ee;
  --muted: #939aa8;
  --accent: #4c8dff;
  --ok: #3fb950;
  --watch: #58a6ff;
  --medium: #d29922;
  --high: #f0883e;
  --critical: #f85149;
  --expired: #a371f7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding-bottom: 72px;
}

a { color: var(--accent); text-decoration: none; }

header.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
header.top .who { font-size: 13px; color: var(--muted); }
header.top strong { font-size: 16px; }

main { padding: 16px; max-width: 900px; margin: 0 auto; }

nav.bottom {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; background: var(--surface); border-top: 1px solid var(--border);
}
nav.bottom a {
  flex: 1; text-align: center; padding: 10px 4px 12px;
  color: var(--muted); font-size: 12px;
}
nav.bottom a.active { color: var(--accent); }
nav.bottom a span { display: block; font-size: 20px; line-height: 1.2; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; margin-bottom: 12px;
}
.card.tight { padding: 10px 12px; }

.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.muted { color: var(--muted); font-size: 13px; }
.big { font-size: 26px; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea, button {
  width: 100%; font-size: 17px; font-family: inherit;
  padding: 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
}
input:focus, select:focus { outline: 2px solid var(--accent); border-color: transparent; }

button, .btn {
  display: block; text-align: center; cursor: pointer;
  background: var(--accent); color: #fff; border: none; font-weight: 600;
  padding: 13px; border-radius: 10px; margin-top: 14px;
}
button.ghost, .btn.ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
button.danger { background: var(--critical); }
.inline { display: flex; gap: 8px; align-items: flex-end; }
.inline button { margin-top: 0; width: auto; white-space: nowrap; }

.scan-field {
  font-size: 20px; letter-spacing: 0.5px; text-align: center;
  border: 2px dashed var(--accent); background: rgba(76, 141, 255, 0.07);
}

.pill {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.pill.ok { background: rgba(63,185,80,.15); color: var(--ok); }
.pill.watch { background: rgba(88,166,255,.15); color: var(--watch); }
.pill.medium { background: rgba(210,153,34,.15); color: var(--medium); }
.pill.high { background: rgba(240,136,62,.16); color: var(--high); }
.pill.critical { background: rgba(248,81,73,.16); color: var(--critical); }
.pill.expired { background: rgba(163,113,247,.18); color: var(--expired); }

.bar { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; }
.bar > i.ok { background: var(--ok); }
.bar > i.watch { background: var(--watch); }
.bar > i.medium { background: var(--medium); }
.bar > i.high { background: var(--high); }
.bar > i.critical { background: var(--critical); }
.bar > i.expired { background: var(--expired); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; }
td.num, th.num { text-align: right; white-space: nowrap; }
.scroll-x { overflow-x: auto; }

.banner { padding: 11px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; }
.banner.ok { background: rgba(63,185,80,.12); color: var(--ok); }
.banner.err { background: rgba(248,81,73,.14); color: var(--critical); }
.banner.info { background: rgba(88,166,255,.12); color: var(--watch); }

.empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.empty span { display: block; font-size: 40px; margin-bottom: 12px; }

.login-wrap { max-width: 380px; margin: 12vh auto; padding: 0 20px; }
h1 { font-size: 21px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 20px 0 10px; color: var(--muted); font-weight: 500; }
