/* ================================================================
   EXHICONNECT — WhatsApp & CRM Platform
   Premium dark-sidebar design with glassmorphism accents
   ================================================================ */
:root {
  --ink: #0D1117;
  --ink-2: #161C2D;
  --ink-3: #1E2540;
  --ink-4: #2A3152;
  --side: #0D1117;

  --surface: #FFFFFF;
  --surface-2: #F8F7F3;
  --surface-3: #F1EFE8;
  --line: #E8E3D8;
  --line-2: #F0EBDF;

  --text: #111827;
  --text-2: #374151;
  --muted: #6B7280;

  --teal: #00B894;
  --teal-2: #00D2B0;
  --teal-dark: #007D65;
  --teal-bg: #D4F4EE;
  --teal-glow: rgba(0,184,148,0.18);

  --amber: #FF8A3D;
  --amber-2: #FF9F5F;
  --amber-dark: #CC5E00;
  --amber-bg: #FFF0E4;
  --amber-glow: rgba(255,138,61,0.18);

  --violet: #7C3AED;
  --violet-bg: #EDE9FF;
  --violet-dark: #4C1D95;

  --sky: #3B82F6;
  --sky-bg: #DBEAFE;
  --sky-dark: #1E40AF;

  --rose: #EF4444;
  --rose-bg: #FEE2E2;
  --rose-dark: #991B1B;

  --gold: #F59E0B;
  --gold-bg: #FEF3C7;
  --gold-dark: #92400E;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-xs: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-sm: 0 4px 16px -6px rgba(13,17,23,0.18);
  --shadow: 0 16px 48px -14px rgba(13,17,23,0.28);
  --shadow-lg: 0 32px 64px -20px rgba(13,17,23,0.40);

  --sidebar-w: 248px;

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--surface-2);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; }
input, select, textarea { font-family: inherit; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 8px; }

/* ═══════════════════════════════════════════════════════════
   APP SHELL
   ═══════════════════════════════════════════════════════════ */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  align-items: start;
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════ */
.sidebar {
  background: var(--ink);
  color: rgba(255,255,255,0.75);
  display: flex;
  flex-direction: column;
  padding: 0 10px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 50;
  box-shadow: 4px 0 24px rgba(0,0,0,0.24);
}

/* Brand area */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 22px 8px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 10px;
}
.brand-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: #1A0800;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255,138,61,0.4);
}
.brand-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255,138,61,0.35);
}
.brand-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.brand-sub {
  font-size: 10.5px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Section labels */
.nav-section-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
  padding: 14px 10px 5px;
  margin-top: 4px;
}

/* Nav items */
.sidebar a.nav-item,
.sidebar a.crm-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  margin-bottom: 2px;
  transition: all 0.15s ease;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar a.nav-item svg,
.sidebar a.crm-link svg {
  flex-shrink: 0;
  opacity: 0.75;
}
.sidebar a.nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.sidebar a.nav-item:hover svg { opacity: 1; }

.sidebar a.nav-item.active {
  background: rgba(0,184,148,0.15);
  color: var(--teal-2);
  font-weight: 700;
}
.sidebar a.nav-item.active svg { opacity: 1; color: var(--teal-2); }
.sidebar a.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 70%;
  background: var(--teal);
  border-radius: 0 3px 3px 0;
}

.sidebar a.crm-link {
  background: rgba(255,138,61,0.12);
  color: rgba(255,224,198,0.9);
  border: 1px solid rgba(255,138,61,0.2);
  margin-bottom: 8px;
}
.sidebar a.crm-link:hover {
  background: rgba(255,138,61,0.22);
  color: #fff;
  border-color: rgba(255,138,61,0.5);
}
.live-pill {
  margin-left: auto;
  font-size: 9.5px;
  background: var(--amber);
  color: #1A0800;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 800;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

/* Sidebar user block */
.sidebar-user {
  margin-top: auto;
  padding: 14px 8px 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ink-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}
.user-info { flex: 1; min-width: 0; }
.user-label { font-size: 10.5px; color: rgba(255,255,255,0.35); }
.user-name {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logout-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: rgba(255,100,100,0.7);
  transition: all 0.15s;
  flex-shrink: 0;
}
.logout-link:hover {
  background: rgba(239,68,68,0.15);
  color: #FCA5A5;
}

/* ═══════════════════════════════════════════════════════════
   MAIN WRAPPER
   ═══════════════════════════════════════════════════════════ */
.main-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* Mobile top bar */
.mobile-bar {
  display: none;
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 2px 12px rgba(0,0,0,0.24);
}
.mobile-bar-left { display: flex; align-items: center; gap: 10px; }
.menu-toggle {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
  font-size: 16px;
  border-radius: 8px;
  padding: 5px 10px;
  line-height: 1;
}
.mobile-brand {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 15.5px;
  color: #fff;
}
.mobile-crm-btn {
  font-size: 12px;
  background: var(--amber);
  color: #1A0800;
  padding: 6px 13px;
  border-radius: 8px;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT AREA
   ═══════════════════════════════════════════════════════════ */
.main {
  padding: 28px 36px;
  flex: 1;
  max-width: 1600px;
  width: 100%;
}

h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}
.subtitle {
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* Page header with action row */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.page-header-title { flex: 1; }
.page-header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

/* ═══════════════════════════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════════════════════════ */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}
.stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--stat-color, var(--teal));
  border-radius: var(--radius) var(--radius) 0 0;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.stat .num {
  font-size: 28px;
  font-weight: 800;
  font-family: 'Bricolage Grotesque', sans-serif;
  color: var(--stat-color, var(--text));
  line-height: 1.1;
  margin-bottom: 4px;
}
.stat .label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}
thead { background: #FAFAF8; }
th {
  text-align: left;
  padding: 11px 14px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  border-bottom: 1.5px solid var(--line);
  white-space: nowrap;
}
td {
  text-align: left;
  padding: 12px 14px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-2); }

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
  border: none;
  font-family: inherit;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: default; pointer-events: none; }

