:root {
  --bg: #070708;
  --bg-elev: #0c0c0e;
  --panel: #101012;
  --panel-2: #141416;
  --border: rgba(255, 255, 255, 0.07);
  --border-soft: rgba(255, 255, 255, 0.05);
  --text: #f2f2f3;
  --muted: #8b8b93;
  --dim: #5c5c66;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --hover: rgba(255, 255, 255, 0.05);
  --active: rgba(255, 255, 255, 0.09);
  --ok: #e8e8ec;
  --danger: #ef4444;
  --warn: #eab308;
  --google-blue: #1a73e8;
  --accent: #f4f4f5;
  --accent-bright: #ffffff;
  --accent-glow: rgba(255, 255, 255, 0.12);
  --sidebar-w: 220px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

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

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

button, input, select, textarea { font: inherit; color: inherit; }

.app {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* —— Sidebar (AIO style) —— */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: #050506;
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
}

.sidebar-top { flex: 1; min-height: 0; overflow: auto; }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 22px;
}

.logo-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff 0%, #c8c8ce 100%);
  color: #111;
  font-weight: 700;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.logo-text {
  font-weight: 650;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.logo-sub {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}

.nav { display: flex; flex-direction: column; gap: 2px; }

.nav-label {
  margin: 14px 10px 6px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--dim);
}
.nav-label:first-of-type { margin-top: 0; }

.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 500;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.nav-btn[hidden] {
  display: none !important;
}
.nav-label[hidden] {
  display: none !important;
}
.nav-btn svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.85; }
.nav-btn svg.nav-google-icon { opacity: 1; }
.nav-btn:hover { background: var(--hover); color: var(--text); }
.nav-btn.active { background: var(--active); color: var(--text); }
a.nav-btn.nav-link { text-decoration: none; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px 4px;
  border-top: 1px solid var(--border-soft);
  margin-top: 12px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8e8ec, #9a9aa3);
  color: #111;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 0.8rem; font-weight: 600; }
.user-plan { font-size: 0.68rem; color: var(--dim); }

/* —— Workspace —— */
.workspace {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(7, 7, 8, 0.85);
}

.crumbs {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.crumbs strong {
  color: var(--text);
  font-weight: 650;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}
.crumb-sep { color: var(--dim); }
.crumb-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  color: #f4f4f5;
}
.crumb-ico svg {
  display: block;
  width: 15px;
  height: 15px;
}
.crumb-ico.is-google svg {
  width: 14px;
  height: 14px;
}
.crumb-sub {
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 500;
  margin-left: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crumb-sub::before {
  content: "·";
  margin-right: 8px;
  color: var(--dim);
}
.crumb-sub[hidden] { display: none !important; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  max-width: 220px;
}

.top-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #7c5cff, #5b3fd4);
  text-transform: uppercase;
}

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

.top-role-badge {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: lowercase;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.28);
}

.top-role-badge.is-admin {
  background: rgba(168, 85, 247, 0.14);
  color: #c4b5fd;
  border-color: rgba(168, 85, 247, 0.3);
}

.top-icon-btn {
  position: relative;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.top-icon-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.top-notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #7c5cff;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.page {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.page-pad {
  padding: 24px;
  overflow: auto;
  flex: 1;
}

.page-pad h1 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.page-pad .sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.88rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  max-width: 640px;
}
.card h3 { margin: 0 0 8px; font-size: 0.95rem; }
.hint { margin: 0; color: var(--muted); font-size: 0.84rem; line-height: 1.45; }

.btn {
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 9px;
  padding: 9px 14px;
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
}
.btn-primary {
  background: #f4f4f5;
  color: #111;
  border-color: transparent;
}
.btn-sm { padding: 6px 10px; font-size: 0.75rem; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.field > span { font-size: 0.72rem; color: var(--muted); }
.field input, .field select, .from-row input, .from-row select {
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  outline: none;
  font-size: 0.84rem;
}
.field input:focus, .field select:focus {
  border-color: rgba(255, 255, 255, 0.2);
}

.row-list { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.row-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft);
  font-size: 0.84rem;
}
.inline-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.inline-row input { flex: 1; min-width: 140px; }

.team-seats {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin: 14px 0;
}
.team-seats i {
  display: block;
  height: 100%;
  background: #e8e8ec;
  border-radius: inherit;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
  max-width: 640px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}
.stat span { display: block; font-size: 0.68rem; color: var(--dim); margin-bottom: 4px; }
.stat strong { font-size: 1.1rem; }

/* —— Mailer grid (AIO) —— */
.mailer-grid {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 220px 6px 280px 6px minmax(0, 1fr);
}
.mailer-grid.is-resizing {
  cursor: col-resize;
  user-select: none;
}
.mailer-grid.is-resizing iframe {
  pointer-events: none;
}

.col-resizer {
  width: 6px;
  margin: 0 -1px;
  cursor: col-resize;
  background: transparent;
  position: relative;
  z-index: 5;
  touch-action: none;
}
.col-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 2px;
  width: 2px;
  background: transparent;
  transition: background 0.12s;
}
.col-resizer:hover::after,
.col-resizer.dragging::after {
  background: rgba(255, 255, 255, 0.28);
}

.col {
  min-height: 0;
  overflow: auto;
  border-right: 0;
  background: var(--bg-elev);
}
.col-templates,
.col-compose {
  border-right: 1px solid var(--border-soft);
}
.col-preview {
  border-right: 0;
  background: #0a0a0c;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.col-head {
  padding: 16px 16px 10px;
  position: sticky;
  top: 0;
  background: linear-gradient(var(--bg-elev), var(--bg-elev) 80%, transparent);
  z-index: 2;
}
.col-head h2 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 650;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
}
.search-wrap input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 0.8rem;
}
.search-wrap input::placeholder { color: var(--dim); }

