/* ══════════════════════════════════════════════════════════════
   GODMAIL PRO — styles.css
   Aesthetic: Premium dark-first, refined tech with warm accents
   Fonts: Plus Jakarta Sans (display) + JetBrains Mono (mono)
══════════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  --bg-base:      #08080c;
  --bg-surface:   #0e0e14;
  --bg-elevated:  #15151e;
  --bg-card:      #111119;
  --bg-hover:     #1a1a28;
  --bg-input:     #0c0c12;
  --border:       #1e1e30;
  --border-accent:#2e2e48;
  --border-subtle:#161624;

  --text-primary: #eaeaf4;
  --text-secondary:#8888a8;
  --text-muted:   #505068;
  --text-inverse: #08080c;

  --accent:       #6366f1;
  --accent-hover: #818cf8;
  --accent-glow:  rgba(99, 102, 241, 0.25);
  --accent-dim:   rgba(99, 102, 241, 0.1);
  --accent-solid: #6366f1;

  --green:        #34d399;
  --green-dim:    rgba(52, 211, 153, 0.12);
  --green-glow:   rgba(52, 211, 153, 0.25);
  --red:          #f87171;
  --red-dim:      rgba(248, 113, 113, 0.12);
  --yellow:       #fbbf24;
  --orange:       #fb923c;

  --radius-xs:    4px;
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --radius-xl:    20px;
  --radius-2xl:   28px;

  --shadow-sm:    0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:    0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.6);
  --shadow-glow:  0 0 60px rgba(99,102,241,0.08);
  --shadow-card:  0 1px 3px rgba(0,0,0,0.3), 0 0 40px rgba(99,102,241,0.04);

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

  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition:   0.2s var(--ease);
  --header-h:     56px;
}

[data-theme="light"] {
  --bg-base:      #f8f8fb;
  --bg-surface:   #ffffff;
  --bg-elevated:  #f0f0f5;
  --bg-card:      #ffffff;
  --bg-hover:     #ececf4;
  --bg-input:     #f4f4f8;
  --border:       #e2e2ec;
  --border-accent:#d0d0e0;
  --border-subtle:#eaeaf0;

  --text-primary: #0f0f1a;
  --text-secondary:#5a5a78;
  --text-muted:   #9898b0;

  --accent:       #4f46e5;
  --accent-hover: #6366f1;
  --accent-glow:  rgba(79, 70, 229, 0.12);
  --accent-dim:   rgba(79, 70, 229, 0.06);
  --accent-solid: #4f46e5;

  --green:        #059669;
  --green-dim:    rgba(5, 150, 105, 0.08);
  --green-glow:   rgba(5, 150, 105, 0.15);

  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:    0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.1);
  --shadow-glow:  0 0 60px rgba(79,70,229,0.06);
  --shadow-card:  0 1px 3px rgba(0,0,0,0.06), 0 0 0 1px var(--border);
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-display);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── BACKGROUND EFFECTS ─────────────────────────────────────── */
.noise-overlay {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
}

.gradient-orb {
  position: fixed; pointer-events: none; z-index: 0;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
}
.gradient-orb--1 {
  width: 500px; height: 500px;
  top: -150px; right: -100px;
  background: var(--accent);
}
.gradient-orb--2 {
  width: 400px; height: 400px;
  bottom: -100px; left: -80px;
  background: var(--green);
  opacity: 0.08;
}
[data-theme="light"] .gradient-orb { opacity: 0.06; }

