/* =============================================================================
   VoidMail — Global Styles
   Dark theme, purple accents. One UI sans: Source Sans 3.
   Login overlay: Outfit. Real code / addresses: JetBrains Mono only where needed.
   ============================================================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #040407;
  --bg-2: #08080f;
  --surface: #0c0c18;
  --surface-2: #111122;
  --surface-3: #18182e;
  --border: #131328;
  --border-2: #1e1e3a;
  --text: #d8d8ea;
  --text-2: #8080a0;
  --text-3: #484868;
  --accent: #8b5cf6;
  --accent-2: #7c3aed;
  --accent-glow: rgba(139, 92, 246, 0.15);
  --green: #34d399;
  --green-dim: rgba(52, 211, 153, 0.15);
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.15);
  --yellow: #fbbf24;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --font: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-login: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --transition: 150ms ease;
}

html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-feature-settings: 'kern' 1, 'liga' 1;
}

a { color: var(--accent); text-decoration: none; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
img { max-width: 100%; }
input, textarea, select, button { font-family: inherit; }

/* --- Utility --- */
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-muted { color: var(--text-3); }
.text-gradient {
  color: #b9a3e8;
}
.dot-green {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  opacity: 0.9;
}
.hero-stat .dot-green { opacity: 0.75; }

/* =============================================================================
   Buttons
   ============================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  background: transparent;
  color: var(--text);
}
.btn:hover { filter: brightness(1.06); }
.btn:active { filter: brightness(0.96); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.25);
}
.btn-primary:hover {
  background: var(--accent-2);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.35);
}
.btn-outline {
  border-color: var(--border-2);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-ghost {
  color: var(--text-2);
}
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-icon {
  padding: 8px;
  border-radius: var(--radius);
  background: transparent;
  border: none;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-icon:hover { color: var(--text); background: var(--surface-2); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-xs { padding: 4px 6px; font-size: 0.75rem; }
.btn-lg { padding: 12px 28px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* =============================================================================
   Inputs
   ============================================================================= */

.input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.input::placeholder { color: var(--text-3); }
textarea.input { resize: vertical; min-height: 80px; }
select.input { cursor: pointer; }
select.input option { background: var(--surface); color: var(--text); }

.input-wrap { position: relative; }
.input-with-suffix {
  display: flex;
  align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.input-with-suffix .input {
  border: none;
  background: transparent;
  flex: 1;
}
.input-with-suffix .input:focus { box-shadow: none; }
.input-with-suffix .input-suffix {
  padding: 10px 14px;
  color: var(--text-3);
  background: var(--surface);
  border-left: 1px solid var(--border);
  font-size: 0.85rem;
  white-space: nowrap;
}
.input-with-suffix:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 0.85rem; font-weight: 500; color: var(--text-2); }
.form-hint { font-size: 0.8rem; color: var(--text-3); margin-top: 4px; }
.form-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--accent-glow);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius);
  margin-top: 12px;
}

/* =============================================================================
   Login Overlay
   ============================================================================= */

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-login);
}
.login-overlay[hidden] { display: none !important; }
.login-overlay .mono,
.login-overlay .signup-number-box,
.login-overlay code {
  font-family: var(--mono);
}
.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 32px;
  text-align: center;
}
.login-icon { margin-bottom: 20px; }
.login-card h2 { font-size: 1.5rem; margin-bottom: 8px; font-weight: 600; }
.login-sub { color: var(--text-3); font-size: 0.9rem; margin-bottom: 14px; line-height: 1.5; }
.login-mode-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.login-tab {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.login-tab:hover { color: var(--text); }
.login-tab.active {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}
.login-panel { text-align: center; }
.login-field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 8px;
  text-align: left;
}
.text-left { text-align: left; }
.signup-result {
  margin-top: 20px;
  padding: 16px;
  text-align: left;
  background: var(--surface);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-lg);
}
.signup-result-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.signup-result-warning {
  font-size: 0.78rem;
  color: var(--yellow);
  line-height: 1.45;
  margin-bottom: 14px;
}
.signup-number-box {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 14px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  margin-bottom: 14px;
  word-break: break-all;
  text-align: center;
}
.signup-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.login-input-wrap { margin-bottom: 16px; }
.login-back-home { margin-top: 20px; color: var(--text-3); }
.login-back-home:hover { color: var(--text-2); }
/* Same look as create-account label field; font follows login overlay (Outfit) */
.login-account-input {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: normal;
  text-align: left;
  padding: 12px 16px;
  border-radius: var(--radius);
}
.login-error { color: var(--red); font-size: 0.85rem; margin-top: 12px; }