.my-tpl-row {
  margin: 4px 12px 10px;
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.my-tpl {
  margin: 0;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
}
.my-tpl:hover { border-color: rgba(255, 255, 255, 0.22); color: var(--text); }
.my-tpl-guide {
  flex: 0 0 auto;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(212, 168, 75, 0.55);
  background: rgba(212, 168, 75, 0.18);
  color: #f0d48a;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  white-space: nowrap;
}
.my-tpl-guide--important {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(248, 113, 113, 0.16);
  color: #fca5a5;
  animation: my-tpl-guide-pulse 2.4s ease-in-out infinite;
}
.my-tpl-guide--important:hover {
  background: rgba(248, 113, 113, 0.28);
  border-color: rgba(248, 113, 113, 0.8);
  color: #fecaca;
}
@keyframes my-tpl-guide-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.35); }
  50% { box-shadow: 0 0 0 4px rgba(248, 113, 113, 0); }
}
.my-tpl-guide:hover {
  background: rgba(212, 168, 75, 0.28);
  border-color: rgba(212, 168, 75, 0.8);
  color: #f5dfa0;
}
.plus {
  width: 20px; height: 20px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.1); display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  line-height: 0;
  padding-bottom: 1px;
}
.my-tpl-form {
  margin: 0 12px 12px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.my-tpl-form[hidden] { display: none !important; }
.my-tpl-hint {
  margin: 0;
  font-size: 0.72rem;
  color: var(--dim);
  line-height: 1.45;
}
.my-tpl-hint code {
  font-size: 0.68rem;
  color: var(--muted);
}
.my-tpl-hint-guide {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  color: #e8c87a;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.my-tpl-hint-guide:hover { color: #f5dfa0; }
.my-tpl-form input,
.my-tpl-form textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.8rem;
  outline: none;
  font-family: inherit;
  color: var(--text);
}

.brand-list { padding: 0 8px 20px; }
.brand { margin-bottom: 2px; }
.brand-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.brand-btn:hover, .brand.open > .brand-btn { background: var(--hover); }
.brand-icon {
  width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center;
  font-size: 0.7rem; font-weight: 700; flex-shrink: 0;
  background: #f4f4f5;
  overflow: hidden;
}
.brand-icon img {
  width: 22px; height: 22px;
  border-radius: 6px;
  object-fit: contain;
  background: #f4f4f5;
}
.brand-name { flex: 1; font-size: 0.84rem; font-weight: 550; }
.brand-count {
  font-size: 0.72rem; color: var(--dim);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 7px; border-radius: 999px;
}
.brand-chevron { color: var(--dim); font-size: 0.7rem; transition: transform 0.15s; }
.brand.open .brand-chevron { transform: rotate(90deg); }
.tpl-items { display: none; padding: 2px 0 6px 32px; }
.brand.open .tpl-items { display: block; }
.tpl-item {
  width: 100%; border: 0; background: transparent;
  color: var(--muted); text-align: left;
  padding: 7px 10px; border-radius: 7px;
  cursor: pointer; font-size: 0.8rem; font-weight: 500;
}
.tpl-item:hover { background: var(--hover); color: var(--text); }
.tpl-item.active { background: var(--active); color: var(--text); }

.col-compose { padding: 16px 16px 28px; position: relative; }
.compose-title {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 0.88rem; font-weight: 600;
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}
.compose-title-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.compose-icon { opacity: 0.7; margin-top: 2px; }
.fa-compose-from,
.fa-preview-from {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  color: var(--muted);
  letter-spacing: 0.01em;
  word-break: break-all;
}
.fa-compose-from[hidden],
.fa-preview-from[hidden] { display: none !important; }
.fa-from-editor { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.fa-from-editor[hidden] { display: none !important; }
.fa-from-row { display: flex; align-items: center; gap: 6px; }
.fa-from-label { font-size: 0.68rem; color: var(--muted); min-width: 62px; text-align: right; font-weight: 500; }
.fa-from-input { flex: 1; font-size: 0.75rem; padding: 3px 6px; border: 1px solid var(--border, #333); border-radius: 4px; background: var(--input-bg, #1a1a1a); color: var(--fg, #e0e0e0); font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); }
.preview-head-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.preview-head-main h2 { margin: 0; }

.field-block { margin-bottom: 18px; }
.block-label {
  margin: 0 0 10px;
  font-size: 0.72rem; font-weight: 650;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--dim);
}
.block-label-row {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.block-label-row .block-label { margin: 0; }

.from-row { display: grid; grid-template-columns: 1fr 1.2fr; gap: 8px; }
.seg {
  display: inline-flex; padding: 3px; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--border);
}
.seg-btn {
  border: 0; background: transparent; color: var(--muted);
  padding: 5px 12px; border-radius: 6px; cursor: pointer;
  font-size: 0.72rem; font-weight: 600;
}
.seg-btn.active { background: var(--active); color: var(--text); }

.var-row {
  display: grid; grid-template-columns: 1fr auto; gap: 8px;
  align-items: end; margin-bottom: 10px;
}
.var-row .field { margin: 0; }
.btn-gen {
  height: 38px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--panel-2);
  color: var(--muted); cursor: pointer; font-size: 0.75rem; font-weight: 600;
}
.btn-gen:hover { color: var(--text); }

.compose-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  padding-top: 4px;
}
.compose-actions .btn-send {
  width: 100%;
  max-width: 220px;
}
.spam-label { display: block; font-size: 0.68rem; color: var(--dim); margin-bottom: 2px; }
.spam-val { font-size: 0.8rem; font-weight: 650; color: var(--ok); }
.spam-bar {
  margin-top: 6px; width: 120px; height: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); overflow: hidden;
}
.spam-bar i {
  display: block; height: 100%; width: 18%;
  background: linear-gradient(90deg, var(--ok), #888);
  border-radius: inherit;
}
.btn-send {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: #f4f4f5;
  color: #111 !important;
  font-weight: 650;
  font-size: 0.86rem;
  padding: 0 16px;
  height: 42px;
  border-radius: 9px;
  cursor: pointer;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1;
  letter-spacing: 0;
  box-sizing: border-box;
}
.btn-send:hover { opacity: 0.92; }
.btn-send:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-send.is-connecting {
  opacity: 0.6;
  pointer-events: none;
  animation: fa-auth-pulse 1.2s infinite ease-in-out;
}

.preview-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
  background: #0a0a0c;
  z-index: 2;
}
.preview-head h2 {
  margin: 0; font-size: 0.72rem; font-weight: 550; color: var(--muted);
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.preview-zoom {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-shrink: 0;
}
.zoom-btn {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.zoom-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); }
#fa-zoom-fit {
  width: auto;
  min-width: 34px;
  padding: 0 8px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
#fa-zoom-fit.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.zoom-label {
  min-width: 42px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.preview-stage {
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #0b1426;
  transition: background 0.15s ease;
}
.preview-stage--scroll {
  align-items: flex-start;
}
.preview-canvas {
  position: relative;
  transform-origin: top center;
  will-change: transform;
  flex-shrink: 0;
  margin: 0 auto;
}
.preview-iframe {
  display: block;
  width: 600px;
  max-width: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: auto;
}
.mailer-grid.is-resizing .preview-iframe {
  pointer-events: none;
}
.preview-empty {
  color: var(--muted);
  text-align: center;
  padding: 48px 20px;
  font-size: 0.88rem;
  min-width: 240px;
  margin: 40px auto;
}

