:root {
  --bg: #f1f5f9; --card: #ffffff; --line: #e2e8f0; --line2: #f1f5f9; --text: #0f172a; --muted: #475569; --soft: #334155;
  --accent: #2563eb; --accent-bg: #eff6ff; --side: #0f172a; --side2: #1e293b; --side-text: #cbd5e1;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: #1d4ed8; } a:hover { color: #1e3a8a; }
h1 { margin: 0; font-size: 26px; } h2 { margin: 0 0 12px; font-size: 17px; } h3 { margin: 0 0 8px; font-size: 15px; }
.muted { color: var(--muted); margin: 4px 0 0; } .small { font-size: 12px; } .mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; overflow-wrap: anywhere; }
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 1 220px; max-width: 100%; background: var(--side); color: var(--side-text); padding: 24px 14px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 20px; font-size: 18px; font-weight: 700; color: #fff; }
.nav-link { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; text-decoration: none; color: var(--side-text); font-weight: 500; }
.nav-link:hover { background: var(--side2); color: #fff; }
.nav-link.on { background: var(--side2); color: #fff; font-weight: 600; }
.nav-soon { display: flex; align-items: center; min-height: 36px; padding: 0 12px; color: #94a3b8; font-size: 13px; }
.nav-head { padding: 16px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; }
.side-foot { margin-top: auto; padding: 14px 12px; border-radius: 10px; background: var(--side2); display: flex; flex-direction: column; gap: 8px; }
.side-foot .me { display: flex; flex-direction: column; color: #fff; text-decoration: none; } .side-foot .me span { color: var(--side-text); font-size: 12px; }
.link-btn { background: none; border: 0; padding: 0; color: #93c5fd; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.content { flex: 999 1 480px; min-width: 0; padding: 28px 32px; display: flex; flex-direction: column; gap: 22px; }
.bare { max-width: 440px; margin: 64px auto; padding: 0 16px; display: flex; flex-direction: column; gap: 16px; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; min-width: 0; }
.row { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.row > .grow { flex: 2 1 520px; } .row > .side-col { flex: 1 1 300px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi .k { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kpi .v { font-size: 24px; font-weight: 700; } .kpi .s { font-size: 12px; color: var(--muted); }
.scroll { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 11px 8px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.t td.n, table.t th.n { text-align: right; font-variant-numeric: tabular-nums; } table.t td.c, table.t th.c { text-align: center; }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.chip.green { background: #dcfce7; color: #14532d; } .chip.amber { background: #fef3c7; color: #78350f; } .chip.red { background: #fee2e2; color: #7f1d1d; }
.chip.blue { background: #dbeafe; color: #1e3a8a; } .chip.indigo { background: #e0e7ff; color: #312e81; } .chip.gray { background: #f1f5f9; color: #1e293b; } .chip.dark { background: #0f172a; color: #fff; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--soft); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=search], select, textarea {
  min-height: 42px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; font-weight: 400; color: var(--text); background: #fff; width: 100%; }
textarea { padding: 10px 12px; min-height: 120px; resize: vertical; } textarea.code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
label.check { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: 14px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: #f8fafc; color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.primary:hover { background: #1d4ed8; color: #fff; }
.btn.danger { color: #991b1b; border-color: #fca5a5; } .btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.flash { padding: 12px 16px; border-radius: 10px; font-weight: 500; }
.flash.ok { background: #f0fdf4; border: 1px solid #86efac; color: #14532d; } .flash.err { background: #fef2f2; border: 1px solid #fca5a5; color: #7f1d1d; }
.flash.warn { background: #fffbeb; border: 1px solid #fcd34d; color: #78350f; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; color: var(--text); text-decoration: none; font-weight: 500; }
.tabs a.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.grant { min-width: 56px; min-height: 36px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.grant input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.grant { display: inline-flex; align-items: center; justify-content: center; position: relative; }
label.grant:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #fff; }
label.grant:has(input:disabled) { opacity: .45; cursor: not-allowed; }
label.grant:focus-within { outline: 2px solid #93c5fd; outline-offset: 2px; }
pre.code { margin: 0; padding: 14px; border-radius: 10px; background: #0f172a; color: #e2e8f0; font: 12px/1.6 ui-monospace, Menlo, monospace; overflow-x: auto; white-space: pre-wrap; word-break: break-all; max-height: 480px; }
.stack { display: flex; flex-direction: column; gap: 10px; } .inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.box { padding: 10px 12px; border-radius: 8px; background: #f8fafc; color: var(--soft); font-size: 13px; overflow-wrap: anywhere; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
@media (max-width: 760px) {
  .content { padding: 20px 16px; }
  .side { flex-basis: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 12px; }
  .brand { width: 100%; padding: 0 6px 6px; }
  .nav-link { min-height: 40px; padding: 0 10px; font-size: 13px; }
  .nav-head { display: none; }
  .side-foot { margin-top: 6px; width: 100%; flex-direction: row; justify-content: space-between; align-items: center; padding: 8px 12px; }
}
