/*
 * w2a Design System — Shared Stylesheet
 * ======================================
 * Single source of truth for all CSS custom properties, base resets,
 * typography, and shared component patterns used across every w2a portal page.
 *
 * Derived from: F:\wa-portal\w2a_design_system\tokens\design_tokens.json
 * Audit date: 2026-09-22
 *
 * HOW TO USE IN EACH PAGE
 * -----------------------
 * 1. Add before any other <style> or <link> in <head>:
 *      <link rel="stylesheet" href="w2a-ui.css">
 * 2. Remove the page's inline @import Google Fonts (this file handles it).
 * 3. Remove the page's inline :root { … } block entirely.
 * 4. Keep all page-specific component CSS — only the :root token block
 *    and font imports are replaced.
 *
 * VARIANT PAGES
 * -------------
 * w2a_portal_runtime.html  — light background: add data-theme="runtime" to <html>
 * mutapa-email-monitor.html — blue accent variant: add data-theme="monitor" to <html>
 */

/* ─── Google Fonts ──────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ─── Design Tokens — Dark Theme (default) ──────────────────────────────────── */
:root {

  /* === Backgrounds / Surfaces === */
  --bg:           #080b16;   /* page background                     */
  --bg2:          #0d1424;   /* slightly elevated bg (sidebar, etc) */
  --bg3:          #131a2c;   /* third elevation level               */
  --panel:        #111a2c;   /* card / panel surface                */
  --panel2:       #1a2338;   /* input / nested panel surface        */
  --panel3:       #1c2e49;   /* deepest panel (studio only)         */
  --panel-hover:  #1f2a42;   /* hover state for interactive panels  */
  --card:         rgba(18,26,44,.95); /* card with slight transparency */

  /* === Border / Dividers === */
  --line:         rgba(148,163,184,.09);  /* subtle divider              */
  --line-soft:    rgba(148,163,184,.09);  /* alias for --line            */
  --line-strong:  rgba(148,163,184,.18);  /* stronger border / outline   */
  /* web_app / sign aliases — maps to the same values */
  --border:       rgba(148,163,184,.12);
  --border-strong: rgba(148,163,184,.22);
  --border2:      rgba(148,163,184,.18);  /* portal sidebar/card borders — alias for --line-strong */

  /* === Text === */
  --text:         #eaf0fb;   /* primary text                        */
  --text2:        #8a9ab4;   /* secondary / muted text (portal)     */
  --text3:        #5f7391;   /* tertiary / caption text             */
  --muted:        #8a9ab4;   /* alias for --text2                   */
  --muted2:       #5f7391;   /* alias for --text3                   */
  --muted-strong: #5a6d8e;   /* slightly stronger muted (web_app)   */

  /* === Brand / Primary — WhatsApp Green === */
  --green:        #25d366;
  --green2:       #1cae54;
  --green-d:      #128c7e;
  --green-soft:   rgba(37,211,102,.13);
  --green-glow:   rgba(37,211,102,.32);
  /* --primary / --primary-dim / --primary-glow are aliases used by web_app pages */
  --primary:      #25d366;
  --primary-dim:  #1cae54;
  --primary-glow: rgba(37,211,102,.25);

  /* === Accent — per-page overrides set these via data-theme === */
  --accent:       #25d366;   /* generic accent (runtime/sign pages) */
  --accent-hover: #1cae54;
  --accent-light: rgba(37,211,102,.13);

  /* === Semantic Status === */
  --red:          #ef4444;
  --danger:       #ef4444;
  --amber:        #f59e0b;
  --warn:         #f59e0b;
  --warning:      #f59e0b;
  --amber-soft:   rgba(245,158,11,.14);
  --amber-glow:   rgba(245,158,11,.28);
  --blue:         #38bdf8;
  --cyan:         #22d3ee;
  --info:         #38bdf8;
  --purple:       #a78bfa;
  --gold:         #e2b05e;
  --success:      #22c55e;
  --success-bg:   rgba(34,197,94,.12);
  --warning-bg:   rgba(245,158,11,.12);
  --danger-bg:    rgba(239,68,68,.12);
  --info-bg:      rgba(56,189,248,.12);

  /* === Shadows === */
  --shadow-sm:    0 2px 6px rgba(0,0,0,.16);
  --shadow:       0 12px 34px rgba(0,0,0,.28);
  --shadow-soft:  0 16px 48px rgba(0,0,0,.24);
  --shadow-lg:    0 24px 60px rgba(0,0,0,.42);

  /* === Border Radius === */
  --radius:       14px;
  --radius-lg:    18px;
  --radius-xl:    22px;
  --r:            14px;  /* studio shorthand alias */

  /* === Layout Dimensions === */
  --sidebar-w:    270px;   /* unified sidebar width (was 240–280px) */
  --nav-w:        270px;   /* alias used by business/web_app        */
  --header-h:     64px;
  --header-height: 64px;   /* alias used by monitor                 */
  --sidebar-width: 270px;  /* alias used by monitor                 */
  --side:         270px;   /* studio alias                          */
  --props:        330px;   /* studio properties panel width         */

  /* === Typography === */
  --font-sans:    'Manrope', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-ui:      'Inter', system-ui, sans-serif;
  --font-display: 'Manrope', 'Inter', system-ui, sans-serif;
  --display:      'Manrope', 'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, Consolas, monospace;
  --font:         'Manrope', 'Inter', system-ui, -apple-system, sans-serif; /* sign/runtime alias */

  /* === Animation === */
  --ease:         cubic-bezier(.22,.61,.36,1);

  /* === Scrollbar thumb (used by multiple pages) === */
  --scrollbar-thumb: rgba(148,163,184,.18);
}

