/* ==========================================================================
   TempMail PRO — Premium Dark Glassmorphic Design System
   ========================================================================== */

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d121f;
  --bg-surface: rgba(18, 24, 38, 0.7);
  --bg-surface-hover: rgba(28, 38, 60, 0.85);
  --bg-surface-active: rgba(38, 50, 80, 0.95);
  --bg-card: rgba(15, 23, 42, 0.6);
  --bg-glass: rgba(255, 255, 255, 0.03);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.6);
  --border-accent: rgba(99, 102, 241, 0.3);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-secondary: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-dropdown: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ================= UTILITY & BUTTONS ================= */
.hidden {
  display: none !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-accent {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.35);
}
.btn-accent:hover {
  background: rgba(99, 102, 241, 0.25);
  color: #fff;
  border-color: var(--accent-primary);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border-color: var(--border-subtle);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-subtle);
}
.btn-outline:hover, .btn-outline.active {
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
  border-color: var(--accent-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.3);
}
.btn-danger:hover {
  background: var(--accent-rose);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-block {
  width: 100%;
}

.btn-text-tiny {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
}
.btn-text-tiny:hover {
  color: var(--text-main);
}

/* ================= MODALS & AUTH GATE ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.logo-badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a5b4fc;
}

.logo-badge i {
  width: 28px;
  height: 28px;
}

.auth-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.auth-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-header code {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input,
.input-group input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.password-input-wrapper input {
  padding-right: 42px;
}

.password-input-wrapper input:focus,
.input-group input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.toggle-password {
  position: absolute;
  right: 6px;
  background: none;
  border: none;
}

.alert-box {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 18px;
}

.alert-box.error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fda4af;
}

.alert-box.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ================= MAIN APP LAYOUT ================= */
.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* HEADER */
.app-header {
  height: 68px;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 20px;
  z-index: 10;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text h1 span {
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-domain {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

/* ACTIVE ADDRESS CONTROL BAR */
.active-address-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 750px;
}

.address-input-group {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2px 6px;
  flex: 1;
  transition: border-color 0.2s;
}

.address-input-group:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.prefix-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  padding: 4px 8px;
}

.prefix-icon {
  width: 16px;
  height: 16px;
  color: var(--text-dim);
}

.prefix-input-wrap input {
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  width: 100%;
}
.prefix-input-wrap input:focus {
  outline: none;
}

.domain-separator {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-weight: 700;
}

.domain-select {
  background: transparent;
  border: none;
  color: #a5b4fc;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.domain-select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.05);
}
.domain-select option {
  background: #0f172a;
  color: #fff;
}

/* HEADER CONTROLS & RELOAD TIMER */
.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reload-timer-widget {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-full);
  transition: background 0.2s;
}

.reload-timer-widget:hover {
  background: rgba(255, 255, 255, 0.1);
}

.progress-ring {
  position: absolute;
  transform: rotate(-90deg);
}

.progress-ring__circle {
  transition: stroke-dashoffset 0.5s linear;
}

.timer-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #a5b4fc;
}

.reload-icon-hover {
  display: none;
  position: absolute;
  color: #fff;
}
.reload-timer-widget:hover .timer-number {
  display: none;
}
.reload-timer-widget:hover .reload-icon-hover {
  display: block;
}

.reload-timer-widget:hover .reload-icon-hover i {
  width: 16px;
  height: 16px;
}

/* ================= 3-PANE WORKSPACE ================= */
.app-workspace {
  display: grid;
  grid-template-columns: 280px 380px 1fr;
  height: calc(100vh - 68px);
  overflow: hidden;
}

/* PANE 1: SIDEBAR */
.sidebar-panel {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 14px;
  overflow-y: auto;
}

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
}

.sidebar-search i {
  width: 16px;
  height: 16px;
  color: var(--text-dim);
}

.sidebar-search input {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  width: 100%;
}
.sidebar-search input:focus {
  outline: none;
}

.sidebar-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  padding-left: 4px;
}

.active-mailboxes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.filter-pills {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.filter-pill i {
  width: 16px;
  height: 16px;
}

.filter-pill .pill-count {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.filter-pill.active {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  font-weight: 600;
}
.filter-pill.active .pill-count {
  background: var(--accent-primary);
  color: #fff;
}

.active-mailboxes-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.mailbox-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.15s ease;
}

.mailbox-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-subtle);
}

.mailbox-item.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

