/* ══════════════════════════════════════════════════════════
   FLINZA OUTREACH OS — PREMIUM DARK DESIGN SYSTEM
   Logo gradient: cyan (#7ECECE) → white (#ffffff)
   Base palette: pure black #0a0a0f, cards #111119, glass
══════════════════════════════════════════════════════════ */

/* Google Fonts import (already in HTML, just declare vars) */

:root {
  /* ─── Flinza Brand Gradient ─── */
  --brand-cyan:   #7ECECE;
  --brand-white:  #ffffff;
  --brand-grad:   linear-gradient(135deg, #7ECECE 0%, #c8e8e8 60%, #ffffff 100%);
  --brand-grad-subtle: linear-gradient(135deg, rgba(126,206,206,0.15) 0%, rgba(255,255,255,0.05) 100%);

  /* ─── Core Backgrounds ─── */
  --bg-root:      #08090f;
  --bg-sidebar:   #0c0d15;
  --bg-card:      #111219;
  --bg-card-2:    #16171f;
  --bg-hover:     #1a1b24;
  --bg-active:    rgba(126, 206, 206, 0.1);
  --bg-input:     #0f1018;

  /* ─── Borders ─── */
  --border:       rgba(255, 255, 255, 0.07);
  --border-med:   rgba(255, 255, 255, 0.12);
  --border-focus: rgba(126, 206, 206, 0.6);

  /* ─── Text ─── */
  --text-primary:   #f0f1f8;
  --text-secondary: #8b8fa8;
  --text-dim:       #4f526a;
  --text-accent:    #7ECECE;

  /* ─── Status Colors ─── */
  --cyan:     #7ECECE;
  --emerald:  #34d399;
  --amber:    #fbbf24;
  --violet:   #a78bfa;
  --rose:     #fb7185;

  /* ─── Shadows ─── */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.5);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:    0 12px 40px rgba(0,0,0,0.6);
  --shadow-glow:  0 0 20px rgba(126, 206, 206, 0.15);

  /* ─── Layout ─── */
  --sidebar-w:    240px;
  --topbar-h:     56px;
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --radius-xl:    20px;

  /* ─── Fonts ─── */
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
}

/* ─── RESET & UNIVERSAL SCROLLBARS ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ══════════════════════════════════════════════════════════
   CUSTOM AESTHETIC SCROLLBARS — ULTRA SLEEK GLASSMORPHIC
   Replaces ugly native Windows scrollbars with 5px glowing bars
══════════════════════════════════════════════════════════ */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  transition: all 0.25s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #00d2ff 0%, #9333ea 100%);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.6);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* ─── GLOBAL FORM CONTROLS & INPUT RESET ─── */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
textarea,
select,
.form-input,
.form-control,
.form-select,
.form-select-sm {
  background: var(--bg-input, #0f1018);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-sm, 8px);
  color: var(--text-primary, #f0f1f8);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 13px;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}

input:focus,
textarea:focus,
select:focus,
.form-input:focus,
.form-control:focus,
.form-select:focus {
  border-color: var(--brand-cyan, #7ECECE);
  box-shadow: 0 0 0 3px rgba(126, 206, 206, 0.15);
  background: rgba(15, 16, 24, 0.95);
}

select,
.form-select,
.form-select-sm,
.alias-route-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237ECECE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px !important;
  cursor: pointer;
}

select option {
  background: #11121a;
  color: #f0f1f8;
  padding: 8px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #8b8fa8);
  letter-spacing: 0.3px;
}

/* ─── MISSING BUTTONS & PANELS ─── */
.btn-primary {
  background: var(--brand-grad, linear-gradient(135deg, #7ECECE 0%, #c8e8e8 60%, #ffffff 100%));
  color: #08090f;
  border: none;
  border-radius: var(--radius-sm, 8px);
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 10px rgba(126, 206, 206, 0.25);
  white-space: nowrap;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(126, 206, 206, 0.45);
  filter: brightness(1.06);
}
.btn-primary:active {
  transform: translateY(0);
}

.card-panel {
  background: var(--bg-card, #111219);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  border-radius: var(--radius-md, 12px);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease;
}
.card-panel:hover {
  border-color: var(--border-med, rgba(255, 255, 255, 0.12));
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.page-title {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.page-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg-root);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════
   APP SHELL
══════════════════════════════ */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ══════════════════════════════
   SIDEBAR
══════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 10px;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
}
.sidebar:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #00d2ff 0%, #9333ea 100%);
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 18px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  background: #000;
}

.brand-text h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.brand-text span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  font-weight: 600;
}

/* Compose Pill */
.btn-compose-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: var(--brand-grad-subtle);
  border: 1px solid rgba(126, 206, 206, 0.25);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand-cyan);
  cursor: pointer;
  margin-bottom: 18px;
  transition: all 0.15s ease;
  letter-spacing: 0.1px;
}

.btn-compose-pill svg {
  flex-shrink: 0;
}

.btn-compose-pill:hover {
  background: rgba(126, 206, 206, 0.18);
  border-color: rgba(126, 206, 206, 0.4);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

/* Nav Section Labels */
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  padding: 4px 10px 6px;
}

/* Nav Items */
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  padding: 8px 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease;
  position: relative;
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item:hover .nav-icon {
  opacity: 1;
}

.nav-item.active {
  background: var(--bg-active);
  color: var(--brand-cyan);
  font-weight: 600;
}

.nav-item.active .nav-icon {
  opacity: 1;
  color: var(--brand-cyan);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--brand-grad);
  border-radius: 0 4px 4px 0;
}

/* Nav Badges */
.nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(126, 206, 206, 0.15);
  color: var(--brand-cyan);
}

