:root {
  --bg: #f6f7fb; --card: #fff; --text: #171923; --muted: #6b7280; --border: #e5e7ee;
  --accent: #5b5bf0; --accent-soft: #eeeefe; --ok: #16a34a; --warn: #d97706; --err: #dc2626;
  --radius: 14px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 16px rgba(16,24,40,.04);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e1016; --card: #161a23; --text: #e8eaf0; --muted: #8b93a5; --border: #262b38; --accent-soft: #20224a; --shadow: none; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.7; }
.hidden { display: none !important; }
h1 { font-size: 22px; margin: 0 0 18px; } h2 { font-size: 16px; margin: 24px 0 12px; } h3 { margin: 0 0 12px; font-size: 15px; }
small, .muted { color: var(--muted); } .sm { font-size: 12px; }
code { background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; font-size: 12px; }

/* layout */
.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.sidebar { background: var(--card); border-inline-end: 1px solid var(--border); padding: 20px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.main { padding: 28px 32px; max-width: 1100px; width: 100%; }
.page { display: none; } .page.active { display: block; }
.brand { font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand.big { font-size: 24px; justify-content: center; margin-bottom: 4px; }
.logo { width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--text); text-decoration: none; }
nav a i { font-style: normal; width: 18px; text-align: center; color: var(--muted); }
nav a:hover { background: var(--bg); }
nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; } nav a.active i { color: var(--accent); }

/* grid */
.grid { display: grid; gap: 14px; } .cols-2 { grid-template-columns: repeat(2, 1fr); } .cols-3 { grid-template-columns: repeat(3, 1fr); }
.stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 8px; }
.align-start { align-items: start; } .end { align-items: end; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row-between h1, .row-between h2 { margin: 0 0 14px; }

/* card & form */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.form { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; }
label small { font-weight: 400; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; }
.actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 4px; }
.error { color: var(--err); font-size: 13px; min-height: 0; } .error:empty { display: none; }

/* buttons */
.btn { font: inherit; font-weight: 600; cursor: pointer; border: 1px solid var(--border); background: var(--card); color: var(--text); padding: 9px 16px; border-radius: 10px; transition: .15s; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.ghost { background: transparent; } .btn.danger:hover { border-color: var(--err); color: var(--err); }
.btn.sm { padding: 5px 11px; font-size: 12px; } .btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: wait; }

/* switch */
.switch-row { flex-direction: row; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 12px; background: var(--bg); border-radius: 12px; cursor: pointer; }
.switch-row > span:first-child { display: flex; flex-direction: column; } .switch-row.compact { padding: 8px 12px; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; background: var(--border); border-radius: 99px; transition: .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + i { background: var(--ok); } .switch input:checked + i::after { inset-inline-start: 21px; }

/* stat cards */
.stat { display: flex; flex-direction: column; gap: 2px; } .stat b { font-size: 26px; line-height: 1.2; } .stat span { color: var(--muted); font-size: 12px; }

/* server card */
.server { display: flex; flex-direction: column; gap: 10px; } .server.off { opacity: .6; }
.server-head { display: flex; align-items: center; gap: 12px; } .flag { font-size: 28px; line-height: 1; }
.server-head .t { flex: 1; min-width: 0; } .server-head .t b { display: block; } .server-head .t small { display: block; direction: ltr; text-align: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; direction: ltr; text-align: start; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.chip.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); } .chip.bad { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, transparent); } .chip.warn { color: var(--warn); }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 2px; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; grid-column: 1 / -1; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); display: inline-block; margin-inline-end: 6px; } .dot.ok { background: var(--ok); } .dot.bad { background: var(--err); }

/* inbound picker */
.inbound-list { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow: auto; }
.inbound-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: var(--bg); }
.inbound-item:hover, .inbound-item.sel { border-color: var(--accent); background: var(--accent-soft); }
.inbound-item span { direction: ltr; }

/* modal */
dialog { border: 0; border-radius: 18px; padding: 22px; width: min(560px, 94vw); background: var(--card); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(10,12,20,.55); backdrop-filter: blur(3px); }

