/* ==========================================================================
   M&C Ops Dashboard — stylesheet (dark theme, teal accent)
   ========================================================================== */
:root {
  --bg: #070c17;
  --bg-soft: #0a1120;
  --panel: #0e1729;
  --panel-2: #111d33;
  --border: #1c2a47;
  --border-soft: #16223b;
  --text: #e8eefb;
  --text-dim: #9aa8c7;
  --text-faint: #67769a;
  --accent: #2dd4bf;
  --accent-strong: #14b8a6;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --cs: #fb7185;        /* CS support */
  --ss: #fbbf24;        /* salesmartly */
  --mon: #f97316;       /* monitoring */
  --pat: #34d399;       /* patrolling */
  --danger: #f87171;
  --warn: #fbbf24;
  --ok: #34d399;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(2, 6, 18, 0.45);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
::selection { background: rgba(45, 212, 191, 0.3); }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #22314f; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2c3f66; }

/* ======================= LOGIN ======================= */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 24px;
  background: radial-gradient(1200px 600px at 15% -10%, #0e2a2a 0%, transparent 60%),
              radial-gradient(1000px 700px at 110% 110%, #14203d 0%, transparent 55%),
              var(--bg);
}
.login-bg-blob {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35; pointer-events: none;
}
.blob-a { width: 420px; height: 420px; background: #0f766e; top: -120px; left: -100px; }
.blob-b { width: 380px; height: 380px; background: #1e3a8a; bottom: -140px; right: -80px; opacity: .25; }
.login-card {
  position: relative;
  width: 100%; max-width: 400px;
  background: rgba(14, 23, 41, 0.85);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: rise .5s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.login-logo { display: flex; justify-content: center; margin-bottom: 14px; }
.login-card h1 { text-align: center; font-size: 22px; margin: 0 0 4px; letter-spacing: .2px; }
.login-sub { text-align: center; color: var(--text-dim); margin: 0 0 24px; font-size: 13px; }
.login-card label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-dim); margin: 14px 0 6px; }
.login-card input {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  font-size: 14px; font-family: var(--font); outline: none; transition: border-color .15s, box-shadow .15s;
}
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-error {
  margin-top: 14px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, .35);
  color: #fca5a5; font-size: 13px;
}
.login-hint { color: var(--text-faint); font-size: 12px; text-align: center; margin: 18px 0 0; line-height: 1.6; }
.login-foot { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: var(--text-faint); font-size: 12px; }

/* ======================= BUTTONS / INPUTS ======================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 13.5px; font-weight: 600;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  padding: 9px 16px; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent-strong); color: #04211d; }
.btn-primary:hover:not(:disabled) { background: var(--accent); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-dim); }
.btn-ghost:hover { border-color: #33507e; color: var(--text); }
.btn-danger { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, .4); color: #fca5a5; }
.btn-danger:hover { background: rgba(248, 113, 113, 0.22); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-block { width: 100%; margin-top: 20px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: transparent; color: var(--text-dim); cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: #33507e; }

input[type="text"], input[type="password"], input[type="number"], input[type="month"], select, textarea {
  font-family: var(--font); font-size: 13.5px; color: var(--text);
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 11px; 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); }
input[type="number"] { width: 100%; }
label { cursor: default; }

/* ======================= APP LAYOUT ======================= */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0; display: flex; flex-direction: column;
  background: var(--bg-soft); border-right: 1px solid var(--border-soft);
  position: sticky; top: 0; height: 100vh; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 18px 18px 14px; }
.brand-title { font-weight: 800; font-size: 15px; letter-spacing: .3px; }
.brand-sub { font-size: 11px; color: var(--text-faint); }
.nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.nav-section {
  display: flex; align-items: center; gap: 8px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-faint); padding: 16px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: transparent; border: none; color: var(--text-dim);
  font-family: var(--font); font-size: 13.5px; font-weight: 500;
  padding: 9px 10px; border-radius: 10px; cursor: pointer; transition: all .15s;
  margin: 1px 0; text-align: left;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .8; }