.nav-badge.dim { background: rgba(255,255,255,0.06); color: var(--text-dim); }
.nav-badge.amber { background: rgba(251, 191, 36, 0.15); color: var(--amber); }
.nav-badge.cyan { background: rgba(126, 206, 206, 0.2); color: var(--brand-cyan); }

/* Sidebar Footer */
.sidebar-footer {
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
}

.avatar-gradient {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--brand-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: #000;
  flex-shrink: 0;
}

.user-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.user-role {
  font-size: 10.5px;
  color: var(--text-dim);
  display: block;
}

.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  margin-left: auto;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.5);
}

/* ══════════════════════════════
   TOPBAR
══════════════════════════════ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-root);
}

.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 16px;
}

/* Search Bar */
.topbar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 8px 16px;
  width: 420px;
  transition: border-color 0.15s ease;
}

.topbar-search:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(126, 206, 206, 0.08);
}

.topbar-search svg {
  color: var(--text-dim);
  flex-shrink: 0;
}

.topbar-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: var(--font-body);
}

.topbar-search input::placeholder {
  color: var(--text-dim);
}

.topbar-search kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Status Chip */
.status-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 20px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
}

.status-dot.running { background: var(--emerald); box-shadow: 0 0 6px rgba(52,211,153,0.5); }
.status-dot.paused  { background: var(--amber);   box-shadow: 0 0 6px rgba(251,191,36,0.4); }

/* Topbar Action Buttons */
.btn-icon-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-secondary);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-icon-pill:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border-color: var(--border-med);
}

.btn-launch {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: var(--font-body);
  color: #000;
  background: var(--brand-grad);
  border: none;
  border-radius: 20px;
  padding: 7px 18px;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.1px;
}

.btn-launch:hover {
  opacity: 0.9;
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

/* ══════════════════════════════
   CONTENT BODY
══════════════════════════════ */
.content-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
  animation: fadeUp 0.2s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════
   VIEW HEADER BAR
══════════════════════════════ */
.view-header-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
}

.view-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: 3px;
}

.view-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 400;
}

.view-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ══════════════════════════════
   REUSABLE BUTTONS
══════════════════════════════ */
.btn-primary-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  color: #000;
  background: var(--brand-grad);
  border: none;
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.1px;
  text-decoration: none;
}

.btn-primary-sm:hover {
  opacity: 0.9;
  box-shadow: 0 0 16px rgba(126, 206, 206, 0.2);
  transform: translateY(-1px);
}

.btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-ghost-sm:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border-color: var(--border-med);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.btn-send-reply {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: #000;
  background: var(--brand-grad);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-send-reply:hover {
  opacity: 0.9;
  box-shadow: var(--shadow-glow);
}

.btn-send-reply:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.12s ease;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-med);
}

.close-btn {
  background: transparent;
  border: none;
}

.btn-google-connect {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.12s ease;
  text-decoration: none;
}

.btn-google-connect:hover {
  background: rgba(255,255,255,0.1);
}

.g-icon {
  color: #4285F4;
  font-weight: 800;
}

/* ══════════════════════════════
   WEBMAIL THREAD LIST
══════════════════════════════ */
.webmail-layout {
  display: flex;
  gap: 16px;
  height: calc(100vh - var(--topbar-h) - 48px);
}