.email-card {
  width: 100%; max-width: 560px;
  background: #fff; color: #202124;
  border-radius: 4px; overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
  font-family: Roboto, Arial, sans-serif;
}
.email-card .e-pad { padding: 36px 40px 28px; }
.email-card .g-logo {
  display: flex; align-items: center; gap: 2px;
  font-size: 1.35rem; font-weight: 500; margin-bottom: 28px;
}
.email-card .g-logo span:nth-child(1) { color: #4285f4; }
.email-card .g-logo span:nth-child(2) { color: #ea4335; }
.email-card .g-logo span:nth-child(3) { color: #fbbc04; }
.email-card .g-logo span:nth-child(4) { color: #4285f4; }
.email-card .g-logo span:nth-child(5) { color: #34a853; }
.email-card .g-logo span:nth-child(6) { color: #ea4335; }
.email-card h1 {
  margin: 0 0 16px; font-size: 1.35rem; font-weight: 400; line-height: 1.35; color: #202124;
}
.email-card p {
  margin: 0 0 14px; font-size: 0.92rem; line-height: 1.55; color: #3c4043;
}
.email-card .meta-box {
  margin: 18px 0; padding: 14px 16px; background: #f8f9fa;
  border-radius: 8px; font-size: 0.85rem; color: #5f6368;
}
.email-card .meta-box strong { color: #202124; font-weight: 500; }
.email-card .cta {
  display: inline-block; margin: 8px 0 18px; padding: 10px 24px;
  background: #1a73e8; color: #fff !important; text-decoration: none;
  border-radius: 4px; font-size: 0.88rem; font-weight: 500;
}
.email-card .ref { font-size: 0.78rem; color: #80868b; margin-top: 8px; }
.email-card .e-foot {
  padding: 20px 40px 28px; border-top: 1px solid #e8eaed;
  font-size: 0.72rem; color: #80868b; line-height: 1.5;
}
.email-card .e-foot a { color: #1a73e8; text-decoration: none; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #1a1a1e; border: 1px solid var(--border);
  color: var(--text); padding: 10px 18px; border-radius: 10px;
  font-size: 0.84rem; z-index: 50;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.toast[hidden] { display: none !important; }

.login[hidden],
.landing[hidden],
.app[hidden] { display: none !important; }

/* —— Landing / login —— */
.landing {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(42, 171, 238, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 80%, rgba(42, 171, 238, 0.07), transparent),
    radial-gradient(ellipse 40% 35% at 0% 60%, rgba(42, 171, 238, 0.05), transparent),
    #08080b;
  overflow-x: hidden;
}

.landing-glow {
  position: fixed;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, 95vw);
  height: 360px;
  background: radial-gradient(ellipse, rgba(42, 171, 238, 0.28) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
  animation: aio-glow-pulse 8s ease-in-out infinite;
}

@keyframes aio-glow-pulse {
  0%, 100% { opacity: 0.75; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.06); }
}

.landing-stars {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 70%, rgba(255, 255, 255, 0.28) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 20%, rgba(255, 255, 255, 0.22) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 80%, rgba(255, 255, 255, 0.18) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 10% 55%, rgba(42, 171, 238, 0.35) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 90% 40%, rgba(42, 171, 238, 0.25) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
  animation: aio-stars-drift 120s linear infinite;
}

@keyframes aio-stars-drift {
  from { transform: translateY(0); }
  to { transform: translateY(-24px); }
}

@media (prefers-reduced-motion: reduce) {
  .landing-glow,
  .landing-stars { animation: none !important; }
}

.landing-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 24px 20px;
}

.auth-card {
  background: rgba(18, 18, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 28px 24px 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.auth-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff 0%, #c8c8ce 100%);
  color: #111;
  font-weight: 700;
  font-size: 1rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.auth-brand-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.auth-brand-name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.auth-brand-sub {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.auth-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.auth-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: -0.02em;
}

.auth-sub {
  margin: 0 0 22px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: lowercase;
}

.auth-sub.tight {
  margin: 14px 0 8px;
  font-size: 0.75rem;
}

.btn-generate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #229ed9, #2aabee);
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: lowercase;
  cursor: pointer;
  box-shadow: 0 8px 28px var(--accent-glow);
  transition: transform 0.15s, opacity 0.15s;
}

.btn-generate:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.btn-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.auth-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: lowercase;
}

.auth-hint-icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--text-muted);
}

.auth-hint-text {
  margin: 0;
  flex: 1;
  min-width: 0;
  line-height: 1.55;
}

.auth-hint-bot {
  color: var(--accent-bright);
  font-weight: 600;
  white-space: nowrap;
}

.auth-hint code {
  color: var(--accent-bright);
  font-family: var(--mono);
  font-size: 0.72rem;
  white-space: nowrap;
}

.code-label {
  margin: 0 0 10px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.code-boxes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  user-select: text;
  -webkit-user-select: text;
}

.code-boxes span {
  display: grid;
  place-items: center;
  height: 52px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-size: 1.5rem;
  font-weight: 600;
  font-family: var(--mono);
  user-select: text;
  -webkit-user-select: text;
}

.code-boxes:hover span {
  border-color: rgba(42, 171, 238, 0.35);
}

.cmd-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  cursor: pointer;
  user-select: text;
  -webkit-user-select: text;
}

.cmd-row:hover {
  border-color: rgba(42, 171, 238, 0.35);
}

.cmd-row code {
  flex: 1;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: text;
  -webkit-user-select: text;
}

.btn-copy {
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-bright);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: lowercase;
  cursor: pointer;
}

.auth-wait {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.timer-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(42, 171, 238, 0.25);
  border-top-color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--accent-bright);
  flex-shrink: 0;
}

.wait-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: lowercase;
}

.wait-sub {
  margin: 4px 0 0;
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: lowercase;
}

.login-status-msg {
  margin: 16px 0 0;
  font-size: 0.8rem;
  color: #fbbf24;
  text-align: center;
}

.aio-badge {
  display: none;
}
.pill a, a.pill { color: inherit; text-decoration: none; }

.loader {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
}
.loader[hidden] { display: none !important; }

.loader-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.loader-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 36px;
}
.loader-bars > i {
  display: block;
  width: 5px;
  height: 12px;
  border-radius: 999px;
  background: #f4f4f5;
  animation: loader-bars 0.9s ease-in-out infinite;
  transform-origin: center bottom;
}
.loader-bars > i:nth-child(1) { animation-delay: 0s; }
.loader-bars > i:nth-child(2) { animation-delay: 0.1s; background: rgba(255,255,255,0.85); }
.loader-bars > i:nth-child(3) { animation-delay: 0.2s; background: rgba(255,255,255,0.7); }
.loader-bars > i:nth-child(4) { animation-delay: 0.3s; background: rgba(255,255,255,0.85); }
.loader-bars > i:nth-child(5) { animation-delay: 0.4s; }
.loader-caption {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
@keyframes loader-bars {
  0%, 100% { height: 10px; opacity: 0.45; }
  50% { height: 34px; opacity: 1; }
}
@keyframes loader-spin { to { transform: rotate(360deg); } }
@keyframes loader-pulse {
  0%, 100% { transform: scale(0.75); opacity: 0.55; }
  50% { transform: scale(1.15); opacity: 1; }
}

.fa-field-row { margin-bottom: 10px; }
.fa-field-label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 5px;
}
.fa-field-input, .fa-field-textarea {
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  outline: none;
  font-size: 0.84rem;
  font-family: inherit;
}
.connected-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin: 0 12px 10px;
  border-radius: 8px;
  background: rgba(61, 214, 140, 0.08);
  border: 1px solid rgba(61, 214, 140, 0.2);
  font-size: 0.78rem;
}
.connected-bar .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok); display: inline-block; margin-right: 6px;
}