/* =============================================================================
   Landing Page — Nav
   ============================================================================= */

.page { min-height: 100vh; }
.page[hidden] { display: none !important; }

.landing-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
}
.glow-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2), transparent 70%);
  top: -200px; left: 50%;
  transform: translateX(-50%);
}
.glow-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.08), transparent 70%);
  bottom: 10%; right: -100px;
}
/* Interactive particle canvas — fixed to viewport, always visible */
.particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 16px 40px;
  background: rgba(4, 4, 7, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  gap: 32px;
  margin-left: 48px;
}
.nav-links a {
  color: var(--text-2);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.nav-mobile-toggle { display: none; background: none; border: none; color: var(--text-2); cursor: pointer; margin-left: auto; }

/* =============================================================================
   Landing Page — Hero
   ============================================================================= */

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 160px 24px 40px;
  max-width: 900px;
  margin: 0 auto;
}
.hero-badge {
  display: block;
  margin: 0 auto 24px;
  max-width: max-content;
  padding: 0;
  border: none;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.01em;
}
.hero-title {
  font-size: clamp(2.25rem, 5.5vw, 3.35rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 20px;
  letter-spacing: -0.035em;
}
.hero-subtitle {
  font-size: 1.08rem;
  color: var(--text-2);
  max-width: 34rem;
  margin: 0 auto 40px;
  line-height: 1.72;
  font-weight: 400;
}
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}
.hero-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-2);
  font-weight: 500;
}

/* Animated dashboard preview — mini mockup of the real UI */
.hero-preview {
  max-width: 900px;
  margin: 0 auto;
  perspective: 1200px;
}
.preview-window {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.4),
    0 0 80px rgba(139, 92, 246, 0.06);
  transform: rotateX(2deg);
  transition: transform 0.4s ease;
}
.preview-window:hover {
  transform: rotateX(0deg) scale(1.01);
}
.preview-titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.preview-dots {
  display: flex;
  gap: 6px;
}
.preview-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.preview-dots span:nth-child(1) { background: #ff5f57; }
.preview-dots span:nth-child(2) { background: #febc2e; }
.preview-dots span:nth-child(3) { background: #28c840; }
.preview-url {
  font-size: 0.7rem;
  color: var(--text-3);
  flex: 1;
  text-align: center;
  background: rgba(255,255,255,0.03);
  padding: 3px 12px;
  border-radius: 4px;
}
.preview-body {
  display: flex;
  min-height: 440px;
}
/* Mini sidebar */
.preview-sidebar {
  width: 160px;
  border-right: 1px solid var(--border);
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}
.preview-sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.8rem;
  color: var(--text-3);
  border-left: 2px solid transparent;
}
.preview-sidebar-item.active {
  color: var(--text);
  background: rgba(139, 92, 246, 0.06);
  border-left-color: var(--accent);
}
.preview-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
}
/* Mini inbox list */
.preview-inbox {
  flex: 1;
  overflow: hidden;
}
.preview-email-list {
  display: flex;
  flex-direction: column;
}
.preview-email {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  opacity: 0;
  transform: translateY(-8px);
  animation: preview-slide-in 0.4s ease forwards;
}
.preview-email.read {
  opacity: 0.5 !important;
}
.preview-email-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.preview-email.read .preview-email-dot {
  background: transparent;
}
.preview-email-from {
  color: var(--text);
  font-weight: 500;
  width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.preview-email-subject {
  color: var(--text-2);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-email-alias {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  opacity: 0.7;
  flex-shrink: 0;
}
.preview-email-time {
  color: var(--text-3);
  font-size: 0.65rem;
  flex-shrink: 0;
}
@keyframes preview-slide-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 600px) {
  .preview-sidebar { display: none; }
  .preview-email-alias { display: none; }
}

/* =============================================================================
   Landing Page — Sections
   ============================================================================= */

.section {
  position: relative;
  z-index: 1;
  padding: 60px 24px;
}
.section-dark {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-container {
  max-width: 1100px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 0;
  border: none;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.02em;
}
.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  line-height: 1.2;
}
.section-subtitle {
  color: var(--text-2);
  font-size: 1.02rem;
  max-width: 32rem;
  margin: 0 auto;
  line-height: 1.65;
  font-weight: 400;
}

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 220ms ease, background 220ms ease;
}
.feature-card:hover {
  border-color: var(--border-2);
  background: rgba(139, 92, 246, 0.04);
}
.feature-icon {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.feature-card p {
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.step-card {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.step-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-3);
  margin-bottom: 10px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.step-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.step-card p { color: var(--text-2); font-size: 0.9rem; line-height: 1.6; }
.step-card code { background: var(--accent-glow); padding: 2px 8px; border-radius: 4px; color: var(--accent); font-size: 0.8rem; }

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}
.pricing-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-2);
}
.pricing-card.featured {
  border-color: var(--accent);
  background: linear-gradient(to bottom, rgba(139, 92, 246, 0.06), var(--surface));
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.1);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 16px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.pricing-card-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.pricing-tier {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}
.pricing-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 8px;
}
.pricing-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.pricing-period {
  font-size: 0.9rem;
  color: var(--text-3);
}
.pricing-desc {
  font-size: 0.85rem;
  color: var(--text-3);
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pricing-features li {
  font-size: 0.88rem;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pricing-features li.disabled {
  color: var(--text-3);
  opacity: 0.5;
}
.pricing-features .check {
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}
.pricing-features .x {
  color: var(--text-3);
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}
.btn-pricing {
  display: block;
  width: 100%;
  padding: 12px 24px;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  font-family: inherit;
}
.btn-pricing:hover {
  background: var(--surface-3);
  border-color: var(--accent);
}
.btn-pricing-featured {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.btn-pricing-featured:hover {
  background: #7c4fe0;
  border-color: #7c4fe0;
}

/* Security */
.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 700px;
  margin: 0 auto;
}
.security-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-2);
}

