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

/* ── B2B ColdMail Premium Dashboard Variables ───────────── */
:root {
  /* Deep Slate / Dark Navy Base */
  --bg-dark: #0b0f19;
  --bg-sidebar: rgba(15, 23, 42, 0.6);
  --bg-card: rgba(15, 23, 42, 0.5);
  
  /* Text Accents */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Neon Glow Accents */
  --accent: #3b82f6; /* Electric Blue */
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.45);
  --accent-glass: rgba(59, 130, 246, 0.15);
  
  --purple: #8b5cf6; /* Amethyst */
  --purple-glow: rgba(139, 92, 246, 0.45);

  --green: #10b981;
  --green-bg: rgba(16, 185, 129, 0.15);
  --green-glow: rgba(16, 185, 129, 0.45);
  
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.15);
  --red-glow: rgba(239, 68, 68, 0.45);
  
  --yellow: #f59e0b;
  --yellow-bg: rgba(245, 158, 11, 0.15);

  /* Glassmorphism Configuration */
  --border: rgba(255, 255, 255, 0.08); /* Outer border */
  --border-inset: inset 0 1px 1px rgba(255, 255, 255, 0.15); /* Glass top edge highlight */
  --border-light: rgba(255, 255, 255, 0.2);
  --radius: 20px;
  --radius-sm: 12px;
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 30px 60px -15px rgba(0, 0, 0, 0.8), 0 0 20px var(--accent-glow);
}

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

body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Mesh Background (Dynamic & Organic Breathing) ─────────────── */
.bg-mesh {
  position: fixed; top: -10vh; left: -10vw; width: 120vw; height: 120vh;
  z-index: -1;
  background: 
    radial-gradient(circle at 10% 40%, rgba(59, 130, 246, 0.18), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.18), transparent 45%),
    radial-gradient(circle at 40% 90%, rgba(16, 185, 129, 0.08), transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(239, 68, 68, 0.05), transparent 40%);
  filter: blur(100px);
  animation: organic-breathe 25s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes organic-breathe {
  0% { transform: scale(1) translate(0, 0) rotate(0deg); }
  33% { transform: scale(1.05) translate(3%, -3%) rotate(2deg); opacity: 0.8; }
  66% { transform: scale(1.02) translate(-2%, 4%) rotate(-1deg); opacity: 0.9; }
  100% { transform: scale(1.08) translate(-1%, -2%) rotate(1deg); opacity: 1; }
}

/* ── App Layout ────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }

.mobile-header { display: none; }
.mobile-overlay { display: none; }

/* ── Sidebar (Premium Glass) ───────────────────────────── */
.sidebar {
  width: 280px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 10px 0 30px rgba(0,0,0,0.3);
  z-index: 10;
}

.sidebar-brand {
  padding: 32px 24px;
  display: flex; align-items: center; gap: 14px;
}

.sidebar-brand .logo {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: white;
  box-shadow: 0 0 20px var(--accent-glow), inset 0 2px 4px rgba(255,255,255,0.4);
}

.sidebar-brand h1 { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.sidebar-brand span { font-size: 12px; color: var(--text-muted); font-weight: 500; letter-spacing: 0.5px; }

.sidebar-nav { flex: 1; padding: 0 16px; margin-top: 10px; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; margin-bottom: 8px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500; font-size: 14.5px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.03);
  transform: translateX(4px);
}

.nav-item.active {
  color: var(--text-primary);
  background: linear-gradient(90deg, var(--accent-glass) 0%, rgba(59,130,246,0) 100%);
  border-left: 3px solid var(--accent);
  box-shadow: inset 1px 0 0 0 rgba(255,255,255,0.05);
}

/* ── Main Content Area ─────────────────────────────────── */
.main {
  flex: 1; padding: 40px 48px;
  max-width: 1400px; margin: 0 auto;
  overflow-y: auto; overflow-x: hidden;
}

.page { display: none; opacity: 0; }
.page.active { 
  display: block; 
  animation: staggeredFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; 
}