.fa-accounts-bar {
  margin: 0 12px 10px;
  border-radius: 8px;
  border: 1px solid rgba(61, 214, 140, 0.18);
  background: rgba(61, 214, 140, 0.06);
  overflow: hidden;
}
.fa-accounts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #8a93a3);
  border-bottom: 1px solid rgba(61, 214, 140, 0.12);
}
.fa-accounts-list {
  display: flex;
  flex-direction: column;
  max-height: 180px;
  overflow: auto;
}
.fa-acct-row {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.fa-acct-row:last-child { border-bottom: 0; }
.fa-acct-row.is-active {
  background: rgba(61, 214, 140, 0.12);
}
.fa-acct-switch {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.fa-acct-switch .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #5a6578; flex-shrink: 0;
}
.fa-acct-row.is-active .fa-acct-switch .dot { background: var(--ok); }
.fa-acct-email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}
.fa-acct-type {
  flex-shrink: 0;
  font-size: 0.65rem;
  color: var(--muted, #8a93a3);
  text-transform: lowercase;
}
.fa-acct-badge {
  flex-shrink: 0;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ok);
}
.fa-acct-remove {
  flex-shrink: 0;
  margin-right: 4px;
  color: var(--muted, #8a93a3) !important;
}
.fa-acct-remove:hover { color: var(--danger, #ef4444) !important; }
.fa-add-acct-panel {
  border-top: 1px solid rgba(61, 214, 140, 0.12);
  padding: 8px;
}
.fa-add-acct-panel .fa-auth-page,
.fa-add-acct-panel .fa-auth-wrap {
  min-height: 0;
  padding: 0;
  margin: 0;
}
.fa-add-acct-panel .fa-auth-card {
  box-shadow: none;
  border: 0;
  padding: 8px;
}
.fa-add-acct-panel .fa-auth-title { font-size: 0.95rem; }
.fa-add-acct-panel .fa-auth-sub { display: none; }

.field[hidden] { display: none !important; }

/* FA Settings inline panel */
.fa-settings-inline {
  margin: 0 12px 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}
.fa-settings-inline[hidden] { display: none; }

.fa-settings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fa-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.fa-setting-row--tz {
  flex-wrap: wrap;
}

.fa-setting-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fa-setting-cmd {
  font-family: var(--mono, monospace);
  font-size: 0.75rem;
  color: #f5c04a;
}

.fa-setting-desc {
  font-size: 0.7rem;
  color: var(--text-dim, rgba(255,255,255,0.45));
}

.fa-setting-toggle {
  flex-shrink: 0;
  min-width: 48px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted, rgba(255,255,255,0.55));
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: lowercase;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.fa-setting-toggle.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

.fa-setting-tz {
  min-width: 80px;
  padding: 6px 24px 6px 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text, #fff);
  font-size: 0.75rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

/* Contact photo block */
.fa-contact-photo-placeholder {
  font-size: 1.4rem;
  color: #aaa;
  user-select: none;
}

.fa-contact-photo-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
}

.fa-contact-photo-preview {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  border: 2px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-sizing: border-box;
  font-size: 1.2rem;
  color: #999;
}

.fa-contact-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.fa-contact-photo-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.fa-contact-photo-hint {
  font-size: 0.72rem;
  color: var(--text-muted, rgba(255,255,255,0.55));
  margin: 0;
}

.fa-contact-photo-spec {
  font-size: 0.68rem;
  color: var(--text-dim, rgba(255,255,255,0.35));
  margin: 0;
  font-family: var(--mono, monospace);
}

.fa-contact-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.fa-contact-photo-upload-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.fa-contacts-guide-btn {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
  font: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-transform: lowercase;
  vertical-align: middle;
}
.fa-contacts-guide-btn:hover {
  background: rgba(248, 113, 113, 0.22);
  color: #fecaca;
}

.fa-contact-android-warn {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
  font-size: 0.72rem;
  line-height: 1.45;
}
.fa-contact-android-warn[hidden] { display: none !important; }

/* Settings button below connected bar */
.fa-settings-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: calc(100% - 24px);
  margin: 0 12px 8px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted, rgba(255,255,255,0.55));
  font-size: 0.76rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.fa-settings-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.fa-settings-btn.is-open {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.fa-settings-btn-ico {
  font-size: 0.9rem;
}

.gm-opt-btn.is-active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.sidebar-user .btn { margin-left: auto; }

/* Dashboard — same command-deck as classic panel, AIO-neutral chrome */
.page:has(.dash-page) {
  overflow: auto;
  background:
    radial-gradient(ellipse 70% 45% at 8% 0%, rgba(255, 255, 255, 0.04), transparent 55%),
    radial-gradient(ellipse 55% 40% at 92% 12%, rgba(255, 255, 255, 0.03), transparent 50%),
    transparent;
}
.dash-page {
  max-width: none;
  padding: 22px 24px 32px;
  min-height: 100%;
  box-sizing: border-box;
}
.dash.dash--deck {
  width: 100%;
  max-width: none;
  min-height: calc(100dvh - 88px);
  display: flex;
  flex-direction: column;
  gap: 28px;
  animation: dashIn 0.4s ease both;
}
@keyframes dashIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.dash-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.dash-hero-text { min-width: 0; flex: 1; }
.dash-kicker {
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.dash-hero-title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  text-transform: lowercase;
  color: var(--text);
}
.dash-hero-sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}
.dash-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}
.dash-jump {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: lowercase;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}
.dash-jump:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.dash-spot {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 18px;
  align-items: stretch;
}
.dash-spot--empty {
  display: block;
  padding: 22px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  background: var(--panel);
}
.dash-spot-hero {
  position: relative;
  overflow: hidden;
  padding: 20px 22px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 48%),
    radial-gradient(circle at 80% 120%, rgba(255, 255, 255, 0.06), transparent 55%),
    var(--panel);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.dash-spot-kicker {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.dash-spot-num {
  font-size: clamp(2.4rem, 4vw, 3.1rem);
  font-weight: 750;
  letter-spacing: -0.05em;
  line-height: 1;
  color: #f4f4f5;
}
.dash-spot-hint { font-size: 0.78rem; color: var(--muted); }
.dash-spot-chips {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.dash-spot-chip {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    var(--panel);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  transition: border-color 0.15s, transform 0.15s;
}
.dash-spot-chip:hover {
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}
.dash-spot-chip span {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.dash-spot-chip strong {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-spot-chip em {
  font-style: normal;
  font-size: 0.68rem;
  color: var(--muted);
}

.dash-team-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--panel);
}
.dash-team-strip-label {
  display: block;
  font-size: 0.62rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dash-team-strip-name { font-size: 0.95rem; }
.dash-team-strip-meta { display: block; margin-top: 2px; font-size: 0.76rem; color: var(--muted); }
.dash-team-sends {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.78rem;
  color: var(--muted);
}
.dash-team-sends b { color: var(--text); }

.dash-split {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 24px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}
.dash-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  padding: 14px 16px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}
.dash-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.dash-panel-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dash-panel-sub { margin: 4px 0 0; font-size: 0.75rem; color: var(--muted); }
.dash-table-wrap { overflow: auto; flex: 1; min-height: 0; }
.dash-sends-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.dash-sends-table th {
  text-align: left;
  color: var(--dim);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-soft);
}
.dash-sends-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
.dash-empty { color: var(--muted); text-align: center; padding: 28px 12px !important; }
.dash-notif-scroll {
  overflow: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-notif-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft);
}
.dash-notif-item.is-unread {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}
.dash-notif-item strong {
  display: block;
  font-size: 0.84rem;
  margin-bottom: 4px;
}
.dash-notif-item p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}
.dash-notif-item em {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.8;
}
.dash-notif-badge {
  display: inline-block;
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent, #9ad0ff);
  background: rgba(154, 208, 255, 0.12);
  padding: 2px 7px;
  border-radius: 999px;
}
.dash-notif-img {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin: 8px 0 6px;
  border: 1px solid var(--border-soft);
}