.nav-item:hover { background: rgba(45, 212, 191, 0.06); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-sub { padding-left: 20px; }

/* ---- collapsible dropdown groups (CS Team / Operations) ---- */
.nav-group { margin: 1px 0; }
.nav-drop { position: relative; }
.nav-drop .chev {
  width: 15px; height: 15px; margin-left: auto; opacity: .55;
  transition: transform .22s ease; flex-shrink: 0;
}
.nav-group.open .nav-drop .chev { transform: rotate(180deg); }
.nav-group.open .nav-drop { color: var(--text); }
.nav-group.has-active .nav-drop { color: var(--accent); font-weight: 600; }
.nav-drop-menu { overflow: hidden; max-height: 0; transition: max-height .25s ease; }
.nav-group.open .nav-drop-menu { max-height: 240px; }
.nav-drop-menu .nav-item { border-left: 1px solid var(--border-soft); margin-left: 13px; border-radius: 0 10px 10px 0; }
.sidebar-foot { padding: 12px; border-top: 1px solid var(--border-soft); display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #032723;
}
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-faint); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 26px; border-bottom: 1px solid var(--border-soft);
  background: rgba(10, 17, 32, 0.8); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 30;
}
.topbar-title { font-size: 17px; font-weight: 700; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.month-picker { display: inline-flex; align-items: center; gap: 6px; color: var(--text-faint); font-size: 12.5px; }
#monthSelect { min-width: 150px; font-weight: 600; }
.view-root { flex: 1; padding: 24px 26px 40px; outline: none; }
.footer {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  padding: 14px; border-top: 1px solid var(--border-soft);
  color: var(--text-faint); font-size: 12px; margin-top: auto;
}
.footer-sep { opacity: .5; }
.mobile-only { display: none; }

/* ======================= CARDS / GRID ======================= */
.page-head { margin-bottom: 20px; }
.page-title { font-size: 21px; font-weight: 800; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-sub { color: var(--text-dim); font-size: 13px; margin: 0; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .4px;
  padding: 4px 10px; border-radius: 999px; border: 1px solid;
}
.badge-cs { color: var(--cs); border-color: rgba(251, 113, 133, .35); background: rgba(251, 113, 133, .08); }
.badge-ss { color: var(--ss); border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .08); }
.badge-mon { color: var(--mon); border-color: rgba(249, 115, 22, .35); background: rgba(249, 115, 22, .08); }
.badge-pat { color: var(--pat); border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .08); }

