/* Nuvine design system: flat colors, rounded shapes, no gradients, no glow */
@font-face { font-family: "Baloo 2"; font-weight: 600; font-display: swap; src: url(fonts/baloo-2-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Baloo 2"; font-weight: 600; font-display: swap; src: url(fonts/baloo-2-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Baloo 2"; font-weight: 700; font-display: swap; src: url(fonts/baloo-2-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Baloo 2"; font-weight: 700; font-display: swap; src: url(fonts/baloo-2-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --bg: #17181c; --panel: #1e1f24; --panel-2: #25262c; --border: #2e3038; --line: #4a4c56; --text: #ffffff; --muted: #9a9ca8;
  --accent: #3b6fea; --accent-hover: #5180ee; --accent-soft: #1f2843;
  --ok: #34c47a; --ok-soft: #1b2e25; --warn: #e2a13a; --warn-soft: #33291b; --danger: #e5584f; --danger-soft: #35201f;
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Baloo 2", var(--font);
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
code, .mono { font-family: var(--mono); font-size: .92em; }
h1, h2, .display { font-family: var(--display); }
h1 { font-size: 30px; font-weight: 700; margin: 0 0 2px; line-height: 1.2; }
h2 { font-size: 19px; font-weight: 700; margin: 0 0 10px; line-height: 1.3; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.icon { width: 18px; height: 18px; vertical-align: -3px; flex: none; }

/* login: large mascot on the left, sign-in button on the right, flat blobs behind */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px;
  padding: 48px max(24px, 6vw); position: relative; overflow: hidden; }
.blob { position: absolute; border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%; z-index: 0; }
.blob.blue { width: 520px; height: 440px; background: var(--accent); opacity: .13; top: -160px; left: -140px; }
.blob.green { width: 420px; height: 380px; background: var(--ok); opacity: .12; bottom: -150px; right: -120px; }
.login > *:not(.blob):not(.sr-only) { position: relative; z-index: 1; }
.login-art { display: flex; justify-content: center; }
.login-art svg { width: min(380px, 85%); height: auto; display: block; }
.login-box { width: 100%; max-width: 360px; }
.btn-xl { width: 100%; height: 52px; font-size: 16px; gap: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; justify-items: center; align-content: center; gap: 28px; }
  .login-art svg { width: 220px; }
}

/* app frame */
.top { display: flex; align-items: center; gap: 28px; padding: 14px 28px; border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand .tile { width: 40px; height: 40px; display: grid; place-items: center; }
.brand .tile img { width: 40px; height: 40px; display: block; }
.brand b { font-family: var(--display); font-weight: 700; font-size: 18px; display: block; line-height: 1.1; }
.brand span { color: var(--muted); font-size: 12px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { color: var(--muted); padding: 8px 14px; border-radius: 999px; display: flex; gap: 8px; align-items: center; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.active { color: var(--text); background: var(--panel-2); }
.userbox { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.page { max-width: 1320px; margin: 0 auto; padding: 32px 28px 64px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }

.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.card-pad { padding: 22px 24px; }
.card + .card, .mt { margin-top: 20px; }
.grid > .card { margin-top: 0; }
.grid { align-items: start; }
.card-title { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--border); gap: 12px; flex-wrap: wrap; }
.card-title h2 { margin: 0; font-size: 16px; }
.grid { display: grid; gap: 20px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g2 { grid-template-columns: 2fr 1fr; }
.g2e { grid-template-columns: 1fr 1fr; }
@media (max-width: 1000px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g2, .g2e { grid-template-columns: 1fr; } }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-family: var(--display); font-size: 38px; font-weight: 700; line-height: 1.2; }
.stat.danger .value { color: var(--danger); } .stat.ok .value { color: var(--ok); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 9px 18px;
  font: inherit; font-weight: 550; background: var(--accent); color: #fff; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--panel-2); color: var(--text); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid #5a2d2b; }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: default; }
form.inline { display: inline; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 12px 24px; border-bottom: 1px solid var(--border); }
td { padding: 12px 24px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--panel-2); }
.table-wrap { overflow-x: auto; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.empty { padding: 40px 24px; text-align: center; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 550;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border); margin: 2px 4px 2px 0; }
.badge.danger { background: var(--danger-soft); color: #ff8a82; border-color: #5a2d2b; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: #5c4521; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: #255a3e; }
.badge.accent { background: var(--accent-soft); color: #8fb0ff; border-color: #2f4479; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.ok { background: var(--ok); } .dot.danger { background: var(--danger); } .dot.warn { background: var(--warn); }

label { display: block; color: var(--muted); font-size: 13px; margin: 0 0 6px; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=url], select, textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; color: var(--text); padding: 9px 12px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { font-family: var(--mono); font-size: 13px; }
.check { display: flex; gap: 10px; align-items: center; color: var(--text); font-size: 14px; margin: 6px 0; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.field-hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }

.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid var(--border); background: var(--panel); }
.flash.success { border-color: #255a3e; background: var(--ok-soft); }
.flash.danger { border-color: #5a2d2b; background: var(--danger-soft); }
.flash.warning { border-color: #5c4521; background: var(--warn-soft); }
.flash.info { border-color: #2f4479; background: var(--accent-soft); }
.empty-art { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-art svg { width: 96px; height: auto; }
.source-list { list-style: none; margin: 0; padding: 0; }
.source-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--border); align-items: center; }
.source-list li:last-child { border-bottom: 0; }
pre.snippet { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 16px; font-size: 13px; max-height: 480px; overflow: auto; }
.keybox { display: flex; gap: 8px; } .keybox input { font-family: var(--mono); }