/* ─── Variant: Portal Runtime (light background) ───────────────────────────── */
:root[data-theme="runtime"] {
  --bg:           #eef3f8;
  --bg2:          #ffffff;
  --bg3:          #f1f5f9;
  --panel:        #ffffff;
  --panel2:       #f8fafc;
  --panel-hover:  #f1f5f9;
  --card:         #ffffff;
  --line:         #d7e0eb;
  --line-soft:    #d7e0eb;
  --line-strong:  #c4cfdd;
  --border:       #d7e0eb;
  --border-strong: #c4cfdd;
  --text:         #14243a;
  --text2:        #4e6380;
  --text3:        #6e8097;
  --muted:        #6e8097;
  --muted2:       #8fa0b4;
  --muted-strong: #4e6380;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
  --shadow:       0 4px 12px rgba(0,0,0,.10);
  --shadow-soft:  0 6px 20px rgba(0,0,0,.10);
  --shadow-lg:    0 12px 32px rgba(0,0,0,.14);
  --scrollbar-thumb: rgba(100,116,139,.22);
  /* keep green accent */
}

/* ─── Variant: Email Monitor (blue accent) ──────────────────────────────────── */
:root[data-theme="monitor"] {
  --bg:           #0f1117;
  --bg2:          #1a1d29;
  --bg3:          #1e2235;
  --panel:        #1e2235;
  --panel2:       #151824;
  --panel-hover:  #252a40;
  --card:         rgba(30,34,53,.95);
  --line:         #2a2f45;
  --line-soft:    #2a2f45;
  --line-strong:  #363b54;
  --border:       #2a2f45;
  --border-strong: #363b54;
  --text:         #e4e6f0;
  --text2:        #9498b0;
  --text3:        #6b7094;
  --muted:        #9498b0;
  --muted2:       #6b7094;
  --muted-strong: #7b7fa0;
  /* Blue accent overrides */
  --green:        #3b82f6;
  --green2:       #2563eb;
  --green-soft:   rgba(59,130,246,.12);
  --green-glow:   rgba(59,130,246,.28);
  --primary:      #3b82f6;
  --primary-dim:  #2563eb;
  --primary-glow: rgba(59,130,246,.20);
  --accent:       #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: rgba(59,130,246,.12);
  --info:         #06b6d4;
  --info-bg:      rgba(6,182,212,.12);
  --purple:       #8b5cf6;
}

/* ─── Base Reset ────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

html, body {
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  letter-spacing: -.005em;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
}

/* ─── Standard Dark-Page Body Background ────────────────────────────────────── */
/* Pages opt in by adding class="w2a-bg" to <body> */
body.w2a-bg {
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(37,211,102,.07), transparent 62%),
    radial-gradient(760px 500px at -10% 108%, rgba(56,189,248,.05), transparent 58%),
    linear-gradient(180deg, #0a0f1e 0%, var(--bg) 100%);
  background-attachment: fixed;
}

