/* ==========================================================================
   Awesome DESIGN.md — Resend & Linear Dark Luxury Design System
   Canvas: Pitch Black #000000 | Hairlines: Translucent White | No Generic Emojis
   ========================================================================== */

:root {
  /* Colors */
  --canvas: #000000;
  --surface-card: #0a0a0c;
  --surface-elevated: #101012;
  --surface-deep: #06060a;
  --surface-hover: #151518;
  --surface-active: #1c1c22;
  
  --ink: #fcfdff;
  --body: rgba(252, 253, 255, 0.86);
  --charcoal: rgba(252, 253, 255, 0.70);
  --mute: #a1a4a5;
  --ash: #888e90;
  --stone: #464a4d;
  
  --hairline: rgba(255, 255, 255, 0.06);
  --hairline-strong: rgba(255, 255, 255, 0.14);
  --divider-soft: rgba(255, 255, 255, 0.04);
  
  --accent-green: #11ff99;
  --accent-green-glow: rgba(17, 255, 153, 0.18);
  --accent-blue: #3b9eff;
  --accent-blue-glow: rgba(59, 158, 255, 0.28);
  --accent-orange: #ff801f;
  --accent-orange-glow: rgba(255, 128, 31, 0.18);
  --accent-red: #ff3355;
  --accent-red-glow: rgba(255, 51, 85, 0.24);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;

  /* Border Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Layout */
  --container-max: 1140px;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  background-color: var(--canvas);
  color: var(--body);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Atmospheric Ambient Glows */
.ambient-glow-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 440px;
  background: radial-gradient(ellipse at 50% 0%, rgba(59, 158, 255, 0.10) 0%, rgba(17, 255, 153, 0.03) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.ambient-glow-side {
  position: absolute;
  top: 300px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(17, 255, 153, 0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--surface-deep);
}
::-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.22);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
  height: 68px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand-glyph {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02));
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: transform 0.2s, border-color 0.2s;
}

.brand:hover .brand-glyph {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.3);
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-chip {
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--mute);
  font-weight: 500;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(17, 255, 153, 0.06);
  border: 1px solid rgba(17, 255, 153, 0.2);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--accent-green);
  font-weight: 500;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-green);
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulseGlow 2.2s infinite ease-in-out;
}

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

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--hairline);
}

.nav-count-badge {
  padding: 1px 6px;
  background: var(--surface-hover);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--mute);
}

/* History Dropdown */
.dropdown-wrapper {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 330px;
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.85);
  display: none;
  flex-direction: column;
  z-index: 80;
  overflow: hidden;
  animation: dropIn 0.15s ease-out;
}

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

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

.dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-deep);
}

.dropdown-action-text {
  background: none;
  border: none;
  color: var(--ash);
  font-size: 11px;
  cursor: pointer;
  transition: color 0.2s;
}

.dropdown-action-text:hover {
  color: var(--accent-red);
}

.dropdown-list {
  max-height: 280px;
  overflow-y: auto;
}

.dropdown-item {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--divider-soft);
  cursor: pointer;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: var(--surface-hover);
}

.dropdown-item-email {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
}

.dropdown-item-pin {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--accent-green);
  background: rgba(17, 255, 153, 0.08);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(17, 255, 153, 0.2);
}

.dropdown-empty {
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--ash);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.main-content {
  padding-top: 48px;
  padding-bottom: 80px;
}

.hero-section {
  text-align: center;
  margin-bottom: 40px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--mute);
  margin-bottom: 22px;
  letter-spacing: -0.01em;
}

.badge-sparkle {
  color: var(--accent-blue);
}

.hero-heading {
  font-size: 46px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin-bottom: 16px;
}

.hero-highlight {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(180deg, #ffffff 30%, rgba(252,253,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 0 4px;
}

.hero-subtext {
  font-size: 15px;
  color: var(--mute);
  max-width: 660px;
  margin: 0 auto 36px auto;
  line-height: 1.6;
}

/* ==========================================================================
   Cockpit Generator Card
   ========================================================================== */
.cockpit-card {
  max-width: 860px;
  margin: 0 auto;
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
}

.cockpit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
}