.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--ink-3); }

.btn.teal {
  background: var(--teal);
  color: #003D30;
  box-shadow: 0 4px 14px var(--teal-glow);
}
.btn.teal:hover { background: var(--teal-2); transform: translateY(-1px); }

.btn.amber {
  background: var(--amber);
  color: #1A0800;
  box-shadow: 0 4px 14px var(--amber-glow);
}
.btn.amber:hover { background: var(--amber-2); transform: translateY(-1px); }

.btn.secondary {
  background: var(--surface);
  color: var(--text-2);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.btn.secondary:hover { border-color: var(--ink); color: var(--ink); }

.btn.sm { padding: 7px 12px; font-size: 12.5px; }
.btn.icon-btn-round {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  border: 1.5px solid var(--line);
  flex-shrink: 0;
}
.btn.icon-btn-round:hover { border-color: var(--ink); color: var(--ink); background: var(--ink); color: #fff; }

/* ═══════════════════════════════════════════════════════════
   FORM CONTROLS
   ═══════════════════════════════════════════════════════════ */
.field { margin-bottom: 18px; }
label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 7px;
}

input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=url], input[type=date], input[type=datetime-local], input[type=file],
input[type=search], input[type=number], select, textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3.5px var(--teal-glow);
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
textarea { resize: vertical; min-height: 80px; }

/* ═══════════════════════════════════════════════════════════
   STATUS BADGES
   ═══════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.badge.sent { background: var(--sky-bg); color: var(--sky-dark); }
.badge.delivered { background: var(--teal-bg); color: var(--teal-dark); }
.badge.read { background: var(--violet-bg); color: var(--violet-dark); }
.badge.failed { background: var(--rose-bg); color: var(--rose-dark); }
.badge.pending { background: var(--gold-bg); color: var(--gold-dark); }
.badge.scheduled { background: var(--violet-bg); color: var(--violet-dark); }
.badge.sending { background: var(--sky-bg); color: var(--sky-dark); }
.badge.completed { background: var(--teal-bg); color: var(--teal-dark); }
.badge.in { background: var(--teal-bg); color: var(--teal-dark); }
.badge.out { background: var(--amber-bg); color: var(--amber-dark); }

/* ═══════════════════════════════════════════════════════════
   INBOX / THREAD (Conversation UI)
   ═══════════════════════════════════════════════════════════ */
.thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 440px;
  overflow-y: auto;
  padding: 14px;
  background: linear-gradient(135deg, #f0fafa, #fafaf8);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
}
.bubble {
  max-width: 72%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.5;
  position: relative;
}
.bubble.inbound {
  background: var(--surface);
  border: 1.5px solid var(--line);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-xs);
}
.bubble.outbound {
  background: linear-gradient(135deg, var(--teal), var(--teal-2));
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px var(--teal-glow);
}
.bubble .meta {
  font-size: 10.5px;
  opacity: 0.7;
  margin-top: 5px;
}

/* ═══════════════════════════════════════════════════════════
   ALERTS & NOTICES
   ═══════════════════════════════════════════════════════════ */
.error-msg, .success-msg, .warning-msg {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.error-msg {
  background: var(--rose-bg);
  color: var(--rose-dark);
  border: 1.5px solid rgba(239,68,68,0.2);
}
.success-msg {
  background: var(--teal-bg);
  color: var(--teal-dark);
  border: 1.5px solid rgba(0,184,148,0.2);
}
.warning-msg {
  background: var(--gold-bg);
  color: var(--gold-dark);
  border: 1.5px solid rgba(245,158,11,0.2);
}

/* ═══════════════════════════════════════════════════════════
   PROGRESS BARS (Dispatcher)
   ═══════════════════════════════════════════════════════════ */
.progress-track {
  width: 100%;
  height: 10px;
  background: var(--surface-3);
  border-radius: 20px;
  overflow: hidden;
  margin: 10px 0;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--teal-2));
  border-radius: 20px;
  transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: rgba(255,255,255,0.25);
  animation: shine 1.5s ease-in-out infinite;
}
@keyframes shine {
  from { opacity: 0.8; }
  to { opacity: 0; }
}