/* ── HEADER ─────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(8,8,12,0.8);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border-subtle);
}
[data-theme="light"] .site-header { background: rgba(248,248,251,0.85); }

.header-inner {
  max-width: 1260px; margin: 0 auto;
  height: 100%; display: flex; align-items: center;
  justify-content: space-between; padding: 0 20px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text-primary);
  cursor: pointer;
}
.logo-icon {
  width: 32px; height: 32px; background: var(--accent-solid);
  border-radius: var(--radius-sm); display: grid; place-items: center;
  box-shadow: 0 0 20px var(--accent-glow);
  transition: transform 0.2s var(--ease-spring);
}
.logo:hover .logo-icon { transform: scale(1.08); }
.logo-icon svg { width: 16px; height: 16px; color: white; }
.logo-text {
  font-weight: 800; font-size: 1.2rem; letter-spacing: -0.03em;
}
.logo em { color: var(--accent); font-style: normal; }

.header-actions { display: flex; align-items: center; gap: 6px; }

.connection-indicator {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px; border-radius: 100px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  font-size: 0.7rem; color: var(--text-muted);
  margin-right: 6px;
}
.conn-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--yellow);
  transition: background 0.3s;
}
.connection-indicator.online .conn-dot { background: var(--green); box-shadow: 0 0 8px var(--green-glow); }
.connection-indicator.offline .conn-dot { background: var(--red); }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-elevated);
  color: var(--text-secondary); cursor: pointer;
  display: grid; place-items: center;
  transition: all var(--transition);
}
.btn-icon svg { width: 16px; height: 16px; }
.btn-icon:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-dim);
}
.btn-icon--sm { width: 30px; height: 30px; }
.btn-icon--sm svg { width: 14px; height: 14px; }
.btn-icon--xs { width: 24px; height: 24px; border: none; background: transparent; }
.btn-icon--xs svg { width: 14px; height: 14px; }

.btn-sm {
  height: 34px; padding: 0 16px; border-radius: var(--radius-sm);
  font-family: var(--font-display); font-size: 0.8rem; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: all var(--transition); white-space: nowrap;
}
.btn-sm svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-primary {
  background: var(--accent-solid); color: #fff; border: none;
  box-shadow: 0 2px 12px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-accent); color: var(--text-primary); background: var(--bg-hover); }

/* ── HERO ───────────────────────────────────────────────────── */
.hero-band {
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-base) 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 48px 20px 36px;
  position: relative; overflow: hidden;
}
.hero-inner { max-width: 1260px; margin: 0 auto; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 100px;
  background: var(--accent-dim); border: 1px solid rgba(99,102,241,0.15);
  font-size: 0.72rem; font-weight: 600; color: var(--accent-hover);
  letter-spacing: 0.02em; margin-bottom: 16px;
}
.hero-copy h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 800; line-height: 1.15; letter-spacing: -0.035em;
  margin-bottom: 10px;
}
.hero-copy h1 em { color: var(--accent); font-style: normal; }
.hero-desc { color: var(--text-secondary); font-size: 0.95rem; max-width: 480px; line-height: 1.6; }
.hero-features {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px;
}
.feature-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 100px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  font-size: 0.72rem; font-weight: 600; color: var(--text-secondary);
}
.feature-pill svg { color: var(--green); }

/* ── APP SHELL ──────────────────────────────────────────────── */
.app-shell { max-width: 1260px; margin: 0 auto; padding: 24px 20px 40px; position: relative; z-index: 1; }

/* ── ADDRESS CARD ───────────────────────────────────────────── */
.address-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
}
.address-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--green), var(--accent));
  background-size: 200% 100%;
  animation: shimmer 4s linear infinite;
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

.address-card-top { padding: 24px 24px 16px; }
.address-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px;
}
.address-display {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.email-text {
  font-family: var(--font-mono); font-size: clamp(0.95rem, 2.5vw, 1.35rem);
  font-weight: 500; color: var(--text-primary); letter-spacing: -0.01em;
  word-break: break-all; flex: 1; min-width: 0;
}
.address-btn-group { display: flex; gap: 6px; flex-shrink: 0; }

.btn-copy {
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  background: var(--green-dim); border: 1px solid var(--green);
  color: var(--green); font-family: var(--font-display); font-weight: 600;
  font-size: 0.8rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all var(--transition); white-space: nowrap;
}
.btn-copy svg { width: 14px; height: 14px; }
.btn-copy:hover {
  background: var(--green); color: var(--text-inverse);
  box-shadow: 0 0 16px var(--green-glow);
}
.btn-copy.copied {
  background: var(--green); color: var(--text-inverse);
  animation: bounce 0.35s var(--ease-spring);
}
@keyframes bounce { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

.btn-refresh {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer;
  display: grid; place-items: center;
  transition: all var(--transition);
}
.btn-refresh svg { width: 16px; height: 16px; }
.btn-refresh:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-dim);
}
.btn-refresh:hover svg { animation: spin 0.5s var(--ease); }
@keyframes spin { to { transform: rotate(360deg); } }

