/* ========================================================
   BunnyMail — High-Fidelity Tmail.pk Design System
   Matches Screenshot Layout: Left Saved Box Card + Right Live Inbox
   Palette: Unified Obsidian Black, Emerald Green & Crisp White
   ======================================================== */

:root {
  --bg-page: #09090b;
  --bg-card: #121215;
  --bg-card-hover: #17171c;
  --bg-input: #16161b;
  --bg-subtle: #1c1c22;
  --bg-dropdown: #141418;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);

  --accent: #10b981;
  --accent-hover: #059669;
  --accent-light: #34d399;
  --accent-glow: rgba(16, 185, 129, 0.18);
  --accent-tint: rgba(16, 185, 129, 0.1);

  --btn-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --btn-gradient-hover: linear-gradient(135deg, #34d399 0%, #10b981 100%);

  --danger: #ef4444;
  --danger-tint: rgba(239, 68, 68, 0.12);

  --text-white: #ffffff;
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

/* Light Theme Variables (When user toggles) */
body.light-theme {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f4f4f5;
  --bg-subtle: #f1f5f9;
  --bg-dropdown: #ffffff;
  --border-color: rgba(0, 0, 0, 0.09);
  --border-hover: rgba(0, 0, 0, 0.18);
  --text-white: #09090b;
  --text-primary: #18181b;
  --text-secondary: #52525b;
  --text-muted: #71717a;
  --btn-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --btn-gradient-hover: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  --accent: #059669;
  --accent-light: #10b981;
  --accent-tint: rgba(16, 185, 129, 0.12);
  --accent-glow: rgba(16, 185, 129, 0.2);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.font-mono {
  font-family: var(--font-mono);
}

.text-accent {
  color: var(--accent);
}

/* ========================================================
   TOP NAVBAR
   ======================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
}

.nav-container {
  max-width: 1560px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
  transition: transform 0.2s ease;
}

.brand:hover .brand-logo-img {
  transform: scale(1.06);
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--btn-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

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

.brand-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.brand-accent {
  color: var(--accent-light);
}

.brand-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: #10b981;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-white);
  background: var(--bg-subtle);
}

.nav-link.active {
  color: var(--accent-light);
}

/* Nav Login Button */
.btn-nav-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.btn-nav-login:hover {
  background: var(--bg-subtle);
  border-color: var(--accent);
  color: var(--text-white);
}

.btn-nav-login svg {
  color: var(--accent);
}

/* Right Nav Actions */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

/* 3-Dots Mobile Menu Button */
.btn-dots-menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.btn-dots-menu:hover,
.btn-dots-menu.active {
  background: var(--bg-subtle);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* Mobile Dropdown Menu */
.mobile-menu-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  min-width: 220px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 3px;
  z-index: 1000;
  animation: dropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-theme .mobile-menu-dropdown {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

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

.mobile-menu-dropdown.open {
  display: flex !important;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.mobile-menu-item:hover,
.mobile-menu-item.active {
  background: var(--bg-subtle);
  color: var(--accent-light);
}

.mobile-menu-item svg {
  color: var(--accent);
  flex-shrink: 0;
}

.mobile-menu-divider {
  height: 1px;
  background: var(--border-color);
  margin: 6px 4px;
}

.btn-menu-login {
  color: var(--accent-light);
  font-weight: 700;
}

.theme-switch {
  width: 44px;
  height: 24px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  padding: 2px;
  transition: var(--transition);
}

.theme-indicator {
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme .theme-indicator {
  transform: translateX(20px);
}

.theme-icon-sun {
  position: absolute;
  right: 5px;
  color: var(--text-muted);
}

body.light-theme .theme-icon-sun {
  color: #ffffff;
}

/* User Pill Dropdown (Screenshot match!) */
.user-account-dropdown {
  position: relative;
}

.user-pill-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px 12px 4px 4px;
  cursor: pointer;
  transition: var(--transition);
}

.user-pill-btn:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.user-avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--btn-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
}

.user-meta-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.2;
}

.user-name-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-white);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chevron-icon {
  color: var(--text-muted);
  margin-left: 2px;
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 250px;
  background: var(--bg-dropdown);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  display: none;
  flex-direction: column;
  z-index: 200;
  overflow: hidden;
  animation: dropdownFade 0.16s ease;
}

.dropdown-menu.open {
  display: flex;
}

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

.dropdown-header {
  padding: 12px 14px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dropdown-header-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.dropdown-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--accent-tint);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-light);
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.dropdown-user-info {
  padding: 4px 14px 10px;
  font-size: 0.8rem;
  color: var(--text-white);
  word-break: break-all;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--bg-subtle);
  color: var(--text-white);
}

.dropdown-item-danger {
  color: #f87171;
}

.dropdown-item-danger:hover {
  background: var(--danger-tint);
  color: #ffffff;
}

/* ========================================================
   HERO HEADER
   ======================================================== */
.main-wrapper {
  flex: 1;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 20px 60px;
}

.hero-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 36px;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.18;
  color: var(--text-white);
  margin-bottom: 12px;
}

