/* ============================================================
   Ntombana Digital Communication Platform — Stylesheet
   Brand anchor: #1B5E20 / #2E7D32 (aGrowChain greens)
   ============================================================ */
:root{
  --forest-950: #0E1F12;
  --forest-900: #14291A;
  --forest-800: #1B5E20;
  --forest-700: #226B27;
  --forest-600: #2E7D32;
  --forest-500: #3E9143;
  --forest-border: #22381F;
  --forest-glow: rgba(46, 125, 50, 0.35);

  --sage-tint: #E7F3E5;
  --amber-600: #B97A2C;
  --amber-500: #C68A3D;
  --amber-tint: #FBF3E4;
  --blue-600: #2C5FA8;
  --blue-tint: #E8EFFA;
  --red-600: #B23A3A;
  --red-tint: #FBEAEA;

  --paper: #F7F5F0;
  --paper-dim: #ECE8DF;
  --paper-line: #DDD6C7;

  --ink-900: #1B1E19;
  --ink-700: #45493F;
  --ink-500: #6E7264;
  --ink-300: #A3A695;

  --font-display: 'Source Serif 4', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

*{ box-sizing: border-box; margin: 0; padding: 0; }
html, body{ font-family: var(--font-body); background: var(--forest-950); color: var(--paper); height: 100%; }
button{ font-family: inherit; }

/* ============ LOGIN PAGE ============ */
.login-body{
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background: radial-gradient(circle at 30% 20%, var(--forest-800), var(--forest-950) 70%);
}
.login-card{
  background: #fff; color: var(--ink-900);
  width: 380px; padding: 32px 30px;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-brand{ display:flex; align-items:center; gap:10px; margin-bottom:24px; }
.login-card h1{ font-family: var(--font-display); font-size:24px; font-weight:600; margin-bottom:4px; }
.login-sub{ font-size:12.5px; color: var(--ink-500); margin-bottom:22px; }
.login-error{ background: var(--red-tint); color: var(--red-600); font-size:12px; padding:9px 12px; border-radius:8px; margin-bottom:14px; }

/* ============ APP LAYOUT ============ */
.app{ display: flex; min-height: 100vh; }
.sidebar{
  width: 230px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--forest-900) 0%, var(--forest-950) 100%);
  border-right: 1px solid var(--forest-border);
  display: flex; flex-direction: column;
  padding: 20px 14px;
  position: sticky; top: 0; height: 100vh;
}
.brand{ display: flex; align-items: center; gap: 10px; padding: 6px 8px 20px; border-bottom: 1px solid var(--forest-border); margin-bottom: 16px; }
.brand-mark{
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--forest-600), var(--forest-800));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 16px; color: #fff;
  flex-shrink: 0; box-shadow: 0 2px 10px var(--forest-glow);
}
.brand-text .name{ font-weight: 600; font-size: 13.5px; color: #fff; }
.brand-text .sub{ font-size: 10px; color: var(--ink-300); letter-spacing: 0.4px; text-transform: uppercase; }

.nav-section-label{ font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-300); padding: 13px 10px 6px; font-weight: 600; }
.nav-item{
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--ink-300); font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease); position: relative;
}
.nav-item:hover{ background: rgba(255,255,255,0.05); color: #fff; }
.nav-item.active{ background: rgba(255,255,255,0.07); color: #fff; }
.nav-item.active::before{ content:''; position:absolute; left:-14px; top:8px; bottom:8px; width:3px; background: var(--forest-500); border-radius:0 3px 3px 0; }
.nav-item svg{ width: 16px; height: 16px; flex-shrink: 0; opacity: 0.85; }
.nav-item .badge{ margin-left: auto; background: var(--red-600); color: #fff; font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 20px; }

.sidebar-footer{ margin-top: auto; padding-top: 14px; border-top: 1px solid var(--forest-border); }
.user-pill{ display:flex; align-items:center; gap:8px; padding:8px; border-radius: var(--radius-sm); margin-bottom: 8px; }
.user-avatar{ width:28px; height:28px; border-radius:50%; background: linear-gradient(135deg, var(--forest-500), var(--forest-700)); display:flex; align-items:center; justify-content:center; color:#fff; font-size:11px; font-weight:700; flex-shrink: 0; }
.uname{ font-size:12px; font-weight:600; color:#fff; }
.urole{ font-size:10px; color: var(--ink-300); text-transform: capitalize; }
.logout-btn{ width:100%; background: rgba(255,255,255,0.06); border: 1px solid var(--forest-border); color: var(--ink-300); font-size:11.5px; font-weight:600; padding:7px; border-radius:8px; cursor:pointer; }
.logout-btn:hover{ background: rgba(255,255,255,0.1); color:#fff; }

.main{ flex:1; background: var(--paper); color: var(--ink-900); min-height:100vh; display:flex; flex-direction:column; }
.topbar{ display:flex; align-items:center; justify-content:space-between; padding:16px 28px; border-bottom:1px solid var(--paper-line); background: var(--paper); position:sticky; top:0; z-index:20; }
.topbar-title h1{ font-family: var(--font-display); font-size:21px; font-weight:600; }
.topbar-title .breadcrumb{ font-size:12px; color:var(--ink-500); margin-top:2px; }
.breadcrumb .sep{ color: var(--paper-line); margin: 0 4px;}
.breadcrumb .here{ color: var(--forest-700); font-weight:600; }

.btn{ font-family: var(--font-body); font-size:13px; font-weight:600; padding:9px 15px; border-radius: var(--radius-sm); border:1px solid transparent; cursor:pointer; display:inline-flex; align-items:center; gap:7px; transition: all 0.15s var(--ease); }
.btn-primary{ background: var(--forest-700); color:#fff; }
.btn-primary:hover{ background: var(--forest-800); transform: translateY(-1px); box-shadow: 0 4px 12px var(--forest-glow); }
.btn-primary:disabled{ opacity:0.5; cursor:not-allowed; transform:none; box-shadow:none; }
.btn-ghost{ background: transparent; border:1px solid var(--paper-line); color: var(--ink-700); }
.btn-ghost:hover{ background: var(--paper-dim); }
.btn svg{ width:14px; height:14px; }

.content{ flex:1; padding:24px 28px 40px; display:none; }
.content.active{ display:block; animation: fadeUp 0.25s var(--ease); }
@keyframes fadeUp{ from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:translateY(0);} }

.kpi-row{ display:grid; grid-template-columns: repeat(4,1fr); gap:14px; margin-bottom:22px; }
.kpi-card{ background:#fff; border:1px solid var(--paper-line); border-radius: var(--radius-lg); padding:16px 18px; position:relative; overflow:hidden; transition: box-shadow 0.15s var(--ease), transform 0.15s var(--ease); }
.kpi-card[onclick]:hover{ box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-2px); }
.kpi-card::before{ content:''; position:absolute; top:0; left:0; width:3px; height:100%; background: var(--accent, var(--forest-700)); }
.kpi-label{ font-size:11px; color:var(--ink-500); font-weight:600; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:7px; }
.kpi-value{ font-family: var(--font-display); font-size:29px; font-weight:600; }

.section-title{ font-family: var(--font-display); font-size:18px; font-weight:600; margin-bottom:4px; }
.section-desc{ font-size:12.5px; color: var(--ink-500); margin-bottom:18px; }

.two-col{ display:grid; grid-template-columns: 1fr 1fr; gap:18px; }
.panel{ background:#fff; border:1px solid var(--paper-line); border-radius: var(--radius-lg); overflow:hidden; }
.panel-header{ padding:14px 18px; border-bottom:1px solid var(--paper-line); display:flex; justify-content:space-between; align-items:center; }
.panel-header h3{ font-family: var(--font-display); font-size:15px; font-weight:600; }
.panel-header .link{ font-size:12px; color: var(--forest-700); font-weight:600; cursor:pointer; }
.row-list{ display:flex; flex-direction:column; }
.row-item{ display:flex; align-items:center; gap:13px; padding:11px 18px; border-bottom:1px solid var(--paper-dim); }
.row-item:last-child{ border-bottom:none; }
.row-icon{ width:34px; height:34px; border-radius:9px; display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:14px; }
.row-main{ flex:1; min-width:0; }
.row-title{ font-size:13px; font-weight:600; }
.row-sub{ font-size:11px; color:var(--ink-500); margin-top:2px; }
.row-end{ text-align:right; flex-shrink:0; font-size: 11px; color: var(--ink-500); }
.empty-state{ padding: 30px 20px; text-align:center; font-size:12.5px; color: var(--ink-500); }
.empty-state a{ color: var(--forest-700); font-weight:600; cursor:pointer; }
.empty-cell{ text-align:center; padding: 30px; color: var(--ink-500); font-size: 12.5px; }

.status-chip{ font-size:9.5px; font-weight:700; padding:3px 9px; border-radius:20px; text-transform:uppercase; letter-spacing:0.3px; display:inline-block; }
.status-sent{ background: var(--sage-tint); color: var(--forest-700); }
.status-scheduled{ background: var(--amber-tint); color: var(--amber-600); }
.status-failed{ background: var(--red-tint); color: var(--red-600); }
.status-draft{ background: var(--paper-dim); color: var(--ink-500); }

.toolbar{ display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; gap:12px; flex-wrap:wrap; }
.search-box{ position:relative; width:280px; }
.search-box input{ width:100%; padding:9px 14px 9px 34px; border-radius:8px; border:1px solid var(--paper-line); font-size:13px; background:#fff; outline:none; }
.search-box input:focus{ border-color: var(--forest-600); }
.search-box svg{ position:absolute; left:11px; top:50%; transform:translateY(-50%); width:14px; height:14px; color:var(--ink-500); }

.data-table{ width:100%; background:#fff; border:1px solid var(--paper-line); border-radius: var(--radius-lg); border-collapse:collapse; overflow:hidden; }
.data-table thead th{ text-align:left; font-size:10px; text-transform:uppercase; letter-spacing:0.5px; color:var(--ink-500); font-weight:700; padding:11px 16px; background: var(--paper-dim); border-bottom:1px solid var(--paper-line); }
.data-table tbody td{ padding:12px 16px; font-size:12.5px; border-bottom:1px solid var(--paper-dim); }
.data-table tbody tr:last-child td{ border-bottom:none; }
.data-table tbody tr:hover{ background:#FCFBF8; }
.campaign-row:hover td{ background: var(--sage-tint) !important; }
.icon-btn{ background:none; border:none; cursor:pointer; color: var(--ink-500); padding: 4px; }
.icon-btn:hover{ color: var(--red-600); }

/* Composer */
.composer{ display:grid; grid-template-columns: 1fr 360px; gap:18px; align-items:start; }
.composer-main{ display:flex; flex-direction:column; gap:16px; }
.composer-card{ background:#fff; border:1px solid var(--paper-line); border-radius: var(--radius-lg); padding:18px 20px; }
.composer-card-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:13px; }
.composer-card-head h4{ font-size:12.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; color: var(--ink-700); display:flex; align-items:center; gap:7px; }
.step-num{ width:20px; height:20px; border-radius:50%; background: var(--forest-700); color:#fff; font-size:10.5px; display:flex; align-items:center; justify-content:center; font-weight:700; }

.field{ display:flex; flex-direction:column; gap:5px; margin-bottom:10px; }
.field label{ font-size:11px; font-weight:600; color: var(--ink-700); }
.field input, .field select, .field textarea{ padding:10px 12px; border-radius:8px; border:1px solid var(--paper-line); font-size:13px; font-family: var(--font-body); background:#fff; outline:none; width:100%; }
.field input:focus, .field select:focus, .field textarea:focus{ border-color: var(--forest-600); }

.channel-select-grid{ display:grid; grid-template-columns: repeat(4,1fr); gap:10px; margin-bottom: 4px; }
.chan-card{ border:1.5px solid var(--paper-line); border-radius:10px; padding:12px; display:flex; align-items:center; gap:10px; cursor:pointer; transition: all 0.15s; }
.chan-card.selected{ border-color: var(--forest-600); background: var(--sage-tint); }
.chan-card.disabled{ opacity:0.45; cursor:not-allowed; background: var(--paper-dim); }
.chan-card .ico{ width:28px; height:28px; border-radius:7px; display:flex; align-items:center; justify-content:center; font-size:12px; flex-shrink:0; }
.chan-card .lbl{ font-size:12px; font-weight:600; }
.chan-card .sub{ font-size:10px; color: var(--ink-500); }
.chan-card.selected .sub{ color: var(--forest-700); font-weight:600; }

.send-mode-toggle{ display:flex; flex-direction:column; gap:8px; margin-bottom: 12px; }
.radio-row{ display:flex; gap:10px; padding:10px; border:1px solid var(--paper-line); border-radius:10px; cursor:pointer; }
.radio-row input{ margin-top:3px; }
.radio-title{ font-size:12.5px; font-weight:600; }
.radio-sub{ font-size:11px; color:var(--ink-500); margin-top:2px; }

#message-editor{ width:100%; min-height:110px; border:1px solid var(--paper-line); border-radius:8px; padding:12px 14px; font-size:13px; font-family: var(--font-body); resize:vertical; outline:none; line-height:1.55; }
#message-editor:focus{ border-color: var(--forest-600); }
#message-editor:disabled{ background: var(--paper-dim); color: var(--ink-500); }
.char-meta{ font-size:11px; color: var(--ink-500); margin-top:8px; font-family: var(--font-mono); }

.preview-pane{ position: sticky; top: 86px; display:flex; flex-direction:column; gap:14px; }
.preview-card{ background: var(--forest-900); border-radius: var(--radius-lg); padding:18px; }
.preview-card-head h4{ color:#fff; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; margin-bottom: 12px;}
.phone-frame{ background:#fff; border-radius:18px; padding:14px 12px; min-height:160px; color:#1a1a1a; }
.phone-msg-bubble{ background: #DCF2D6; border-radius:12px 12px 12px 3px; padding:10px 13px; font-size:12px; line-height:1.5; max-width:92%; }
.phone-empty{ display:flex; align-items:center; justify-content:center; min-height:130px; color:#b8b8b8; font-size:11.5px; text-align:center; padding: 0 10px;}

.audience-summary{ background: rgba(255,255,255,0.06); border-radius:10px; padding:14px; }
.audience-num{ font-family: var(--font-display); font-size:26px; font-weight:600; color:#fff; }
.audience-lbl{ font-size:10.5px; color: var(--ink-300); }

.group-card{ background:#fff; border:1px solid var(--paper-line); border-radius:var(--radius-lg); margin-bottom:10px; overflow:hidden; }
.group-card-head{ display:flex; align-items:center; gap:12px; padding:14px 18px; cursor:pointer; user-select:none; }
.group-card-head:hover{ background:var(--paper-dim); }
.group-expand-icon{ width:20px; height:20px; flex-shrink:0; color:var(--ink-300); transition:transform 0.2s; }
.group-card.open .group-expand-icon{ transform:rotate(90deg); }
.group-card-info{ flex:1; min-width:0; }
.group-card-name{ font-size:13.5px; font-weight:700; }
.group-card-meta{ font-size:11px; color:var(--ink-500); margin-top:2px; }
.group-card-count{ background:var(--sage-tint); color:var(--forest-700); font-size:11px; font-weight:700; padding:3px 10px; border-radius:20px; flex-shrink:0; }
.group-card-actions{ display:flex; gap:6px; flex-shrink:0; }
.group-members{ display:none; border-top:1px solid var(--paper-line); }
.group-card.open .group-members{ display:block; }
.group-member-row{ display:flex; align-items:center; gap:12px; padding:9px 18px 9px 50px; border-bottom:1px solid var(--paper-dim); font-size:12.5px; }
.group-member-row:last-child{ border-bottom:none; }
.group-member-name{ flex:1; font-weight:500; }
.group-member-num{ font-family:var(--font-mono); font-size:11px; color:var(--ink-500); }
.group-members-loading{ padding:18px; text-align:center; font-size:12px; color:var(--ink-500); } font-weight:600; padding:4px 10px; border-radius:20px; border:1px solid var(--paper-line); background:#fff; cursor:pointer; color:var(--ink-500); }
.filter-btn.active{ background:var(--forest-700); color:#fff; border-color:var(--forest-700); }
.detail-stat{ flex:1; padding:12px 18px; text-align:center; border-right:1px solid var(--paper-line); }
.detail-stat:last-child{ border-right:none; }
.detail-stat-val{ font-family:var(--font-display); font-size:22px; font-weight:600; }
.detail-stat-lbl{ font-size:10px; text-transform:uppercase; letter-spacing:0.5px; color:var(--ink-500); margin-top:2px; }
.log-row{ display:flex; align-items:flex-start; gap:12px; padding:10px 20px; border-bottom:1px solid var(--paper-dim); }
.log-row:last-child{ border-bottom:none; }
.log-name{ font-size:12.5px; font-weight:600; flex:1; min-width:0; }
.log-number{ font-size:11px; color:var(--ink-500); font-family:var(--font-mono); }
.log-error{ font-size:11px; color:var(--red-600); background:var(--red-tint); border-radius:6px; padding:5px 8px; margin-top:4px; line-height:1.4; }
.log-time{ font-size:10.5px; color:var(--ink-300); text-align:right; flex-shrink:0; } align-items:center; gap:5px; background:var(--sage-tint); color:var(--forest-700); border:1px solid var(--forest-500); border-radius:20px; padding:3px 10px 3px 8px; font-size:12px; font-weight:600; }
.contact-chip button{ background:none; border:none; cursor:pointer; color:var(--forest-700); font-size:14px; line-height:1; padding:0; margin-left:2px; }
.picker-row{ display:flex; align-items:center; gap:10px; padding:10px 14px; border-bottom:1px solid var(--paper-dim); cursor:pointer; }
.picker-row:last-child{ border-bottom:none; }
.picker-row:hover{ background:var(--paper-dim); }
.picker-row input[type=checkbox]{ width:16px; height:16px; accent-color:var(--forest-600); flex-shrink:0; }
.picker-row .p-name{ font-size:13px; font-weight:600; flex:1; color:var(--ink-900); }
.picker-row .p-num{ font-size:11px; color:var(--ink-500); font-family:var(--font-mono); }
.picker-row .p-group{ font-size:11px; color:var(--ink-300); }
.tag-pill{ background:var(--sage-tint); color:var(--forest-700); font-size:11px; font-weight:600; padding:2px 8px; border-radius:20px; display:inline-block; text-transform:capitalize; }
.send-summary-line svg{ flex-shrink:0; margin-top:1px; }

.banner{ padding:11px 16px; border-radius:10px; font-size:12.5px; margin-bottom:16px; display:flex; gap:8px; align-items: flex-start; }
.banner.success{ background: var(--sage-tint); color: var(--forest-700); border: 1px solid var(--forest-500); }
.banner.error{ background: var(--red-tint); color: var(--red-600); border: 1px solid var(--red-600); }
.banner.info{ background: var(--blue-tint); color: var(--blue-600); border: 1px solid var(--blue-600); }

/* Modal */
.modal-overlay{ position:fixed; inset:0; background:rgba(0,0,0,0.5); display:flex; align-items:center; justify-content:center; z-index:100; }
.modal-card{ background:#fff; border-radius: var(--radius-lg); width:400px; max-width:90vw; color:var(--ink-900); }
.modal-header{ display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid var(--paper-line); }
.modal-header h3{ font-family: var(--font-display); font-size:16px; font-weight:600; color:var(--ink-900); }
.modal-close{ background:none; border:none; font-size:22px; cursor:pointer; color: var(--ink-500); line-height: 1; }
.modal-body{ padding:18px 20px; }
.modal-footer{ display:flex; justify-content:flex-end; gap:8px; padding:14px 20px; border-top:1px solid var(--paper-line); }

@media (max-width: 1100px){
  .kpi-row{ grid-template-columns: repeat(2,1fr); }
  .composer{ grid-template-columns: 1fr; }
  .preview-pane{ position:static; }
  .two-col{ grid-template-columns: 1fr; }
}

/* ============================================================
   Department Switcher (super_admin only)
   ============================================================ */
.dept-switcher{ padding: 0 8px 16px; margin-bottom: 4px; }
.dept-switcher-label{ font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-300); font-weight: 600; display:block; margin-bottom: 6px; }
.dept-switcher select{
  width:100%; background-color: var(--forest-800); border: 1px solid var(--forest-border);
  color: #ffffff; font-size: 12.5px; font-weight: 600; padding: 8px 9px; border-radius: 8px;
  cursor: pointer; -webkit-appearance: none; -moz-appearance: none; appearance: none;
}
.dept-switcher select option{
  background-color: #ffffff; color: var(--ink-900);
}
.dept-switcher select:focus{ outline: none; border-color: var(--forest-500); }
.dept-badge{
  display:inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.4px; padding: 2px 7px; border-radius: 5px;
  background: var(--paper-dim); color: var(--ink-700); margin-left: 8px; vertical-align: middle;
}
.audit-cross-tenant-row{ background: var(--amber-tint) !important; }
.audit-cross-tenant-tag{
  display:inline-block; font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.3px; padding: 2px 7px; border-radius: 5px;
  background: var(--amber-500); color: #fff; margin-left: 6px;
}

.sidebar-nav-scroll{ scrollbar-width:thin; scrollbar-color:rgba(255,255,255,0.15) transparent; }
.sidebar-nav-scroll::-webkit-scrollbar{ width:6px; }
.sidebar-nav-scroll::-webkit-scrollbar-track{ background:transparent; }
.sidebar-nav-scroll::-webkit-scrollbar-thumb{ background:rgba(255,255,255,0.15); border-radius:10px; }
.sidebar-nav-scroll::-webkit-scrollbar-thumb:hover{ background:rgba(255,255,255,0.28); }

Add-Content -Path "public\css\app.css" -Value @"

/* ============================================================
   Mobile Responsiveness — Phase 1
   Sidebar becomes an off-canvas drawer; KPI grids stack; modals and
   the Events check-in scanner fit narrow screens properly.
   ============================================================ */
.mobile-menu-toggle{ display:none; background:none; border:none; cursor:pointer; padding:6px; margin-right:4px; color: var(--ink-900); flex-shrink:0; }
.mobile-menu-toggle svg{ width:22px; height:22px; }
.sidebar-backdrop{ display:none; position:fixed; inset:0; background:rgba(0,0,0,0.45); z-index:199; }
.sidebar-backdrop.show{ display:block; }

@media (max-width: 860px){
  .mobile-menu-toggle{ display:flex; align-items:center; }

  .sidebar{
    position: fixed; left:0; top:0; height:100vh; width:260px;
    transform: translateX(-100%);
    transition: transform 0.25s var(--ease);
    z-index: 200;
    box-shadow: 4px 0 24px rgba(0,0,0,0.3);
  }
  .sidebar.mobile-open{ transform: translateX(0); }

  .main{ width:100%; }
  .topbar{ padding:12px 16px; justify-content:flex-start; gap:10px; }
  .topbar-title{ flex:1; min-width:0; }
  .topbar-title h1{ font-size:18px; }
  .topbar-actions .btn span, .topbar-actions .btn{ font-size:12px; padding:8px 11px; }
  .content{ padding:16px 16px 32px; }

  .kpi-row{ grid-template-columns: repeat(2, 1fr) !important; gap:10px; }
  .kpi-value{ font-size:22px; }

  .two-col, .composer{ grid-template-columns: 1fr; }
  .preview-pane{ position:static; }

  .modal-card{ width:94vw; max-width:94vw; max-height:88vh; overflow-y:auto; }
  .modal-body{ padding:14px 16px; }

  #qr-reader{ max-width:100%; }
  #qr-reader video{ max-width:100%; height:auto !important; }

  .channel-select-grid{ grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 480px){
  .kpi-row{ grid-template-columns: 1fr !important; }
  .login-card{ width:92vw; padding:26px 20px; }
}
"@