/* CTA */
.section-cta {
  text-align: center;
  padding: 120px 24px;
}
.section-cta .section-title { margin-bottom: 12px; }
.section-cta .section-subtitle { margin-bottom: 32px; }

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}
.footer-copy { color: var(--text-3); font-size: 0.85rem; }

/* =============================================================================
   Dashboard Layout — Email Client Style
   ============================================================================= */

.page-dashboard {
  display: flex;
  height: 100vh;
  overflow: hidden;
  font-family: var(--font);
}

/* Sidebar */
.dash-sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
}

/* Profile selector */
.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}
.sidebar-profile:hover { background: var(--surface); }
.profile-avatar {
  width: 36px; height: 36px;
  background: var(--accent-glow);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-info {
  flex: 1;
  min-width: 0;
}
.profile-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.profile-domain {
  display: block;
  font-size: 0.75rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-chevron {
  color: var(--text-3);
  flex-shrink: 0;
  transition: transform var(--transition);
}
.sidebar-profile.open .profile-chevron { transform: rotate(180deg); }

/* Profile dropdown */
.profile-dropdown {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  max-height: 280px;
  overflow-y: auto;
}
.profile-dropdown[hidden] { display: none; }
.dropdown-header {
  padding: 10px 20px 6px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  font-weight: 600;
}
.dropdown-aliases {
  padding: 0 8px 8px;
}
.dropdown-alias {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  font-size: 0.82rem;
  width: 100%;
  border: none;
  background: none;
  color: var(--text);
  text-align: left;
}
.dropdown-alias:hover { background: var(--surface-2); }
.dropdown-alias .alias-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dropdown-alias .alias-dot.active { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dropdown-alias .alias-dot.burned { background: var(--red); box-shadow: 0 0 6px var(--red); }
.dropdown-alias .alias-addr {
  font-family: var(--mono);
  font-size: 0.78rem;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dropdown-alias .alias-label {
  font-size: 0.72rem;
  color: var(--text-3);
}
.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 8px;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  width: 100%;
  border: none;
  background: none;
  color: var(--text-2);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}
.dropdown-item:hover { background: var(--surface-2); color: var(--text); }

/* Sidebar nav */
.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: transparent;
  border: none;
  color: var(--text-2);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  width: 100%;
}
.sidebar-item:hover { background: var(--surface); color: var(--text); }
.sidebar-item.active { background: var(--accent-glow); color: var(--accent); }
.sidebar-item span:first-of-type { flex: 1; }
.sidebar-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
}
.badge-red {
  background: var(--red-dim);
  color: var(--red);
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

/* Top bar */
.dash-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  flex-shrink: 0;
}
.dash-menu-toggle { display: none; }
.topbar-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 400px;
}
.topbar-search svg { color: var(--text-3); flex-shrink: 0; }
.topbar-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.88rem;
}
.topbar-search-input::placeholder { color: var(--text-3); }
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Views */
.dash-view {
  flex: 1;
  overflow: hidden;
  display: flex;
}
.dash-view[hidden] { display: none !important; }

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.view-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* =============================================================================
   Email List
   ============================================================================= */