.gradient-headline {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme .gradient-headline {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 0.96rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Mode Switcher Tabs */
.mode-tabs-container {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 5px;
  border-radius: var(--radius-full);
  margin-top: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.mode-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

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

.mode-tab-btn.active {
  background: var(--btn-gradient);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.tab-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tab-badge-subtle {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.mode-tab-btn.active .tab-badge-subtle {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.active-mode-indicator {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--accent-tint);
  color: var(--accent-light);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.active-mode-indicator.badge-temp {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border-color: var(--border-color);
}

/* Domain Selector row in disposable view */
.domain-selector-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  margin-bottom: 14px;
}

.domain-selector-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.domain-quick-select {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--accent-light);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.domain-quick-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.mailbox-view-panel {
  display: flex;
  flex-direction: column;
}

/* ========================================================
   WORKSPACE DUAL-GRID (SCREENSHOT MATCH)
   ======================================================== */
.workspace-grid {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 24px;
  align-items: start;
}

/* ========================================================
   LEFT CARD: YOUR TEMPORARY EMAIL
   ======================================================== */
.card-temp-email {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

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

.card-head-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.card-head-title svg {
  color: var(--accent);
}

/* Tmail Inputs */
.tmail-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px 6px 4px 14px;
  margin-bottom: 12px;
  transition: var(--transition);
}

.tmail-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.tmail-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-white);
  font-size: 0.94rem;
  font-weight: 600;
  width: 100%;
}

.password-input-row {
  margin-bottom: 6px;
}

.tmail-input-prefix {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-right: 8px;
  user-select: none;
}

.input-actions-dual {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-action-icon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-action-icon:hover {
  color: var(--text-white);
  background: var(--bg-subtle);
}

/* Change Password link */
.change-password-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.text-link {
  background: transparent;
  border: none;
  color: var(--accent-light);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: var(--transition);
}

.text-link:hover {
  color: var(--text-white);
}

.text-link-muted {
  color: var(--text-muted);
  text-decoration: none;
}

.text-link-muted:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

.text-link-subtle {
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.text-link-subtle:hover {
  color: var(--text-white);
}

/* Regenerate Button */
.btn-primary-gradient {
  background: var(--btn-gradient);
  color: #ffffff;
  border: none;
  padding: 13px 20px;
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 14px var(--accent-glow);
  width: 100%;
}

.btn-primary-gradient:hover {
  background: var(--btn-gradient-hover);
  transform: translateY(-1px);
}

.mailboxes-remaining-text {
  text-align: center;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin: 10px 0 12px;
}

/* Copy Credentials Button */
.btn-secondary-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-white);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  width: 100%;
  margin-bottom: 14px;
}

.btn-secondary-outline:hover {
  background: var(--bg-subtle);
  border-color: var(--border-hover);
}

.share-privately-row {
  text-align: center;
  margin-bottom: 16px;
}

/* Card Trust Badge */
.card-trust-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.card-trust-footer svg {
  color: var(--accent);
}

/* Spin animation */
.refresh-spin-target.spinning {
  animation: spin 0.8s linear infinite;
}

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

/* ========================================================
   RIGHT CARD: LIVE INBOX (EXACT TMAIL.PK MATCH)
   ======================================================== */
.card-inbox-workspace {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.inbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 14px;
}

.inbox-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inbox-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-dot 1.8s infinite;
}

.inbox-label {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-white);
}

.inbox-count-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

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

.inbox-recipient-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.btn-inbox-sync {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-inbox-sync:hover {
  color: var(--text-white);
  background: var(--bg-subtle);
}

/* Inbox Search & Sound Bar */
.inbox-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 10px 6px 14px;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.search-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-white);
  font-size: 0.86rem;
}

