:root{--side:#111827;--side-fg:#cbd5e1;--accent:#e11d48;--bg:#f5f6f8;--line:#e5e7eb}
body{background:var(--bg);color:#0f172a;font-size:14.5px}
.shell{display:flex;min-height:100vh}
.side{width:228px;flex:0 0 228px;background:var(--side);color:var(--side-fg);display:flex;flex-direction:column;padding:16px 12px;position:sticky;top:0;height:100vh}
.brand{display:flex;align-items:center;gap:10px;color:#fff;font-weight:700;text-decoration:none;padding:4px 8px 18px;font-size:16px}
.brand-mark{display:inline-flex;width:30px;height:30px;border-radius:9px;background:var(--accent);align-items:center;justify-content:center}
.brand-mark svg{width:18px;height:18px;fill:#fff}
.side nav{display:flex;flex-direction:column;gap:2px;flex:1;overflow:auto}
.side nav a{display:flex;gap:10px;align-items:center;color:var(--side-fg);text-decoration:none;padding:8px 10px;border-radius:8px;font-size:14px}
.side nav a svg{width:18px;height:18px;fill:currentColor;opacity:.75}
.side nav a:hover{background:#1f2937;color:#fff}
.side nav a.active{background:#1f2937;color:#fff;box-shadow:inset 3px 0 0 var(--accent)}
.side-user{border-top:1px solid #1f2937;padding:12px 8px 0;color:#94a3b8}
.main{flex:1;min-width:0;padding:24px 28px 48px}
.topbar{display:flex;gap:12px;align-items:center;margin-bottom:16px}
.page-head{display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between;align-items:flex-end;margin-bottom:18px}
.page-head h1{font-size:22px;font-weight:700;margin:0}
.page-head .sub{color:#64748b;font-size:13px;margin-top:2px}
.card{border:1px solid var(--line);border-radius:12px;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.card-header{background:#fff;border-bottom:1px solid var(--line);font-weight:600;border-radius:12px 12px 0 0!important}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin-bottom:18px}
.kpi{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px 16px}
.kpi .label{color:#64748b;font-size:12.5px;font-weight:500}
.kpi .value{font-size:24px;font-weight:700;line-height:1.2;margin-top:4px;font-variant-numeric:tabular-nums}
.kpi .hint{color:#94a3b8;font-size:12px}
.table{margin:0;font-size:13.5px}
.table th{color:#64748b;font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}
.table td{vertical-align:middle}
.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.status{display:inline-block;padding:2px 8px;border-radius:999px;font-size:12px;font-weight:600;background:#e2e8f0;color:#334155}
.status.ok,.status.active,.status.sent{background:#dcfce7;color:#166534}
.status.warn,.status.scheduled,.status.queued,.status.warmup{background:#fef3c7;color:#92400e}
.status.sending{background:#dbeafe;color:#1e40af}
.status.bad,.status.failed,.status.expired,.status.cancelled,.status.off{background:#fee2e2;color:#991b1b}
.progress{height:6px;border-radius:99px}
.bar-row{display:grid;grid-template-columns:minmax(120px,240px) 1fr 80px;gap:10px;align-items:center;font-size:13px;margin:5px 0}
.bar-row .bar{height:10px;border-radius:6px;background:#eef2f7;overflow:hidden}
.bar-row .bar span{display:block;height:100%;background:#64748b;border-radius:6px}
.bar-row .bar span.good{background:#16a34a}
.funnel .bar span{background:var(--accent)}
.empty-state{text-align:center;padding:48px 16px;color:#64748b}
.secret-box{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;background:#0f172a;color:#e2e8f0;border-radius:10px;padding:12px 14px;font-size:13px;word-break:break-all}
pre.code{background:#0f172a;color:#e2e8f0;border-radius:10px;padding:14px;font-size:12.5px;white-space:pre-wrap}
.form-text{font-size:12.5px}
.chip-group{display:flex;flex-wrap:wrap;gap:6px}
.chip-group label{border:1px solid var(--line);background:#fff;border-radius:999px;padding:4px 10px;font-size:13px;cursor:pointer;user-select:none}
.chip-group input{margin-right:6px}
.minimal{background:var(--bg)}
.minimal-main{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:16px}
.login-card{width:100%;max-width:380px}
.preview-note{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px;display:flex;gap:10px;max-width:380px;box-shadow:0 8px 24px rgba(15,23,42,.12)}
.preview-note img{width:40px;height:40px;border-radius:8px;object-fit:cover}
.preview-note .t{font-weight:600;font-size:14px}
.preview-note .b{font-size:13px;color:#475569}
@media(max-width:991px){
  .side{position:fixed;z-index:1040;left:-240px;transition:left .2s}
  .side.open{left:0}
  .main{padding:16px}
}