/* Address Row */
.cockpit-address-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.address-input-container {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--surface-deep);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-md);
  padding: 4px 8px 4px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.address-input-container:focus-within {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.05);
}

.address-icon {
  color: var(--mute);
  margin-right: 10px;
  display: flex;
  align-items: center;
}

.prefix-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 500;
  flex: 1;
  min-width: 140px;
}

.at-separator {
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 17px;
  padding: 0 4px;
}

.domain-dropdown {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.domain-dropdown:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.domain-dropdown option {
  background: var(--surface-card);
  color: var(--ink);
}

.btn-copy-inline {
  background: var(--surface-elevated);
  border: 1px solid var(--hairline-strong);
  color: var(--ink);
  border-radius: var(--radius-md);
  padding: 0 16px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-copy-inline:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* Security & Password Banner */
.security-banner {
  background: var(--surface-deep);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.security-badge-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shield-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.shield-locked {
  background: rgba(17, 255, 153, 0.1);
  border: 1px solid rgba(17, 255, 153, 0.25);
  color: var(--accent-green);
}

.shield-unlocked {
  background: rgba(255, 128, 31, 0.1);
  border: 1px solid rgba(255, 128, 31, 0.25);
  color: var(--accent-orange);
}

.security-meta {
  display: flex;
  flex-direction: column;
}

.security-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.security-subtitle {
  font-size: 12px;
  color: var(--ash);
}

.security-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.password-input-box {
  display: flex;
  align-items: center;
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  width: 170px;
}

.password-input-box:focus-within {
  border-color: rgba(255, 255, 255, 0.35);
}

.password-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  width: 100%;
}

.btn-toggle-eye {
  background: none;
  border: none;
  color: var(--ash);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
  transition: color 0.2s;
}

.btn-toggle-eye:hover {
  color: var(--ink);
}

/* Toolbar Buttons */
.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Button Standard Tokens */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  height: 38px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
  user-select: none;
}

.btn-primary {
  background: var(--ink);
  color: #000000;
  font-weight: 600;
}

.btn-primary:hover {
  background: #ffffff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surface-elevated);
  border: 1px solid var(--hairline-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.btn-accent {
  background: rgba(17, 255, 153, 0.12);
  border: 1px solid rgba(17, 255, 153, 0.3);
  color: var(--accent-green);
  font-weight: 600;
}

.btn-accent:hover {
  background: rgba(17, 255, 153, 0.22);
  border-color: var(--accent-green);
  transform: translateY(-1px);
}

.btn-danger-ghost {
  background: rgba(255, 51, 85, 0.08);
  border: 1px solid rgba(255, 51, 85, 0.2);
  color: #ff6680;
}

.btn-danger-ghost:hover {
  background: rgba(255, 51, 85, 0.18);
  border-color: rgba(255, 51, 85, 0.4);
}

.btn-sm {
  height: 32px;
  padding: 4px 12px;
  font-size: 12px;
}

.action-svg {
  flex-shrink: 0;
}

/* Live Refresh Tracker */
.live-tracker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--divider-soft);
  font-size: 12px;
  color: var(--ash);
}

.tracker-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulsing-green-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-green);
  border-radius: var(--radius-full);
  box-shadow: 0 0 6px var(--accent-green);
  animation: pulseGlow 1.8s infinite;
}

.tracker-bar {
  width: 130px;
  height: 3px;
  background: var(--surface-deep);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.tracker-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
  width: 100%;
  transition: width 1s linear;
}

/* ==========================================================================
   Inbox Feed Section
   ========================================================================== */
.inbox-section {
  max-width: 980px;
  margin: 0 auto 60px auto;
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.inbox-head {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.015);
  gap: 16px;
}

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

.inbox-icon {
  color: var(--mute);
  display: flex;
  align-items: center;
}

.inbox-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.inbox-count-pill {
  padding: 2px 8px;
  background: var(--surface-elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--mute);
}

.inbox-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-deep);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  width: 260px;
  transition: border-color 0.2s, width 0.2s;
}