/* Monitor variant bg */
[data-theme="monitor"] body.w2a-bg,
body.w2a-bg[data-theme="monitor"] {
  background: var(--bg);
}

/* ─── Typography ─────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6, .display {
  font-family: var(--font-display);
  letter-spacing: -.025em;
  font-weight: 700;
  color: var(--text);
}

a {
  color: var(--green);
  text-decoration: none;
}
a:hover { color: #4ade80; }

[data-theme="monitor"] a { color: var(--accent); }
[data-theme="monitor"] a:hover { color: #60a5fa; }

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

/* ─── Focus Styles ───────────────────────────────────────────────────────────── */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.nav-item:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 9px;
}
[data-theme="monitor"] button:focus-visible,
[data-theme="monitor"] a:focus-visible,
[data-theme="monitor"] input:focus-visible,
[data-theme="monitor"] select:focus-visible,
[data-theme="monitor"] textarea:focus-visible {
  outline-color: var(--accent);
}

/* ─── Scrollbar ──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,.32); }
[data-theme="runtime"] ::-webkit-scrollbar-track { background: var(--bg); }

/* ─── Shared Layout Shell ────────────────────────────────────────────────────── */
/* Standard sidebar + main shell. Each page may override widths via its own CSS. */
.app-shell,
.app,
.shell {
  display: flex;
  min-height: 100vh;
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 11px;
  padding: 10px 17px;
  font: 600 14px/1.2 var(--font-sans);
  cursor: pointer;
  background: var(--green);
  color: #04180b;
  box-shadow: 0 4px 14px rgba(37,211,102,.24), inset 0 1px 0 rgba(255,255,255,.15);
  transition: transform .15s var(--ease), filter .15s var(--ease), box-shadow .15s var(--ease);
  min-height: 38px;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(37,211,102,.32);
}
.btn:active  { transform: translateY(0); }
.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: none;
}

