/* ============================================
   ZippBiz Automator - Style System
   Premium Dark/Light Mode Dashboard
   ============================================ */

/* ---- GOOGLE FONTS FALLBACK ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS VARIABLES ---- */
:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;

  /* Light mode */
  --bg-base: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-2: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-topbar: rgba(255,255,255,0.92);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-glow: rgba(99,102,241,0.15);
  --green: #10b981;
  --red: #ef4444;
  --yellow: #f59e0b;
  --blue: #3b82f6;
  --nav-active-bg: #eef2ff;
  --nav-active-text: #4f46e5;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 4px 16px rgba(0,0,0,0.1);
  --topbar-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

html.dark-mode {
  --bg-base: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-2: #151e2e;
  --bg-sidebar: #0f172a;
  --bg-topbar: rgba(11,15,25,0.92);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --border-strong: #334155;
  --accent: #818cf8;
  --accent-hover: #6366f1;
  --accent-glow: rgba(129,140,248,0.15);
  --green: #4ade80;
  --red: #f87171;
  --yellow: #fbbf24;
  --blue: #60a5fa;
  --nav-active-bg: rgba(129,140,248,0.12);
  --nav-active-text: #a5b4fc;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --card-shadow-hover: 0 4px 20px rgba(0,0,0,0.4);
  --topbar-shadow: 0 1px 0 rgba(255,255,255,0.04);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: var(--font-main); }

/* ---- TOPBAR ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-topbar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--topbar-shadow);
  padding-top: max(0px, env(safe-area-inset-top));
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  height: 58px;
  padding: 0 20px;
  gap: 12px;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  max-width: 220px;
}
.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.brand-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-accent { color: var(--accent); }
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  transition: background 0.3s;
}
.status-dot.connected { background: var(--green); box-shadow: 0 0 6px var(--green); animation: pulse 2s infinite; }
.status-dot.disconnected { background: var(--red); }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.5; } }
.btn-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-icon:hover { background: var(--bg-surface-2); border-color: var(--border-strong); transform: scale(1.05); }
.btn-icon:active { transform: scale(0.93); }

/* ---- MAIN LAYOUT ---- */
.main-layout {
  display: flex;
  min-height: calc(100vh - 58px);
}

/* ---- SIDEBAR ---- */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 16px 10px;
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  overflow-y: auto;
}
.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  transition: all 0.18s;
}
.nav-item:hover { background: var(--nav-active-bg); color: var(--text-primary); }
.nav-item.active { background: var(--nav-active-bg); color: var(--nav-active-text); font-weight: 600; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-label { flex: 1; }

/* ---- CONTENT AREA ---- */
.content-area {
  flex: 1;
  padding: 28px 24px;
  min-width: 0;
  overflow-x: hidden;
}

/* ---- TAB PANELS ---- */
.tab-panel { display: none; animation: fadeIn 0.2s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity:0; transform: translateY(6px); } to { opacity:1; transform: translateY(0); } }

/* ---- PAGE HEADER ---- */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.page-desc { font-size: 14px; color: var(--text-muted); }