.address-stats {
  display: flex; gap: 16px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.mini-stat { display: flex; flex-direction: column; align-items: center; min-width: 60px; }
.mini-stat-val {
  font-family: var(--font-mono); font-size: 0.9rem; font-weight: 600;
  color: var(--accent);
}
.mini-stat-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.address-card-bottom {
  padding: 0 24px 20px;
}
.custom-address-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.custom-input-wrap {
  flex: 1; min-width: 200px;
  display: flex; align-items: center;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  transition: border-color var(--transition);
}
.custom-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }
.custom-input-wrap input {
  flex: 1; background: transparent; border: none; outline: none;
  padding: 0 12px; height: 36px;
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--text-primary);
}
.custom-input-wrap input::placeholder { color: var(--text-muted); }
.input-domain {
  padding: 0 12px; font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--text-muted); white-space: nowrap;
  border-left: 1px solid var(--border); height: 36px;
  display: flex; align-items: center;
}
.custom-error { font-size: 0.75rem; color: var(--red); min-height: 0; margin-top: 4px; }

/* ── INBOX LAYOUT ───────────────────────────────────────────── */
.inbox-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  min-height: 520px;
  align-items: start;
}
@media (max-width: 900px) { .inbox-layout { grid-template-columns: 1fr; } }

/* ── INBOX PANEL ────────────────────────────────────────────── */
.inbox-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.panel-title-wrap { display: flex; align-items: center; gap: 8px; }
.panel-header h2 { font-size: 0.85rem; font-weight: 700; letter-spacing: -0.01em; }
.badge {
  background: var(--accent-solid); color: #fff;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  padding: 1px 7px; border-radius: 100px; min-width: 22px; text-align: center;
}
.panel-actions { display: flex; gap: 4px; }

/* Search bar */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.search-bar svg { color: var(--text-muted); flex-shrink: 0; }
.search-bar input {
  flex: 1; background: transparent; border: none; outline: none;
  font-family: var(--font-display); font-size: 0.82rem;
  color: var(--text-primary);
}
.search-bar input::placeholder { color: var(--text-muted); }

/* Empty state */
.inbox-empty { padding: 40px 20px; text-align: center; color: var(--text-muted); }
.empty-illustration { margin-bottom: 16px; }
.empty-title { font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.empty-sub { font-size: 0.78rem; color: var(--text-muted); }

.inbox-loader { padding: 40px; display: flex; justify-content: center; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  animation: spinAnim 0.7s linear infinite;
}
@keyframes spinAnim { to { transform: rotate(360deg); } }

/* Email list */
.email-list { list-style: none; overflow-y: auto; max-height: 540px; }
.email-item {
  padding: 12px 16px; border-bottom: 1px solid var(--border-subtle);
  cursor: pointer; transition: all var(--transition);
  position: relative;
}
.email-item:last-child { border-bottom: none; }
.email-item:hover { background: var(--bg-hover); }
.email-item.active {
  background: var(--accent-dim); border-left: 3px solid var(--accent);
  padding-left: 13px;
}
.email-item.unread .email-item-subject { font-weight: 700; color: var(--text-primary); }
.email-item.unread::after {
  content: ''; position: absolute; top: 16px; right: 12px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 6px var(--accent-glow);
}
.email-item-from {
  font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-right: 18px;
}
.email-item-subject {
  font-size: 0.83rem; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-right: 18px; margin-bottom: 3px;
}
.email-item-date {
  font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-muted);
}
.email-item.new-flash { animation: newFlash 0.6s var(--ease); }
@keyframes newFlash { 0%,100% { background: transparent; } 50% { background: var(--accent-dim); } }