@keyframes staggeredFadeIn {
  0% { opacity: 0; transform: translateY(20px) scale(0.98); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.page-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 36px;
}

.page-header h2 { font-size: 32px; font-weight: 800; letter-spacing: -1px; margin-bottom: 6px; }
.page-header p { color: var(--text-secondary); font-size: 15px; }

/* ── Glass Cards & Dashboard Elements ──────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: var(--shadow-lg), var(--border-inset);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  transform-origin: center center;
}

.card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-hover), var(--border-inset);
}

.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px;
  margin-bottom: 24px;
}

.stat-card {
  display: flex; flex-direction: column; justify-content: center;
  position: relative; padding: 28px 24px;
  opacity: 0; animation: staggeredFadeIn 0.8s forwards;
}

.stat-glow {
  position: absolute; top: -20px; right: -20px; width: 140px; height: 140px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.3; pointer-events: none; border-radius: 50%;
  transition: var(--transition);
}

.stat-card:hover .stat-glow { opacity: 0.6; transform: scale(1.2); }
.stat-card.sent .stat-glow { background: radial-gradient(circle, var(--green-glow) 0%, transparent 70%); }
.stat-card.failed .stat-glow { background: radial-gradient(circle, var(--red-glow) 0%, transparent 70%); }
.stat-card.opened .stat-glow { background: radial-gradient(circle, var(--purple-glow) 0%, transparent 70%); }
.stat-card.pending .stat-glow { background: radial-gradient(circle, rgba(245,158,11,0.4) 0%, transparent 70%); }

.stat-icon {
  font-size: 24px; margin-bottom: 16px;
  width: 48px; height: 48px; border-radius: 14px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--border-inset), 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.3s;
}

.stat-card:hover .stat-icon { transform: scale(1.1) rotate(5deg); }

.stat-value { font-size: 38px; font-weight: 800; line-height: 1; margin-bottom: 8px; font-variant-numeric: tabular-nums; letter-spacing: -1px; text-shadow: 0 4px 10px rgba(0,0,0,0.5); }
.stat-label { font-size: 14px; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;}

/* ── Buttons (Premium Gradients & Hover) ───────────────── */
.btn {
  padding: 10px 18px; border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  transition: var(--transition); font-family: 'Inter', sans-serif;
  position: relative; overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: white; box-shadow: 0 8px 16px var(--accent-glow), var(--border-inset);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 24px var(--accent-glow), var(--border-inset);
  filter: brightness(1.15);
}

.btn-primary:active { transform: translateY(1px) scale(0.98); box-shadow: 0 4px 8px var(--accent-glow); }

.btn-secondary {
  background: rgba(255, 255, 255, 0.05); color: var(--text-primary);
  border-color: var(--border); box-shadow: var(--border-inset);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1); border-color: var(--border-light);
  transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,0.4), var(--border-inset);
}

.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }

/* ── Advanced Tables & Data Grids ───────────────────────── */
.table-wrap { overflow-x: auto; margin: -24px; margin-top: 0; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th {
  padding: 18px 24px; font-size: 12px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted); font-weight: 700;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(10px);
}
td {
  padding: 16px 24px; font-size: 14.5px; border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
tr:last-child td { border-bottom: none; }

/* Smooth scale & shadow on table rows */
tbody tr { transition: var(--transition); cursor: default; }
tbody tr:hover { 
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%); 
  transform: scale(1.005) translateY(-1px);
  box-shadow: 0 10px 20px -10px rgba(0,0,0,0.5);
  z-index: 1; position: relative;
}