/* ---- STATS GRID ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-1px); }
.stat-icon { font-size: 28px; flex-shrink: 0; }
.stat-value { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---- CARD ---- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--card-shadow-hover); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.card-body { padding: 20px; }

/* ---- DASHBOARD GRID ---- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* ---- FEATURE GRID ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface-2);
  transition: all 0.2s;
}
.feature-item:hover { border-color: var(--accent); background: var(--accent-glow); }
.feature-icon { font-size: 22px; flex-shrink: 0; }
.feature-info { flex: 1; min-width: 0; }
.feature-info strong { font-size: 13px; color: var(--text-primary); display: block; }
.feature-info p { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ---- BADGES ---- */
.badge { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.badge-green { background: rgba(16,185,129,0.15); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.badge-blue { background: rgba(59,130,246,0.15); color: var(--blue); border: 1px solid rgba(59,130,246,0.3); }
.badge-yellow { background: rgba(245,158,11,0.15); color: var(--yellow); border: 1px solid rgba(245,158,11,0.3); }
.badge-gray { background: var(--bg-hover, rgba(148, 163, 184, 0.12)); color: var(--text-muted, #64748b); border: 1px solid var(--border, #cbd5e1); }
.badge-red { background: rgba(239, 68, 68, 0.15); color: var(--red, #ef4444); border: 1px solid rgba(239, 68, 68, 0.3); }

/* ---- STEPS LIST ---- */
.steps-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.step-item { display: flex; align-items: flex-start; gap: 12px; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: white;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.step-content strong { font-size: 13px; color: var(--text-primary); display: block; margin-bottom: 3px; }
.step-content p { font-size: 12px; color: var(--text-muted); }

/* ---- ACTIVITY LOG ---- */
.activity-log {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 8px;
}
.log-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 12px;
  background: var(--bg-surface-2);
}
.log-time { color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.log-msg { color: var(--text-secondary); flex: 1; }
.log-info { border-left: 3px solid var(--blue); }
.log-success { border-left: 3px solid var(--green); }
.log-error { border-left: 3px solid var(--red); }
.log-warn { border-left: 3px solid var(--yellow); }

/* ---- FORM STYLES ---- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
input[type="text"], input[type="url"], input[type="tel"],
input[type="email"], input[type="password"], input[type="number"],
textarea, select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface-2);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-main);
  transition: border 0.2s, box-shadow 0.2s;
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
input:disabled, textarea:disabled { opacity: 0.5; cursor: not-allowed; }
textarea { resize: vertical; min-height: 80px; }
select { appearance: none; cursor: pointer; }
.field-hint { font-size: 11px; color: var(--text-muted); margin-top: 5px; }
.char-count { font-size: 11px; color: var(--text-muted); text-align: right; margin-top: 3px; }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; }

/* ---- BUTTONS ---- */
.btn-primary, .btn-secondary, .btn-danger, .btn-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 9px; font-weight: 600; font-family: var(--font-main);
  cursor: pointer; transition: all 0.18s; border: none; white-space: nowrap;
}
.btn-primary {
  padding: 10px 20px; font-size: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px var(--accent-glow); }
.btn-primary:active { transform: scale(0.96); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary {
  padding: 10px 20px; font-size: 14px;
  background: var(--bg-surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-base); border-color: var(--accent); color: var(--accent); }
.btn-secondary:active { transform: scale(0.96); }
.btn-secondary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-danger {
  padding: 10px 20px; font-size: 14px;
  background: rgba(239,68,68,0.1);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.btn-danger:active { transform: scale(0.96); }
.btn-sm {
  padding: 6px 12px; font-size: 12px;
  background: var(--bg-surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-sm:hover { color: var(--text-primary); border-color: var(--border-strong); }
.full-width { width: 100%; margin-bottom: 10px; }
.inline-btn {
  background: none; border: none; color: var(--accent);
  font-size: 12px; font-weight: 600; cursor: pointer; padding: 0;
  text-decoration: underline;
}
.inline-btn:hover { color: var(--accent-hover); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hidden { display: none !important; }

/* ---- TOGGLE SWITCH ---- */
.toggle-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  left: 3px; top: 3px;
  width: 20px; height: 20px;
  background: white; border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.notif-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.toggle-info strong { font-size: 14px; color: var(--text-primary); display: block; }
.toggle-info p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ---- CHECKBOX ---- */
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-primary); cursor: pointer; }
.checkbox-group { display: flex; flex-direction: column; gap: 10px; }

/* ---- SESSION LAYOUT ---- */
.session-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.session-control-card {}
.session-status-box { text-align: center; padding: 30px 20px; }
.big-status-icon { font-size: 52px; margin-bottom: 12px; }
.big-status-text { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.big-status-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.session-btns { display: flex; flex-direction: column; gap: 8px; }
.qr-card {}
.qr-body { display: flex; flex-direction: column; gap: 16px; }
.qr-container { display: flex; align-items: center; justify-content: center; min-height: 200px; border-radius: 10px; background: var(--bg-surface-2); border: 2px dashed var(--border-strong); }
.qr-placeholder { text-align: center; padding: 20px; color: var(--text-muted); }
.qr-icon { font-size: 40px; margin-bottom: 10px; }
.qr-container img { max-width: 220px; border-radius: 8px; }
.qr-instructions ol { padding-left: 20px; }
.qr-instructions li { font-size: 13px; color: var(--text-secondary); margin-bottom: 5px; }
.qr-instructions p { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }

/* ---- SEND LAYOUT ---- */
.send-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

/* ---- BLAST OPTIONS ---- */
.blast-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.blast-actions { display: flex; gap: 10px; }

/* ---- PROGRESS BAR ---- */
.progress-box { margin-bottom: 16px; }
.progress-bar-wrap { height: 10px; background: var(--bg-surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 12px; border: 1px solid var(--border); }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--green)); border-radius: 999px; transition: width 0.3s ease; }
.progress-stats { display: flex; gap: 20px; font-size: 13px; color: var(--text-secondary); }
.progress-stats strong { color: var(--text-primary); }

/* ---- INFO BOX ---- */
.info-box {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.info-box p { margin-bottom: 8px; }
.info-box p:last-child { margin-bottom: 0; }
.info-box strong { color: var(--text-primary); }
.info-box-alt { border-left: 3px solid var(--accent); }
.arch-diagram {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
}
.arch-node { background: var(--accent-glow); border: 1px solid var(--accent); color: var(--accent); padding: 5px 12px; border-radius: 999px; font-weight: 600; }
.arch-arrow { color: var(--text-muted); }

/* ---- CODE BLOCKS ---- */
.code-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-base);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px 0;
  font-size: 12px;
}
.code-block code { color: var(--accent); font-family: 'Courier New', monospace; flex: 1; word-break: break-all; }
.btn-copy {
  background: none; border: none; cursor: pointer; font-size: 16px;
  color: var(--text-muted); padding: 2px 4px; border-radius: 5px;
  transition: all 0.2s;
}
.btn-copy:hover { color: var(--accent); background: var(--accent-glow); }
.code-block-large {
  background: #0f172a;
  border-radius: 10px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.6;
  color: #e2e8f0;
  font-family: 'Courier New', monospace;
  padding: 20px;
  white-space: pre;
  max-height: 420px;
}
html:not(.dark-mode) .code-block-large { background: #1e293b; color: #e2e8f0; }

/* ---- CONTACTS RESULT ---- */
.contact-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
  background: var(--bg-surface-2);
}
.contact-result-item .phone { font-weight: 600; color: var(--text-primary); font-size: 13px; }
.contact-result-item .name { font-size: 12px; color: var(--text-muted); }
.contact-status-ok { color: var(--green); font-size: 16px; }
.contact-status-no { color: var(--red); font-size: 16px; }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}
.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  width: 100%; max-width: 480px;
  overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.btn-close {
  width: 30px; height: 30px; border-radius: 8px; border: none;
  background: var(--bg-surface-2);
  color: var(--text-muted); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
}
.btn-close:hover { background: rgba(239,68,68,0.1); color: var(--red); }
.modal-body { padding: 24px; }
.modal-actions { margin-top: 20px; }
.test-result { padding: 12px; border-radius: 8px; font-size: 13px; margin-top: 12px; }
.test-result.success { background: rgba(16,185,129,0.1); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.test-result.error { background: rgba(239,68,68,0.1); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }

/* ---- TOAST ---- */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast {
  padding: 12px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: slideInRight 0.3s ease;
  border: 1px solid var(--border);
}
@keyframes slideInRight { from { transform: translateX(100%); opacity:0; } to { transform: translateX(0); opacity:1; } }
.toast-success { background: var(--bg-surface); border-left: 4px solid var(--green); color: var(--text-primary); }
.toast-error { background: var(--bg-surface); border-left: 4px solid var(--red); color: var(--text-primary); }
.toast-info { background: var(--bg-surface); border-left: 4px solid var(--blue); color: var(--text-primary); }
.toast-warn { background: var(--bg-surface); border-left: 4px solid var(--yellow); color: var(--text-primary); }

/* ---- MUTED TEXT ---- */
.muted-text { font-size: 13px; color: var(--text-muted); }

/* ---- RESPONSIVE MOBILE ---- */
@media (max-width: 768px) {
  .main-layout { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: static;
    border-right: none; border-bottom: 1px solid var(--border);
    padding: 8px;
    display: flex; overflow-x: auto;
  }
  .nav-list { flex-direction: row; gap: 4px; flex-wrap: nowrap; }
  .nav-item { flex-direction: column; gap: 3px; padding: 8px 10px; font-size: 11px; min-width: 60px; }
  .nav-label { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .session-layout, .send-layout, .feature-grid { grid-template-columns: 1fr; }
  .blast-options { grid-template-columns: 1fr 1fr; }
  .content-area { padding: 16px; }
  .topbar-inner { padding: 0 12px; }
  .brand-name { font-size: 14px; }
  .status-pill span:last-child { display: none; }
}

/* ---- INBOX ---- */
.inbox-status-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; margin-bottom: 12px;
  font-size: 13px; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.inbox-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 420px; overflow-y: auto;
}
.inbox-empty { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.inbox-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface-2);
  cursor: pointer; transition: all 0.18s;
}
.inbox-item:hover { border-color: var(--accent); background: var(--accent-glow); }
.inbox-item.selected { border-color: var(--accent); background: var(--accent-glow); box-shadow: 0 0 0 2px var(--accent-glow); }
.inbox-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--green));
  color: white; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.inbox-content { flex: 1; min-width: 0; }
.inbox-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.inbox-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.inbox-time { font-size: 11px; color: var(--text-muted); }
.inbox-phone { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.inbox-body { font-size: 12px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.inbox-type-badge { font-size: 10px; padding: 2px 7px; border-radius: 999px; background: var(--bg-base); border: 1px solid var(--border); color: var(--text-muted); flex-shrink: 0; }