.mailbox-addr {
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mailbox-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.smtp-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-dot.online {
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.smtp-sublabel {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
  padding-left: 16px;
}

/* PANE 2: EMAIL LIST */
.email-list-panel {
  background: var(--bg-primary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.list-header {
  height: 60px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13, 18, 31, 0.5);
}

.list-title-wrap h2 {
  font-size: 1.05rem;
  font-weight: 700;
}

.current-address-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.email-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* EMAIL CARD */
.email-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.email-card:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.email-card.active {
  background: var(--bg-surface-active);
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.email-card.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-primary);
}

.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.card-sender {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

.card-time {
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.card-subject {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-card.unread .card-subject {
  color: var(--text-main);
  font-weight: 600;
}

.card-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-recipient {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* INLINE OTP PILL */
.otp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 88, 12, 0.2));
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.otp-pill i {
  width: 12px;
  height: 12px;
}

/* EMPTY STATES */
.empty-state, .no-selection-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  padding: 40px 20px;
  color: var(--text-dim);
}

.empty-icon, .no-selection-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.empty-icon i, .no-selection-icon i {
  width: 32px;
  height: 32px;
}

.empty-state h3, .no-selection-state h3 {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

.empty-state p, .no-selection-state p {
  font-size: 0.85rem;
  max-width: 320px;
  line-height: 1.4;
}

.empty-quick-hint {
  margin-top: 20px;
  font-size: 0.75rem;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.1);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* PANE 3: EMAIL DETAIL */
.email-detail-panel {
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.detail-content-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.detail-top-bar {
  height: 60px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 24, 38, 0.4);
}

.detail-actions-left, .detail-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-mode-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn i {
  width: 14px;
  height: 14px;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

/* SMART OTP BANNER */
.otp-banner {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.15), rgba(234, 88, 12, 0.15));
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: bannerGlow 2s infinite alternate;
}

@keyframes bannerGlow {
  from { background-color: rgba(245, 158, 11, 0.1); }
  to { background-color: rgba(245, 158, 11, 0.2); }
}

.otp-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.otp-sparkle-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-amber), #ea580c);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.otp-banner-title {
  font-size: 0.7rem;
  font-weight: 800;
  color: #fde68a;
  letter-spacing: 0.08em;
}

.otp-code-value {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.15em;
  line-height: 1.2;
}

.copy-otp-btn {
  background: linear-gradient(135deg, var(--accent-amber), #ea580c);
  color: #000;
  font-weight: 700;
}

/* ACTION LINKS STRIP */
.action-links-strip {
  background: rgba(6, 182, 212, 0.1);
  border-bottom: 1px solid rgba(6, 182, 212, 0.25);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
}

.action-strip-header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #67e8f9;
  font-weight: 600;
}

.action-strip-header i {
  width: 14px;
  height: 14px;
}

.action-links-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-link-btn {
  background: rgba(6, 182, 212, 0.2);
  color: #fff;
  border: 1px solid rgba(6, 182, 212, 0.4);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s;
}
.action-link-btn:hover {
  background: var(--accent-cyan);
  color: #000;
}

/* EMAIL METADATA CARD */
.detail-meta-card {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.3);
}

.meta-row-main {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.sender-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sender-details {
  flex: 1;
  min-width: 0;
}

.detail-subject {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  line-height: 1.3;
}

.detail-sender-line {
  font-size: 0.875rem;
  margin-bottom: 2px;
}

.sender-name {
  font-weight: 600;
  color: var(--text-main);
  margin-right: 6px;
}

.sender-email {
  color: var(--text-muted);
}

.detail-recipient-line {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.recipient-tag {
  font-family: var(--font-mono);
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.detail-timestamp {
  margin-left: auto;
}

/* ATTACHMENTS WRAP */
.attachments-wrap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.attachments-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.attachments-title i {
  width: 14px;
  height: 14px;
}

.attachments-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.2s;
}
.attachment-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-primary);
  color: #a5b4fc;
}

/* TAB PANES */
.view-tab-pane {
  display: none;
  flex: 1;
  overflow: hidden;
  height: 100%;
}
.view-tab-pane.active {
  display: flex;
  flex-direction: column;
}

/* SANDBOXED IFRAME */
.iframe-container {
  flex: 1;
  height: 100%;
  background: #ffffff;
  position: relative;
}

#emailHtmlFrame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.plain-text-box, .raw-headers-box {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(0, 0, 0, 0.3);
}

.headers-toolbar {
  padding: 10px 24px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
}

/* STATS MODAL STYLES */
.stats-card {
  max-width: 580px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.stat-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: #a5b4fc;
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.stats-section {
  margin-top: 20px;
}

.stats-section h4 {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.domain-tag-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.domain-tag {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.recent-otp-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.recent-otp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
}

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

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

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* TOAST NOTIFICATIONS */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  box-shadow: var(--shadow-dropdown);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
  font-size: 0.875rem;
  animation: toastSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.toast.toast-success {
  border-color: rgba(16, 185, 129, 0.4);
}
.toast.toast-info {
  border-color: rgba(99, 102, 241, 0.4);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .app-workspace {
    grid-template-columns: 240px 320px 1fr;
  }
}

@media (max-width: 768px) {
  .app-workspace {
    grid-template-columns: 1fr;
  }
  .sidebar-panel {
    display: none;
  }
  .email-detail-panel {
    display: none;
  }
  .email-detail-panel.mobile-active {
    display: flex;
    position: fixed;
    inset: 68px 0 0 0;
    z-index: 50;
  }
}