/* ── READER PANEL ───────────────────────────────────────────── */
.reader-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-height: 400px;
  display: flex; flex-direction: column;
}
.reader-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 50px 20px; text-align: center; color: var(--text-muted);
}
.reader-empty-graphic { margin-bottom: 16px; opacity: 0.7; }
.reader-empty-title { font-size: 0.95rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.reader-empty-sub { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 16px; }
.shortcuts-hint {
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted);
  padding: 8px 14px; background: var(--bg-elevated); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.shortcuts-hint kbd {
  display: inline-block; padding: 1px 5px; border-radius: 3px;
  background: var(--bg-hover); border: 1px solid var(--border-accent);
  font-family: var(--font-mono); font-size: 0.65rem; font-weight: 600;
  margin-right: 2px;
}

.reader-content { flex: 1; display: flex; flex-direction: column; }
.reader-toolbar {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--bg-elevated);
}
.reader-meta { flex: 1; min-width: 0; }
.reader-meta h3 {
  font-size: 0.95rem; font-weight: 700; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.reader-from {
  font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.reader-acts { display: flex; gap: 6px; flex-shrink: 0; }
.btn-label-desktop { /* visible by default */ }
.reader-date {
  padding: 6px 16px;
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.attachments-bar {
  padding: 8px 16px; background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--text-secondary);
}
.attachments-list { display: flex; gap: 6px; flex-wrap: wrap; }
.attach-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-xs);
  background: var(--accent-dim); border: 1px solid rgba(99,102,241,0.2);
  color: var(--accent); font-size: 0.72rem; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: all var(--transition);
}
.attach-btn:hover { background: var(--accent-solid); color: #fff; }
.reader-body {
  flex: 1; padding: 20px; overflow-y: auto;
  font-size: 0.9rem; line-height: 1.7;
}
.reader-body iframe { width: 100%; border: none; min-height: 400px; border-radius: var(--radius-sm); }
.reader-body pre {
  white-space: pre-wrap; word-break: break-word;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-secondary);
}

/* ── INFO SECTION ───────────────────────────────────────────── */
.info-section {
  padding: 60px 20px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}
.info-inner { max-width: 1260px; margin: 0 auto; }
.info-title {
  font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em;
  text-align: center; margin-bottom: 40px;
}
.info-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 700px) { .info-grid { grid-template-columns: 1fr; } }
.info-card {
  padding: 28px 24px; border-radius: var(--radius-lg);
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
}
.info-card:hover { border-color: var(--accent); box-shadow: 0 0 30px var(--accent-glow); transform: translateY(-2px); }
.info-card-num {
  font-family: var(--font-mono); font-size: 2rem; font-weight: 800;
  color: var(--accent); opacity: 0.3; margin-bottom: 8px; line-height: 1;
}
.info-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.info-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }

/* ── MODALS ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(10px);
  display: grid; place-items: center; padding: 20px;
  animation: fadeIn 0.2s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 24px;
  max-width: 340px; width: 100%; text-align: center;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.25s var(--ease-spring);
}
.modal-box--wide { max-width: 480px; text-align: left; }
@keyframes scaleIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-header h3 { font-size: 1rem; font-weight: 700; }
.qr-canvas {
  display: inline-block; padding: 12px;
  background: #fff; border-radius: var(--radius-md);
  margin-bottom: 14px;
}
.qr-canvas canvas, .qr-canvas img { display: block; }
.qr-note { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }

.shortcuts-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.shortcut-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--bg-elevated); border: 1px solid var(--border);
  font-size: 0.82rem;
}
.shortcut-item kbd {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  background: var(--bg-hover); border: 1px solid var(--border-accent);
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  min-width: 28px; text-align: center;
}
.shortcut-item span { color: var(--text-secondary); }

/* ── TOAST ──────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 20px; z-index: 300;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 10px 16px;
  font-size: 0.82rem; color: var(--text-primary);
  box-shadow: var(--shadow-md); pointer-events: auto;
  animation: toastIn 0.3s var(--ease-spring);
  max-width: 300px;
}
.toast.success { border-color: var(--green); }
.toast.success::before { content: ''; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--green); margin-right: 8px; vertical-align: middle; }
.toast.error { border-color: var(--red); }
.toast.error::before { content: ''; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--red); margin-right: 8px; vertical-align: middle; }
.toast.info { border-color: var(--accent); }
.toast.info::before { content: ''; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: middle; }
@keyframes toastIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.out { animation: toastOut 0.25s var(--ease) forwards; }
@keyframes toastOut { to { transform: translateX(120%); opacity: 0; } }

/* ── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 32px 20px; text-align: center;
}
.footer-inner { max-width: 1260px; margin: 0 auto; }
.footer-brand {
  font-size: 0.82rem; color: var(--text-muted);
}
.footer-logo { font-weight: 800; color: var(--text-secondary); }
.footer-logo em { color: var(--accent); font-style: normal; }
.footer-sub { margin-top: 4px; font-size: 0.72rem; color: var(--text-muted); }

/* ── AD SLOTS — Professional, non-intrusive ──────────────────── */
.ad-slot { position: relative; text-align: center; overflow: hidden; }
.ad-label {
  display: block; font-size: 0.58rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px;
  opacity: 0.5;
}

.ad-content-break {
  padding: 10px 0 8px;
  margin: 0 auto; max-width: 1260px;
}

.ad-inbox-native {
  padding: 10px; border-top: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}
.ad-reader-idle { width: 100%; margin-top: 20px; }
.ad-reader-bottom {
  padding: 14px 0 8px; margin-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
.ad-footer-native {
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

/* Mobile sticky with close button */
.ad-mobile-sticky {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  z-index: 90; padding: 6px 0 4px;
  background: var(--bg-surface); border-top: 1px solid var(--border);
  width: 320px; box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  transition: transform 0.3s var(--ease);
}
.ad-mobile-sticky.dismissed { transform: translateX(-50%) translateY(100%); pointer-events: none; }
.ad-sticky-close {
  position: absolute; top: -10px; right: -6px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 14px; line-height: 1;
  cursor: pointer; display: grid; place-items: center; z-index: 2;
  transition: all var(--transition);
}
.ad-sticky-close:hover { background: var(--red-dim); border-color: var(--red); color: var(--red); }

/* Visibility */
.ad-desktop-only { display: block; }
.ad-mobile-only  { display: none;  }
@media (max-width: 900px) {
  .ad-desktop-only { display: none !important; }
  .ad-mobile-only  { display: block; }
  .site-footer { padding-bottom: 68px; }
  .app-shell   { padding-bottom: 72px; }
}

/* ── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-accent); }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .app-shell { padding: 14px 12px 40px; }
  .address-card-top { padding: 18px 16px 12px; }
  .address-card-bottom { padding: 0 16px 16px; }
  .hero-band { padding: 32px 16px 24px; }
  .custom-address-row { flex-direction: column; align-items: stretch; }
  .custom-input-wrap { width: 100%; }
  .reader-acts { gap: 4px; }
  .btn-label-desktop { display: none; }
  .address-stats { gap: 10px; }
  .connection-indicator .conn-label { display: none; }
  .shortcuts-grid { grid-template-columns: 1fr; }
}
@media (min-width: 901px) { .reader-back-btn { display: none; } }
@media (max-width: 900px) { .reader-back-btn { display: grid; } }

/* ── UTILITIES ──────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Connection status colors */
.connection-indicator.online .conn-label { color: var(--green); }
.connection-indicator.offline .conn-label { color: var(--red); }