.thread-list-panel {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.thread-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
}

.thread-list-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.thread-list-title h2 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.thread-count-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(126, 206, 206, 0.12);
  color: var(--brand-cyan);
  border: 1px solid rgba(126, 206, 206, 0.2);
}

.thread-rows {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.06) transparent;
}

/* Mail Rows */
.mail-row {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 22px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s ease;
}

.mail-row:hover {
  background: var(--bg-hover);
}

.mail-row.active {
  background: var(--bg-active);
}

.mail-row-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-grad-subtle);
  border: 1px solid rgba(126, 206, 206, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-cyan);
  flex-shrink: 0;
}

.mail-row-body {
  min-width: 0;
}

.mail-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.mail-sender {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.mail-subject {
  font-size: 12.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-subject b {
  color: var(--text-primary);
  font-weight: 600;
}

.mail-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.mail-time {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}

/* Intent/Tag Chips */
.intent-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 8px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.chip-interested { background: rgba(52,211,153,0.15); color: var(--emerald); }
.chip-inbound    { background: rgba(126,206,206,0.15); color: var(--brand-cyan); }
.chip-verification { background: rgba(168,85,247,0.18); color: #c084fc; border: 1px solid rgba(168,85,247,0.35); font-weight: 600; }
.chip-sent       { background: rgba(167,139,250,0.15); color: var(--violet); }
.chip-draft      { background: rgba(251,191,36,0.15);  color: var(--amber); }
.chip-admin      { background: rgba(255,255,255,0.06); color: var(--text-secondary); }

/* ── Webmail Unread vs Read High-Contrast Boldness ── */
.mail-row.unread {
  background: rgba(0, 210, 255, 0.04);
  border-left: 3px solid var(--brand-cyan, #00d2ff);
}
.mail-row.unread .mail-sender {
  font-weight: 800;
  color: #ffffff;
}
.mail-row.unread .mail-subject {
  font-weight: 700;
  color: #f8fafc;
}
.mail-row.unread .mail-snippet {
  color: #cbd5e1;
}

.mail-row.read {
  background: transparent;
  border-left: 3px solid transparent;
  opacity: 0.85;
}
.mail-row.read .mail-sender {
  font-weight: 500;
  color: #94a3b8;
}
.mail-row.read .mail-subject {
  font-weight: 400;
  color: #94a3b8;
}
.mail-row.read .mail-snippet {
  color: #64748b;
}

.mail-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-cyan, #00d2ff);
  box-shadow: 0 0 8px rgba(0, 210, 255, 0.8);
  display: inline-block;
  margin-right: 4px;
}

.mail-star-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  padding: 2px 4px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.25);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mail-star-btn:hover {
  transform: scale(1.35) rotate(6deg);
  background: linear-gradient(135deg, #00d2ff 0%, #7ECECE 50%, #9333ea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(0, 210, 255, 0.8));
}
.mail-star-btn.starred {
  background: linear-gradient(135deg, #00d2ff 0%, #7ECECE 45%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.75)) drop-shadow(0 0 10px rgba(168, 85, 247, 0.5));
  transform: scale(1.15);
}

/* ── Webmail Filter Pills ── */
.filter-pill {
  background: var(--bg-card, #111827);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
  color: var(--text-secondary, #94a3b8);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.filter-pill:hover {
  background: var(--bg-hover, rgba(255,255,255,0.05));
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}
.filter-pill.active {
  background: rgba(0, 210, 255, 0.12);
  color: var(--brand-cyan, #00d2ff);
  border-color: rgba(0, 210, 255, 0.4);
  font-weight: 700;
}

/* Inbox Empty / Loading */
.inbox-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  gap: 12px;
  color: var(--text-dim);
}

.inbox-empty-state p {
  font-size: 13px;
}

/* ══════════════════════════════
   READING PANE
══════════════════════════════ */
.reading-pane {
  width: 480px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

.reading-pane-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.reading-meta { flex: 1; min-width: 0; }

.reading-subject-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.reading-subject-row h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.reading-participants-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  flex-wrap: wrap;
}

.rp-from {
  color: var(--text-secondary);
  font-weight: 500;
}

.rp-time {
  margin-left: 4px;
  font-size: 11px;
}

.reading-body-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.06) transparent;
}

.email-body-card {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* AI Reply Composer */
.ai-reply-composer {
  background: var(--bg-card-2);
  border: 1px solid rgba(126, 206, 206, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.ai-reply-composer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--brand-grad);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.ai-composer-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.ai-badge {
  background: var(--brand-grad);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
}

.dispatch-ready-chip {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--emerald);
  background: rgba(52, 211, 153, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.ai-reply-composer textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-primary);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease;
  line-height: 1.5;
}

.ai-reply-composer textarea:focus {
  border-color: var(--border-focus);
}

.ai-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ══════════════════════════════
   ALIASES & ROUTING
══════════════════════════════ */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.arch-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  transition: border-color 0.15s ease;
}

.arch-tile:hover { border-color: var(--border-med); }

.arch-gmail { border-left: 3px solid var(--rose); }
.arch-cf    { border-left: 3px solid var(--brand-cyan); }
.arch-ses   { border-left: 3px solid var(--emerald); }

.arch-tile-icon {
  font-size: 20px;
  margin-bottom: 8px;
}

.arch-tile strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

.arch-tile p {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

.arch-tile code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(255,255,255,0.06);
  padding: 1px 4px;
  border-radius: 4px;
  color: var(--brand-cyan);
}

.alias-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

/* Alias Route Card */
.alias-route-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.15s ease;
}

.alias-route-card:hover {
  border-color: var(--border-med);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.alias-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.alias-address {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.alias-subtext {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 2px;
}

.route-mode-chip {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 7px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.chip-gmail { background: rgba(251,113,133,0.15); color: var(--rose); border: 1px solid rgba(251,113,133,0.2); }
.chip-cf    { background: rgba(126,206,206,0.15); color: var(--brand-cyan); border: 1px solid rgba(126,206,206,0.2); }
.chip-ses   { background: rgba(52,211,153,0.15);  color: var(--emerald); border: 1px solid rgba(52,211,153,0.2); }
.chip-brevo { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.25); }

.alias-route-info {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card-2);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 11.5px;
  color: var(--text-dim);
}

.alias-route-info code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--brand-cyan);
}

.form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

.form-select:focus { border-color: var(--border-focus); }

.alias-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ══════════════════════════════
   DASHBOARD METRICS
══════════════════════════════ */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: border-color 0.15s ease;
}

.metric-card:hover { border-color: var(--border-med); }

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.metric-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.metric-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-icon-box.cyan    { background: rgba(126,206,206,0.15); color: var(--cyan); }
.metric-icon-box.emerald { background: rgba(52,211,153,0.15);  color: var(--emerald); }
.metric-icon-box.violet  { background: rgba(167,139,250,0.15); color: var(--violet); }
.metric-icon-box.amber   { background: rgba(251,191,36,0.15);  color: var(--amber); }

.metric-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}