@media (max-width: 1100px) {
  .dash-spot { grid-template-columns: 1fr; }
  .dash-spot-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-split { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .dash-spot-chips { grid-template-columns: 1fr 1fr; }
  .dash-hero { flex-direction: column; }
  .dash-jumps { justify-content: flex-start; }
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 650;
  text-transform: lowercase;
}
.badge-ok { background: rgba(255,255,255,0.1); color: var(--ok); }
.badge-no { background: rgba(239,68,68,0.15); color: var(--danger); }

.preview-live-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ok);
}

.page:has(.sr-shell),
.page:has(.mailer-grid),
.page:has(.tools-hub--searcher),
.page:has(.gm-page) {
  overflow: hidden;
}

.sr-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 14px 16px 10px;
  background: var(--bg);
}
.sr-head { margin-bottom: 4px; }
.sr-title {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  text-transform: lowercase;
}
.sr-frame {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0a0a0c;
}

.hub-subnav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  margin: 8px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #101012;
  width: fit-content;
  max-width: 100%;
}
.hub-subnav-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: lowercase;
  cursor: pointer;
}
.hub-subnav-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.hub-subnav-btn.active {
  background: #f4f4f5;
  color: #111;
  border-color: transparent;
  font-weight: 700;
}

.nav-label[hidden] { display: none !important; }

@media (max-width: 1100px) {
  .dash-spot { grid-template-columns: 1fr; }
  .dash-spot-chips { grid-template-columns: repeat(3, 1fr); }
  .dash-split { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .dash-spot-chips { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1100px) {
  .mailer-grid { grid-template-columns: 200px 6px 240px 6px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { display: none; }
  .mailer-grid { grid-template-columns: 1fr; height: auto; }
  .col-resizer { display: none; }
  .col { border-right: 0; border-bottom: 1px solid var(--border-soft); }
  .col-preview { min-height: 70vh; }
  .stat-row { grid-template-columns: 1fr; }
}

/* —— Account / Team —— */
.tools-page .card { max-width: none; }
.acct-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.acct-head h1 { margin: 0; }
.acct-head .sub { margin: 4px 0 0; }
.acct-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff 0%, #c8c8ce 100%);
  color: #111;
  font-weight: 750;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.acct-big {
  margin: 6px 0 8px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.stat-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.stat-chip {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.stat-chip span {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
}
.stat-chip strong {
  font-size: 1.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acct-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
}
.team-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.team-hero-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.team-seats-bar {
  margin-top: 14px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.team-seats-fill {
  height: 100%;
  background: linear-gradient(90deg, #3dd68c, #8b8b93);
  border-radius: inherit;
}
.team-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
  align-items: start;
}
.team-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.team-member-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.team-member-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: var(--bg);
}
.team-member-card.is-owner {
  border-color: rgba(61, 214, 140, 0.28);
}
.team-member-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.team-member-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}
.team-role-pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
}
.team-you-tag {
  font-size: 0.68rem;
  color: var(--ok);
  font-weight: 650;
}
.team-member-tgid-label {
  display: block;
  font-size: 0.65rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.team-invite-box {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.team-invite-title {
  margin: 0 0 4px;
  font-weight: 650;
  font-size: 0.9rem;
}
.pill-ok {
  background: rgba(61, 214, 140, 0.14);
  color: var(--ok);
  border-color: rgba(61, 214, 140, 0.28);
}
.inline-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.inline-row input {
  flex: 1;
  min-width: 140px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  outline: none;
}
.row-list { display: flex; flex-direction: column; gap: 2px; }
.row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.86rem;
}
.row-item:last-child { border-bottom: 0; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 0.84rem; }

@media (max-width: 900px) {
  .stat-chips,
  .acct-grid,
  .team-layout {
    grid-template-columns: 1fr;
  }
}

/* —— FA Mailer auth (centered, with where-to-get hints) —— */
.fa-auth-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 28px 16px 48px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 45% at 50% -8%, rgba(255, 255, 255, 0.06), transparent 55%);
}

.fa-auth-page-head {
  margin-bottom: 28px;
  max-width: 420px;
}

.fa-auth-page-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 1.35rem;
  color: #f4f4f5;
}

.fa-auth-page-head h2 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  text-transform: lowercase;
}

.fa-auth-page-head p {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  text-transform: lowercase;
}

.fa-auth-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 440px;
}

