/* DaisyDB — neutral dark, flat chips, white primary */
:root {
  --bg: #0b0b0d;
  --bg-2: #101013;
  --panel: #141417;
  --panel-2: #1a1a1e;
  --panel-3: #222227;
  --input: #0e0e11;
  --border: #25252b;
  --border-2: #33333a;
  --border-3: #45454d;
  --text: #f4f4f5;
  --text-2: #d4d4d8;
  --muted: #a1a1aa;
  --dim: #71717a;
  --good: #4ade80;
  --good-bg: #0f2417;
  --warn: #fbbf24;
  --warn-bg: #261d08;
  --bad: #f87171;
  --bad-bg: #2a1213;
  --radius: 10px;
  --shadow: 0 1px 0 #ffffff08 inset, 0 10px 30px -12px #000c;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.5 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
code, .mono { font-family: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .93em; }
code { background: var(--panel-3); border: 1px solid var(--border-2); padding: 0 5px; border-radius: 4px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.sm { font-size: 12.5px; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
svg { width: 16px; height: 16px; display: block; flex: none; }
::selection { background: #e4e4e740; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2a2a30; border-radius: 10px; border: 2px solid var(--bg); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 7px;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border-2);
  font-weight: 600; font-size: 13px; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s, opacity .12s, transform .05s;
}
.btn:hover { background: var(--panel-3); border-color: var(--border-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.primary { background: #fafafa; color: #0b0b0d; border-color: #fafafa; }
.btn.primary:hover { background: #ffffff; box-shadow: 0 0 0 3px #ffffff1f; }
.btn.danger { background: #3b1416; border-color: #7f1d1d; color: #fecaca; }
.btn.danger:hover { background: #4d1a1d; border-color: #991b1b; }
.btn.warn { background: var(--warn-bg); border-color: #5c4710; color: var(--warn); }
.btn.warn:hover { background: #33270b; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; }
.btn.wide { width: 100%; }
.icon-btn {
  width: 32px; height: 32px; display: inline-grid; place-items: center;
  background: transparent; color: var(--muted); border: 1px solid transparent; border-radius: 7px;
  transition: background .12s, color .12s, border-color .12s;
}
.icon-btn:hover { color: var(--text); background: var(--panel-3); border-color: var(--border-2); }
.icon-btn.del:hover { color: var(--bad); border-color: #5c1f22; background: var(--bad-bg); }

/* chip: flat, small radius, thin border */
.chip {
  display: inline-flex; align-items: center; gap: 5px; vertical-align: middle;
  font-size: 11.5px; font-weight: 600; color: var(--muted); line-height: 1;
  background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 5px; padding: 4px 7px;
}
.chip.good { color: var(--good); border-color: #1d4d2f; background: var(--good-bg); }
.chip.warn { color: var(--warn); border-color: #5c4710; background: var(--warn-bg); }
.chip.bad { color: var(--bad); border-color: #5c1f22; background: var(--bad-bg); }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--bg-2); border-right: 1px solid var(--border); padding: 18px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; letter-spacing: -.2px; padding: 4px 8px 18px; }
.brand.lg { font-size: 20px; padding: 0 0 22px; }
.logo {
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px;
  background: linear-gradient(160deg, #fafafa, #a1a1aa); color: #0b0b0d;
  box-shadow: 0 0 0 1px #ffffff26, 0 6px 16px -6px #ffffff40;
}
.logo svg { width: 16px; height: 16px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13.5px; border: 1px solid transparent;
}
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.active { color: var(--text); background: var(--panel-2); border-color: var(--border); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.server-pill { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; font-size: 12px; color: var(--muted); background: var(--panel); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); flex: none; }
.dot.on { background: var(--good); box-shadow: 0 0 0 3px #4ade8022; }
.dot.off { background: var(--bad); box-shadow: 0 0 0 3px #f8717122; }

.main { min-width: 0; padding: 34px 40px 80px; max-width: 1280px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 26px; letter-spacing: -.5px; margin: 0; display: flex; align-items: center; gap: 10px; }
.crumb { font-size: 12px; color: var(--dim); font-weight: 600; margin-bottom: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions.center { justify-content: center; margin-top: 18px; }

/* stat cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat-card .k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--dim); display: flex; align-items: center; gap: 6px; }
.stat-card .v { font-size: 22px; font-weight: 700; letter-spacing: -.4px; margin-top: 6px; }
.stat-card .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.bar { height: 4px; background: var(--panel-3); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--text-2); border-radius: 4px; }
.bar > i.warn { background: var(--warn); }
.bar > i.bad { background: var(--bad); }

.toolbar { display: flex; gap: 10px; margin-bottom: 12px; }
.search { position: relative; flex: 1; max-width: 360px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--dim); }
.search input { margin: 0; padding-left: 34px; height: 36px; }

/* database rows */
.list { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: grid; grid-template-columns: 38px minmax(180px, 1.4fr) repeat(3, minmax(120px, 1fr)) auto; align-items: center; gap: 18px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px;
  transition: border-color .12s, background .12s; box-shadow: var(--shadow);
}
.row:hover { border-color: var(--border-2); background: #16161a; }
.row .ic { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); }
.row .ic svg { width: 18px; height: 18px; }
.row .name { min-width: 0; }
.row .name b { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .name small { display: flex; gap: 8px; align-items: center; color: var(--dim); font-size: 12px; margin-top: 2px; flex-wrap: wrap; }
.cell { min-width: 0; }
.cell b { display: block; font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.cell span { font-size: 10.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--dim); }
.cell .copyable { cursor: pointer; border-radius: 4px; }
.cell .copyable:hover { color: var(--text); text-decoration: underline dotted var(--dim); text-underline-offset: 3px; }
.row-actions { display: flex; gap: 2px; }
.live { display: inline-flex; align-items: center; gap: 5px; }

.empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--border-2); border-radius: var(--radius); background: var(--bg-2); }
.empty h3 { margin: 14px 0 4px; font-size: 17px; }
.empty-ic { width: 52px; height: 52px; margin: 0 auto; display: grid; place-items: center; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border-2); color: var(--muted); }
.empty-ic svg { width: 24px; height: 24px; }

/* cards */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.card h2 { font-size: 15px; margin: 0; }
.card > p.muted { margin: 0 0 14px; font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 > .card { margin-bottom: 16px; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border-2); background: var(--panel); border-radius: var(--radius); color: var(--text-2); font-size: 13px; margin-bottom: 16px; }
.note svg { color: var(--muted); margin-top: 2px; }
.stack label:last-of-type { margin-bottom: 12px; }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--dim); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-2); }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #17171b; }
.table .r { text-align: right; white-space: nowrap; }
.card .table th:first-child, .card .table td:first-child { padding-left: 0; }
.card .table th { background: transparent; }
.card.flush .table th:first-child, .card.flush .table td:first-child { padding-left: 18px; }
.empty-sm { color: var(--dim); font-size: 13px; padding: 10px 0; }
.act { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 12px; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks svg { color: var(--good); margin-top: 2px; }
.checks b { display: block; font-size: 13px; }
.checks span { color: var(--muted); font-size: 12.5px; }

/* ---------------------------------------------------------------- forms */
label { display: block; font-weight: 600; font-size: 13px; color: var(--text-2); margin-bottom: 16px; }
label small { display: block; font-weight: 400; color: var(--muted); margin-top: 6px; font-size: 12px; line-height: 1.45; }
input, select, textarea {
  display: block; width: 100%; margin-top: 7px; background: var(--input); color: var(--text);
  border: 1px solid var(--border-2); border-radius: 7px; padding: 0 12px; height: 38px; font: inherit; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
textarea { padding: 10px 12px; height: auto; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 16px, calc(100% - 12px) 16px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
input:hover, select:hover, textarea:hover { border-color: var(--border-3); }
input:focus, select:focus, textarea:focus { border-color: #a1a1aa; box-shadow: 0 0 0 3px #a1a1aa26; }
input::placeholder, textarea::placeholder { color: #55555d; }
input[type=checkbox] { width: 16px; height: 16px; display: inline-block; margin: 0 9px 0 0; accent-color: #e4e4e7; }
label.check { display: flex; align-items: center; font-weight: 500; flex-wrap: wrap; gap: 0 6px; }
.req { color: var(--bad); }
.err { color: #fecaca; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.err:not(:empty) { margin-bottom: 14px; padding: 10px 12px; background: var(--bad-bg); border: 1px solid #5c1f22; border-radius: 7px; }
.grid2 { display: grid; grid-template-columns: 1fr 120px; gap: 12px; }
.grid2.even { grid-template-columns: 1fr 1fr; }
.code-input { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 20px; letter-spacing: 6px; text-align: center; height: 48px; }
.divider { height: 1px; background: var(--border); margin: 4px 0 16px; }

.drop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 26px 16px; border: 1px dashed var(--border-3); border-radius: var(--radius); background: var(--bg-2); cursor: pointer; transition: border-color .12s, background .12s; }
.drop:hover, .drop.over { border-color: var(--muted); background: var(--panel-2); }
.drop input { display: none; }
.drop-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--panel-3); color: var(--text-2); margin-bottom: 6px; }
.drop small { margin-top: 0; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.seg-btn { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--border-2); color: var(--muted); transition: border-color .12s, background .12s, color .12s; }
.seg-btn svg { width: 20px; height: 20px; }
.seg-btn b { display: block; color: var(--text-2); font-size: 13px; }
.seg-btn small { display: block; font-size: 11.5px; color: var(--dim); }
.seg-btn:hover { border-color: var(--border-3); }
.seg-btn.active { background: var(--panel-2); border-color: #a1a1aa; color: var(--text); box-shadow: 0 0 0 3px #a1a1aa1a; }
.seg-btn.active b { color: var(--text); }

/* copy fields */
.field { margin-bottom: 14px; }
.field-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 13px; color: var(--text-2); margin-bottom: 7px; min-height: 26px; }
.field-row { display: flex; }
.field-row input { margin: 0; border-radius: 7px 0 0 7px; color: var(--text-2); font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 13px; }
.field-row input[readonly] { background: #0c0c0f; }
.field-row .icon-btn { height: 38px; width: 40px; border: 1px solid var(--border-2); border-left: 0; border-radius: 0; background: var(--panel-2); }
.field-row .icon-btn:hover { background: var(--panel-3); }
.field-row .icon-btn:last-child { border-radius: 0 7px 7px 0; }
.field-row .icon-btn.done { color: var(--good); }
.snip { position: relative; margin-bottom: 14px; }
.snip pre { margin: 0; padding-right: 52px !important; background: #0c0c0f; border: 1px solid var(--border-2); border-radius: 7px; padding: 12px 14px; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 12.5px; color: var(--text-2); overflow-x: auto; line-height: 1.6; }
.snip .icon-btn { position: absolute; top: 34px; right: 6px; background: var(--panel-2); border-color: var(--border-2); }
.snip-head { font-weight: 600; font-size: 13px; color: var(--text-2); margin-bottom: 7px; display: flex; justify-content: space-between; }

/* ---------------------------------------------------------------- modal */
.backdrop { position: fixed; inset: 0; background: #000000b3; backdrop-filter: blur(4px); z-index: 20; animation: fade .15s ease; }
.modal { position: fixed; inset: 0; display: flex; align-items: flex-start; justify-content: center; z-index: 21; padding: 7vh 16px; overflow-y: auto; }
.modal-box { width: 100%; max-width: 500px; background: var(--panel); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: 0 30px 80px -10px #000, 0 0 0 1px #ffffff06 inset; animation: pop .16s ease; }
.modal-box.sm { max-width: 420px; }
.modal-box.lg { max-width: 620px; }
.modal-box.xl { max-width: 1040px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 17px; letter-spacing: -.2px; display: flex; align-items: center; gap: 10px; }
.x { background: none; border: 1px solid transparent; color: var(--muted); padding: 5px; border-radius: 6px; }
.x:hover { color: var(--text); background: var(--panel-3); }
.modal-body { padding: 18px 20px 4px; }
.modal-body > p { margin-top: 0; }
.modal-foot { display: flex; justify-content: space-between; gap: 8px; padding: 14px 20px 18px; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.985); } }
@keyframes fade { from { opacity: 0; } }

.tabs { display: flex; gap: 2px; margin: -4px 0 18px; border-bottom: 1px solid var(--border); }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 8px 12px; font-weight: 600; font-size: 13px; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--text); }

.danger-box { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; background: var(--bad-bg); border: 1px solid #5c1f22; border-radius: 7px; color: #fecaca; font-size: 13px; margin-bottom: 16px; }
.danger-box svg { color: var(--bad); margin-top: 2px; }

.progress { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border-2); border-radius: 7px; background: var(--bg-2); margin-bottom: 14px; }
.progress b { display: block; font-size: 13px; }
.progress small { color: var(--muted); font-size: 12px; }
.spin { width: 16px; height: 16px; border: 2px solid var(--border-3); border-top-color: var(--text); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; flex: none; }
.btn .spin { width: 14px; height: 14px; }
.btn.primary .spin { border-color: #0b0b0d33; border-top-color: #0b0b0d; }
@keyframes spin { to { transform: rotate(360deg); } }

/* console */
textarea#consoleSql { min-height: 130px; resize: vertical; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 13px; margin-top: 0; background: #0c0c0f; line-height: 1.55; }
.console-bar { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 14px; gap: 10px; }
.console-out { overflow: auto; max-height: 52vh; margin-bottom: 16px; border-radius: 7px; }
.console-out table { border-collapse: collapse; font-size: 12.5px; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; min-width: 100%; }
.console-out th, .console-out td { border: 1px solid var(--border); padding: 6px 9px; text-align: left; white-space: nowrap; max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
.console-out th { background: var(--panel-2); position: sticky; top: 0; color: var(--text); }
.console-out td { color: var(--text-2); }
.console-out td.null { color: var(--dim); font-style: italic; }
.console-meta { color: var(--muted); font-size: 12px; margin-bottom: 8px; }

/* 2FA */
.tfa-setup { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.qr { background: #fff; border-radius: 10px; padding: 6px; width: 168px; }
.qr svg { width: 156px; height: 156px; }
.secret { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 12.5px; word-break: break-all; padding: 8px 10px; background: #0c0c0f; border: 1px solid var(--border-2); border-radius: 7px; margin: 6px 0 14px; color: var(--text-2); }

/* ---------------------------------------------------------------- login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; position: relative; overflow: hidden; }
.login-glow { position: absolute; width: 900px; height: 900px; top: -480px; left: 50%; transform: translateX(-50%); background: radial-gradient(closest-side, #ffffff10, transparent 70%); pointer-events: none; }
.login-card { position: relative; width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--border-2); border-radius: 14px; padding: 30px 28px 22px; box-shadow: 0 40px 100px -20px #000; }
.login-title { font-size: 22px; letter-spacing: -.4px; margin: 0; }
.login-sub { margin: 2px 0 22px; font-size: 13px; }
.login-foot { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px 0 0; font-size: 11.5px; color: var(--dim); }
.login-foot svg { width: 12px; height: 12px; }

/* toasts */
.toasts { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { display: flex; align-items: center; gap: 9px; background: var(--panel-2); color: var(--text); border: 1px solid var(--border-3); padding: 10px 14px; border-radius: 8px; font-weight: 600; font-size: 13px; box-shadow: 0 16px 40px -10px #000; animation: pop .16s ease; max-width: 420px; }
.toast svg { color: var(--good); }
.toast.bad { border-color: #7f1d1d; background: #2a1213; color: #fecaca; }
.toast.bad svg { color: var(--bad); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .row { grid-template-columns: 38px minmax(160px, 1fr) minmax(120px, 1fr) auto; }
  .row .cell.c-from, .row .cell.c-endpoint { display: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
  .brand { padding: 4px 8px 4px 0; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav a span { display: none; }
  .side-foot { margin: 0 0 0 auto; flex-direction: row; }
  .server-pill { display: none; }
  .main { padding: 20px 16px 60px; }
  .row { grid-template-columns: 38px 1fr auto; }
  .row .cell { display: none; }
  .grid-2, .checks, .seg { grid-template-columns: 1fr; }
  .tfa-setup { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- monitoring */
.range { display: inline-flex; border: 1px solid var(--border-2); border-radius: 7px; overflow: hidden; background: var(--panel); }
.range button { background: none; border: 0; border-right: 1px solid var(--border-2); color: var(--muted); font-weight: 600; font-size: 12px; padding: 0 12px; height: 32px; }
.range button:last-child { border-right: 0; }
.range button:hover { color: var(--text); background: var(--panel-2); }
.range button.active { background: var(--panel-3); color: var(--text); }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chart-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px 12px; box-shadow: var(--shadow); min-width: 0; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.chart-head h3 { margin: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--dim); display: flex; align-items: center; gap: 6px; }
.chart-now { font-size: 24px; font-weight: 700; letter-spacing: -.4px; margin-top: 6px; }
.chart-now small { font-size: 13px; font-weight: 500; color: var(--muted); }
.chart-stats { display: flex; gap: 14px; text-align: right; }
.chart-stats div span { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--dim); }
.chart-stats div b { font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.chart-plot { position: relative; height: 170px; margin-top: 12px; }
.chart-plot svg { width: 100%; height: 100%; overflow: visible; }
.chart-plot .axis { fill: var(--dim); font-size: 10.5px; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; }
.chart-empty { height: 100%; display: grid; place-items: center; color: var(--dim); font-size: 13px; border: 1px dashed var(--border-2); border-radius: 8px; }
.chart-tip { position: absolute; top: 0; pointer-events: none; background: var(--panel-3); border: 1px solid var(--border-3); border-radius: 7px; padding: 7px 10px; font-size: 12px; white-space: nowrap; box-shadow: 0 10px 30px -8px #000; z-index: 2; }
.chart-tip b { display: block; font-size: 13px; color: var(--text); }
.chart-tip span { color: var(--muted); }
.chart-legend { display: flex; gap: 14px; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.chart-legend i { display: inline-block; width: 14px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.chart-legend i.line { height: 2px; background: #e4e4e7; }
.chart-legend i.band { background: #e4e4e726; border: 1px solid #e4e4e740; }
@media (max-width: 1000px) { .charts { grid-template-columns: 1fr; } }