.email-list {
  flex: 1;
  overflow-y: auto;
  min-width: 320px;
  border-right: 1px solid var(--border);
}
.email-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}
.email-item:hover { background: var(--surface); }
.email-item.active { background: var(--accent-glow); border-left: 3px solid var(--accent); }
.email-item.unread { background: rgba(139, 92, 246, 0.04); }
.email-item.unread .email-subject { color: var(--text); font-weight: 600; }

.email-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 7px;
}
.email-item:not(.unread) .email-dot { background: transparent; }

.email-content {
  flex: 1;
  min-width: 0;
}
.email-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}
.email-sender {
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.email-time {
  font-size: 0.75rem;
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
}
.email-subject {
  font-size: 0.85rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.email-alias {
  font-size: 0.72rem;
  color: var(--text-3);
  font-family: var(--mono);
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
  color: var(--text-3);
  height: 100%;
}
.empty-state svg { margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 {
  font-size: 1.05rem;
  color: var(--text-2);
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.empty-state p { font-size: 0.9rem; margin-bottom: 20px; }

/* =============================================================================
   Email Reader
   ============================================================================= */

.email-reader {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.email-reader[hidden] { display: none !important; }

.reader-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.reader-actions { display: flex; gap: 4px; }
.reader-subject {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.35;
  padding: 20px 24px 12px;
}
.reader-meta {
  padding: 0 24px 20px;
  border-bottom: 1px solid var(--border);
}
.reader-sender {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sender-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}
.sender-info { flex: 1; }
.sender-name { display: block; font-weight: 500; font-size: 0.92rem; }
.sender-to { font-size: 0.8rem; color: var(--text-3); }
.reader-date { font-size: 0.8rem; color: var(--text-3); flex-shrink: 0; }

.reader-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}

/* =============================================================================
   Aliases Table
   ============================================================================= */

.aliases-table {
  padding: 0;
  overflow-y: auto;
  flex: 1;
}
#view-aliases {
  flex-direction: column;
}
.alias-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.alias-row:hover { background: var(--surface); }
.alias-status {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.alias-status.active { background: var(--green); box-shadow: 0 0 8px var(--green); }
.alias-status.burned { background: var(--red); box-shadow: 0 0 8px var(--red); }
.alias-info { flex: 1; min-width: 0; }
.alias-address {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alias-row-label {
  font-size: 0.78rem;
  color: var(--text-3);
}
.alias-meta {
  text-align: right;
  flex-shrink: 0;
}
.alias-count {
  font-size: 0.85rem;
  color: var(--text-2);
}
.alias-date {
  font-size: 0.72rem;
  color: var(--text-3);
}
.alias-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* =============================================================================
   Stats Dashboard
   ============================================================================= */

/* Tier badge */
.tier-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tier-free { background: var(--surface-3); color: var(--text-3); }
.tier-pro { background: rgba(139, 92, 246, 0.2); color: var(--accent); }
.tier-business { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }

/* Usage section */
.usage-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 24px 24px 0;
}
.usage-card {
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.usage-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.usage-label {
  font-size: 0.82rem;
  color: var(--text-3);
  font-weight: 500;
}
.usage-value {
  font-size: 0.82rem;
  color: var(--text-2);
  font-family: 'JetBrains Mono', monospace;
}
.storage-bar {
  height: 6px;
  background: var(--surface-3);
  border-radius: 3px;
  overflow: hidden;
}
.storage-fill {
  height: 100%;
  background: var(--green);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.storage-fill.yellow { background: #fbbf24; }
.storage-fill.red { background: var(--red); }

#view-stats { flex-direction: column; overflow-y: auto; }
.stats-dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 24px;
}
.stat-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.stat-card-value {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.stat-card-label {
  font-size: 0.8rem;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 0;
}
.stat-card-icon {
  position: absolute;
  top: 20px; right: 20px;
  opacity: 0.3;
}

/* Spam view */
#view-spam { flex-direction: column; }
#spam-list { border-right: none; }

/* =============================================================================
   Plan View
   ============================================================================= */

#view-plan {
  flex-direction: column;
  overflow-y: auto;
}

/* Current plan summary */
.plan-current {
  padding: 24px 24px 0;
}
.plan-current-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.plan-current-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.plan-current-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.plan-current-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.plan-current-price {
  font-size: 0.85rem;
  color: var(--text-3);
  margin-top: 2px;
}

/* Usage meters within the plan card */
.plan-usage-meters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.plan-meter {
  background: var(--surface-2);
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.plan-meter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.plan-meter-label {
  font-size: 0.8rem;
  color: var(--text-3);
  font-weight: 500;
}
.plan-meter-value {
  font-size: 0.78rem;
  color: var(--text-2);
}

/* Feature checklist in current plan card */
.plan-features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.plan-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  padding: 4px 0;
}
.plan-feature-item.on { color: var(--text); }
.plan-feature-item.off { color: var(--text-3); }

/* Compare plans header */
.plan-compare-header {
  padding: 32px 24px 0;
}
.plan-compare-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.plan-compare-header p {
  font-size: 0.85rem;
}

/* Tier comparison grid */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px 24px 32px;
}
.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.plan-card:hover {
  border-color: var(--border-2);
}
.plan-card-featured {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.08);
}
.plan-card-featured:hover {
  border-color: var(--accent);
}
.plan-card-active {
  border-color: var(--green) !important;
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.08);
}
.plan-card-popular {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.plan-card-badge {
  margin-bottom: 16px;
}
.plan-card-price {
  margin-bottom: 20px;
}
.plan-price-amount {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}
.plan-price-period {
  font-size: 0.82rem;
  color: var(--text-3);
  margin-left: 2px;
}
.plan-card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan-card-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
}
.plan-card-features li.included { color: var(--text); }
.plan-card-features li.excluded { color: var(--text-3); }
.plan-btn-current {
  opacity: 0.5;
  cursor: default !important;
}

/* =============================================================================
   Modals
   ============================================================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay[hidden] { display: none !important; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 200ms ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.modal-body { padding: 24px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* Settings toggles */
.settings-section { margin-bottom: 24px; }
.settings-section h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 12px;
  font-weight: 600;
}
.setting-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-2);
}
.setting-toggle input[type="checkbox"] { display: none; }
.toggle-track {
  width: 40px; height: 22px;
  background: var(--surface-3);
  border-radius: 11px;
  position: relative;
  transition: background 200ms ease;
  flex-shrink: 0;
}
.toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: var(--text-3);
  border-radius: 50%;
  transition: all 200ms ease;
}
.setting-toggle input:checked + .toggle-track {
  background: var(--accent);
}
.setting-toggle input:checked + .toggle-track .toggle-thumb {
  transform: translateX(18px);
  background: #fff;
}