.inbox-search-box:focus-within {
  border-color: rgba(255, 255, 255, 0.3);
  width: 300px;
}

.inbox-search-box svg {
  color: var(--ash);
  flex-shrink: 0;
}

.search-field {
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-size: 13px;
  width: 100%;
}

/* ==========================================================================
   Inbox State: Locked Security Gate
   ========================================================================== */
.locked-screen {
  padding: 64px 24px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.locked-shield-aura {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px auto;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(17, 255, 153, 0.14), rgba(59, 158, 255, 0.05));
  border: 1px solid rgba(17, 255, 153, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  box-shadow: 0 0 30px rgba(17, 255, 153, 0.12);
}

.locked-screen-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.locked-screen-desc {
  font-size: 14px;
  color: var(--mute);
  line-height: 1.55;
  margin-bottom: 24px;
}

.locked-screen-desc strong {
  color: var(--ink);
  font-family: var(--font-mono);
}

.locked-input-group {
  display: flex;
  gap: 8px;
  justify-content: center;
  max-width: 360px;
  margin: 0 auto 12px auto;
}

.locked-input {
  flex: 1;
  background: var(--surface-deep);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.locked-input:focus {
  border-color: rgba(255, 255, 255, 0.4);
}

.locked-hint {
  font-size: 12px;
  color: var(--ash);
}

/* ==========================================================================
   Inbox State: Empty Waiting Radar
   ========================================================================== */
.empty-screen {
  padding: 72px 24px;
  text-align: center;
}

.empty-radar-aura {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px auto;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mute);
  position: relative;
}

.empty-radar-aura::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: var(--radius-full);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  animation: rotateBorder 12s linear infinite;
}

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

.empty-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}

.empty-desc {
  font-size: 13px;
  color: var(--ash);
  max-width: 420px;
  margin: 0 auto 20px auto;
  line-height: 1.6;
}

.empty-steps {
  display: inline-flex;
  gap: 16px;
  background: var(--surface-deep);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-size: 12px;
  color: var(--mute);
}

.empty-steps span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.empty-steps strong {
  color: var(--accent-blue);
  font-family: var(--font-mono);
}

/* ==========================================================================
   Email List Table (Loaded Feed)
   ========================================================================== */
.email-feed {
  list-style: none;
}

.email-row {
  display: grid;
  grid-template-columns: 240px 1fr 140px 140px 48px;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--divider-soft);
  transition: background 0.15s ease;
  cursor: pointer;
}

.email-row:hover {
  background: var(--surface-hover);
}

.email-row:last-child {
  border-bottom: none;
}

/* Sender Column */
.row-sender-col {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 12px;
  overflow: hidden;
}

.sender-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(59, 158, 255, 0.2), rgba(17, 255, 153, 0.2));
  border: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  flex-shrink: 0;
}

.sender-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sender-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sender-email {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--ash);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Subject & Snippet Column */
.row-subject-col {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  padding-right: 16px;
}

.row-subject {
  font-size: 13px;
  font-weight: 500;
  color: var(--body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-snippet {
  font-size: 12px;
  color: var(--ash);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Timestamp Column */
.row-time-col {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--mute);
  white-space: nowrap;
}

/* OTP Badge Column */
.row-otp-col {
  display: flex;
  align-items: center;
}

.otp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(59, 158, 255, 0.12);
  border: 1px solid rgba(59, 158, 255, 0.3);
  border-radius: var(--radius-sm);
  color: var(--accent-blue);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 10px rgba(59, 158, 255, 0.1);
}

.otp-chip:hover {
  background: rgba(59, 158, 255, 0.22);
  border-color: var(--accent-blue);
  transform: scale(1.03);
}

.no-otp-indicator {
  font-size: 11px;
  color: var(--stone);
  font-family: var(--font-mono);
}

/* Row Action Column */
.row-action-col {
  display: flex;
  justify-content: flex-end;
}

.btn-row-action {
  background: transparent;
  border: none;
  color: var(--ash);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-row-action:hover {
  background: rgba(255, 51, 85, 0.15);
  color: var(--accent-red);
}

/* ==========================================================================
   Modal Dialogs
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-window {
  width: 100%;
  max-width: 880px;
  max-height: 88vh;
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 72px rgba(0, 0, 0, 0.95);
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.modal-backdrop.open .modal-window {
  transform: translateY(0);
}

.modal-wide {
  max-width: 960px;
}

.modal-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface-elevated);
}

.modal-tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-blue);
  margin-bottom: 4px;
}

.modal-subject {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.3;
}

.modal-info-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--mute);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.modal-btn-close {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  color: var(--mute);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.modal-btn-close:hover {
  color: var(--ink);
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Modal Giant OTP Card */
.modal-otp-card {
  margin: 16px 24px 0 24px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(59, 158, 255, 0.12), rgba(17, 255, 153, 0.08));
  border: 1px solid rgba(59, 158, 255, 0.3);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.otp-banner-left {
  display: flex;
  flex-direction: column;
}

.otp-badge-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent-blue);
  margin-bottom: 4px;
}