.fa-auth-card {
  width: 100%;
  background: linear-gradient(165deg, rgba(22, 22, 28, 0.98) 0%, rgba(16, 16, 20, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  padding: 28px 26px 26px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  text-align: left;
}

.fa-auth-title {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-align: center;
  text-transform: lowercase;
}

.fa-auth-sub {
  margin: 0 0 22px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

.fa-auth-segment {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin-bottom: 22px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.fa-auth-providers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.fa-auth-provider {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.fa-auth-provider:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.fa-auth-back {
  width: 100%;
  margin-top: 10px;
  opacity: 0.85;
}

.fa-auth-pick {
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  padding: 10px 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: lowercase;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fa-auth-pick:hover { color: var(--text); }
.fa-auth-pick.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.fa-auth-pick--star .fa-auth-star {
  color: #f6c344;
  font-weight: 700;
  font-size: 1.05em;
  margin-left: 1px;
}
.fa-auth-pick--star.active .fa-auth-star {
  color: #ffd666;
}

.fa-auth-hint-note {
  margin: 8px 0 10px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  text-align: center;
}

.fa-auth-hint-unlocks {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.76rem;
  color: #f5c04a;
  line-height: 1.4;
  text-align: center;
}

.fa-auth-steps-title {
  text-align: center;
}

.fa-auth-steps .fa-auth-steps-link,
#fa-cred-hint .fa-auth-steps-link {
  display: inline-flex;
  text-align: center;
  margin-top: 0;
}

.fa-auth-field { margin-bottom: 14px; }
.fa-auth-field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: lowercase;
  text-align: left;
}
.fa-auth-field input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  outline: none;
  font-size: 0.88rem;
}
.fa-auth-field input:focus {
  border-color: rgba(255, 255, 255, 0.22);
}

.fa-auth-steps {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  user-select: text;
  -webkit-user-select: text;
}

.fa-auth-hint-line {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
  text-transform: lowercase;
  text-align: center;
}

.fa-auth-steps--compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.fa-auth-steps-title {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #f4f4f5;
  text-transform: lowercase;
}

.fa-auth-steps-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.55;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.fa-auth-steps-list li { margin-bottom: 6px; }
.fa-auth-steps-list li:last-child { margin-bottom: 0; }

.fa-auth-steps-list a,
.fa-auth-steps-link {
  color: #f4f4f5;
  text-decoration: none;
  word-break: break-all;
  user-select: text;
  -webkit-user-select: text;
}

.fa-auth-steps-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px 0 4px;
}

.fa-auth-steps-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  color: #f4f4f5 !important;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none !important;
  word-break: normal;
}

.fa-auth-steps-link:hover {
  border-color: rgba(147, 197, 253, 0.45);
  background: rgba(147, 197, 253, 0.12);
  color: #fff !important;
}

.fa-auth-guide-btn {
  border: 1px solid rgba(244, 192, 74, 0.35);
  background: linear-gradient(180deg, rgba(244, 192, 74, 0.18), rgba(244, 192, 74, 0.08));
  color: #f5d78a;
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
.fa-auth-guide-btn:hover {
  border-color: rgba(244, 192, 74, 0.55);
  background: rgba(244, 192, 74, 0.22);
  color: #ffe9a8;
}

.fa-auth-steps .fa-auth-steps-link,
#fa-cred-hint .fa-auth-steps-link {
  margin-top: 0;
}

.fa-auth-steps-link:hover,
.fa-auth-steps-list a:hover { text-decoration: underline; }

.fa-guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.fa-guide-overlay[hidden] { display: none !important; }
.fa-guide-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.fa-guide-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(80vh, 560px);
  overflow: auto;
  background: #141418;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  padding: 16px 16px 18px;
}
.fa-guide-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.fa-guide-top h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}
.fa-guide-close {
  border: 0;
  background: transparent;
  color: #a1a1aa;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 4px 6px;
}
.fa-guide-body {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #d4d4d8;
}
.fa-guide-body p { margin: 0 0 14px; }
.fa-guide-body p:last-child { margin-bottom: 0; }
.fa-guide-body ul,
.fa-guide-body ol {
  margin: 0 0 14px;
  padding-left: 1.2em;
}
.fa-guide-body li { margin: 0 0 6px; }
.fa-guide-body code {
  font-size: 0.85em;
  color: #e8c87a;
}
.fa-guide-body a {
  color: #93c5fd;
  word-break: break-all;
  text-decoration: none;
}
.fa-guide-body a:hover { text-decoration: underline; }

.fa-auth-submit {
  width: 100%;
  margin-top: 4px;
  text-transform: lowercase;
  transition: background 0.2s, opacity 0.2s;
}

.fa-auth-submit.is-connecting {
  opacity: 0.6;
  pointer-events: none;
  background: rgba(99, 102, 241, 0.3);
  animation: fa-auth-pulse 1.2s infinite ease-in-out;
}

@keyframes fa-auth-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.9; }
}

/* —— Google Mailer —— */
.page-pad.gm-page {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  overflow: hidden;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: 14px 16px;
  position: relative;
}

.gm-page-head {
  display: none;
}

.gm-page-icon {
  display: none;
}

.gm-page-head h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  text-transform: lowercase;
}

.gm-page-head .sub {
  margin: 8px 0 0;
  text-transform: lowercase;
}