.metric-sub {
  font-size: 11.5px;
  color: var(--text-dim);
}

.dashboard-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.pipeline-funnel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pipeline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-card-2);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text-secondary);
}

.pipeline-row strong {
  font-weight: 700;
  color: var(--text-primary);
}

.quick-controls-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-card-2);
  border-radius: var(--radius-sm);
  gap: 12px;
}

.qc-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.qc-desc {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 1px;
}

/* ══════════════════════════════
   LEADS CRM
══════════════════════════════ */
.stage-tabs-row {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  width: fit-content;
}

.stage-tab {
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.12s ease;
}

.stage-tab.active {
  background: var(--brand-grad);
  color: #000;
  font-weight: 700;
}

.search-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
}

.search-inline svg { color: var(--text-dim); flex-shrink: 0; }

.search-inline input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-body);
  width: 200px;
}

.data-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: visible;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 12px 18px;
  background: var(--bg-card-2);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 13px 18px;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.data-table td:first-child { color: var(--text-primary); font-weight: 500; }
.data-table td code { font-family: var(--font-mono); font-size: 12px; color: var(--brand-cyan); }

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); }

.table-empty {
  text-align: center;
  color: var(--text-dim) !important;
  padding: 40px !important;
  font-size: 13px !important;
}

/* Stage Badges */
.stage-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.stage-badge.new        { background: rgba(126,206,206,0.15); color: var(--brand-cyan); }
.stage-badge.contacted  { background: rgba(251,191,36,0.15);  color: var(--amber); }
.stage-badge.opened     { background: rgba(167,139,250,0.15); color: var(--violet); }
.stage-badge.replied    { background: rgba(52,211,153,0.15);  color: var(--emerald); }

/* ══════════════════════════════
   MAILBOXES GRID
══════════════════════════════ */
.mailboxes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.account-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.15s ease;
}

