:root {
  --font-sans: "Inter", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, ui-monospace, monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --transition: 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="dark"] {
  --bg: #05070c;
  --bg-elevated: rgba(13, 18, 30, 0.72);
  --bg-surface: rgba(17, 24, 39, 0.62);
  --bg-input: rgba(8, 12, 22, 0.85);
  --bg-hover: rgba(56, 189, 248, 0.08);
  --bg-active: rgba(56, 189, 248, 0.14);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --accent-ink: #04121d;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --success: #34d399;
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --shadow-card: 0 24px 60px -18px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --grid-line: rgba(148, 163, 184, 0.045);
}

html[data-theme="light"] {
  --bg: #f6f8fb;
  --bg-elevated: rgba(255, 255, 255, 0.88);
  --bg-surface: #ffffff;
  --bg-input: #f8fafc;
  --bg-hover: rgba(37, 99, 235, 0.05);
  --bg-active: rgba(37, 99, 235, 0.10);
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.18);
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --accent: #0284c7;
  --accent-2: #4f46e5;
  --accent-ink: #ffffff;
  --accent-soft: rgba(2, 132, 199, 0.10);
  --success: #059669;
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.08);
  --shadow-card: 0 16px 40px -16px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --grid-line: rgba(15, 23, 42, 0.035);
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient Background */
.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 10%, #000 35%, transparent 100%);
}

.bg-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(110px);
  opacity: 0.48;
}

html[data-theme="light"] .bg-glow {
  opacity: 0.22;
}

.bg-glow-1 {
  width: 620px;
  height: 300px;
  top: -120px;
  left: 50%;
  transform: translateX(-60%);
  background: radial-gradient(circle, rgba(56, 189, 248, 0.36), transparent 70%);
}

.bg-glow-2 {
  width: 520px;
  height: 280px;
  top: -80px;
  left: 52%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.30), transparent 70%);
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

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

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: pulseRing 2.2s infinite;
}

@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.icon-btn.icon-only {
  width: 34px;
  padding: 0;
  justify-content: center;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

/* Main Container */
.container {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Hero Command Console */
.hero-card {
  background: var(--bg-elevated);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px 24px 18px;
  box-shadow: var(--shadow-card);
}

.hero-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hero-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.mode-chips {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
}

.chip-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 7px;
  cursor: pointer;
  transition: all var(--transition);
}

.chip-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.composer-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}

.address-box {
  flex: 1;
  min-width: 280px;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 4px 6px 4px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.address-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.address-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding-right: 10px;
  border-right: 1px solid var(--border);
  margin-right: 10px;
  user-select: none;
}

.prefix-input {
  flex: 1;
  min-width: 90px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 0;
}

.prefix-input::placeholder {
  color: var(--text-dim);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
}

.at-sign {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--accent);
  font-weight: 600;
  padding: 0 8px;
  user-select: none;
}

.domain-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.domain-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 32px 8px 12px;
  border-radius: 9px;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}

.domain-select:hover, .domain-select:focus {
  border-color: var(--accent);
}

.select-chevron {
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: var(--text-muted);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--accent) 55%, transparent);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.07);
}

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  color: var(--text);
}

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

.btn-ghost {
  background: var(--bg-surface);
  border-color: var(--border);
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.icon-only-btn {
  width: 44px;
  padding: 0;
}

.hero-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.current-address-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-tag {
  font-size: 11.5px;
  color: var(--text-dim);
}

.mono-addr {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 6px;
}

.scope-pill {
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
}

.scope-pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.history-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.history-pill {
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
}

.history-pill:hover, .history-pill.active {
  border-color: var(--accent);
  color: var(--text);
  background: var(--bg-hover);
}

/* Split Workspace */
.workspace-card {
  background: var(--bg-elevated);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 380px 1fr;
  min-height: 580px;
  overflow: hidden;
}

/* Inbox Pane */
.inbox-pane {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: color-mix(in srgb, var(--bg-surface) 45%, transparent);
}

.pane-toolbar {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 10px;
  height: 34px;
  color: var(--text-dim);
}

.search-wrap:focus-within {
  border-color: var(--accent);
}

.search-wrap input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
}