.gm-stack {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.gm-stack--below {
  max-width: none;
  margin-top: 16px;
  width: 100%;
  flex-shrink: 0;
}

.gm-workbench {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.gm-workbench[hidden] {
  display: none !important;
}

.gm-workbench.gm-workbench--no-preview {
  grid-template-columns: minmax(300px, 420px);
  max-width: 420px;
}

.gm-preview-card[hidden] {
  display: none !important;
}

@media (max-width: 960px) {
  .gm-workbench {
    grid-template-columns: 1fr;
    overflow: auto;
    height: auto;
    min-height: 0;
  }
}

.gm-compose {
  position: static;
  display: flex;
  flex-direction: column;
  text-align: left;
  box-sizing: border-box;
  height: 100%;
  min-height: 0;
  overflow: auto;
}

.gm-compose .block-label {
  flex-shrink: 0;
}

.gm-compose-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 0 0 auto;
  min-height: 0;
}

.gm-compose-form[hidden] {
  display: none !important;
}

.gm-compose-form .field {
  flex-shrink: 0;
  margin-bottom: 12px;
}

.gm-compose-form .btn-send,
.gm-compose-form .gm-send-wrap {
  margin-top: 4px;
  width: 100%;
}

.gm-preview-card {
  padding: 14px;
  background: #0e0e10;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  text-align: left;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* option 1 — security auto-reply (white Gmail card) */
.gm-pv-security {
  background: #fff;
  color: #202124;
  font-family: "Google Sans", Roboto, Arial, Helvetica, sans-serif;
  max-width: 640px;
  margin: 0 auto;
  border-radius: 8px;
  padding: 20px 22px 28px;
  text-align: left;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.15), 0 1px 3px 1px rgba(60, 64, 67, 0.1);
}
.gm-pv-security .gm-pv-sec-body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #202124;
  padding: 0;
  overflow: visible;
  max-height: none;
}
.gm-pv-security .gm-pv-sec-body p {
  margin: 0 0 12px;
}
.gm-pv-security .gm-pv-sec-list {
  margin: 0 0 12px 20px;
  padding: 0;
  color: #3c4043;
}
.gm-pv-security .gm-pv-sec-list li {
  margin-bottom: 10px;
}
.gm-pv-security .gm-pv-sec-body a {
  color: #1a73e8;
  text-decoration: none;
}
.gm-pv3-av-sec {
  background: linear-gradient(135deg, #4285f4, #34a853);
}

.gm-preview-head {
  margin-bottom: 10px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: 18px;
}
.gm-preview-head .block-label {
  margin: 0;
  justify-self: start;
}
.gm-preview-from {
  margin: 0;
  justify-self: center;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--muted);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.gm-preview-stage {
  background: #dfe3e8;
  border-radius: 10px;
  padding: 16px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.gm-preview-stage > .gm-pv,
.gm-preview-stage > .gm-pv-shot {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  flex-shrink: 0;
}

.gm-pv-shot {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.gm-shot-frame {
  position: relative;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.gm-shot-img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

/* blur emails on opt 4–6 like reference shot 9 */
.gm-shot-blur {
  position: absolute;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  background: rgba(241, 243, 244, 0.35);
  border-radius: 3px;
  pointer-events: none;
}
.gm-shot-blur--top {
  left: 8%;
  right: 6%;
  top: 2.2%;
  height: 9.5%;
}
.gm-pv-shot--secure[data-opt="5"] .gm-shot-blur--top,
.gm-shot-frame:has(img[src*="opt5"]) .gm-shot-blur--top {
  top: 1.5%;
  height: 11%;
}
.gm-shot-blur--chip {
  left: 32%;
  right: 32%;
  top: 28%;
  height: 4.5%;
}
.gm-shot-frame:has(img[src*="opt4"]) .gm-shot-blur--chip {
  top: 29%;
}
.gm-shot-frame:has(img[src*="opt5"]) .gm-shot-blur--chip {
  top: 30%;
}
.gm-shot-frame:has(img[src*="opt6"]) .gm-shot-blur--chip {
  top: 27%;
}
.gm-shot-frame:has(img[src*="opt6"]) .gm-shot-blur--top {
  height: 10%;
}
.gm-pv-shot--secure[data-opt="7"] .gm-shot-blur--top,
.gm-shot-frame:has(img[src*="opt7"]) .gm-shot-blur--top {
  left: 7%;
  right: 5%;
  top: 1.8%;
  height: 12.5%;
}
.gm-pv-shot--secure[data-opt="7"] .gm-shot-blur--chip,
.gm-shot-frame:has(img[src*="opt7"]) .gm-shot-blur--chip {
  left: 34%;
  right: 28%;
  top: 36.5%;
  height: 3.8%;
}

.gm-hist-btn {
  width: 100%;
  margin-top: 8px;
  text-transform: lowercase;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}
.gm-hist-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.16);
}
.gm-hist-btn.is-open {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--text);
}

.gm-history-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}
.gm-history-overlay[hidden] {
  display: none !important;
}
.gm-history-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  pointer-events: auto;
}
.gm-history-drawer {
  position: relative;
  z-index: 1;
  width: min(420px, 92vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #121214;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  animation: gm-drawer-in 0.22s ease-out;
}
@keyframes gm-drawer-in {
  from { transform: translateX(18px); opacity: 0.6; }
  to { transform: translateX(0); opacity: 1; }
}
.gm-history-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
  text-align: left;
}
.gm-history-top h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: var(--text);
}
.gm-history-count {
  margin: 4px 0 0;
  font-size: 0.72rem;
  color: var(--dim);
}
.gm-hist-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.gm-hist-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}
.gm-history-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.gm-hist-row {
  padding: 12px 12px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.gm-hist-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.gm-hist-opt {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.gm-hist-status {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.gm-hist-status.is-ok { color: #4ade80; }
.gm-hist-status.is-bad { color: #f87171; }
.gm-hist-status.is-muted { color: var(--dim); }
.gm-hist-mail {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
  line-height: 1.35;
}
.gm-hist-meta {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.72rem;
  color: var(--dim);
  font-family: var(--mono);
}
.gm-hist-subj {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gm-hist-empty {
  margin: auto;
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
}
.gm-hist-empty p {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-transform: lowercase;
}
.gm-hist-empty span {
  font-size: 0.78rem;
  color: var(--dim);
}
.gm-hist-admin {
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 14px 16px 16px;
  text-align: left;
}
.gm-hist-admin-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 10px;
  max-height: 120px;
  overflow: auto;
}
.gm-hist-admin-row {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--mono);
  padding: 7px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
}

.gm-compose-form .btn-send {
  margin-top: 0;
}
.gm-compose-form .gm-hist-btn {
  margin-top: 0;
  flex-shrink: 0;
}

.gm-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
  align-items: stretch;
}
.gm-action-row > .btn-send,
.gm-action-row > .gm-hist-btn {
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  margin: 0 !important;
  height: 42px !important;
  padding: 0 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  text-transform: lowercase;
  border-radius: 8px;
  font-weight: 650;
  box-sizing: border-box;
  line-height: 1 !important;
}
.gm-action-row > .gm-hist-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* Google mailer send status */
.gm-status {
  margin-top: 10px;
  padding: 8px 10px 7px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gm-status[hidden] { display: none !important; }
.gm-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.gm-status-title {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: var(--text);
  flex-shrink: 0;
  line-height: 1;
}
.gm-status-bar {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}
.gm-status-bar > i {
  display: block;
  height: 100%;
  width: 35%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.55);
  animation: gm-bar-slide 1.1s ease-in-out infinite;
}
.gm-status.is-sent .gm-status-bar > i,
.gm-status.is-failed .gm-status-bar > i {
  animation: none;
  width: 100%;
}
.gm-status.is-queued .gm-status-bar > i {
  background: #fbbf24;
}
.gm-status.is-sent .gm-status-bar > i {
  background: #4ade80;
}
.gm-status.is-failed .gm-status-bar > i {
  background: #f87171;
}
@keyframes gm-bar-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
.gm-status-meta {
  font-size: 0.68rem;
  color: var(--dim);
  font-family: var(--mono);
  line-height: 1;
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gm-status.is-sent {
  border-color: rgba(74, 222, 128, 0.22);
  background: rgba(34, 197, 94, 0.06);
}
.gm-status.is-sent .gm-status-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  color: #86efac;
  text-shadow: none;
}
.gm-status.is-queued {
  border-color: rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.06);
}
.gm-status.is-queued .gm-status-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  color: #fcd34d;
  text-shadow: none;
}
.gm-status.is-failed {
  border-color: rgba(248, 113, 113, 0.22);
  background: rgba(239, 68, 68, 0.06);
}
.gm-status.is-failed .gm-status-title {
  color: #fca5a5;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.gm-field-hint {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: lowercase;
}

.gm-g-logo {
  font-family: "Product Sans", "Google Sans", Arial, sans-serif;
  font-size: 22px;
  letter-spacing: -0.5px;
  font-weight: 500;
}
.gm-g-logo b { font-weight: 500; }

.gm-mail-blur {
  display: inline-block;
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
  color: #202124;
  font-weight: 600;
}

/* opt 1 — match real Google Support bounce mail */
.gm-pv-1 {
  background: #fff;
  color: #202124;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 4px;
  overflow: hidden;
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
}
.gm-pv1-head {
  background: #1a73e8;
  color: #fff;
  padding: 18px 24px;
  font-size: 20px;
  font-weight: 500;
  text-align: left;
}
.gm-pv1-body { padding: 28px 24px; text-align: left; }
.gm-pv1-body p { margin: 0 0 1em; }
.gm-pv1-body p:last-child { margin-bottom: 0; }
.gm-pv1-body a { color: #1a73e8; }
.gm-pv1-foot {
  background: #f1f3f4;
  padding: 14px 24px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: #5f6368;
  text-align: left;
}
.gm-pv1-foot a {
  color: #5f6368;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: underline;
  flex-shrink: 0;
}
.gm-pv1-foot span {
  text-align: right;
}

/* opt 2 — match real Google Support “no longer monitored” mail */
.gm-pv-2 {
  background: #fff;
  color: #202124;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  max-width: 560px;
  margin: 0 auto;
  border-radius: 4px;
  overflow: hidden;
  text-align: left;
}
.gm-pv2-top { padding: 18px 22px 8px; text-align: left; }
.gm-pv2-body { padding: 8px 22px 24px; text-align: left; }
.gm-pv2-body p { margin: 0 0 1em; }
.gm-pv2-body p:last-child { margin-bottom: 0; }
.gm-pv2-body a { color: #1a73e8; }
.gm-pv2-foot {
  background: #f1f3f4;
  padding: 16px 22px 22px;
  border-top: 1px solid #e0e0e0;
  text-align: center;
}
.gm-pv2-disc {
  font-size: 11px;
  font-style: italic;
  color: #5f6368;
  margin: 0 0 18px;
  line-height: 1.45;
  text-align: center;
}
.gm-pv2-brand { text-align: center; margin-bottom: 8px; }
.gm-pv2-addr {
  text-align: center;
  font-size: 12px;
  color: #5f6368;
  margin: 0;
}

/* opt 3 — match Gmail reading pane (lis-noreply) */
.gm-pv-3 {
  background: #fff;
  color: #202124;
  font-family: "Google Sans", Roboto, Arial, Helvetica, sans-serif;
  max-width: 640px;
  margin: 0 auto;
  border-radius: 8px;
  padding: 20px 22px 28px;
  text-align: left;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.15), 0 1px 3px 1px rgba(60, 64, 67, 0.1);
}
.gm-pv3-subj {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.gm-pv3-subj-text {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1.35;
  color: #202124;
}
.gm-pv3-inbox {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  padding: 2px 6px 2px 8px;
  border-radius: 4px;
  background: #f1f3f4;
  color: #5f6368;
  font-weight: 500;
  font-family: Roboto, Arial, sans-serif;
}
.gm-pv3-inbox-x {
  font-size: 14px;
  line-height: 1;
  opacity: 0.7;
  margin-left: 2px;
}
.gm-pv3-from {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.gm-pv3-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1a73e8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E") center/60% no-repeat;
  flex-shrink: 0;
}
.gm-pv3-from-meta { min-width: 0; }
.gm-pv3-from-mail {
  font-weight: 700;
  font-size: 0.875rem;
  color: #202124;
  line-height: 1.3;
}
.gm-pv3-to {
  font-size: 0.75rem;
  color: #5f6368;
  margin-top: 2px;
}
.gm-pv3-caret { font-size: 0.65rem; }
.gm-pv3-body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #222;
}
.gm-pv3-body p { margin: 0 0 1em; }
.gm-pv3-body p:last-child { margin-bottom: 0; }

/* security alerts 4/5/6 */
.gm-pv-sec {
  max-width: 520px;
  margin: 0 auto;
  font-family: "Google Sans", Roboto, Arial, sans-serif;
  color: #202124;
}
.gm-sec-banner {
  display: flex;
  gap: 10px;
  background: #f1f3f4;
  border-radius: 8px 8px 0 0;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.45;
  color: #3c4043;
}
.gm-sec-ico {
  flex-shrink: 0;
  opacity: 0.55;
  font-size: 16px;
  line-height: 1.2;
}
.gm-sec-txt p { margin: 0 0 2px; }
.gm-sec-txt a { color: #1a73e8; text-decoration: none; }
.gm-sec-card {
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 28px 24px 22px;
  text-align: center;
  margin-top: 0;
}
.gm-sec-logo { margin-bottom: 18px; }
.gm-sec-card h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #202124;
}
.gm-acc-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 16px;
}
.gm-acc-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #7c4dff;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: lowercase;
}
.gm-acc-mail { font-size: 0.88rem; color: #3c4043; }
.gm-sec-hr {
  border: 0;
  border-top: 1px solid #e8eaed;
  margin: 0 0 18px;
}
.gm-sec-body {
  font-size: 0.92rem;
  line-height: 1.5;
  color: #3c4043;
  margin: 0 0 22px;
  text-align: center;
}
.gm-sec-body a { color: #1a73e8; }
.gm-pv-inject {
  font-weight: 700;
  color: #202124;
  outline: none;
  cursor: text;
  border-bottom: 1.5px dashed #1a73e8;
  padding: 0 2px;
  border-radius: 2px;
  white-space: pre-wrap;
  word-break: break-word;
}
.gm-pv-inject:focus {
  background: rgba(26, 115, 232, 0.08);
  border-bottom-style: solid;
}
.gm-sec-btn {
  display: inline-block;
  background: #1a73e8;
  color: #fff !important;
  border: 0;
  border-radius: 999px;
  padding: 10px 28px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: default;
  margin-bottom: 16px;
}
.gm-sec-link {
  font-size: 0.78rem;
  color: #5f6368;
  margin: 0;
  word-break: break-all;
}
.gm-sec-link a { color: #1a73e8; text-decoration: none; }
.gm-sec-copy {
  text-align: center;
  font-size: 11px;
  color: #80868b;
  line-height: 1.45;
  margin: 14px 8px 0;
}

.gm-card {
  max-width: none;
  width: 100%;
  margin: 0;
}

.gm-card h3 {
  text-transform: lowercase;
}

.gm-option-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
  overflow: visible;
}

.gm-option-row .gm-opt-btn {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.8rem;
  padding: 10px 6px;
  text-align: center;
  box-sizing: border-box;
}

.gm-opt-btn.is-active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.gm-card .btn-send {
  width: 100%;
  margin-top: 0;
  text-transform: lowercase;
}

.gm-compose-form .btn-send {
  margin-top: 0;
}

.gm-card .row-list {
  gap: 6px;
  margin: 10px 0 0;
  min-width: 0;
}

.gm-card .row-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-soft);
}

