/* ==========================================================================
   EB (EMAIL BAYANGAN) — MODERN GEN Z CYBER-GLASS DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Color Tokens */
  --bg-main: #07080d;
  --bg-surface: rgba(18, 20, 29, 0.75);
  --bg-surface-elevated: rgba(28, 32, 48, 0.85);
  --bg-surface-hover: rgba(38, 44, 68, 0.9);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.3);
  --border-active: rgba(139, 92, 246, 0.6);

  /* Neon Brand Accents */
  --neon-cyan: #00f2fe;
  --neon-violet: #8b5cf6;
  --neon-magenta: #ec4899;
  --neon-emerald: #10b981;
  --neon-amber: #f59e0b;
  --neon-rose: #f43f5e;
  
  --grad-cyber: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --grad-genz: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  --grad-dark-card: linear-gradient(180deg, rgba(26, 30, 46, 0.8) 0%, rgba(14, 16, 26, 0.9) 100%);
  --grad-glow-pill: linear-gradient(90deg, rgba(0, 242, 254, 0.15), rgba(139, 92, 246, 0.15));

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #38bdf8;

  /* Elevation & Shadows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-neon-cyan: 0 0 20px rgba(0, 242, 254, 0.25);
  --shadow-neon-violet: 0 0 20px rgba(139, 92, 246, 0.25);

  /* Layout Constants */
  --header-height: 72px;
  --footer-height: 44px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* Ambient Background Lights & Grid */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  animation: floatAmbient 18s ease-in-out infinite alternate;
}
.glow-1 {
  top: -100px;
  left: 10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
}
.glow-2 {
  bottom: -150px;
  right: 5%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #00f2fe 0%, transparent 70%);
  animation-delay: -6s;
}
.glow-3 {
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #ec4899 0%, transparent 75%);
  opacity: 0.15;
  animation-delay: -12s;
}

.cyber-grid {
  position: fixed;
  inset: 0;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  pointer-events: none;
  z-index: 1;
}

@keyframes floatAmbient {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, -40px) scale(0.95); }
}

/* App Layout Wrapper */
.app-layout {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==========================================================================
   TOP NAVIGATION HEADER
   ========================================================================== */
.cyber-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  margin-top: 12px;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--grad-genz);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  box-shadow: var(--shadow-neon-violet);
  transition: transform var(--transition-fast);
}

.brand-logo:hover {
  transform: scale(1.05) rotate(-3deg);
}

.pulse-indicator {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-highlight {
  background: var(--grad-cyber);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  opacity: 0.9;
}

.brand-tagline {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Storage Mode Selector Pills */
.storage-mode-toggle {
  display: flex;
  align-items: center;
  background: rgba(10, 12, 18, 0.7);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  gap: 4px;
}

.mode-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mode-pill i {
  font-size: 13px;
}

.mode-pill .badge-mini {
  background: rgba(0, 242, 254, 0.2);
  color: var(--neon-cyan);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.mode-pill.active {
  background: var(--grad-glow-pill);
  color: var(--text-primary);
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.18);
}

.mode-pill:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Header Action Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-icon:hover {
  color: var(--neon-cyan);
  background: rgba(0, 242, 254, 0.08);
  border-color: var(--border-glow);
}

.btn-ghost {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-glow);
}

.btn-admin-portal {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: var(--grad-genz);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  box-shadow: var(--shadow-neon-violet);
  transition: all var(--transition-fast);
}
.btn-admin-portal:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

/* ==========================================================================
   MAIN WORKSPACE LAYOUT
   ========================================================================== */
.main-workspace {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  margin-top: 16px;
  flex: 1;
}

/* Card Base */
.cyber-card {
  background: var(--grad-dark-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-status-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--neon-emerald);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 4px;
}
.live-status-pill i {
  font-size: 7px;
  animation: pulseGlow 1.5s infinite;
}

/* Left Sidebar Panel */
.sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Active Identity Box */
.alias-display-box {
  background: rgba(8, 10, 16, 0.85);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
  margin-bottom: 14px;
  position: relative;
}

.alias-string {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  color: var(--neon-cyan);
  word-break: break-all;
  margin-bottom: 12px;
  user-select: all;
}

.alias-actions {
  display: flex;
  gap: 8px;
}

.btn-action-primary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--grad-cyber);
  color: #040814;
  border: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow-neon-cyan);
  transition: all var(--transition-fast);
}
.btn-action-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}
.btn-action-primary:active {
  transform: translateY(1px);
}