.account-card:hover {
  border-color: var(--border-med);
  box-shadow: var(--shadow-sm);
}

.account-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.account-email {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.provider-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 7px;
}

.provider-gmail { background: rgba(251,113,133,0.15); color: var(--rose); }
.provider-cf    { background: rgba(126,206,206,0.15); color: var(--brand-cyan); }
.provider-ses   { background: rgba(52,211,153,0.15);  color: var(--emerald); }
.provider-oauth { background: rgba(167,139,250,0.15); color: var(--violet); }

/* ══════════════════════════════
   SETTINGS
══════════════════════════════ */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-card-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-field input,
.form-field textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(126, 206, 206, 0.08);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.settings-note {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

.info-text {
  color: var(--text-dim);
  font-size: 13px;
  padding: 12px 0;
}

/* ══════════════════════════════
   SKELETON LOADERS
══════════════════════════════ */
.skeleton-card {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-2) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-lg);
  height: 130px;
  border: 1px solid var(--border);
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* ══════════════════════════════
   MODALS
══════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.modal-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand-grad);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-box form {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

/* Audit Results */
.audit-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audit-zone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease;
}

.audit-zone-row:hover { border-color: var(--border-med); }

/* Sequence steps */
.sequence-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

/* ══════════════════════════════
   CAMPAIGN BUILDER & DELIVERABILITY LAB
══════════════════════════════ */
.builder-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  align-items: start;
}

.builder-editor-card,
.builder-diagnostics-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
}

.tag-chips-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.tag-chip-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
}

.btn-tag-chip {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--brand-cyan);
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-tag-chip:hover {
  background: var(--bg-active);
  border-color: var(--brand-cyan);
  transform: translateY(-1px);
}

.score-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.score-dial {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--brand-cyan);
  box-shadow: 0 0 16px rgba(126, 206, 206, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.score-dial-val {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.score-dial-lbl {
  font-size: 8px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.diagnostics-section {
  margin-bottom: 16px;
}

.diagnostics-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.diagnostics-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.diagnostics-list li {
  font-size: 12px;
  color: var(--rose);
  padding-left: 12px;
  position: relative;
  line-height: 1.4;
}

.diagnostics-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: inherit;
}

.diagnostics-list.suggestions li {
  color: var(--brand-cyan);
}

.preview-box {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  min-height: 90px;
  font-family: var(--font-body);
}

/* ══════════════════════════════
   A/B LAB VARIANT CARDS
══════════════════════════════ */
.ab-variants-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ab-variant-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: all 0.15s ease;
}

.ab-variant-card:hover {
  border-color: var(--border-med);
  box-shadow: var(--shadow-sm);
}

.ab-variant-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.ab-variant-num {
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ab-variant-body {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.55;
  white-space: pre-wrap;
}

/* ══════════════════════════════
   COMMAND TERMINAL CONSOLE
══════════════════════════════ */
.terminal-quick-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.terminal-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s ease;
}

.terminal-chip:hover {
  background: var(--bg-hover);
  color: var(--brand-cyan);
  border-color: var(--brand-cyan);
  transform: translateY(-1px);
}

.terminal-window {
  background: #05060a;
  border: 1px solid rgba(126, 206, 206, 0.25);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(126, 206, 206, 0.08);
  display: flex;
  flex-direction: column;
  height: 520px;
}

.terminal-titlebar {
  height: 38px;
  background: #090a12;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

.term-dots {
  display: flex;
  gap: 6px;
}

.term-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red    { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green  { background: #10b981; }

.term-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}

.term-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--emerald);
  font-family: var(--font-mono);
}

.terminal-output {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: #c9d1d9;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.term-line {
  word-break: break-word;
  white-space: pre-wrap;
}

.term-line.cmd-entry {
  color: var(--brand-cyan);
  font-weight: 600;
}

.term-line.banner {
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.terminal-input-row {
  display: flex;
  align-items: center;
  background: #080910;
  border-top: 1px solid var(--border);
  padding: 8px 14px;
  gap: 10px;
}

.terminal-prompt {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--emerald);
  flex-shrink: 0;
}

#terminal-cli-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #fff;
}

#terminal-cli-input::placeholder {
  color: var(--text-dim);
}

.terminal-send-btn {
  background: var(--brand-grad);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.12s ease;
}

.terminal-send-btn:hover {
  opacity: 0.9;
}

/* Webhook Card in Analytics */
.webhook-card {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.webhook-url {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand-cyan);
  word-break: break-all;
  background: rgba(126, 206, 206, 0.08);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(126, 206, 206, 0.15);
}