/* Rounded Pill Badges */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 12px; border-radius: 20px; gap: 4px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.badge-active, .badge-sent { background: var(--green-bg); color: var(--green); border: 1px solid rgba(16,185,129,0.4); box-shadow: 0 0 10px rgba(16,185,129,0.2), inset 0 1px 1px rgba(255,255,255,0.1); }
.badge-draft, .badge-pending, .badge-queued, .badge-sending { background: var(--yellow-bg); color: var(--yellow); border: 1px solid rgba(245,158,11,0.4); box-shadow: 0 0 10px rgba(245,158,11,0.2), inset 0 1px 1px rgba(255,255,255,0.1); }
.badge-paused, .badge-failed, .badge-bounced { background: var(--red-bg); color: var(--red); border: 1px solid rgba(239,68,68,0.4); box-shadow: 0 0 10px rgba(239,68,68,0.2), inset 0 1px 1px rgba(255,255,255,0.1); }
.badge-opened { background: var(--purple-glow); color: #ddd6fe; border: 1px solid rgba(139,92,246,0.5); box-shadow: 0 0 10px rgba(139,92,246,0.3), inset 0 1px 1px rgba(255,255,255,0.1); }

/* ── Forms & Glass Modals ───────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.form-row .form-group { margin-bottom: 0; }
label { display: block; margin-bottom: 8px; font-size: 13.5px; color: var(--text-secondary); font-weight: 600;}

input, textarea, select {
  width: 100%; padding: 12px 16px; background: rgba(0,0,0,0.3);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: white; font-size: 14.5px; font-family: 'Inter', sans-serif;
  transition: var(--transition);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent); background: rgba(0,0,0,0.5);
  box-shadow: 0 0 0 3px var(--accent-glow), inset 0 2px 4px rgba(0,0,0,0.2);
}

.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; opacity: 0; pointer-events: none; transition: var(--transition);
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius); padding: 40px; width: 100%; max-width: 540px;
  transform: translateY(30px) scale(0.95); transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 1), var(--border-inset);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.show .modal { transform: translateY(0) scale(1); }

.modal h3 { font-size: 24px; font-weight: 800; margin-bottom: 24px; letter-spacing: -0.5px; text-shadow: 0 2px 4px rgba(0,0,0,0.5);}
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 32px; }

/* ── Activity Feed & Progress Bars ──────────────────────── */
.activity-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.activity-item:hover { transform: translateX(4px); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; box-shadow: 0 0 10px currentColor;}
.activity-text { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.activity-time { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }

.queue-bar-track {
  height: 8px; background: rgba(0,0,0,0.4); border-radius: 4px; overflow: hidden; margin-top: 6px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}
.queue-bar-fill { height: 100%; border-radius: 4px; transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 0 10px rgba(0,0,0,0.5); }
.queue-bar { display: grid; grid-template-columns: 100px 1fr 60px; align-items: center; gap: 16px; margin-bottom: 12px; }
.queue-bar-label { font-size: 13.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.queue-bar-count { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ── High-End Skeleton Loading ──────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.5) 25%, rgba(51, 65, 85, 0.5) 50%, rgba(30, 41, 59, 0.5) 75%);
  background-size: 400% 100%;
  animation: premium-skeleton-load 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

@keyframes premium-skeleton-load {
  0% { background-position: 200% 50%; }
  100% { background-position: -200% 50%; }
}

.skeleton-text { height: 20px; width: 60%; margin-bottom: 8px; border-radius: 6px; }
.skeleton-title { height: 32px; width: 40%; margin-bottom: 16px; border-radius: 8px; }
.skeleton-row { height: 50px; width: 100%; margin-bottom: 8px; border-radius: 12px; }
.skeleton-card { height: 160px; width: 100%; border-radius: var(--radius); }
.skeleton-chart { height: 250px; width: 100%; border-radius: var(--radius); }

/* ── Canvas Chart Enhancements ─────────────────────────── */
.chart-container {
  position: relative; height: 280px; width: 100%;
  margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border);
}

/* ── Toasts & Utils ────────────────────────────────────── */
.toast-container { position: fixed; bottom: 32px; right: 32px; z-index: 9999; display: flex; flex-direction: column; gap: 16px; }
.toast {
  background: var(--bg-card); border: 1px solid var(--border-light); 
  backdrop-filter: blur(24px) saturate(200%); -webkit-backdrop-filter: blur(24px) saturate(200%);
  padding: 18px 24px; border-radius: var(--radius-sm); color: white; font-size: 14.5px; font-weight: 600;
  display: flex; align-items: center; gap: 14px; 
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.8), var(--border-inset);
  animation: springSlideIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; transition: opacity 0.3s;
}
@keyframes springSlideIn { 
  0% { transform: translateX(100%) scale(0.9); opacity: 0; } 
  100% { transform: translateX(0) scale(1); opacity: 1; } 
}