/* =============================================================================
   Toast Notifications
   ============================================================================= */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  box-shadow: var(--shadow);
  animation: toastIn 200ms ease;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 380px;
}
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }
.toast.success::before { content: ''; width: 8px; height: 8px; background: var(--green); border-radius: 50%; flex-shrink: 0; }
.toast.error::before { content: ''; width: 8px; height: 8px; background: var(--red); border-radius: 50%; flex-shrink: 0; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================================================
   Responsive
   ============================================================================= */

@media (max-width: 900px) {
  .features-grid, .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-dashboard { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  .security-grid { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; max-width: 400px; }
  .plan-usage-meters { grid-template-columns: 1fr; }
  .plan-features-list { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
}

@media (max-width: 768px) {
  .dash-sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    z-index: 200;
    transition: left 200ms ease;
    box-shadow: var(--shadow-lg);
  }
  .dash-sidebar.open { left: 0; }
  .dash-menu-toggle { display: flex; }
  .email-reader {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: var(--bg);
  }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-stats { gap: 16px; }
  .features-grid, .steps-grid { grid-template-columns: 1fr; }
  .stats-dashboard { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .nav { padding: 12px 16px; }
  .hero { padding: 120px 16px 60px; }
  .hero-title { font-size: 2rem; }
  .section { padding: 60px 16px; }
  .dash-topbar { padding: 12px 12px; }
  .email-item { padding: 12px 14px; }
}