.sound-chip {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.sound-chip.active {
  color: var(--accent-light);
  border-color: rgba(16, 185, 129, 0.3);
  background: var(--accent-tint);
}

/* Empty State (Exact Tmail.pk match!) */
.inbox-feed-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tmail-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 70px 20px;
  text-align: center;
  flex: 1;
}

.empty-envelope-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 18px;
}

body.light-theme .empty-envelope-circle {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
  color: #6366f1;
}

.awaiting-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 8px;
}

.awaiting-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 440px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.listening-signals-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--accent-light);
}

.signal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: pulse-dot 1.8s infinite;
}

/* Modern Inbox Item Card */
.inbox-item,
.email-row-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 12px;
  position: relative;
}

.inbox-item:hover,
.email-row-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.inbox-item.unread,
.email-row-item.unread {
  border-left: 4px solid var(--accent);
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.05) 0%, var(--bg-card) 25%);
}

.inbox-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inbox-sender-col {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.inbox-sender-avatar,
.sender-avatar-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--btn-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.inbox-sender-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.inbox-sender-name,
.email-row-from {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-sender-from {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-item-time,
.email-row-time {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
}

.inbox-item-subject-row {
  margin-top: 2px;
}

.inbox-item-subject,
.email-row-subject {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  word-break: break-word;
}

.inbox-item-snippet {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Quick OTP Chip in Inbox Feed */
.inbox-item-otp-chip,
.otp-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-light);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
  width: fit-content;
}

body.light-theme .inbox-item-otp-chip,
body.light-theme .otp-pill {
  background: #e8f0fe;
  border-color: #c2e7ff;
  color: #0b57d0;
}

.inbox-otp-code-value {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 2px;
  font-weight: 800;
  color: var(--text-white);
}

body.light-theme .inbox-otp-code-value {
  color: #1f1f1f;
}

.btn-inbox-quick-copy {
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-inbox-quick-copy:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

/* ========================================================
   BOTTOM FEATURES & FAQ
   ======================================================== */
.features-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 60px 0 40px;
}

.feature-col {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
}

.feature-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-tint);
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 12px;
}

.feature-col h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 6px;
}

.feature-col p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.faq-container {
  margin: 40px 0 60px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.faq-heading {
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  color: var(--text-white);
  margin-bottom: 24px;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-q {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--text-muted);
}

.faq-card[open] .faq-q::after {
  content: '−';
}

.faq-a {
  padding: 0 20px 16px;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
}

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

.modal-backdrop.open,
.modal-backdrop.active {
  display: flex !important;
  opacity: 1;
  visibility: visible;
}

.modal-window {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-window-viewer {
  max-width: 860px;
  height: 84vh;
}

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

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

.modal-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-light);
}

.modal-header-title h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-white);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: var(--text-white);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--text-white);
  outline: none;
  transition: var(--transition);
}

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

.input-split-row {
  display: flex;
  gap: 8px;
}

.btn-split-addon {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}

.preview-box {
  background: var(--bg-subtle);
  border: 1px dashed var(--border-color);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.preview-tag {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.preview-text {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent-light);
}

.modal-alert-error {
  background: var(--danger-tint);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  margin-top: 12px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg-subtle);
}

.btn-modal-submit {
  background: var(--btn-gradient);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
}

.btn-modal-cancel {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
}

/* QR Modal */
.qr-canvas-box {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: #ffffff;
  border-radius: var(--radius-sm);
  margin: 14px auto;
  max-width: 220px;
}

.qr-address-text {
  font-size: 0.84rem;
  color: var(--accent-light);
  word-break: break-all;
}

/* Viewer Modal */
.viewer-head-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.viewer-pill-badge {
  background: var(--accent-tint);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-light);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
}

.viewer-subject-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.btn-icon-danger {
  background: var(--danger-tint);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 5px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.viewer-sender-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
}

.sender-initial-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--btn-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #ffffff;
}