.btn-action-secondary {
  width: 40px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-action-secondary:hover {
  border-color: var(--border-glow);
  background: rgba(0, 242, 254, 0.1);
  color: var(--neon-cyan);
}

/* Generator Buttons */
.generator-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-cyber-generate, .btn-cyber-custom {
  padding: 10px 8px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-cyber-generate {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
}
.btn-cyber-generate:hover {
  background: rgba(139, 92, 246, 0.25);
  color: #fff;
  border-color: var(--neon-violet);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.btn-cyber-custom {
  background: rgba(236, 72, 153, 0.12);
  border: 1px solid rgba(236, 72, 153, 0.35);
  color: #f472b6;
}
.btn-cyber-custom:hover {
  background: rgba(236, 72, 153, 0.22);
  color: #fff;
  border-color: var(--neon-magenta);
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.3);
}

/* Saved History Card */
.aliases-history-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  max-height: 380px;
}

.btn-text-only {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.btn-text-only:hover {
  color: var(--neon-rose);
}

.alias-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  padding-right: 4px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.history-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-glow);
}
.history-item.active {
  background: rgba(0, 242, 254, 0.08);
  border-color: var(--border-glow);
}

.history-email {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.history-item.active .history-email {
  color: var(--neon-cyan);
  font-weight: 600;
}

.btn-delete-history-item {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px;
  cursor: pointer;
  opacity: 0.6;
}
.btn-delete-history-item:hover {
  color: var(--neon-rose);
  opacity: 1;
}

/* System Stats Box */
.system-info-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 18px;
}
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}
.info-row strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
}
.text-cyan {
  color: var(--neon-cyan) !important;
}
.text-violet {
  color: var(--neon-violet) !important;
}
.text-green {
  color: var(--neon-emerald) !important;
}

.api-link-row {
  border-top: 1px dashed var(--border-subtle);
  padding-top: 8px;
  margin-top: 2px;
}

.api-raw-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-cyan);
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.api-raw-link:hover {
  background: rgba(0, 242, 254, 0.2);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
  transform: translateY(-1px);
}

/* ==========================================================================
   CENTER & RIGHT CONTENT PANEL
   ========================================================================== */
.content-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Toolbar */
.inbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 440px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 13px;
}

.search-input {
  width: 100%;
  padding: 8px 34px 8px 36px;
  border-radius: var(--radius-full);
  background: rgba(10, 12, 18, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: all var(--transition-fast);
}
.search-input:focus {
  border-color: var(--border-glow);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
}

.btn-clear-search {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-refresh {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-refresh:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-glow);
}
.btn-refresh.spinning i {
  animation: spin 0.8s linear infinite;
}

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

.message-counter {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.counter-badge {
  background: var(--neon-cyan);
  color: #040814;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
}

/* Split-View Container */
.split-view-container {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 16px;
  flex: 1;
  min-height: 580px;
}

/* Inbox List Column */
.inbox-list-column {
  background: var(--grad-dark-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: calc(100vh - 240px);
}

.email-items-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Email Item Card */
.email-item-card {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.email-item-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 242, 254, 0.3);
  transform: translateX(2px);
}
.email-item-card.active {
  background: rgba(0, 242, 254, 0.07);
  border-color: var(--border-glow);
  box-shadow: inset 3px 0 0 var(--neon-cyan);
}

.email-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.email-item-sender {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.email-item-time {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.email-item-subject {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-item-snippet {
  font-size: 12px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.email-item-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.badge-otp {
  background: rgba(16, 185, 129, 0.15);
  color: var(--neon-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.badge-storage-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Empty & Loading States */
.inbox-loading-state, .inbox-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  gap: 12px;
}
.cyber-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(0, 242, 254, 0.15);
  border-top-color: var(--neon-cyan);
  animation: spin 0.8s linear infinite;
}
.empty-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--text-muted);
}
.inbox-empty-state h3 {
  font-family: var(--font-heading);
  color: var(--text-secondary);
  font-size: 16px;
}
.inbox-empty-state p {
  font-size: 12px;
  line-height: 1.6;
  max-width: 280px;
}
.empty-hint-pill {
  font-size: 11px;
  color: var(--neon-cyan);
  background: rgba(0, 242, 254, 0.08);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-top: 8px;
}

/* Email Viewer Column */
.email-viewer-column {
  background: var(--grad-dark-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: calc(100vh - 240px);
}

.viewer-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  gap: 14px;
  height: 100%;
}
.placeholder-art {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(139, 92, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--neon-violet);
}
.viewer-placeholder h3 {
  font-family: var(--font-heading);
  color: var(--text-secondary);
  font-size: 18px;
}
.viewer-placeholder p {
  font-size: 13px;
  max-width: 340px;
}

/* Active Email View */
.active-email-view {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.viewer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(12, 14, 22, 0.6);
}

.viewer-subject-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.viewer-subject {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

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

.btn-tool {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-tool:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}
.btn-tool.btn-danger:hover {
  background: rgba(244, 63, 94, 0.2);
  color: var(--neon-rose);
  border-color: rgba(244, 63, 94, 0.4);
}
.btn-close-mobile {
  display: none;
}

/* OTP Banner */
.otp-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.otp-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.otp-badge-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--neon-emerald);
  letter-spacing: 0.5px;
}
.otp-number {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 2px;
}

.btn-copy-otp {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--neon-emerald);
  color: #040814;
  border: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-copy-otp:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

/* Meta Grid */
.viewer-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  font-size: 12px;
}
.meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.meta-label {
  color: var(--text-muted);
  font-weight: 600;
}
.meta-value {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meta-storage-badge {
  background: rgba(0, 242, 254, 0.1);
  color: var(--neon-cyan);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

/* Content Tabs */
.content-tabs {
  display: flex;
  gap: 8px;
  padding: 8px 24px;
  background: rgba(8, 10, 16, 0.5);
  border-bottom: 1px solid var(--border-subtle);
}
.tab-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}
.tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* Body Container */
.viewer-body-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 320px;
}

.html-frame-wrapper, .text-content-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.html-frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
  border-radius: 0 0 var(--radius-lg) 0;
}

.text-content-wrapper {
  padding: 20px;
  overflow-y: auto;
  background: rgba(8, 10, 16, 0.7);
}
.text-content-wrapper pre {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

/* ==========================================================================
   FOOTER BAR
   ========================================================================== */
.cyber-footer {
  height: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  margin: 12px 0;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}
.separator {
  margin: 0 8px;
  opacity: 0.3;
}
.footer-link {
  color: var(--neon-cyan);
  text-decoration: none;
}
.footer-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.cyber-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}
.cyber-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.cyber-modal {
  width: 100%;
  max-width: 520px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), var(--shadow-neon-cyan);
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-smooth);
  overflow: hidden;
}
.cyber-modal.modal-sm { max-width: 400px; }
.cyber-modal.modal-lg { max-width: 720px; }