/* popup preview */
.phone { background: var(--bg); border-radius: 18px; padding: 40px 18px; display: grid; place-items: center; min-height: 260px; border: 1px dashed var(--border); }
.popup { background: var(--card); width: 100%; max-width: 300px; border-radius: 16px; padding: 18px; box-shadow: 0 8px 30px rgba(0,0,0,.18); border-top: 4px solid var(--accent); text-align: center; }
.popup.success { border-color: var(--ok); } .popup.warning { border-color: var(--warn); } .popup.error { border-color: var(--err); }
.popup b { display: block; font-size: 16px; margin-bottom: 6px; } .popup p { margin: 0 0 14px; color: var(--muted); white-space: pre-wrap; }
.popup .pbtn { display: block; background: var(--accent); color: #fff; padding: 8px; border-radius: 10px; margin-bottom: 8px; font-weight: 600; }
.popup .pclose { color: var(--muted); font-size: 12px; }
.popup.off { opacity: .35; }

/* login */
.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; } .login-card p { margin: 0; text-align: center; }

/* toast */
.toast { position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translate(-50%, 20px); background: #111827; color: #fff; padding: 10px 18px; border-radius: 12px; opacity: 0; pointer-events: none; transition: .25s; z-index: 99; }
html[dir=rtl] .toast { transform: translate(50%, 20px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); } html[dir=rtl] .toast.show { transform: translate(50%, 0); }
.toast.err { background: var(--err); }

@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; padding: 10px; gap: 8px; }
  .sidebar .brand { display: none; } nav { flex-direction: row; overflow-x: auto; } nav a { white-space: nowrap; padding: 7px 10px; } nav a i { display: none; }
  .sidebar .btn.block { width: auto; padding: 6px 12px; }
  .main { padding: 18px 14px; } .cols-2, .cols-3 { grid-template-columns: 1fr; }
}

/* ===================== ads ===================== */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs button { font: inherit; font-weight: 600; background: none; border: 0; border-bottom: 2px solid transparent; padding: 9px 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--text); } .tabs button.active { color: var(--accent); border-color: var(--accent); }
.tab-pane { display: none; } .tab-pane.active { display: block; }
.main:has(#page-ads.active) { max-width: 1280px; }

.stats.five { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat b.ok { color: var(--ok); } .stat b.warn { color: var(--warn); }
.banner { padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--warn) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }

.chart { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 10px; }
.chart .col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 2px; position: relative; }
.chart .pair { display: flex; align-items: flex-end; gap: 2px; height: calc(100% - 18px); width: 100%; justify-content: center; }
.chart .bar { width: 45%; max-width: 14px; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; transition: height .3s; }
.chart .bar.c { background: var(--ok); }
.chart .lbl { font-size: 10px; color: var(--muted); height: 16px; white-space: nowrap; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 6px; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }

table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: start; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); }
table.t td { padding: 8px; border-bottom: 1px solid var(--border); } table.t tr:last-child td { border: 0; }
.num { direction: ltr; text-align: end; font-variant-numeric: tabular-nums; }

.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.ad-list { display: flex; flex-direction: column; gap: 10px; }
.ad-card { display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; align-items: center; padding: 12px; }
.ad-card.off { opacity: .6; }
.ad-thumb { width: 92px; height: 68px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); overflow: hidden; display: grid; place-items: center; font-size: 26px; color: var(--muted); }
.ad-thumb img, .ad-thumb video { width: 100%; height: 100%; object-fit: cover; }
.ad-main b { display: block; } .ad-main .chips { margin-top: 6px; }
.ad-metrics { display: flex; gap: 16px; text-align: center; } .ad-metrics div { min-width: 54px; } .ad-metrics b { display: block; font-size: 15px; } .ad-metrics span { font-size: 11px; color: var(--muted); }
.ad-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; } .ad-actions .row { display: flex; gap: 6px; }
.chip.accent { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.chip.gray { opacity: .75; }

/* placements */
.place-group { margin-bottom: 22px; } .place-group h3 { margin-bottom: 10px; }
.place-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.place { display: flex; flex-direction: column; gap: 8px; } .place.off { opacity: .55; }
.place .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; } .place .head b { display: block; } .place .head small { display: block; }
.place .cnt { font-size: 22px; font-weight: 700; } .place .cnt small { font-size: 12px; font-weight: 400; }

