[hidden] { display: none !important; }
:root {
  --bg: #0d0f13; --panel: #151820; --panel2: #1b1f29; --line: #262b37; --text: #e9eaee; --muted: #8b91a1;
  --gold: #d4a94f; --gold2: #f0cf85; --green: #3fbf7f; --red: #e5636b; --blue: #5b9cf0; --meta: #6f8cff; --google: #47b27a;
  --r: 12px; font-family: "Heebo", "Segoe UI", "Arial Hebrew", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: var(--gold2); text-decoration: none; }
h1 { font-size: 22px; margin: 0 0 4px; } h2 { font-size: 16px; margin: 0 0 12px; } h3 { font-size: 14px; margin: 0 0 8px; color: var(--muted); font-weight: 500; }
.muted { color: var(--muted); } .err { color: var(--red); min-height: 1.2em; } .ok { color: var(--green); }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: plaintext; }
#demo-banner { background: var(--gold); color: #1a1406; text-align: center; padding: 6px; font-weight: 600; position: sticky; top: 0; z-index: 5; }

.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side { background: var(--panel); border-inline-start: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.brand { font-weight: 700; letter-spacing: .5px; font-size: 17px; direction: ltr; text-align: right; }
.brand b { color: var(--gold); font-weight: 700; } .brand .mark { color: var(--gold); }
.brand.big { font-size: 26px; text-align: center; }
nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
nav a { color: var(--text); padding: 8px 10px; border-radius: 8px; }
nav a:hover { background: var(--panel2); } nav a.on { background: var(--panel2); color: var(--gold2); box-shadow: inset -3px 0 0 var(--gold); }
.nav-group { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 6px; padding-inline-start: 8px; border-inline-start: 1px solid var(--line); }
.nav-group a { font-size: 13px; padding: 6px 10px; }
.side-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
main { padding: 24px 28px 60px; min-width: 0; }

.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.grid { display: grid; gap: 14px; } .g4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } .g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.kpi .v { font-size: 24px; font-weight: 700; margin-top: 4px; } .kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.section { margin-top: 18px; }

.pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; background: var(--panel2); border: 1px solid var(--line); }
.pill.google { color: var(--google); border-color: #2a4a38; } .pill.meta { color: var(--meta); border-color: #2c3566; }
.pill.ACTIVE { color: var(--green); } .pill.PAUSED { color: var(--muted); } .pill.warn { color: var(--gold2); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: right; padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 12px; cursor: pointer; user-select: none; position: sticky; top: 0; background: var(--panel); }
td.name { white-space: normal; min-width: 180px; }
tr:hover td { background: #181c25; }
.table-wrap { overflow: auto; max-height: 70vh; border-radius: var(--r); }
tfoot td { font-weight: 700; border-top: 2px solid var(--line); }

.btn { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; font: inherit; cursor: pointer; }
.btn:hover { border-color: #3a4152; } .btn:disabled { opacity: .5; cursor: default; }
.btn.gold { background: var(--gold); color: #1a1406; border-color: var(--gold); font-weight: 600; }
.btn.danger { color: var(--red); } .btn.sm { padding: 3px 8px; font-size: 12px; }
.link { background: none; border: 0; color: var(--gold2); cursor: pointer; font: inherit; padding: 0; }
input, select, textarea { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font: inherit; }
textarea { width: 100%; min-height: 90px; resize: vertical; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
label input, label select, label textarea { color: var(--text); font-size: 14px; }
.form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form .full { grid-column: 1 / -1; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs button { background: none; border: 0; color: var(--muted); padding: 9px 14px; cursor: pointer; font: inherit; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--gold2); border-color: var(--gold); }

.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 28px; text-align: center; }
.login-card label { text-align: right; }

#toast { position: fixed; bottom: 20px; left: 20px; background: var(--panel2); border: 1px solid var(--line); padding: 10px 14px; border-radius: 10px; opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; max-width: 420px; z-index: 20; }
#toast.show { opacity: 1; transform: none; } #toast.bad { border-color: var(--red); color: #ffd3d6; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; width: min(640px, 94vw); }
dialog::backdrop { background: rgba(0,0,0,.6); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.chart svg { width: 100%; height: 180px; display: block; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-inline-end: 5px; vertical-align: middle; }
.empty { text-align: center; padding: 36px; color: var(--muted); }
.steps { margin: 0; padding-inline-start: 20px; line-height: 1.9; }
.chk { width: 16px; height: 16px; }
.loading { color: var(--muted); padding: 20px; }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  main { padding: 16px; }
}