/* ══════════════════════════════
   A/B TESTING & SPINTAX LAB V2
══════════════════════════════ */
.ab-hud-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.ab-hud-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.ab-hud-card:hover {
  border-color: rgba(126, 206, 206, 0.3);
  transform: translateY(-1px);
}

.ab-hud-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}

.ab-hud-val {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.ab-hud-val.cyan {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ab-hud-val.emerald {
  color: var(--emerald);
}

.ab-hud-sub {
  font-size: 11px;
  color: var(--text-dim);
}

/* Mock Lead Variables Simulator Bar */
.ab-lead-sim-bar {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(126, 206, 206, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.ab-sim-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-cyan);
}

.ab-sim-fields {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ab-sim-fields input {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 12px;
  padding: 6px 10px;
  width: 120px;
  outline: none;
  transition: border-color 0.15s ease;
}

.ab-sim-fields input:focus {
  border-color: var(--brand-cyan);
}

/* A/B Variant Cards Grid */
.ab-variants-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.ab-variant-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.ab-variant-card:hover {
  border-color: rgba(126, 206, 206, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.ab-variant-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.ab-variant-tags {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ab-variant-num {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #000;
  background: var(--brand-grad);
  padding: 2px 8px;
  border-radius: 4px;
}

.ab-variant-chip {
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 7px;
  border-radius: 4px;
}

.ab-variant-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-copy-variant {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-copy-variant:hover {
  background: rgba(126, 206, 206, 0.12);
  border-color: var(--brand-cyan);
  color: #fff;
}

.btn-copy-variant.copied {
  background: rgba(52, 211, 153, 0.2);
  border-color: var(--emerald);
  color: var(--emerald);
}

.ab-variant-body {
  font-size: 13.5px;
  line-height: 1.65;
  color: #e2e8f0;
  white-space: pre-wrap;
}

/* Open & Click Tracking Badges */
.badge-opened {
  background: rgba(52, 211, 153, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(52, 211, 153, 0.25);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-clicked {
  background: rgba(167, 139, 250, 0.15);
  color: var(--violet);
  border: 1px solid rgba(167, 139, 250, 0.25);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ══════════════════════════════
   GLOBAL NOTIFICATION ALERTS & BANNERS
══════════════════════════════ */
.alerts-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.alert-banner {
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: slideInDown 0.2s ease-out;
  border: 1px solid transparent;
}

.alert-banner.success {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
  color: #a7f3d0;
}

.alert-banner.error {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fecdd3;
}

.alert-banner.warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fde68a;
}

.alert-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s;
  padding: 0 4px;
}

.alert-close:hover {
  opacity: 1;
}

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════
   SENT HISTORY STYLES
══════════════════════════════ */
.badge-delivered {
  background: rgba(52, 211, 153, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(52, 211, 153, 0.25);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-failed {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose);
  border: 1px solid rgba(244, 63, 94, 0.25);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.history-detail-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 10px;
}

.history-detail-chip {
  font-size: 11.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.history-detail-chip strong {
  color: #fff;
}

.history-body-box {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  max-height: 280px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.65;
  color: #e2e8f0;
  white-space: pre-wrap;
  font-family: var(--font-body);
}

/* ══════════════════════════════
   DYNAMIC ALIAS DISPATCH PANELS
══════════════════════════════ */
.alias-mode-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.2s ease-in-out;
}

.alias-checkbox-card {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.badge-verified {
  background: rgba(52, 211, 153, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════
   LEADS CRM GLASSMORPHISM 3-DOTS KEBAB ACTION MENU
   ═══════════════════════════════════════════════════ */
.lead-action-cell {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.btn-lead-kebab-trigger {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-lead-kebab-trigger:hover,
.btn-lead-kebab-trigger.active {
  background: linear-gradient(135deg, rgba(126,206,206,0.2) 0%, rgba(33,84,232,0.25) 100%);
  border-color: rgba(0, 163, 255, 0.6);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(0, 163, 255, 0.35);
  transform: scale(1.04);
}

.lead-kebab-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 1050;
  width: 250px;
  background: rgba(10, 14, 26, 0.94);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border: 1px solid rgba(126, 206, 206, 0.3);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 18px 40px -4px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 163, 255, 0.22), 0 8px 24px rgba(0, 163, 255, 0.12);
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  pointer-events: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.lead-kebab-menu.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.kebab-menu-header {
  padding: 6px 10px 8px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
}

.kebab-lead-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kebab-lead-sub {
  font-size: 11px;
  color: #7ecece;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kebab-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  background: transparent;
  border: 1px solid transparent;
  color: #e2e8f0;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  font-family: inherit;
  margin-bottom: 2px;
}

.kebab-menu-item:hover {
  background: linear-gradient(90deg, rgba(126, 206, 206, 0.15) 0%, rgba(0, 163, 255, 0.12) 100%);
  border-color: rgba(0, 163, 255, 0.35);
  transform: translateX(2px);
}

.kebab-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(126,206,206,0.22) 0%, rgba(0,163,255,0.25) 50%, rgba(33,84,232,0.3) 100%);
  border: 1px solid rgba(0, 163, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.kebab-item-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.kebab-item-text strong {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
}

.kebab-item-text small {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 1px;
}

.kebab-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 6px;
}

.kebab-danger:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

.kebab-danger:hover strong {
  color: #f87171 !important;
}


/* ══════════════════════════════
   IP NODES 100X ENGINE STYLING
══════════════════════════════ */
.live-pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.live-pulse-dot.active {
  background: #00e082;
  box-shadow: 0 0 8px rgba(0, 224, 130, 0.7);
  animation: livePulseGreen 2s infinite ease-in-out;
}

.live-pulse-dot.paused {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
  animation: livePulseAmber 2.4s infinite ease-in-out;
}

.live-pulse-dot.offline {
  background: #64748b;
  box-shadow: none;
}

@keyframes livePulseGreen {
  0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 224, 130, 0.7); }
  70%  { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(0, 224, 130, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 224, 130, 0); }
}

@keyframes livePulseAmber {
  0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6); }
  70%  { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.pulse-beacon {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.pulse-beacon.green {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

.node-quota-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 5px;
}

.node-quota-bar {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #00d2ff, #9333ea);
  transition: width 0.4s ease;
}

.carrier-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.latency-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-family: var(--font-mono, monospace);
  font-weight: 600;
  background: rgba(52, 211, 153, 0.08);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.node-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  transition: all 0.15s ease;
}
.node-action-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border);
}

.node-action-btn.pause {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.06);
}
.node-action-btn.pause:hover {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.5);
}

.node-action-btn.resume {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.06);
}
.node-action-btn.resume:hover {
  background: rgba(52, 211, 153, 0.16);
  border-color: rgba(52, 211, 153, 0.5);
}

.node-action-btn.ping {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}
.node-action-btn.ping:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.5);
}

.node-action-btn.rotate {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.35);
}
.node-action-btn.rotate:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.tunnel-tag-badge {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(168, 85, 247, 0.15));
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ip-tab-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.ip-tab-btn.active {
  background: rgba(0, 224, 130, 0.12);
  border-color: rgba(0, 224, 130, 0.35);
  color: #00e082;
  box-shadow: 0 2px 8px rgba(0, 224, 130, 0.12);
}
.ip-tab-btn:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

/* ══════════════════════════════════════════════════
   APP PRELOADER (HIGH-TECH LOGO PULSE)
══════════════════════════════════════════════════ */
.preloader-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: radial-gradient(circle at center, #0f172a 0%, #070b14 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.45s;
}

.preloader-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
}

.preloader-logo-wrapper {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.preloader-orbit {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed rgba(56, 189, 248, 0.4);
  border-top-color: #38bdf8;
  border-right-color: #818cf8;
  animation: preloader-spin 3s linear infinite;
}

.preloader-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.45);
  animation: preloader-pulse 2s ease-in-out infinite;
}