/* Dispatcher log console */
.log-console {
  background: var(--ink);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  max-height: 160px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  border: 1px solid var(--ink-4);
}
.log-console .log-ok { color: var(--teal-2); }
.log-console .log-err { color: #F87171; }
.log-console .log-info { color: rgba(255,255,255,0.5); }

/* ═══════════════════════════════════════════════════════════
   CAMPAIGN CARDS
   ═══════════════════════════════════════════════════════════ */
.campaign-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
  overflow: hidden;
}
.campaign-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--teal);
  border-radius: 0;
}
.campaign-card:hover {
  border-color: var(--teal);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}
.campaign-card.active {
  border-color: var(--teal);
  background: linear-gradient(135deg, #f0fdf9, var(--surface));
}

/* ═══════════════════════════════════════════════════════════
   MINI PROGRESS ROW (inside campaign list)
   ═══════════════════════════════════════════════════════════ */
.mini-progress {
  height: 5px;
  background: var(--surface-3);
  border-radius: 20px;
  overflow: hidden;
  margin-top: 8px;
}
.mini-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--teal-2));
  border-radius: 20px;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — TABLET & MOBILE
   ═══════════════════════════════════════════════════════════ */

/* Responsive 2-col grid: becomes 1-col below 860px */
.rg-2 {
  display: grid;
  grid-template-columns: clamp(260px, 30%, 360px) 1fr;
  gap: 20px;
  align-items: start;
}
/* Every child needs min-width:0 so tables can shrink inside grids */
.rg-2 > * { min-width: 0; }

/* Responsive inner card — tables must not overflow parent */
.card, .table-wrap { max-width: 100%; overflow-x: auto; }
table { min-width: 560px; }

/* Upload media toggle */
.media-toggle { display: flex; gap: 0; border: 1.5px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 10px; }
.media-toggle label { flex: 1; padding: 9px 14px; text-align: center; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--surface-2); transition: all 0.15s; margin: 0; text-transform: none; letter-spacing: 0; }
.media-toggle input[type=radio] { display: none; }
.media-toggle input[type=radio]:checked + label { background: var(--ink); color: #fff; }

/* Notification badge on nav */
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 20px; background: var(--rose); color: #fff; font-size: 10.5px; font-weight: 800; margin-left: auto; line-height: 1; }

/* Schedule warning pill */
.schedule-warning { display: inline-flex; align-items: center; gap: 6px; background: var(--gold-bg); color: var(--gold-dark); border: 1px solid rgba(245,158,11,0.3); padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 700; margin-bottom: 14px; }

/* Failed number row highlight */
tr.row-failed td { background: rgba(239,68,68,0.04); }
tr.row-failed td:first-child { border-left: 3px solid var(--rose); }

/* Error reason tooltip/badge */
.err-reason { display: inline-block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--rose-dark); background: var(--rose-bg); padding: 2px 8px; border-radius: 6px; cursor: help; }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-bar { display: flex; }
  .main { padding: 20px 16px 80px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .page-header { flex-direction: column; }
  .page-header-actions { width: 100%; }
  .page-header-actions .btn { flex: 1; justify-content: center; }

  /* Responsive 2-col → 1-col */
  .rg-2 { grid-template-columns: 1fr; }

  /* Inline form on contacts → stack */
  form[style*="grid-template-columns:1fr 1fr auto"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .stat-row { grid-template-columns: 1fr 1fr; }
  .card { padding: 18px 16px; }
  .page-header-actions { flex-direction: column; }
  .page-header-actions .btn { width: 100%; }
  h1 { font-size: 22px; }
}



/* ═══════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════ */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--ink);
}
.login-left {
  position: relative;
  overflow: hidden;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: rgba(255,255,255,0.85);
  background: linear-gradient(160deg, #0D1117 0%, #1a2035 100%);
}
.login-left::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,184,148,0.2), transparent 70%);
  top: -200px;
  left: -100px;
  pointer-events: none;
}
.login-left::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,138,61,0.15), transparent 70%);
  bottom: -100px;
  right: -100px;
  pointer-events: none;
}
.login-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 30px 30px;
}
.login-hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
}
.login-logo-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: #1A0800;
}
.login-logo-name { font-size: 14.5px; font-weight: 700; color: #fff; }
.login-hero-body { position: relative; z-index: 2; max-width: 380px; }
.login-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: 12px;
}
.login-headline {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.login-desc {
  color: rgba(255,255,255,0.5);
  font-size: 14.5px;
  line-height: 1.65;
}
.login-stats {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 32px;
}
.login-stats .s-val {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}
.login-stats .s-key {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.login-right {
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.login-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  border: 1.5px solid var(--line);
}
.login-card h1 { font-size: 24px; margin-bottom: 5px; }
.login-card .subtitle { margin-bottom: 28px; }

@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .login-right { min-height: 100vh; }
}