.empty-state { text-align: center; padding: 64px 24px; color: var(--text-muted); }
.empty-state .icon { font-size: 48px; margin-bottom: 20px; filter: grayscale(1) opacity(0.3); transition: var(--transition);}
.card:hover .empty-state .icon { filter: grayscale(0) opacity(0.8); transform: scale(1.1) rotate(-5deg); }
.text-transparent-gradient {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

/* Scrollbar Customization */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
  
/* WIZARD COMPONENT */
.wizard-stepper { display: flex; justify-content: space-between; position: relative; margin-bottom: 12px; padding: 0 10px; }
.step-line { position: absolute; top: 50%; left: 16px; right: 16px; height: 2px; background: var(--border); transform: translateY(-50%); z-index: 1; }
.step { width: 36px; height: 36px; border-radius: 50%; background: var(--card-bg); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--text-muted); position: relative; z-index: 2; transition: all 0.3s ease; }
.step.active { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 20px rgba(59, 130, 246, 0.4); text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.step.completed { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 0 15px rgba(16, 185, 129, 0.3); }
.wizard-step-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); font-weight: 500; padding: 0 4px; }
.wizard-step-labels span.active { color: var(--blue); }
.wizard-step { animation: wizard-fade-in 0.3s ease-out forwards; }
@keyframes wizard-fade-in { from { opacity: 0; transform: translateX(15px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: 0.8; } 100% { transform: scale(1); opacity: 1; } }

/* ══════════════════════════════════════════════════════════ */
/* DOMAIN & DELIVERABILITY COMPONENT                         */
/* ══════════════════════════════════════════════════════════ */

.domain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
}

.domain-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: var(--shadow-lg), var(--border-inset);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.domain-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-hover), var(--border-inset);
}

/* Glow effect on top-right corner */
.domain-card .domain-glow {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.2;
  pointer-events: none;
  border-radius: 50%;
  transition: var(--transition);
}

.domain-card:hover .domain-glow {
  opacity: 0.5;
  transform: scale(1.3);
}

.domain-card.status-active .domain-glow {
  background: radial-gradient(circle, var(--green-glow) 0%, transparent 70%);
}

.domain-card.status-error .domain-glow {
  background: radial-gradient(circle, var(--red-glow) 0%, transparent 70%);
}

.domain-card.status-configuring .domain-glow {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.4) 0%, transparent 70%);
}

/* Domain card header */
.domain-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.domain-card-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

.domain-card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* DNS Health Grid — 4 column indicator */
.dns-health-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.dns-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.dns-indicator-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transition: all 0.3s ease;
  position: relative;
}

/* Active (green) neon glow */
.dns-indicator.active .dns-indicator-dot {
  background: var(--green);
  box-shadow: 0 0 8px var(--green), 0 0 20px rgba(16, 185, 129, 0.4);
  animation: dns-pulse 2s ease-in-out infinite;
}

/* Inactive (red) neon glow */
.dns-indicator.inactive .dns-indicator-dot {
  background: var(--red);
  box-shadow: 0 0 8px var(--red), 0 0 15px rgba(239, 68, 68, 0.3);
}

/* Pending (yellow) */
.dns-indicator.pending .dns-indicator-dot {
  background: var(--yellow);
  box-shadow: 0 0 8px var(--yellow), 0 0 15px rgba(245, 158, 11, 0.3);
  animation: dns-pulse 1.5s ease-in-out infinite;
}

@keyframes dns-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

.dns-indicator-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.dns-indicator.active .dns-indicator-label { color: var(--green); }
.dns-indicator.inactive .dns-indicator-label { color: var(--red); }

/* Provider Badge */
.provider-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.provider-badge.google {
  background: rgba(66, 133, 244, 0.15);
  color: #4285f4;
  border: 1px solid rgba(66, 133, 244, 0.3);
}

.provider-badge.microsoft {
  background: rgba(0, 120, 212, 0.15);
  color: #0078d4;
  border: 1px solid rgba(0, 120, 212, 0.3);
}

.provider-badge.custom {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Domain Actions */
.domain-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Setup Progress Animation */
.domain-setup-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 10px;
  margin: 16px 0;
}