.preloader-brand-title {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  margin-bottom: 4px;
}

.preloader-subtitle {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 22px;
  letter-spacing: 0.3px;
}

.preloader-bar {
  width: 180px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
}

.preloader-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 45%;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #a855f7);
  border-radius: 3px;
  animation: preloader-fill-move 1.5s ease-in-out infinite;
}

.preloader-status {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

@keyframes preloader-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes preloader-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.4)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 25px rgba(129, 140, 248, 0.7)); }
}

@keyframes preloader-fill-move {
  0% { left: -45%; }
  100% { left: 100%; }
}

/* ══════════════════════════════════════════════════
   LOGIN GATEKEEPER VIEW
══════════════════════════════════════════════════ */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: #080c16;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.login-glow-bg {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(129, 140, 248, 0.08) 45%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 410px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(56, 189, 248, 0.08);
  padding: 34px 28px;
  animation: login-card-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes login-card-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-header {
  text-align: center;
  margin-bottom: 26px;
}

.login-logo-box {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(129, 140, 248, 0.15));
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.2);
}

.login-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.login-title {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  margin: 0 0 5px;
}

.login-subtitle {
  font-size: 12.5px;
  color: var(--text-muted, #94a3b8);
  margin: 0;
  line-height: 1.4;
}

.login-error-alert {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  font-size: 12.5px;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 18px;
  text-align: center;
  animation: login-shake 0.35s ease;
}

@keyframes login-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.login-form .form-group {
  margin-bottom: 18px;
}

.login-form .form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 13px;
  color: #64748b;
  pointer-events: none;
}