/* networks */
.wf { display: flex; flex-direction: column; gap: 6px; }
.wf-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.wf-item .n { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
.wf-item .grow { flex: 1; } .wf-item.dim { opacity: .5; }
.net-card { display: flex; flex-direction: column; gap: 10px; } .net-card.off .units { display: none; }
.units { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px 8px; align-items: center; font-size: 12px; }
.units .h { color: var(--muted); font-weight: 600; } .units input { padding: 5px 8px; direction: ltr; font-size: 12px; }

/* media library */
.dropzone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 26px; text-align: center; color: var(--muted); cursor: pointer; transition: .15s; margin-bottom: 14px; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.media-item { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--card); display: flex; flex-direction: column; }
.media-item .pv { aspect-ratio: 4/3; background: var(--bg); display: grid; place-items: center; cursor: pointer; } .media-item .pv img, .media-item .pv video { width: 100%; height: 100%; object-fit: cover; }
.media-item .meta { padding: 8px 10px; font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; } .media-item .meta b { color: var(--text); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-item .row { display: flex; gap: 6px; } .media-item.sel { outline: 2px solid var(--accent); }

/* ad editor */
dialog.wide { width: min(1180px, 96vw); max-height: 94vh; overflow: auto; }
.ad-editor { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; margin-top: 8px; }
.ad-preview { position: sticky; top: 0; background: var(--bg); border-radius: 16px; padding: 16px; border: 1px solid var(--border); }
.fsec { border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.fsec > h4 { margin: 0; font-size: 13px; color: var(--accent); }
.frow { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.fld.hidden { display: none; } .fld > label { width: 100%; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.radio-cards.pills { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.rc { position: relative; border: 1.5px solid var(--border); border-radius: 12px; padding: 9px 11px; cursor: pointer; background: var(--bg); display: flex; flex-direction: column; gap: 2px; font-weight: 600; font-size: 13px; }
.rc small { font-size: 11px; line-height: 1.5; } .rc:hover { border-color: var(--accent); }
.rc input { position: absolute; opacity: 0; pointer-events: none; }
.rc:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.chk { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--border); border-radius: 99px; font-weight: 500; font-size: 12px; cursor: pointer; background: var(--bg); }
.chk input { width: auto; margin: 0; } .chk:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.chk.dis { opacity: .4; pointer-events: none; }
.media-field { display: flex; gap: 8px; align-items: center; } .media-field input { flex: 1; direction: ltr; } .media-field .thumb { width: 38px; height: 38px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); overflow: hidden; flex: none; display: grid; place-items: center; } .media-field .thumb img, .media-field .thumb video { width: 100%; height: 100%; object-fit: cover; }
input[type=color] { padding: 2px; height: 38px; min-width: 60px; } .color-field { display: flex; gap: 6px; } .color-field input[type=text] { direction: ltr; }
textarea.code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; direction: ltr; }

/* preview mockups */
.pv-stage { display: grid; place-items: center; min-height: 120px; }
.pv-phone { width: 100%; max-width: 250px; aspect-ratio: 9/17; border-radius: 26px; background: #0f1218; border: 6px solid #1c212b; position: relative; overflow: hidden; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.pv-phone .bg { position: absolute; inset: 0; background: linear-gradient(160deg,#334 0%, #556 100%); } .pv-phone .bg img, .pv-phone .bg video { width: 100%; height: 100%; object-fit: cover; }
.pv-phone .top { position: absolute; top: 8px; inset-inline: 8px; display: flex; justify-content: space-between; align-items: center; font-size: 11px; gap: 6px; z-index: 2; }
.pv-phone .pill { background: rgba(0,0,0,.55); padding: 3px 9px; border-radius: 99px; font-size: 11px; backdrop-filter: blur(4px); }
.pv-phone .bottom { position: absolute; bottom: 10px; inset-inline: 10px; z-index: 2; display: flex; flex-direction: column; gap: 6px; text-align: center; }
.pv-phone .cta { background: var(--accent, #5b5bf0); color: #fff; padding: 8px; border-radius: 10px; font-weight: 700; font-size: 12px; }
.pv-phone .txt { text-shadow: 0 1px 6px rgba(0,0,0,.6); font-size: 12px; } .pv-phone .txt b { display: block; font-size: 14px; }
.pv-bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,.3); overflow: hidden; } .pv-bar i { display: block; height: 100%; width: 45%; background: #fff; }
.pv-banner { width: 100%; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--card); position: relative; display: grid; place-items: center; text-align: center; font-size: 12px; color: var(--muted); }
.pv-banner img, .pv-banner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-banner .tag, .pv-card .tag { position: absolute; top: 3px; inset-inline-start: 4px; background: rgba(0,0,0,.55); color: #fff; font-size: 9px; padding: 1px 6px; border-radius: 6px; z-index: 2; }
.pv-card { width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: flex; gap: 10px; align-items: center; position: relative; }
.pv-card .ic { width: 44px; height: 44px; border-radius: 10px; background: var(--accent-soft); overflow: hidden; flex: none; display: grid; place-items: center; font-size: 20px; } .pv-card .ic img { width: 100%; height: 100%; object-fit: cover; }
.pv-card .b { flex: 1; min-width: 0; } .pv-card .b b { display: block; font-size: 13px; } .pv-card .b span { font-size: 11px; color: var(--muted); display: block; }
.pv-card .btn-x { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 99px; white-space: nowrap; }
.pv-card.col { flex-direction: column; align-items: stretch; } .pv-card .media { border-radius: 10px; overflow: hidden; aspect-ratio: 16/9; background: var(--bg); } .pv-card .media img, .pv-card .media video { width: 100%; height: 100%; object-fit: cover; }
.pv-text { width: 100%; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 12px; position: relative; padding-inline-start: 46px; }
.pv-text .tag { position: absolute; inset-inline-start: 8px; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.55); color: #fff; font-size: 9px; padding: 1px 6px; border-radius: 6px; }
.pv-popup { width: 100%; max-width: 270px; background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.25); position: relative; text-align: center; }
.pv-popup .media { aspect-ratio: 16/9; background: var(--bg); } .pv-popup .media img { width: 100%; height: 100%; object-fit: cover; } .pv-popup .in { padding: 14px; } .pv-popup .in b { display: block; margin-bottom: 4px; } .pv-popup .in p { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.pv-popup .x { position: absolute; top: 6px; inset-inline-end: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; font-size: 12px; z-index: 2; }
.pv-icon { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--accent); box-shadow: 0 6px 18px rgba(0,0,0,.3); display: grid; place-items: center; font-size: 26px; } .pv-icon img { width: 100%; height: 100%; object-fit: cover; }
.pv-net { width: 100%; padding: 16px; text-align: center; border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); font-size: 12px; } .pv-net b { display: block; color: var(--text); font-size: 14px; }
.pv-iframe { width: 100%; border: 0; border-radius: 10px; background: #fff; min-height: 90px; }
.pv-server { width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; position: relative; }
.pv-server .fl { font-size: 26px; } .pv-server .b { flex: 1; } .pv-server .b b { display: block; font-size: 13px; } .pv-server .b span { font-size: 11px; color: var(--muted); }
.pv-server .tg { background: var(--accent-soft); color: var(--accent); font-size: 10px; padding: 2px 8px; border-radius: 99px; font-weight: 700; }

@media (max-width: 1000px) {
  .ad-editor { grid-template-columns: 1fr; } .ad-preview { position: static; order: -1; }
  .filters { grid-template-columns: 1fr 1fr; } .ad-card { grid-template-columns: 70px 1fr; } .ad-metrics, .ad-actions { grid-column: 1 / -1; } .ad-actions { flex-direction: row; justify-content: space-between; align-items: center; }
  .units { grid-template-columns: 1fr 1fr; } .units .h:nth-child(3) { display: none; }
}

/* online users */
.big-num { font-size: 28px; color: var(--ok); line-height: 1; }
.meter { height: 6px; border-radius: 99px; background: var(--bg); overflow: hidden; } .meter i { display: block; height: 100%; background: var(--ok); border-radius: 99px; transition: width .4s; }
#online-users-card { margin: 14px 0 8px; } #online-users { overflow-x: auto; margin-top: 8px; }

/* overflow safety */
.app > *, .main > *, .card, .ad-main, .fld, .frow > *, .grid > * { min-width: 0; }
.card:has(table.t) { overflow-x: auto; }
.ad-main .chips { max-width: 100%; }