.cyber-modal-backdrop.active .cyber-modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}
.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  transition: color var(--transition-fast);
}
.btn-close-modal:hover {
  color: #fff;
}

.modal-body {
  padding: 22px;
  max-height: 70vh;
  overflow-y: auto;
}
.modal-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(10, 12, 18, 0.4);
}
.modal-footer.justify-center {
  justify-content: center;
}

/* Form Controls in Modal */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.input-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-prefix-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-prefix-wrapper i {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
}
.input-prefix-wrapper input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: rgba(10, 12, 18, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
}
.input-prefix-wrapper input:focus {
  border-color: var(--border-glow);
}

.custom-select-wrapper select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(10, 12, 18, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.preview-alias-box {
  background: rgba(0, 242, 254, 0.08);
  border: 1px dashed rgba(0, 242, 254, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.preview-alias-box strong {
  font-family: var(--font-mono);
  color: var(--neon-cyan);
}

/* QR Code Modal Content */
.qr-frame {
  background: #ffffff;
  padding: 16px;
  border-radius: var(--radius-md);
  display: inline-block;
  margin: 10px auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.qr-img {
  width: 180px;
  height: 180px;
  display: block;
}
.qr-email-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--neon-cyan);
  margin-top: 10px;
  word-break: break-all;
}

/* API Docs Cards */
.api-endpoint-card {
  background: rgba(10, 12, 18, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
}
.api-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.http-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
}
.http-badge.get {
  background: rgba(16, 185, 129, 0.2);
  color: var(--neon-emerald);
}
.api-url-path {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #fff;
}
.badge-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
}
.tag-cyan { background: rgba(0, 242, 254, 0.15); color: var(--neon-cyan); }
.tag-violet { background: rgba(139, 92, 246, 0.15); color: var(--neon-violet); }
.tag-green { background: rgba(16, 185, 129, 0.15); color: var(--neon-emerald); }

.api-explanation {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.code-snippet-box {
  position: relative;
  background: #05060a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 40px 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #38bdf8;
  overflow-x: auto;
}
.btn-copy-code {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}
.btn-copy-code:hover {
  color: var(--neon-cyan);
}

.raw-content-box {
  background: #05060a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  max-height: 400px;
  overflow-y: auto;
}
.raw-content-box pre {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #94a3b8;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
}

.cyber-toast {
  pointer-events: auto;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glow);
  box-shadow: var(--shadow-lg), var(--shadow-neon-cyan);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Custom Scrollbars */
.custom-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.custom-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
.custom-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 242, 254, 0.4);
}

/* ==========================================================================
   RESPONSIVE DESIGN (ALL DEVICES)
   ========================================================================== */
@media (max-width: 1080px) {
  .main-workspace {
    grid-template-columns: 300px 1fr;
  }
  .split-view-container {
    grid-template-columns: 320px 1fr;
  }
}

@media (max-width: 860px) {
  .app-layout {
    padding: 0 10px;
  }

  .cyber-header {
    height: auto;
    flex-wrap: wrap;
    padding: 12px 14px;
  }

  .storage-mode-toggle {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .main-workspace {
    grid-template-columns: 1fr;
  }

  .split-view-container {
    grid-template-columns: 1fr;
    position: relative;
  }

  .email-viewer-column {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 50;
    max-height: 100vh;
    border-radius: 0;
    background: #090b12;
  }
  .email-viewer-column.mobile-open {
    display: flex;
  }

  .btn-close-mobile {
    display: inline-flex;
  }
}