.toolbar-btns {
  display: flex;
  align-items: center;
  gap: 5px;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.mini-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

.mini-btn.danger:hover {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
  background: var(--danger-soft);
}

.inbox-meta-bar {
  padding: 9px 16px;
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inbox-meta-bar strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.meta-hint {
  font-size: 11px;
  color: var(--text-dim);
}

.email-list {
  flex: 1;
  overflow-y: auto;
  max-height: 620px;
}

.email-list-empty {
  padding: 56px 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
}

.email-row {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  gap: 12px;
  transition: background var(--transition);
  position: relative;
}

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

.email-row.active {
  background: var(--bg-active);
}

.email-row.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
}

.email-row-body {
  flex: 1;
  min-width: 0;
}

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

.sender-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.email-time {
  font-size: 11px;
  color: var(--text-dim);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

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

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

.row-badges {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.otp-row-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  cursor: pointer;
}

.otp-row-pill:hover {
  filter: brightness(1.15);
}

.rcpt-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  background: var(--bg-input);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
}

/* Reader Pane */
.reader-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.reader-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  gap: 10px;
}

.reader-empty h3 {
  margin: 8px 0 0;
  font-size: 17px;
}

.reader-empty p {
  margin: 0 0 8px;
  max-width: 360px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.radar-emblem {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}

.radar-ring {
  position: absolute;
  inset: -8px;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  animation: radarPulse 3s ease-out infinite;
}

@keyframes radarPulse {
  0% { transform: scale(0.92); opacity: 0.7; }
  100% { transform: scale(1.22); opacity: 0; }
}

.reader-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.reader-head {
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--border);
}

.reader-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.reader-subject {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.reader-meta-grid {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 12.5px;
}

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

.meta-k {
  color: var(--text-dim);
}

.meta-v {
  color: var(--text-muted);
}

.meta-v.mono {
  font-family: var(--font-mono);
  color: var(--text);
}

.otp-banner {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent), color-mix(in srgb, var(--accent-2) 10%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

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

.otp-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
}

.otp-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--text);
}

.reader-tabs {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 9px;
  background: var(--bg-input);
  border: 1px solid var(--border);
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
}

.seg-btn.active {
  background: var(--bg-surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.reader-body {
  flex: 1;
  padding: 18px 24px 24px;
  overflow: auto;
}

.iframe-stage {
  display: flex;
  justify-content: center;
}

.email-iframe {
  width: 100%;
  min-height: 440px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  transition: width var(--transition);
}

.email-iframe.mobile-preview {
  width: 390px;
  max-width: 100%;
}

.plain-viewer {
  margin: 0;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.plain-viewer.mono-small {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* Modal & Drawer */
.modal-backdrop, .drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(8px);
  display: flex;
}

.modal-backdrop {
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 360px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

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

.modal-head h3 {
  margin: 0;
  font-size: 15px;
}

.qr-box {
  background: #ffffff;
  padding: 14px;
  border-radius: 14px;
  display: inline-flex;
  margin-bottom: 12px;
}

.qr-address {
  display: block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  word-break: break-all;
}

.drawer-backdrop {
  justify-content: flex-end;
}

.drawer-panel {
  width: 100%;
  max-width: 480px;
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-strong);
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.drawer-head h3 {
  margin: 0;
  font-size: 17px;
}

.drawer-head p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-section h4 {
  margin: 0;
  font-size: 14px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.field-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
}

.inline-form {
  display: flex;
  gap: 8px;
}

.text-input {
  flex: 1;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text);
  font-size: 13px;
  outline: none;
}

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

.drawer-section .btn {
  height: 40px;
}

.domain-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.domain-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
}

.domain-tag button {
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0 2px;
  font-size: 14px;
  line-height: 1;
}

.domain-tag button:hover {
  color: var(--danger);
}

.code-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.code-box {
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  background: #04070d;
  color: #cbd5e1;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  z-index: 80;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transition: all 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 960px) {
  .workspace-card {
    grid-template-columns: 1fr;
  }
  .inbox-pane {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 360px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 14px 14px 28px;
  }
  .topbar-inner {
    padding: 0 14px;
  }
  .live-pill {
    display: none;
  }
  .hero-card {
    padding: 16px;
  }
  .address-label {
    display: none;
  }
  .composer-actions {
    width: 100%;
  }
  .composer-actions .btn-primary,
  .composer-actions .btn-secondary {
    flex: 1;
  }
}