/* Ghost */
.btn.ghost,
.btn.secondary {
  background: rgba(255,255,255,.03);
  color: var(--text);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.btn.ghost:hover,
.btn.secondary:hover {
  background: rgba(37,211,102,.06);
  border-color: rgba(37,211,102,.32);
  color: #86efac;
}

/* Warning / Amber */
.btn.warn,
.btn.amber {
  background: linear-gradient(180deg, #fbbf24, var(--amber));
  color: #1a1408;
  box-shadow: 0 4px 14px var(--amber-glow);
}
.btn.warn:hover,
.btn.amber:hover { filter: brightness(1.06); }

/* Danger */
.btn.danger {
  background: linear-gradient(180deg, #f87171, var(--red));
  color: #fff;
  box-shadow: 0 4px 14px rgba(239,68,68,.28);
}
.btn.danger:hover { filter: brightness(1.06); }

/* Danger ghost variant (used in modals / tables) */
.btn.danger.ghost,
.btn.mini.danger {
  background: rgba(239,68,68,.14);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,.28);
  box-shadow: none;
}
.btn.danger.ghost:hover,
.btn.mini.danger:hover {
  background: rgba(239,68,68,.22);
}

/* Size variants */
.btn.small,
.btn.mini {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 9px;
  min-height: 30px;
}
.btn.large {
  padding: 13px 24px;
  font-size: 15px;
  border-radius: 13px;
  min-height: 48px;
}

/* Monitor blue-accent override */
[data-theme="monitor"] .btn {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(59,130,246,.24);
}
[data-theme="monitor"] .btn:hover {
  box-shadow: 0 8px 22px rgba(59,130,246,.32);
}

/* ─── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.026), rgba(255,255,255,.005) 42%), var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.card:hover {
  border-color: rgba(148,163,184,.24);
  box-shadow: 0 16px 40px rgba(0,0,0,.32);
}

/* Card heading with green accent bar */
.card h2,
.card > h2 {
  font: 700 16px/1.25 var(--font-display);
  letter-spacing: -.02em;
  margin-bottom: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.card h2::before {
  content: '';
  width: 4px;
  height: 16px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 12px var(--green-glow);
  flex: 0 0 auto;
}

[data-theme="runtime"] .card {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
[data-theme="runtime"] .card:hover {
  border-color: var(--line-strong);
}

/* ─── Inputs ─────────────────────────────────────────────────────────────────── */
input,
select,
textarea {
  width: 100%;
  background: var(--panel2);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--text);
  padding: 10px 13px;
  font-size: 14px;
  margin-bottom: 10px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
  background: #1f2942;
}
input::placeholder,
textarea::placeholder { color: var(--muted2); }

label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

[data-theme="runtime"] input,
[data-theme="runtime"] select,
[data-theme="runtime"] textarea {
  background: var(--panel);
  border-color: var(--line-strong);
  color: var(--text);
}
[data-theme="runtime"] input:focus,
[data-theme="runtime"] select:focus,
[data-theme="runtime"] textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(37,211,102,.14);
  background: #fff;
}

[data-theme="monitor"] input:focus,
[data-theme="monitor"] select:focus,
[data-theme="monitor"] textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

/* ─── Pills / Badges ─────────────────────────────────────────────────────────── */

/* Pill — used by business, ops, savings, web_app */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border-radius: 99px;
  font: 700 10.5px/1.4 var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .55px;
  white-space: nowrap;
}
.pill.active,
.pill.published,
.pill.verified,
.pill.ok,
.pill.online {
  background: rgba(37,211,102,.14);
  color: #6ee7b7;
  box-shadow: inset 0 0 0 1px rgba(37,211,102,.22);
}
.pill.pending,
.pill.draft,
.pill.unverified,
.pill.warn,
.pill.expiring {
  background: rgba(245,158,11,.14);
  color: #fcd34d;
  box-shadow: inset 0 0 0 1px rgba(245,158,11,.26);
}
.pill.suspended,
.pill.rejected,
.pill.bad,
.pill.offline,
.pill.expired,
.pill.used {
  background: rgba(239,68,68,.14);
  color: #fca5a5;
  box-shadow: inset 0 0 0 1px rgba(239,68,68,.22);
}
.pill.info {
  background: rgba(56,189,248,.14);
  color: #7dd3fc;
  box-shadow: inset 0 0 0 1px rgba(56,189,248,.22);
}

/* Badge — used by runtime, till, monitor */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font: 700 11px/1.4 var(--font-sans);
  white-space: nowrap;
}
/* Default / neutral badge */
.badge:not([class*="-"]):not(.on):not(.off) {
  background: rgba(148,163,184,.10);
  color: var(--text2);
}
.badge.on,
.badge-success {
  background: rgba(37,211,102,.15);
  color: #86efac;
  border: 1px solid rgba(37,211,102,.4);
}
.badge.off,
.badge-danger {
  background: rgba(239,68,68,.12);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,.4);
}
.badge-warning {
  background: rgba(245,158,11,.14);
  color: #fcd34d;
  border: 1px solid rgba(245,158,11,.3);
}
.badge-info {
  background: rgba(56,189,248,.14);
  color: #7dd3fc;
  border: 1px solid rgba(56,189,248,.28);
}
.badge-purple {
  background: rgba(167,139,250,.14);
  color: #c4b5fd;
  border: 1px solid rgba(167,139,250,.28);
}
.badge-neutral {
  background: rgba(148,163,184,.10);
  color: var(--text2);
  border: 1px solid var(--line-strong);
}

/* ─── Tables ─────────────────────────────────────────────────────────────────── */
.table-wrap { overflow: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}
th, td {
  text-align: left;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 13.5px;
}
th {
  font: 600 11.5px/1.2 var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .45px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  white-space: nowrap;
}
tr:hover td { background: rgba(255,255,255,.015); }
td.numeric, th.numeric, td.num { font-family: var(--font-mono); text-align: right; }