.sender-text-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.sender-line {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-label {
  color: var(--text-muted);
  margin-right: 4px;
}

.recipient-line {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.meta-sep {
  margin: 0 6px;
  color: var(--text-muted);
}

/* Gmail-Style OTP Box (Matches user screenshot) */
.gmail-otp-card {
  margin: 14px 20px;
  background: var(--bg-card);
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.02) 100%);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.light-theme .gmail-otp-card {
  background: #f0f4f9;
  border-color: #d3e3fd;
}

.gmail-otp-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gmail-otp-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
}

body.light-theme .gmail-otp-title {
  color: #444746;
}

.gmail-otp-digits {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.otp-box-digit {
  width: 42px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-light);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  user-select: all;
}

body.light-theme .otp-box-digit {
  background: #ffffff;
  border-color: #c4c7c5;
  color: #1f1f1f;
}

.gmail-otp-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-gmail-copy-code {
  background: #0b57d0;
  color: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 8px 22px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(11, 87, 208, 0.3);
}

.btn-gmail-copy-code:hover {
  background: #0842a0;
  transform: translateY(-1px);
}

.btn-gmail-copy-code.copied {
  background: var(--accent);
}

.viewer-tabs-row {
  display: flex;
  gap: 6px;
  padding: 10px 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.viewer-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 6px 12px;
  cursor: pointer;
}

.viewer-tab-btn.active {
  color: var(--accent-light);
  border-bottom-color: var(--accent);
}

.viewer-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: #ffffff;
}

.viewer-panel {
  display: none;
  width: 100%;
  height: 100%;
}

.viewer-panel.active {
  display: block;
}

.viewer-frame-sandbox {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

.viewer-plain-body {
  width: 100%;
  height: 100%;
  padding: 18px;
  overflow-y: auto;
  font-size: 0.86rem;
  color: #18181b;
  white-space: pre-wrap;
  word-break: break-word;
  background: #fafafa;
}

/* Toast Notifications (Singleton Pill) */
.toast-viewport {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 99999;
  pointer-events: none;
}

.toast-pill,
.toast-item {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f9fafb;
  padding: 9px 18px;
  border-radius: 9999px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 2px 6px rgba(0, 0, 0, 0.4);
  font-size: 0.84rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  animation: toastPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.light-theme .toast-pill,
body.light-theme .toast-item {
  background: #1e293b;
  color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

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

.toast-pill.hide,
.toast-item.hide {
  opacity: 0;
  transform: translateY(8px) scale(0.95);
}

.toast-pill.toast-success,
.toast-item.success {
  border-color: rgba(16, 185, 129, 0.5);
}
.toast-pill.toast-success svg,
.toast-item.success svg {
  color: #10b981;
}

.toast-pill.toast-error,
.toast-item.error {
  border-color: rgba(239, 68, 68, 0.5);
}
.toast-pill.toast-error svg,
.toast-item.error svg {
  color: #ef4444;
}

.toast-pill.toast-info,
.toast-item.info {
  border-color: rgba(99, 102, 241, 0.5);
}
.toast-pill.toast-info svg,
.toast-item.info svg {
  color: #818cf8;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-page);
  padding: 20px 0;
  margin-top: auto;
}

.footer-container {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ========================================================
   2FA LIVE AUTHENTICATOR (2FA.CN / 2FA.LIVE TOOL)
   ======================================================== */
.two-factor-section {
  margin-top: 50px;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
}

.two-factor-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 28px;
}

.two-factor-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-tint);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-light);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.two-factor-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 8px;
  line-height: 1.25;
}

.two-factor-sub {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.two-factor-mode-tabs {
  display: inline-flex;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 4px;
  border-radius: var(--radius-full);
  margin-top: 16px;
}

.two-factor-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.two-factor-tab-btn.active {
  background: var(--btn-gradient);
  color: #ffffff;
}

.two-factor-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
}

.two-factor-panel {
  display: flex;
  flex-direction: column;
}

.two-factor-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.btn-clear {
  margin-left: auto;
}

.two-factor-result-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: modalScale 0.2s ease;
}

.result-box-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 12px;
}

.result-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.timer-countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-tint);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-light);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.timer-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-light);
  animation: pulseLive 1.5s infinite;
}

.two-factor-big-code-wrap {
  margin: 10px 0 16px;
  text-align: center;
}

.two-factor-big-code {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--accent-light);
  letter-spacing: 6px;
  line-height: 1;
  text-shadow: 0 0 20px var(--accent-glow);
  user-select: all;
}

.totp-progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 20px;
}