.input-with-icon .form-input {
  width: 100%;
  padding: 11px 40px 11px 38px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.input-with-icon .form-input:focus {
  outline: none;
  border-color: #38bdf8;
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.btn-toggle-pw {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s;
}

.btn-toggle-pw:hover {
  color: #cbd5e1;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  font-size: 12px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #94a3b8;
  cursor: pointer;
}

.remember-label input[type="checkbox"] {
  accent-color: #38bdf8;
}

.login-hint {
  color: #38bdf8;
  font-size: 11px;
  font-weight: 500;
}

.btn-login-submit {
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #0284c7, #6366f1);
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.4);
  transition: all 0.2s ease;
}

.btn-login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(2, 132, 199, 0.55);
}

.btn-login-submit:active {
  transform: translateY(0);
}

.login-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #64748b;
}

.login-domain {
  font-family: 'JetBrains Mono', monospace;
  color: #38bdf8;
  font-weight: 500;
}

/* ══════════════════════════════════════════════════
   MOBILE HEADER & DRAWER SYSTEM
══════════════════════════════════════════════════ */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 58px;
  background: rgba(11, 17, 33, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 500;
}

.mobile-burger-btn {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4.5px;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.mobile-burger-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
}

.burger-bar {
  width: 18px;
  height: 2px;
  background: #cbd5e1;
  border-radius: 2px;
  transition: all 0.25s ease;
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-brand-logo {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.mobile-brand-title {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.2px;
}

.mobile-brand-badge {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 6px;
  padding: 1px 6px;
}

.mobile-compose-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0284c7, #6366f1);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35);
}

.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-sidebar-close {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  transition: color 0.15s ease;
}

.mobile-sidebar-close:hover {
  color: #fff;
}

.btn-logout-icon {
  background: transparent;
  border: none;
  color: var(--text-dim, #64748b);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  transition: all 0.15s ease;
}

.btn-logout-icon:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.btn-mobile-back-reading {
  display: none;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE LAYOUTS (MOBILE & TABLET ADAPTATION)
══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .mobile-topbar {
    display: flex;
  }

  .mobile-sidebar-close {
    display: flex;
  }

  .app-container {
    padding-top: 58px;
  }

  /* Off-canvas mobile drawer sidebar */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 290px;
    max-width: 86vw;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.6);
    background: #0d1322;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .topbar {
    display: none; /* Mobile topbar replaces standard topbar */
  }

  .content-body {
    padding: 14px 12px 30px;
  }

  /* Responsive Webmail */
  .webmail-layout {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 80px);
  }

  .thread-list-panel {
    width: 100%;
    min-height: 450px;
  }

  .reading-pane {
    width: 100%;
  }

  /* When reading pane is active on mobile, hide thread list */
  .webmail-layout.reading-active .thread-list-panel {
    display: none !important;
  }

  .webmail-layout.reading-active .reading-pane {
    display: flex !important;
    min-height: calc(100vh - 90px);
  }

  .btn-mobile-back-reading {
    display: inline-flex;
  }

  /* Grids & Cards */
  .metrics-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .dashboard-panels {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .arch-grid {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .data-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 12px;
  }

  .modal-dialog {
    width: 95vw !important;
    max-width: 95vw !important;
    margin: 10px auto;
  }
}

@media (max-width: 520px) {
  .metrics-row {
    grid-template-columns: 1fr;
  }

  .mail-row {
    grid-template-columns: 24px 1fr;
    gap: 8px;
    padding: 10px 12px;
  }

  .mail-meta {
    display: none; /* Keep thread row compact on narrow phones */
  }

  .thread-list-header {
    padding: 12px 14px;
  }

  .webmail-filter-bar {
    padding: 6px 10px;
  }

  .filter-pill {
    padding: 3px 9px;
    font-size: 11px;
  }
}