.domain-setup-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(245, 158, 11, 0.3);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Domain error panel */
.domain-error-panel {
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  margin: 16px 0;
  font-size: 13px;
  color: var(--red);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* Domain card footer meta */
.domain-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ══════════════════════════════════════════════════════════ */
/* UNIFIED INBOX COMPONENT                                    */
/* ══════════════════════════════════════════════════════════ */

.inbox-list {
  display: flex;
  flex-direction: column;
}

.inbox-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.inbox-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.inbox-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.inbox-item:hover::before {
  opacity: 1;
}

.inbox-item:last-child {
  border-bottom: none;
}

/* Unread State — bold left accent + glow */
.inbox-item.unread {
  background: rgba(59, 130, 246, 0.04);
  border-left: 3px solid var(--accent);
}

.inbox-item.unread::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow), 0 0 24px rgba(59, 130, 246, 0.2);
}

.inbox-item.unread:hover {
  background: rgba(59, 130, 246, 0.07);
}

/* Avatar Circle */
.inbox-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.3);
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.inbox-item:hover .inbox-avatar {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* Warmup Inbox Avatar Variant */
.inbox-item .inbox-avatar.warmup-avatar {
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* Content Wrapper */
.inbox-content {
  flex: 1;
  min-width: 0; /* Prevent overflow */
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Header Row: Sender + Date */
.inbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.inbox-sender {
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.inbox-item.unread .inbox-sender {
  font-weight: 700;
  color: #fff;
}

.inbox-date {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.inbox-item.unread .inbox-date {
  color: var(--accent);
  font-weight: 600;
}

/* Subject Line */
.inbox-subject {
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.inbox-item.unread .inbox-subject {
  font-weight: 700;
}

.inbox-item:hover .inbox-subject {
  color: var(--accent);
}

/* Snippet (Preview) */
.inbox-snippet {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

/* Expanded Body */
.inbox-body-full {
  margin-top: 14px;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-height: 400px;
  overflow-y: auto;
  animation: inbox-body-expand 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

@keyframes inbox-body-expand {
  from {
    opacity: 0;
    transform: translateY(-8px);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 400px;
  }
}

.inbox-body-full pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: 'Inter', sans-serif;
  margin: 0;
}

/* Warmup Fire Tag — small glowing badge */
.warmup-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.warmup-tag .fire-icon {
  font-size: 12px;
  animation: fire-flicker 1.5s ease-in-out infinite;
}

@keyframes fire-flicker {
  0%, 100% { transform: scale(1); opacity: 1; }
  25% { transform: scale(1.15) rotate(-5deg); opacity: 0.9; }
  50% { transform: scale(1.05) rotate(3deg); opacity: 1; }
  75% { transform: scale(1.1) rotate(-2deg); opacity: 0.85; }
}

/* Inbox Empty State */
.inbox-list .empty-state {
  padding: 80px 24px;
}

/* Inbox Pagination Area */
#inboxPagination {
  padding: 16px;
  display: flex;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid var(--border);
}

/* Toggle Switch (for Warmup Toggle in SMTP Modal) */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  left: 2px;
  bottom: 2px;
  background: var(--text-muted);
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--green-bg);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: var(--green);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ══════════════════════════════════════════════════════════ */
/* RESPONSIVE ADJUSTMENTS                                     */
/* ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .mobile-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    position: sticky; top: 0; z-index: 50;
  }
  .mobile-logo-wrap { display: flex; align-items: center; gap: 8px; }
  .mobile-logo {
    width: 32px; height: 32px; border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; color: white;
  }
  .btn-icon { background: none; border: none; color: white; font-size: 24px; cursor: pointer; }
  
  .mobile-overlay {
    display: none;
    position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    z-index: 90; opacity: 0; pointer-events: none; transition: opacity 0.3s;
  }
  .mobile-overlay.show { display: block; opacity: 1; pointer-events: auto; }

  .inbox-item {
    padding: 14px 16px;
    gap: 12px;
  }

  .inbox-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 12px;
  }

  .inbox-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .inbox-date {
    font-size: 11px;
  }

  .inbox-body-full {
    padding: 12px 14px;
  }
}