.gm-card .row-item-main {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.4;
  color: var(--text);
}

.gm-card .row-item-status {
  flex: 0 0 auto;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.78rem;
  padding-top: 1px;
}

/* —— Global Logs —— */
.card-logs {
  max-width: 920px;
}
.log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.log-item {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}
.log-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}
.log-event {
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--text);
}
.log-who {
  color: var(--muted);
  font-size: 0.8rem;
}
.log-item-detail {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* —— Team details compact key/value —— */
.kv-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.kv-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.kv-k {
  flex: 0 0 5.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.kv-v {
  flex: 0 1 auto;
  color: var(--text);
  font-size: 0.86rem;
}

/* ─── NFA MAILER ─────────────────────────────────────────────── */
.nfa-grid {
  display: grid;
  grid-template-columns: 200px 220px 1fr;
  gap: 16px;
  min-height: 500px;
}
@media (max-width: 900px) {
  .nfa-grid { grid-template-columns: 1fr; }
}
.nfa-col {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px;
  overflow-y: auto;
  max-height: 600px;
}
.nfa-col-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 10px;
}
.nfa-list { display: flex; flex-direction: column; gap: 4px; }
.nfa-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s;
}
.nfa-item:hover { background: rgba(255,255,255,0.05); }
.nfa-item.active { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); }
.nfa-count {
  font-size: 0.7rem;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  padding: 2px 6px;
  border-radius: 6px;
}
.nfa-form { display: flex; flex-direction: column; gap: 12px; }
.nfa-field { display: flex; flex-direction: column; gap: 4px; }
.nfa-field > span {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nfa-input {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.85rem;
}
.nfa-input:focus { border-color: rgba(255,255,255,0.25); outline: none; }
.btn-nfa-send {
  margin-top: 8px;
  padding: 12px;
  border-radius: 10px;
  border: 0;
  background: #fff;
  color: #111;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.btn-nfa-send:disabled { opacity: 0.5; cursor: not-allowed; }
.nfa-result {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.85rem;
}
.nfa-ok { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #4ade80; }
.nfa-err { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #f87171; }
