/* Danabak Growth panel. Dark, dense, readable. No framework. */
:root {
  --bg: #0d1117;
  --bg-2: #121923;
  --bg-3: #192230;
  --line: #243043;
  --text: #e6edf3;
  --muted: #8b98a9;
  --accent: #4f8cff;
  --accent-2: #7cc4ff;
  --ok: #3fb950;
  --warn: #d9a21b;
  --bad: #f0616d;
  --info: #58a6ff;
  --radius: 10px;
  --sidebar: 236px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .5rem; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
p { margin: 0 0 .75rem; }
code, pre { font-family: var(--mono); font-size: 12.5px; }
pre { background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; overflow: auto; white-space: pre-wrap; word-break: break-word; }

.layout { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--bg-2); border-right: 1px solid var(--line); padding: 18px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; font-weight: 700; font-size: 15px; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--ok)); box-shadow: 0 0 0 4px rgba(79,140,255,.15); }
.nav a { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--text); }
.nav a:hover { background: var(--bg-3); text-decoration: none; }
.nav a.active { background: rgba(79,140,255,.14); color: #fff; }
.nav .count { font-size: 11px; background: var(--bg-3); border: 1px solid var(--line); padding: 1px 7px; border-radius: 999px; color: var(--muted); }
.nav .count.hot { background: rgba(217,162,27,.18); border-color: rgba(217,162,27,.5); color: #ffd66b; }
.sidebar .foot { margin-top: auto; font-size: 12px; color: var(--muted); padding: 8px; }
.main { padding: 22px 28px 60px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.topbar .crumbs { color: var(--muted); font-size: 13px; }
.topbar .crumbs a { color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-3); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.btn:hover { border-color: #3a4a63; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ok { background: rgba(63,185,80,.16); border-color: rgba(63,185,80,.5); color: #7ee89a; }
.btn.bad { background: rgba(240,97,109,.14); border-color: rgba(240,97,109,.5); color: #ff9aa2; }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid.cols-4 { grid-template-columns: 1fr 1fr; } .grid.cols-3 { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; } .grid.cols-2 { grid-template-columns: 1fr; } .main { padding: 16px; } }

.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.card .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
tr:hover td { background: rgba(255,255,255,.015); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.tag-ok { background: rgba(63,185,80,.14); color: #7ee89a; border-color: rgba(63,185,80,.35); }
.tag-warn { background: rgba(217,162,27,.14); color: #ffd66b; border-color: rgba(217,162,27,.4); }
.tag-bad { background: rgba(240,97,109,.14); color: #ff9aa2; border-color: rgba(240,97,109,.4); }
.tag-info { background: rgba(88,166,255,.14); color: #9ccbff; border-color: rgba(88,166,255,.4); }
.tag-muted { background: var(--bg-3); color: var(--muted); border-color: var(--line); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: #fff; border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--text); }

form.stack { display: grid; gap: 12px; }
form.stack .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 860px) { form.stack .row { grid-template-columns: 1fr; } }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=url], input[type=password], input[type=number], input[type=email], select, textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13.5px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,140,255,.18); }
textarea { min-height: 70px; resize: vertical; }
.help { font-size: 12px; color: var(--muted); margin-top: 3px; }
.errorlist { color: var(--bad); font-size: 12px; margin: 2px 0 0; padding-left: 16px; }
.field { margin-bottom: 2px; }
.inline-form { display: inline; }
.checkbox { display: flex; gap: 8px; align-items: center; }
.checkbox input { width: auto; }

.messages { display: grid; gap: 8px; margin-bottom: 14px; }
.msg { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-3); }
.msg.success { border-color: rgba(63,185,80,.5); } .msg.warning { border-color: rgba(217,162,27,.6); } .msg.error { border-color: rgba(240,97,109,.6); }

.log { background: #0a0e14; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; font-family: var(--mono); font-size: 12px; max-height: 480px; overflow: auto; white-space: pre-wrap; color: #c9d1d9; }
.log .live { color: var(--ok); }
.prose { max-width: 900px; line-height: 1.65; }
.prose h1 { font-size: 20px; margin-top: 1.2rem; } .prose h2 { font-size: 17px; margin-top: 1.4rem; } .prose h3 { font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--text); margin-top: 1rem; }
.prose table { margin: .6rem 0 1rem; } .prose ul, .prose ol { padding-left: 1.3rem; } .prose img { max-width: 100%; border-radius: 8px; }
.preview { background: #fff; color: #111; border-radius: var(--radius); padding: 22px 26px; max-width: 860px; font-family: Georgia, "Times New Roman", serif; font-size: 16px; line-height: 1.7; }
.preview h2 { font-size: 22px; margin-top: 1.2em; color: #111; } .preview h3 { font-size: 18px; color: #222; text-transform: none; letter-spacing: 0; }
.preview a { color: #0b57d0; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 14px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.finding { padding: 8px 10px; border-radius: 8px; margin-bottom: 6px; border: 1px solid var(--line); font-size: 13px; }
.finding.block { border-color: rgba(240,97,109,.5); background: rgba(240,97,109,.08); }
.finding.warn { border-color: rgba(217,162,27,.5); background: rgba(217,162,27,.08); }
.empty { color: var(--muted); padding: 22px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
.login { min-height: 100vh; display: grid; place-items: center; }
.login .card { width: 360px; }
details summary { cursor: pointer; color: var(--muted); }
.conn-list { display: grid; gap: 10px; }
.conn { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-3); }
.conn .d { font-size: 12px; color: var(--muted); }
.run-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.run-grid form { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-3); }
.run-grid .k { font-weight: 600; }