.otp-giant-code {
  font-size: 32px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--ink);
  letter-spacing: 0.15em;
  text-shadow: 0 0 16px rgba(59, 158, 255, 0.4);
}

.btn-copy-otp {
  height: 42px;
  padding: 0 20px;
  font-size: 14px;
}

/* Modal Tab Switcher */
.modal-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-deep);
}

.switcher-tabs {
  display: flex;
  gap: 6px;
}

.switcher-tab {
  background: transparent;
  border: none;
  color: var(--mute);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.switcher-tab.active {
  color: var(--ink);
  background: var(--surface-card);
}

.modal-content-area {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-content-area.scrollable {
  max-height: 520px;
}

.email-sandbox-frame {
  width: 100%;
  height: 480px;
  border: none;
  background: #ffffff;
  border-radius: var(--radius-md);
}

.raw-code-view {
  background: var(--surface-deep);
  border: 1px solid var(--hairline);
  padding: 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--body);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

/* Code Window (Traffic Lights) */
.code-window {
  background: var(--surface-deep);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
}

.code-traffic-lights {
  background: var(--surface-card);
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  gap: 6px;
}

.light {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}

.light-red { background: var(--accent-red); }
.light-yellow { background: #ffc53d; }
.light-green { background: var(--accent-green); }

.code-title {
  margin-left: 10px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--mute);
}

.code-snippet {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--body);
  overflow-x: auto;
  line-height: 1.6;
}

.code-inline {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--hairline);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-blue);
}

.api-lead {
  font-size: 14px;
  color: var(--mute);
  margin-bottom: 20px;
  line-height: 1.6;
}

/* Telemetry Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-box {
  background: var(--surface-deep);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.stat-caption {
  font-size: 11px;
  color: var(--ash);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.stat-number {
  font-size: 22px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--ink);
}

.section-subheading {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.live-terminal-logs {
  background: var(--surface-deep);
  border: 1px solid var(--hairline);
  padding: 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mute);
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.6;
}

/* Toast Stack */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink);
  pointer-events: auto;
  animation: slideToast 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-success-icon {
  color: var(--accent-green);
  flex-shrink: 0;
}

.toast-error-icon {
  color: var(--accent-red);
  flex-shrink: 0;
}

@keyframes slideToast {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--hairline);
  padding: 32px 0;
  background: var(--surface-deep);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 12px;
  color: var(--ash);
}

.footer-links {
  display: flex;
  gap: 8px;
}

.footer-pill {
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--mute);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 860px) {
  .hero-heading {
    font-size: 34px;
  }
  .cockpit-address-row {
    flex-direction: column;
  }
  .btn-copy-inline {
    height: 40px;
    justify-content: center;
  }
  .email-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px;
  }
  .row-sender-col, .row-subject-col {
    padding-right: 0;
  }
  .inbox-head {
    flex-direction: column;
    align-items: stretch;
  }
  .inbox-search-box {
    width: 100%;
  }
  .modal-otp-card {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .otp-banner-left {
    align-items: center;
  }
}