.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-6 { grid-template-columns: repeat(6, 1fr); }
.card {
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 18px; position: relative;
}
.card-hover:hover { border-color: #2a3d63; }
.card-title { font-size: 14px; font-weight: 700; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-title .spark { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.card-sub { font-size: 12px; color: var(--text-faint); font-weight: 500; }

.kpi { display: flex; flex-direction: column; gap: 8px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: 12px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: .6px; }
.kpi-icon {
  width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); flex-shrink: 0;
}
.kpi-icon svg { width: 20px; height: 20px; }
.kpi-value { font-size: 27px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px; }
.kpi-value small { font-size: 14px; font-weight: 600; color: var(--text-dim); }
.kpi-foot { font-size: 12px; color: var(--text-faint); }
.kpi-accent-cs .kpi-icon { background: rgba(251, 113, 133, .12); color: var(--cs); }
.kpi-accent-ss .kpi-icon { background: rgba(251, 191, 36, .12); color: var(--ss); }
.kpi-accent-mon .kpi-icon { background: rgba(249, 115, 22, .12); color: var(--mon); }
.kpi-accent-pat .kpi-icon { background: rgba(52, 211, 153, .12); color: var(--pat); }

.chart-wrap { position: relative; width: 100%; }
.chart-160 { height: 160px; }
.chart-200 { height: 200px; }
.chart-220 { height: 220px; }
.chart-260 { height: 260px; }

/* ======================= TABLES ======================= */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.tbl th, .tbl td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl thead th {
  background: var(--panel-2); color: var(--text-dim); font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; position: sticky; top: 0;
}
.tbl tbody tr:hover { background: rgba(45, 212, 191, 0.035); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .row-total td { background: var(--panel-2); font-weight: 700; border-top: 1px solid var(--border); }
.tbl .num-strong { font-weight: 700; color: var(--accent); }
.tbl .cell-good { color: var(--ok); font-weight: 600; }
.tbl .cell-warn { color: var(--warn); font-weight: 600; }
.tbl .cell-bad { color: var(--danger); font-weight: 600; }
.tbl td.lbl, .tbl th.lbl { text-align: left; }
.mono { font-variant-numeric: tabular-nums; }

/* employee / operator cards */
.entity-card { border-left: 3px solid var(--accent); }
.entity-card.cs { border-left-color: var(--cs); }
.entity-card.mon { border-left-color: var(--mon); }
.entity-card.pat { border-left-color: var(--pat); }
.entity-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.entity-name { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.entity-meta { font-size: 12px; color: var(--text-faint); }
.channel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.channel-box { background: var(--bg-soft); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 14px; }
.channel-box h4 { margin: 0 0 10px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.tag {
  font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent); letter-spacing: .3px;
}
.tag-vip { background: rgba(251, 191, 36, .12); color: var(--ss); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.mini-stat { background: var(--panel-2); border-radius: 8px; padding: 9px 10px; }
.mini-stat .v { font-size: 16.5px; font-weight: 800; }
.mini-stat .k { font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .4px; margin-top: 2px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-size: 11.5px; padding: 4px 10px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--border-soft); color: var(--text-dim);
}
.chip b { color: var(--text); }
.chip.chip-accent { border-color: rgba(45,212,191,.3); color: var(--accent); background: var(--accent-soft); }

details.source-block { margin-top: 14px; }
details.source-block summary {
  cursor: pointer; color: var(--text-faint); font-size: 12.5px; font-weight: 600;
  padding: 8px 0; user-select: none; list-style: none; display: flex; align-items: center; gap: 7px;
}
details.source-block summary::before { content: "▸"; transition: transform .15s; }
details.source-block[open] summary::before { transform: rotate(90deg); }
details.source-block summary:hover { color: var(--text-dim); }
.source-img { max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-top: 8px; }

/* progress bars */
.pbar { height: 7px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.pbar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent-strong), var(--accent)); }
.pbar > i.warn { background: linear-gradient(90deg, #d97706, var(--warn)); }
.pbar > i.bad { background: linear-gradient(90deg, #dc2626, var(--danger)); }
.rate-row { display: flex; align-items: center; gap: 10px; margin: 7px 0; }
.rate-row .rl { width: 150px; font-size: 12px; color: var(--text-dim); flex-shrink: 0; }
.rate-row .rv { width: 52px; text-align: right; font-size: 12.5px; font-weight: 700; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.rate-row .pbar { flex: 1; }

/* ======================= ADMIN ======================= */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border-soft); margin-bottom: 20px; overflow-x: auto; }
.tab {
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--text-dim); font-family: var(--font); font-size: 13.5px; font-weight: 600;
  padding: 10px 14px; cursor: pointer; white-space: nowrap; transition: all .15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.field label { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-dim); margin-bottom: 5px; }
.field .hint { font-size: 11px; color: var(--text-faint); margin-top: 4px; }
fieldset.form-section {
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  padding: 14px 16px 16px; margin: 0 0 14px; min-width: 0;
}
fieldset.form-section legend { font-size: 13px; font-weight: 700; padding: 0 8px; display: flex; align-items: center; gap: 8px; }
.quickfill { background: var(--bg-soft); border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 18px; }
.quickfill h4 { margin: 0 0 6px; font-size: 13px; color: var(--accent); display: flex; align-items: center; gap: 8px; }
.quickfill p { margin: 0 0 10px; font-size: 12px; color: var(--text-faint); line-height: 1.55; }
.quickfill textarea { width: 100%; min-height: 110px; resize: vertical; font-size: 12px; font-family: ui-monospace, monospace; }
.qf-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.callout {
  background: rgba(251, 191, 36, 0.07); border: 1px solid rgba(251, 191, 36, .25);
  color: #fde68a; font-size: 12.5px; border-radius: var(--radius-sm); padding: 11px 14px; line-height: 1.6;
}
.callout.info { background: rgba(45, 212, 191, .06); border-color: rgba(45, 212, 191, .25); color: #99f6e4; }

/* ======================= DRIVE HISTORY / GOOGLE DRIVE ======================= */
.drive-hero {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 22px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(45, 212, 191, .10), rgba(96, 165, 250, .07));
  border: 1px solid rgba(45, 212, 191, .28);
}
.drive-hero .dh-ico {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  background: rgba(45, 212, 191, .14); display: flex; align-items: center; justify-content: center; color: var(--accent);
}
.drive-hero .dh-ico svg { width: 27px; height: 27px; }
.drive-hero .dh-body { flex: 1; min-width: 220px; }
.drive-hero .dh-title { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.drive-hero .dh-sub { font-size: 12.5px; color: var(--text-dim); line-height: 1.55; }

.month-archive { display: flex; flex-direction: column; gap: 10px; }
.archive-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 13px 16px; border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  background: var(--bg-soft);
}
.archive-row .ar-month { font-weight: 700; font-size: 14px; min-width: 150px; }
.archive-row .ar-month .chip { margin-left: 8px; }
.archive-row .ar-files { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.file-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--accent);
  background: rgba(45, 212, 191, .08); border: 1px solid rgba(45, 212, 191, .3);
  padding: 5px 11px; border-radius: 999px; text-decoration: none; transition: all .15s;
}
.file-chip:hover { background: rgba(45, 212, 191, .18); transform: translateY(-1px); }
.file-chip svg { width: 13px; height: 13px; }
.file-chip.muted { color: var(--text-dim); background: var(--bg-soft); border-color: var(--border); }

.status-line { font-size: 12.5px; color: var(--text-dim); line-height: 1.6; }
.status-line .ok { color: #34d399; font-weight: 700; }
.status-line .err { color: #f87171; font-weight: 700; }
.archive-loading { padding: 26px; text-align: center; color: var(--text-faint); font-size: 13px; }
.archive-loading .spin { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.drive-months-tbl td, .drive-months-tbl th { vertical-align: middle; }
.btn-row-status { min-width: 130px; display: inline-block; }
.month-switch {
  cursor: pointer; user-select: none; transition: all .15s;
}
.month-switch:hover { transform: translateY(-1px); border-color: rgba(45, 212, 191, .5); }

/* ======================= TOASTS ======================= */
.toast-host { position: fixed; bottom: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast {
  min-width: 240px; max-width: 380px; padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--panel-2); border: 1px solid var(--border); box-shadow: var(--shadow);
  font-size: 13px; display: flex; align-items: flex-start; gap: 10px;
  animation: toastIn .25s ease;
}
.toast.ok { border-color: rgba(52, 211, 153, .45); }
.toast.err { border-color: rgba(248, 113, 113, .45); }
.toast .t-ico { flex-shrink: 0; margin-top: 1px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

.empty-state { text-align: center; color: var(--text-faint); padding: 46px 20px; font-size: 13.5px; }
.empty-state .big { font-size: 34px; margin-bottom: 8px; }

/* ======================= RESPONSIVE ======================= */
@media (max-width: 1200px) {
  .cols-6 { grid-template-columns: repeat(3, 1fr); }
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .cols-3, .cols-4 { grid-template-columns: 1fr 1fr; }
  .channel-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%);
    transition: transform .22s ease; box-shadow: var(--shadow); height: 100dvh;
  }
  .sidebar.open { transform: none; }
  .mobile-only { display: inline-flex; }
  .view-root { padding: 16px 14px 32px; }
  .topbar { padding: 12px 14px; }
  .cols-2, .cols-3, .cols-4, .cols-6 { grid-template-columns: 1fr 1fr; }
  .mini-stats { grid-template-columns: repeat(3, 1fr); }
  .login-card { padding: 28px 22px 22px; }
}
@media (max-width: 520px) {
  .cols-2, .cols-3, .cols-4, .cols-6 { grid-template-columns: 1fr; }
  .kpi-value { font-size: 23px; }
}