[data-theme="runtime"] th { background: #f8fafc; }
[data-theme="runtime"] tr:hover td { background: #f1f5f9; }

/* ─── Sidebar — shared base ──────────────────────────────────────────────────── */
/*
 * Each page uses its own sidebar class names (.sidebar, .ops-sidebar, .sav-sidebar,
 * .business-sidebar etc.). These shared rules set the consistent structural defaults.
 * Per-page CSS retains full control of positioning and content styling.
 */
.sidebar,
.ops-sidebar,
.sav-sidebar,
.business-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  border-right: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Sidebar nav button shared defaults */
.sidebar .nav button,
.ops-sidebar .nav button,
.sav-sidebar .nav button,
.nav button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 11px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.sidebar .nav button:hover,
.nav button:hover {
  background: rgba(255,255,255,.045);
  color: var(--text);
}
.sidebar .nav button.on,
.nav button.on {
  background: rgba(37,211,102,.12);
  color: #7bedaa;
}

/* ─── Topbar / Header — shared base ─────────────────────────────────────────── */
/*
 * Each page has its own topbar class (.topbar, .header, .business-topbar etc.).
 * These rules set a consistent default height, background, and border.
 */
.topbar,
.header,
.business-topbar,
.sav-topbar,
.ops-topbar {
  min-height: var(--header-h);
  background: rgba(8,11,22,.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

[data-theme="runtime"] .topbar,
[data-theme="runtime"] .header {
  background: rgba(238,243,248,.92);
}

[data-theme="monitor"] .header {
  background: rgba(26,29,41,.92);
}

/* ─── Modal / Overlay ────────────────────────────────────────────────────────── */
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(5,14,28,.65);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 500;
}
.modal {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  max-width: 760px;
  width: 100%;
  max-height: 88vh;
  overflow: auto;
  padding: 20px;
  box-shadow: var(--shadow-lg);
}
.modal-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.modal-head h3 { margin: 0; flex: 1; }

[data-theme="runtime"] .modal { background: #fff; border-color: var(--line); }

/* ─── Empty / Error States ───────────────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 40px;
  color: var(--muted);
}
.error { color: var(--danger); }
.hint {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 12px;
  line-height: 1.5;
}

/* ─── Utility ────────────────────────────────────────────────────────────────── */
.muted      { color: var(--muted); }
.text-muted { color: var(--muted); }
.grow       { flex: 1; min-width: 0; }
.row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.row.wrap   { flex-wrap: wrap; }

/* Pager / Pagination */
.pager,
.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.pager button {
  border: 1px solid var(--line-strong);
  background: var(--panel);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: border-color .15s var(--ease);
}
.pager button:disabled { opacity: .45; cursor: default; }
.pager button:hover:not(:disabled) { border-color: var(--green); color: var(--green); }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 1000;
  background: #14243a;
  border: 1px solid var(--line-strong);
  padding: 11px 17px;
  border-radius: 11px;
  box-shadow: var(--shadow);
  display: none;
  max-width: min(620px, calc(100vw - 30px));
  font-size: 14px;
}
.toast.bad { border-color: #8d3a47; color: #ffc0c4; }

/* Status chip (studio) */
.status {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: #27364b;
  color: #bdcbe0;
}
.status.ready,
.status.published  { background: #07391f; color: #67e896; }
.status.dirty,
.status.warning    { background: #4a330a; color: #ffd17d; }
.status.error      { background: #4a1720; color: #ffabb2; }

/* ─── Grid helpers ───────────────────────────────────────────────────────────── */
.grid { display: grid; gap: 15px; }
@media (min-width: 800px) {
  .grid.cols2, .grid.two  { grid-template-columns: 1fr 1fr; }
  .grid.cols3, .grid.three { grid-template-columns: repeat(3, 1fr); }
  .grid.cols4             { grid-template-columns: repeat(4, 1fr); }
}

/* ─── Responsive: mobile sidebar collapse ────────────────────────────────────── */
@media (max-width: 820px) {
  :root {
    --sidebar-w: 0px;
    --nav-w:     0px;
  }
  .sidebar,
  .ops-sidebar,
  .sav-sidebar,
  .business-sidebar {
    transform: translateX(-110%);
    transition: transform .24s var(--ease);
    width: min(290px, 86vw);
  }
  .sidebar.open,
  .sidebar.collapsed-false,
  .ops-sidebar.open,
  .sav-sidebar.open,
  .business-sidebar.open {
    transform: none;
  }
}