.totp-progress-fill {
  height: 100%;
  background: var(--btn-gradient);
  border-radius: var(--radius-full);
  transition: width 0.9s linear;
}

.result-action-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.btn-copy-big-otp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 320px;
  background: var(--btn-gradient);
  color: #ffffff;
  border: none;
  font-size: 0.94rem;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 15px var(--accent-glow);
  transition: var(--transition);
}

.btn-copy-big-otp:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.auto-refresh-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Bulk Table */
.bulk-results-viewport {
  margin-top: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.bulk-table-wrap {
  max-height: 360px;
  overflow-y: auto;
}

.bulk-totp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.bulk-totp-table th {
  background: var(--bg-subtle);
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.bulk-totp-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.bulk-totp-table tr:last-child td {
  border-bottom: none;
}

.bulk-code-cell {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: 2px;
}

.btn-table-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-table-copy:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* ========================================================
   RESPONSIVE DESIGN (MOBILE-FIRST POLISH)
   ======================================================== */

/* Tablet & Smaller Screens */
@media (max-width: 960px) {
  .workspace-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .features-container {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 40px 0 30px;
  }
}

/* Mobile Devices & Phones (<= 768px) */
@media (max-width: 768px) {
  /* Prevent horizontal scroll globally */
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  /* Prevent iOS automatic zoom on text inputs */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Hide desktop items on mobile */
  .hide-mobile,
  .nav-links {
    display: none !important;
  }

  /* Header Navigation */
  .nav-container {
    padding: 10px 14px;
    gap: 8px;
    position: relative;
  }

  .brand {
    gap: 10px;
  }

  .brand-logo-img {
    width: 36px;
    height: 36px;
  }

  .brand-title {
    font-size: 1.15rem;
    white-space: nowrap;
  }

  .brand-sub {
    display: none !important;
  }

  /* Show 3-Dots Menu Button on Mobile */
  .btn-dots-menu {
    display: flex !important;
  }

  .btn-nav-login {
    display: none !important;
  }

  /* Toast Notification at Bottom Center on Mobile (Never covers header/inputs) */
  .toast-viewport {
    top: auto !important;
    bottom: 24px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    max-width: 90vw !important;
    align-items: center;
    z-index: 99999;
    pointer-events: none !important;
  }

  .toast-pill,
  .toast-item {
    width: auto;
    padding: 8px 16px;
    font-size: 0.82rem;
  }

  /* Main Wrapper */
  .main-wrapper {
    padding: 6px 10px 24px;
  }

  /* Hero Section on Mobile: Hide redundant marketing text so user directly gets the Mailbox */
  .hero-header {
    padding: 4px 0 8px;
    margin-bottom: 4px;
  }

  .hero-title,
  .hero-sub {
    display: none !important;
  }

  /* Dual Mode Tabs (Saved Mailbox vs Disposable Box) */
  .mode-tabs-container {
    display: flex;
    width: 100%;
    gap: 6px;
    padding: 4px;
    border-radius: var(--radius-md);
  }

  .mode-tab-btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
    padding: 9px 8px;
    font-size: 0.82rem;
    gap: 6px;
    border-radius: var(--radius-sm);
  }

  .mode-tab-btn .tab-badge,
  .mode-tab-btn .tab-badge-subtle {
    display: none; /* Hide secondary tag on mobile so tab buttons stay on 1 clean row */
  }

  /* Left Cards: Saved & Disposable Controls */
  .card-temp-email {
    padding: 16px 14px;
    border-radius: var(--radius-md);
  }

  .card-head {
    margin-bottom: 12px;
  }

  .card-head-title span {
    font-size: 0.88rem;
  }

  .active-mode-indicator {
    font-size: 0.68rem;
    padding: 2px 7px;
  }

  .tmail-input-wrap {
    margin-bottom: 10px;
  }

  .tmail-input {
    font-size: 0.95rem;
    padding: 12px 14px;
  }

  .btn-action-icon {
    width: 44px;
    height: 44px;
  }

  .tmail-domain-select-wrap select {
    padding: 11px 12px;
    font-size: 0.9rem;
  }

  .btn-primary-gradient,
  .btn-secondary-outline {
    padding: 13px 16px;
    font-size: 0.92rem;
    min-height: 46px;
    justify-content: center;
  }

  /* Right Card: Live Inbox */
  .card-inbox-workspace {
    padding: 16px 14px;
    border-radius: var(--radius-md);
  }

  .inbox-head {
    margin-bottom: 12px;
    gap: 8px;
  }

  .inbox-label {
    font-size: 1.1rem;
  }

  .inbox-header-right {
    gap: 8px;
    min-width: 0;
  }

  .inbox-recipient-label {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.76rem;
  }

  .btn-inbox-sync {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .inbox-search-bar {
    padding: 8px 10px;
    margin-bottom: 12px;
    gap: 8px;
  }

  .search-input-field {
    font-size: 0.85rem;
  }

  .sound-chip {
    padding: 5px 8px;
    font-size: 0.72rem;
  }

  /* Inbox Feed Items on Mobile */
  .inbox-item,
  .email-row-item {
    padding: 14px 12px;
    margin-bottom: 10px;
    gap: 8px;
  }

  .inbox-sender-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }

  .inbox-sender-name {
    font-size: 0.88rem;
  }

  .inbox-sender-from {
    font-size: 0.74rem;
  }

  .inbox-item-subject {
    font-size: 0.88rem;
  }

  .inbox-item-snippet {
    font-size: 0.8rem;
    line-height: 1.45;
  }

  /* Quick OTP Chip on Mobile */
  .inbox-item-otp-chip {
    width: 100%;
    box-sizing: border-box;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
  }

  .inbox-otp-code-value {
    font-size: 1.15rem;
    letter-spacing: 2px;
  }

  .btn-inbox-quick-copy {
    padding: 6px 12px;
    font-size: 0.78rem;
    border-radius: 6px;
    min-height: 32px;
  }

  /* FULL SCREEN EMAIL VIEWER MODAL ON MOBILE */
  .modal-backdrop {
    padding: 0 !important;
  }

  .modal-window {
    border-radius: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
  }

  .modal-window-viewer {
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
    display: flex;
    flex-direction: column;
  }

  .modal-header {
    padding: 12px 14px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-card);
  }

  .viewer-subject-text {
    font-size: 0.94rem;
  }

  .modal-close-btn {
    font-size: 28px;
    padding: 4px 8px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .viewer-sender-bar {
    padding: 10px 14px;
    gap: 10px;
  }

  .sender-initial-circle {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .sender-line {
    font-size: 0.82rem;
  }

  .recipient-line {
    font-size: 0.74rem;
  }

  /* Gmail-Style OTP Card on Mobile */
  .gmail-otp-card {
    margin: 10px 12px;
    padding: 12px 12px;
    gap: 10px;
    border-radius: 10px;
  }

  .gmail-otp-title {
    font-size: 0.82rem;
  }

  .gmail-otp-digits {
    gap: 5px;
    justify-content: flex-start;
  }

  .otp-box-digit {
    width: 34px;
    height: 40px;
    font-size: 1.25rem;
    border-radius: 6px;
  }

  .btn-gmail-copy-code {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    font-size: 0.88rem;
    border-radius: 20px;
  }

  .viewer-tabs-row {
    padding: 6px 12px 0;
  }

  .viewer-tab-btn {
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .viewer-viewport {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 2FA Live Authenticator on Mobile */
  .two-factor-section {
    margin-top: 24px;
    padding-top: 16px;
  }

  .two-factor-title {
    font-size: 1.15rem;
  }

  .two-factor-sub {
    display: none !important;
  }

  .two-factor-mode-tabs {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .two-factor-tab-btn {
    flex: 1;
    text-align: center;
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .two-factor-panel {
    padding: 16px 12px;
  }

  .two-factor-actions-row {
    flex-direction: column;
  }

  .two-factor-actions-row button {
    width: 100%;
    justify-content: center;
  }

  .two-factor-big-code {
    font-size: 2.1rem;
    letter-spacing: 3px;
  }

  /* Footer on Mobile */
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding: 14px;
  }
}

/* Very Small Mobile Screens (<= 380px) */
@media (max-width: 380px) {
  .hero-title {
    font-size: 1.25rem !important;
  }

  .otp-box-digit {
    width: 29px;
    height: 36px;
    font-size: 1.1rem;
    gap: 3px;
  }

  .inbox-recipient-label {
    max-width: 110px;
  }

  .btn-nav-login span {
    display: none; /* Just show icon on narrow screens */
  }
}
