/* RecevedMail — design system (refont) */
:root {
  --bg: #07080c;
  --bg-elevated: #0d0f16;
  --bg-card: #11131b;
  --bg-hover: #171a24;
  --border: rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.12);
  --text: #f4f4f7;
  --muted: #9ba0b0;
  --muted-2: #5c6170;
  --accent: #6d7cff;
  --accent-2: #8b5cf6;
  --accent-soft: rgba(255,59,48,0.14);
  --accent-border: rgba(255,59,48,0.35);
  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0,0,0,0.45);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.mono { font-family: var(--mono); }

/* Ambient background */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}
.app-shell::before {
  content: "";
  position: fixed;
  inset: -20% auto auto -10%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(255,59,48,0.16), transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.app-shell::after {
  content: "";
  position: fixed;
  inset: auto -15% -25% auto;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(215,0,21,0.12), transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.app-shell > * { position: relative; z-index: 1; }

/* Topbar */
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(7,8,12,0.72);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  user-select: none;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(255,59,48,0.35);
  color: white;
  font-weight: 700;
  font-size: 14px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 650; letter-spacing: -0.02em; font-size: 15px; }
.brand-tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-weight: 600;
}
.tag {
  display: inline-flex; align-items: center; gap: 0.35rem;
  border: 1px solid var(--border); background: var(--bg-card);
  border-radius: 999px; padding: 0.2rem 0.55rem;
  font-size: 11px; color: var(--muted); font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  border-radius: 11px; border: 1px solid transparent;
  padding: 0.55rem 0.95rem; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: 0.15s ease; background: transparent; color: var(--text);
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 12px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #d70015);
  color: white; box-shadow: 0 8px 22px rgba(255,59,48,0.28);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost {
  border-color: var(--border); background: rgba(255,255,255,0.02); color: var(--muted);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-hover); }
.btn-danger {
  border-color: rgba(248,113,113,0.35); color: #fecaca; background: rgba(248,113,113,0.08);
}
.btn-danger:hover { background: rgba(248,113,113,0.16); }
.btn-success {
  border-color: rgba(52,211,153,0.35); color: #a7f3d0; background: rgba(52,211,153,0.08);
}
.btn-success:hover { background: rgba(52,211,153,0.16); }

/* Forms */
.label {
  display: block; margin-bottom: 0.35rem;
  font-size: 12px; font-weight: 650; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted);
}
.input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.65rem 0.8rem;
  font-size: 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input-sm { padding: 0.45rem 0.65rem; font-size: 12px; }
.input-mono { font-family: var(--mono); }
.input-accent { border-color: var(--accent-border); }

/* Cards */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent 40%), var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.icon-tile {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--accent-soft); border: 1px solid var(--accent-border);
  color: #fecdd3;
}
.ic { width: 16px; height: 16px; }
.ic-sm { width: 14px; height: 14px; }
.ic-xl { width: 22px; height: 22px; }

/* Layout panels */
.panel-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 900px) {
  .inbox-layout { grid-template-columns: 280px 1fr; }
  .reader-layout { grid-template-columns: 1.05fr 1.35fr; }
  .profile-layout { grid-template-columns: 220px 1fr; }
  .admin-layout { grid-template-columns: 200px 1fr; }
}

/* Sidebar nav items */
.side-nav, .tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.side-nav.vertical, .tabs.lg\:flex-col { flex-direction: column; }
.nav-item, .prof-nav, .adm-nav {
  display: flex; align-items: center; gap: 0.55rem;
  width: 100%; text-align: left;
  padding: 0.65rem 0.8rem;
  border-radius: 11px;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: .15s ease;
}
.nav-item:hover, .prof-nav:hover, .adm-nav:hover {
  color: var(--text); background: var(--bg-hover);
}
.nav-item.is-active, .prof-nav.is-active, .adm-nav.is-active {
  color: var(--text);
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  padding: 0.75rem 0.85rem; text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.table th { color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; font-size: 10px; }
.table tbody tr:hover { background: rgba(255,255,255,0.02); }

.codeblock {
  background: #0a0b10;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  overflow: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: #fecdd3;
}

.gradient-text {
  background: linear-gradient(135deg, #fda4af, #ff8a80 40%, #ff6961);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.range-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 0.3rem 0.55rem;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}
.range-btn.is-active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--text);
}

.hidden { display: none !important; }

/* Mailbox / message rows */
.mb-row, .msg-row {
  padding: 0.85rem 1rem;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: .12s ease;
}
.mb-row:hover, .msg-row:hover { background: var(--bg-hover); }
.mb-row.is-active, .msg-row.is-active {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

/* Landing */
.hero {
  max-width: 920px;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 3rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 750;
  margin: 1rem 0 1.1rem;
}
.feature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  max-width: 1100px;
  margin: 0 auto 3rem;
  padding: 0 1.25rem;
}
@media (min-width: 800px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* Toast already styled inline via JS classes — provide helpers */
.toast-ok {
  background: rgba(17,19,27,0.95);
  border: 1px solid var(--accent-border);
  color: #fecdd3;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.toast-err {
  background: rgba(40,12,12,0.95);
  border: 1px solid rgba(248,113,113,0.4);
  color: #fecaca;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

/* Admin category buttons compatibility (JS sets classes) */
#admCatBtn_dashboard,
#admCatBtn_domaine,
#admCatBtn_users,
#admCatBtn_settings,
#admCatBtn_tutos {
  border-radius: 999px !important;
}

/* Modal */
.modal-card {
  width: min(520px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.35rem;
}

/* Mailbox create: domain select readable */
.domain-select, #newDomainSelect {
  min-width: 0;
  width: auto;
  max-width: 55%;
  flex: 1 1 7rem;
  text-overflow: ellipsis;
}
.mailbox-compose .mailbox-local { flex: 1 1 5rem; }
.mailbox-compose .mailbox-domain { flex: 1 1 7rem; }


/* Restored helpers (chart, spin, copied) */
.chart-axis, .chart-xaxis { fill: #9ca3af; font-family: var(--mono); font-size: 11px; }
.chart-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
#profChart svg { display: block; overflow: visible; }
.ic.spinning { animation: spinIcon 0.7s linear infinite; }
@keyframes spinIcon { to { transform: rotate(360deg); } }
.is-copied { color: #fda4af !important; border-color: var(--accent-border) !important; background: var(--accent-soft) !important; }

/* =====================================================================
   Full-screen inbox — vanityhunter.lol style
   (dark sidebar on the left + black main area, no page scroll)
   ===================================================================== */
body.workspace-locked { overflow: hidden; }
body.workspace-locked .app-shell {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
#inboxView:not(.hidden) ~ #footerContainer,
#adminView:not(.hidden) ~ #footerContainer,
#profileView:not(.hidden) ~ #footerContainer { display: none; }
body.inbox-active .topbar,
body:has(#inboxView:not(.hidden)) .topbar { display: none; }
body.inbox-active .app-shell::before,
body.inbox-active .app-shell::after { display: none; }

.vh-inbox {
  --vh-side: #18181b;
  --vh-side-2: #222226;
  --vh-side-3: #2a2a2f;
  --vh-line: rgba(255,255,255,0.07);
  --vh-muted: #8b8b94;
  --vh-muted-2: #5f5f68;
  --vh-blue: #ff3b30;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: #000;
  color: #f4f4f5;
}
#inboxView:not(.hidden) { display: flex; }
.vh-inbox svg { flex-shrink: 0; }

/* Thin scrollbars */
.vh-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.16) transparent;
}
.vh-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.vh-scroll::-webkit-scrollbar-track { background: transparent; }
.vh-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.14);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.vh-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.26); background-clip: padding-box; }

/* ---------- Sidebar ---------- */
.vh-side {
  width: 300px;
  flex: 0 0 300px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--vh-side);
  border-right: 1px solid var(--vh-line);
  padding: 14px 12px 0;
}
.vh-side-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 2px 4px 14px;
}
.vh-brand {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  background: none; border: 0; padding: 0; cursor: pointer; color: inherit;
}
.vh-brand-ic { width: 17px; height: 17px; color: #e4e4e7; }
.vh-brand-name { font-weight: 700; font-size: 15px; letter-spacing: -0.02em; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vh-brand-muted { color: var(--vh-muted); font-weight: 600; }
.vh-round-btn {
  width: 32px; height: 32px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--vh-side-2); border: 1px solid var(--vh-line);
  color: #d4d4d8; cursor: pointer; transition: .15s;
}
.vh-round-btn svg { width: 18px; height: 18px; }
.vh-round-btn:hover { color: #fff; background: var(--vh-side-3); }

/* Mailbox picker */
.vh-picker-wrap { position: relative; margin-bottom: 10px; }
.vh-picker {
  width: 100%; height: 38px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 12px; border-radius: 11px;
  background: var(--vh-side-2); border: 1px solid var(--vh-line);
  color: #f4f4f5; font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s;
}
.vh-picker:hover, .vh-picker[aria-expanded="true"] { background: var(--vh-side-3); }
.vh-picker-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vh-chev { width: 16px; height: 16px; color: var(--vh-muted); transition: transform .15s; }
.vh-picker[aria-expanded="true"] .vh-chev { transform: rotate(180deg); }

.vh-popover {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
  background: rgba(31,31,35,0.82); border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 14px; padding: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
}
.vh-pop-search {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px;
  border-radius: 9px; background: #151518; border: 1px solid var(--vh-line); margin-bottom: 6px;
}
.vh-pop-search svg { width: 14px; height: 14px; color: var(--vh-muted); }
.vh-pop-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; font-size: 12px; }
.vh-mb-list { max-height: 280px; display: flex; flex-direction: column; gap: 4px; padding: 2px 0; }
.vh-mb-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 11px; border-radius: 11px; cursor: pointer;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
  transition: background .12s, border-color .12s;
}
.vh-mb-item:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.09); }
.vh-mb-item.is-active {
  background: linear-gradient(90deg, rgba(255,59,48,0.16), rgba(255,59,48,0.06));
  border-color: rgba(255,59,48,0.35);
  box-shadow: inset 3px 0 0 #ff3b30;
}
.vh-mb-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.vh-mb-all-left { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #f4f4f5; }
.vh-mb-av {
  width: 28px; height: 28px; border-radius: 999px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(255,59,48,0.16); border: 1px solid rgba(255,59,48,0.28);
  color: #ff6961; font-size: 12px; font-weight: 700;
}
.vh-mb-addr { font-family: var(--mono); font-size: 12.5px; color: #f4f4f5; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vh-mb-dom-part { color: #8b8b94; font-weight: 400; }
.vh-mb-check { width: 15px; height: 15px; color: #ff6961; margin-left: 2px; }
.vh-mb-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.vh-count {
  min-width: 24px; padding: 2px 8px; border-radius: 999px; text-align: center;
  font-size: 11px; font-weight: 600; color: var(--vh-muted); background: rgba(255,255,255,0.06);
}
.vh-count.has-mail { color: #fda4af; background: rgba(255,59,48,0.16); }
.vh-mb-item.is-active .vh-count { color: #fecdd3; background: rgba(255,59,48,0.24); }
.vh-mini {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
  color: #a1a1aa; cursor: pointer; opacity: 1; transition: .12s;
}
.vh-mini svg { width: 13px; height: 13px; }
.vh-mini:hover { color: #fff; background: rgba(255,255,255,0.1); }
.vh-mini.is-danger { color: #f87171; background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.22); }
.vh-mini.is-danger:hover { color: #fecaca; background: rgba(239,68,68,0.2); }
.vh-mini.is-copied { opacity: 1; }

/* Mailboxes centered modal */
.vh-mb-modal {
  width: min(440px, 100%);
  max-height: calc(100dvh - 32px);
  display: flex; flex-direction: column; gap: 10px;
  background: #1b1b1f;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.75);
  animation: modalIn .16s cubic-bezier(.22,1,.36,1);
}
.vh-mb-mhead { display: flex; align-items: center; gap: 11px; }
.vh-mb-micon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(255,59,48,0.14); border: 1px solid rgba(255,59,48,0.28); color: #ff6961;
}
.vh-mb-micon svg { width: 17px; height: 17px; }
.vh-mb-mtitle-wrap { flex: 1; min-width: 0; }
.vh-mb-mtitle-row { display: flex; align-items: center; gap: 8px; }
.vh-mb-mtitle { margin: 0; font-size: 15px; font-weight: 700; color: #fff; }
.vh-mb-badge {
  padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: rgba(255,59,48,0.18); color: #ff6961;
}
.vh-mb-msub { margin: 1px 0 0; font-size: 11.5px; color: #8b8b94; }
.vh-mb-msearch {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
  border-radius: 10px; background: #121215; border: 1px solid rgba(255,255,255,0.1);
  transition: border-color .15s, box-shadow .15s;
}
.vh-mb-msearch:focus-within { border-color: #ff3b30; box-shadow: 0 0 0 3px rgba(255,59,48,0.15); }
.vh-mb-msearch svg { width: 14px; height: 14px; color: #71717a; }
.vh-mb-msearch input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; font-size: 13px; }
.vh-mb-mcount { font-size: 11px; color: #71717a; padding: 0 2px; }
.vh-mb-mfoot { border-top: 1px solid rgba(255,255,255,0.07); padding-top: 10px; }
.vh-mb-mcreate { display: flex; align-items: center; gap: 8px; }
.vh-mb-alias {
  width: 110px; height: 36px; padding: 0 10px; border-radius: 10px;
  background: #121215; border: 1px solid rgba(255,255,255,0.1);
  color: #fff; font-size: 12.5px; outline: 0;
}
.vh-mb-alias:focus { border-color: #ff3b30; }
.vh-mb-dom {
  flex: 1; min-width: 0; height: 36px; padding: 0 10px; border-radius: 10px;
  background: #121215; border: 1px solid rgba(255,255,255,0.1);
  color: #e4e4e7; font-size: 12.5px; outline: 0; cursor: pointer;
}
.vh-mb-dom option { background: #1b1b1f; color: #fff; }
.vh-mb-addbtn {
  width: 36px; height: 36px; border-radius: 10px; border: 0; flex-shrink: 0;
  background: #ff3b30; color: #fff; display: grid; place-items: center; cursor: pointer;
  transition: filter .15s, transform .12s;
}
.vh-mb-addbtn svg { width: 17px; height: 17px; }
.vh-mb-addbtn:hover { filter: brightness(1.1); }
.vh-mb-addbtn:active { transform: scale(0.95); }
.vh-mb-empty { padding: 14px 8px; text-align: center; font-size: 12px; color: var(--vh-muted); }
.vh-pop-sep { height: 1px; background: var(--vh-line); margin: 8px 2px; }
.vh-pop-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--vh-muted-2); padding: 0 4px 6px; margin: 0; }
.vh-create { display: flex; flex-direction: column; gap: 6px; }
.vh-create-row {
  display: flex; align-items: center; height: 34px; border-radius: 9px;
  background: #151518; border: 1px solid var(--vh-line); overflow: hidden;
}
.vh-create-row:focus-within { border-color: rgba(255,59,48,0.5); }
.vh-create-local { flex: 1 1 auto; min-width: 0; height: 100%; background: transparent; border: 0; outline: 0; color: #fff; font-size: 12px; padding: 0 9px; }
.vh-at { color: var(--vh-muted); font-size: 12px; padding: 0 2px; }
.vh-create-domain {
  flex: 0 1 48%; min-width: 0; height: 100%; background: transparent; border: 0; outline: 0;
  color: #d4d4d8; font-size: 12px; padding: 0 6px; cursor: pointer;
}
.vh-create-domain option { background: #1f1f23; color: #fff; }
.vh-create-actions { display: flex; gap: 6px; }
.vh-btn-primary {
  flex: 1; height: 32px; border-radius: 9px; border: 0; cursor: pointer;
  background: var(--vh-blue); color: #fff; font-size: 12px; font-weight: 700; transition: filter .15s;
}
.vh-btn-primary:hover { filter: brightness(1.1); }
.vh-btn-square {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; cursor: pointer;
  background: #151518; border: 1px solid var(--vh-line); color: #d4d4d8; transition: .15s;
}
.vh-btn-square svg { width: 16px; height: 16px; }
.vh-btn-square:hover { color: #fff; background: var(--vh-side-3); }

/* Search */
.vh-search {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 11px;
  border-radius: 11px; background: #111114; border: 1px solid var(--vh-line);
  cursor: text; transition: border-color .15s;
}
.vh-search:focus-within { border-color: rgba(255,59,48,0.45); }
.vh-search svg { width: 15px; height: 15px; color: var(--vh-muted); }
.vh-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; font-size: 13px; }
.vh-search input::placeholder, .vh-pop-search input::placeholder, .vh-create-local::placeholder { color: var(--vh-muted-2); }

.vh-meta { display: flex; align-items: center; justify-content: space-between; padding: 10px 4px 8px; font-size: 12px; color: var(--vh-muted); }
.vh-meta-actions { display: flex; align-items: center; gap: 2px; }
.vh-text-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 6px; border-radius: 6px;
  background: none; border: 0; color: var(--vh-muted); font-size: 12px; font-weight: 500; cursor: pointer;
}
.vh-text-btn .ic { width: 13px; height: 13px; }
.vh-text-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }
.vh-divider { height: 1px; background: var(--vh-line); margin: 0 -12px; }

/* Mail list */
.vh-msg-list { flex: 1 1 auto; min-height: 0; margin: 0 -12px; padding: 6px 8px 12px; }
.vh-msg {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 12px; cursor: pointer;
  border: 1px solid transparent; transition: background .12s; margin-bottom: 3px;
}
.vh-msg:hover { background: rgba(255,255,255,0.04); }
.vh-msg.is-active { background: #26262b; border-color: rgba(255,255,255,0.07); }
.vh-msg-av {
  width: 34px; height: 34px; border-radius: 999px; flex-shrink: 0;
  display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 700;
}
.vh-msg-body { flex: 1; min-width: 0; }
.vh-msg-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 1px; }
.vh-msg-from { font-size: 13px; font-weight: 700; color: #fff; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vh-msg-time { font-size: 11px; color: var(--vh-muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.vh-msg-subj { font-size: 12.5px; font-weight: 500; color: #e4e4e7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vh-msg-prev {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11.5px; line-height: 1.35; color: var(--vh-muted); margin-top: 2px;
}
.vh-msg-to { font-family: var(--mono); font-size: 10.5px; color: rgba(255,59,48,0.75); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vh-list-empty { padding: 32px 14px; text-align: center; font-size: 12px; line-height: 1.5; color: var(--vh-muted); }

/* ---------- Main area ---------- */
.vh-main { flex: 1 1 auto; min-width: 0; min-height: 0; background: #000; display: flex; flex-direction: column; position: relative; }
.vh-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 32px;
}
.vh-empty.hidden { display: none; }
.vh-empty-tile {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: #161618; border: 1px solid rgba(255,255,255,0.08); color: var(--vh-blue); margin-bottom: 16px;
}
.vh-empty-tile svg { width: 19px; height: 19px; }
.vh-empty-title { font-size: 18px; font-weight: 700; color: #fff; margin: 0 0 6px; letter-spacing: -0.01em; }
.vh-empty-text { max-width: 420px; font-size: 13px; line-height: 1.6; color: var(--vh-muted); margin: 0; }
.vh-pill {
  display: inline-block; font-family: var(--mono); font-size: 12px; color: #e4e4e7;
  background: #161618; border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; padding: 1px 6px;
  word-break: break-all;
}
.vh-empty .vh-ghost-btn { margin-top: 16px; }

.vh-ghost-btn, .vh-danger-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 9px;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: .15s; white-space: nowrap;
}
.vh-ghost-btn { background: #141416; border: 1px solid rgba(255,255,255,0.09); color: #d4d4d8; }
.vh-ghost-btn:hover { color: #fff; background: #1c1c1f; }
.vh-danger-btn { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.vh-danger-btn:hover { background: rgba(239,68,68,0.16); }

.vh-reader { flex: 1; min-height: 0; flex-direction: column; }
.vh-reader:not(.hidden) { display: flex; }
.vh-reader-head { flex-shrink: 0; padding: 18px 24px 12px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.vh-reader-top { display: flex; align-items: flex-start; gap: 10px; }
.vh-reader-subject { flex: 1; min-width: 0; margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; color: #fff; word-break: break-word; }
.vh-reader-actions { display: flex; gap: 8px; flex-shrink: 0; }
.vh-sq.is-danger-sq { color: #f87171; background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.26); }
.vh-sq.is-danger-sq:hover { color: #fecaca; background: rgba(239,68,68,0.2); }
.vh-meta-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 12px;
}
@media (max-width: 640px) {
  .vh-meta-cards { grid-template-columns: 1fr; }
}
.vh-meta-card {
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
  padding: 10px 13px; border-radius: 12px;
  background: #111114; border: 1px solid rgba(255,255,255,0.07);
}
.vh-meta-k { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #71717a; }
.vh-meta-v { font-size: 12.5px; font-weight: 500; color: #e4e4e7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vh-back {
  display: none; width: 30px; height: 30px; border-radius: 9px; place-items: center; flex-shrink: 0;
  background: #141416; border: 1px solid rgba(255,255,255,0.09); color: #d4d4d8; cursor: pointer;
}
.vh-back svg { width: 16px; height: 16px; }
.vh-reader-meta { display: grid; gap: 3px; margin: 12px 0 12px; font-size: 12px; }
.vh-reader-meta > div { display: flex; gap: 10px; min-width: 0; }
.vh-reader-meta dt { width: 40px; flex-shrink: 0; color: #71717a; }
.vh-reader-meta dd { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d4d4d8; }
.vh-reader-meta dd.vh-accent { color: #ff8a80; }
.vh-reader-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vh-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: #111113; border: 1px solid rgba(255,255,255,0.08); }
.vh-seg button {
  height: 24px; padding: 0 11px; border-radius: 7px; border: 0; background: transparent;
  color: #8b8b94; font-size: 12px; font-weight: 600; cursor: pointer;
}
.vh-seg button:hover { color: #fff; }
.vh-seg button.is-active { background: #26262b; color: #fff; }
.vh-reader-body { flex: 1 1 auto; min-height: 0; padding: 20px 24px 28px; }
.vh-html-body { font-size: 14px; line-height: 1.65; color: #e4e4e7; word-break: break-word; }
.vh-html-body.hidden { display: none; }
.vh-html-body a { color: #ff8a80; }
.vh-html-body img { max-width: 100%; height: auto; }
.vh-pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 12px; line-height: 1.6; color: #d4d4d8; }
.vh-json-card {
  background: #0d0d10;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
}
.vh-json-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.vh-json-lang { font-size: 11.5px; font-weight: 600; color: #71717a; }
.vh-json {
  color: #a1a1aa;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 16px 18px;
  font-size: 12.5px;
  line-height: 1.65;
}
.json-k { color: #9cdcfe; }
.json-s { color: #ce9178; }
.json-n { color: #b5cea8; }
.json-b { color: #569cd6; }
.json-null { color: #569cd6; }
.json-p { color: #d4d4d4; }
.json-br-0 { color: #ffd700; font-weight: 600; }
.json-br-1 { color: #da70d6; font-weight: 600; }
.json-br-2 { color: #179fff; font-weight: 600; }

/* ---------- Account modal ---------- */
.vh-backdrop {
  position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(0,0,0,0.62); backdrop-filter: blur(3px);
}
.vh-backdrop.hidden { display: none; }
.vh-acc {
  width: min(400px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto;
  background: #1c1c1f; border: 1px solid rgba(255,255,255,0.08); border-radius: 22px;
  padding: 16px; box-shadow: 0 30px 80px rgba(0,0,0,0.7); color: #f4f4f5;
  display: flex; flex-direction: column; gap: 8px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.16) transparent;
}
.vh-acc svg { flex-shrink: 0; }
.vh-acc-head { display: flex; align-items: center; gap: 12px; padding: 2px 2px 6px; }
.vh-avatar {
  width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, #ff6961, #d70015); color: #fff; font-weight: 800; font-size: 17px;
  box-shadow: 0 6px 18px rgba(215,0,21,0.35); text-transform: uppercase;
}
.vh-acc-id { flex: 1; min-width: 0; }
.vh-acc-name { font-size: 16px; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vh-acc-since { font-size: 12px; color: #8b8b94; margin-top: 1px; }
.vh-acc-since.hidden { display: none; }
.vh-close {
  width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; cursor: pointer;
  background: #27272b; border: 1px solid rgba(255,255,255,0.07); color: #a1a1aa; transition: .15s;
}
.vh-close svg { width: 15px; height: 15px; }
.vh-close:hover { color: #fff; background: #303035; }
.vh-acc-card { background: #141416; border: 1px solid rgba(255,255,255,0.06); border-radius: 15px; padding: 12px; }
.vh-acc-row { display: flex; align-items: center; gap: 11px; }
.vh-tile {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
  background: #222226; border: 1px solid rgba(255,255,255,0.06); color: #d4d4d8;
}
.vh-tile svg { width: 16px; height: 16px; }
.vh-acc-col { flex: 1; min-width: 0; }
.vh-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #71717a; }
.vh-value { font-size: 14px; font-weight: 600; color: #fff; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vh-sq {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
  background: #222226; border: 1px solid rgba(255,255,255,0.07); color: #d4d4d8; transition: .15s;
}
.vh-sq:hover { color: #fff; background: #2b2b30; }
.vh-sq.is-copied span { display: none; }
.vh-status { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #e4e4e7; margin-top: 2px; }
.vh-dot { width: 7px; height: 7px; border-radius: 999px; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.18); }
.vh-dot.is-off { background: #71717a; box-shadow: 0 0 0 3px rgba(113,113,122,0.18); }
.vh-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; cursor: pointer; }
.vh-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.vh-switch-track { position: absolute; inset: 0; border-radius: 999px; background: #3f3f46; transition: .2s; }
.vh-switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.4); transition: transform .2s;
}
.vh-switch input:checked + .vh-switch-track { background: #22c55e; }
.vh-switch input:checked + .vh-switch-track::after { transform: translateX(18px); }
.vh-switch input:focus-visible + .vh-switch-track { outline: 2px solid rgba(255,59,48,0.6); outline-offset: 2px; }
.vh-keybox {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #0c0c0e; border: 1px solid rgba(255,255,255,0.07);
  font-size: 12.5px; color: #d4d4d8; word-break: break-all; user-select: all;
}
.vh-keybox.is-off { opacity: .45; }
.vh-key-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.vh-key-btn {
  height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: #222226; border: 1px solid rgba(255,255,255,0.07); color: #e4e4e7; font-size: 12px; font-weight: 600; cursor: pointer; transition: .15s;
}
.vh-key-btn:hover { background: #2b2b30; color: #fff; }
.vh-hint { display: flex; align-items: center; gap: 6px; margin: 10px 2px 0; font-size: 11.5px; color: #71717a; }
.vh-hint svg { width: 13px; height: 13px; }
.vh-hint code { color: #a1a1aa; font-size: 11px; }
.vh-acc-link {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 12px; border-radius: 15px; text-align: left;
  background: #141416; border: 1px solid rgba(255,255,255,0.06); color: #f4f4f5; cursor: pointer; text-decoration: none;
  font-size: 13.5px; font-weight: 600; transition: background .15s;
}
.vh-acc-link.hidden { display: none; }
.vh-acc-link:hover { background: #1a1a1d; }
.vh-acc-link-text { flex: 1; min-width: 0; }
.vh-acc-link-end { width: 15px; height: 15px; color: #71717a; }
.vh-acc-logout {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 42px; border-radius: 15px;
  background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.28); color: #f87171;
  font-size: 13.5px; font-weight: 700; cursor: pointer; transition: background .15s;
}
.vh-acc-logout svg { width: 16px; height: 16px; }
.vh-acc-logout:hover { background: rgba(239,68,68,0.15); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .vh-side { width: 100%; flex: 1 1 auto; border-right: 0; }
  .vh-main { position: fixed; inset: 0; z-index: 40; display: none; }
  .vh-inbox.reader-open .vh-main { display: flex; }
  .vh-back { display: grid; }
  .vh-reader-head { padding: 14px 14px 10px; }
  .vh-reader-body { padding: 16px 14px 24px; }
  .vh-reader-actions .vh-ghost-btn span, .vh-reader-actions .vh-danger-btn span { display: none; }
  .vh-reader-actions .vh-ghost-btn, .vh-reader-actions .vh-danger-btn { padding: 0 8px; }
}

/* Fixed sidebar blocks do not shrink (only the list scrolls) */
.vh-side > *:not(.vh-msg-list) { flex-shrink: 0; }

/* =====================================================================
   HARMONIZATION — every page in the inbox style (vanityhunter)
   ===================================================================== */
:root {
  --bg: #000000;
  --bg-elevated: #141416;
  --bg-card: #1c1c1f;
  --bg-hover: #232327;
  --border: rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.12);
  --text: #f4f4f5;
  --muted: #8b8b94;
  --muted-2: #5f5f68;
  --accent: #ff3b30;
  --accent-2: #d70015;
  --accent-soft: rgba(255,59,48,0.12);
  --accent-border: rgba(255,59,48,0.35);
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px rgba(0,0,0,0.45);
}
html, body { background: #000 !important; }
body { color: var(--text); }
.app-shell::before, .app-shell::after { display: none !important; }

/* Guest topbar (iOS Liquid Glass floating pill) */
.topbar {
  width: min(980px, calc(100% - 2rem));
  height: 52px;
  margin: 14px auto 0;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(24, 24, 28, 0.56);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 14px 40px rgba(0,0,0,0.48), inset 0 1px 0 rgba(255,255,255,0.09);
  top: 14px;
}
.topbar-link {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: 999px;
  background: transparent; border: 1px solid transparent;
  color: #a1a1aa; font-size: 13px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: color .15s, background .15s, border-color .15s, transform .12s;
}
.topbar-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.1);
}
.topbar-link:active { transform: scale(0.96); }
.topbar-link.is-signin { color: #e4e4e7; }

/* Auth overlay modal (60fps smooth dim + card glass) */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
  animation: fadeBackdrop .15s ease-out;
}
.auth-card {
  border-radius: 26px;
  background: rgba(24, 24, 28, 0.88);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 28px 70px rgba(0,0,0,0.75), inset 0 1px 0 rgba(255,255,255,0.09);
  animation: modalIn .16s cubic-bezier(.22,1,.36,1);
  will-change: transform, opacity;
}
.auth-close { position: absolute; top: 14px; right: 14px; }
.auth-seg {
  display: flex; padding: 4px; border-radius: 999px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
}
.auth-seg-btn {
  flex: 1; height: 34px; border-radius: 999px; border: 0; background: transparent;
  color: #a1a1aa; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s;
}
.auth-seg-btn:hover { color: #fff; }
.auth-seg-btn.is-active {
  background: rgba(255,255,255,0.22);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}
.auth-input { border-radius: 12px !important; height: 42px; background: rgba(14,14,17,0.85) !important; }
.auth-submit-btn {
  width: 100%; height: 42px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(215, 0, 21, 0.34);
  border: 1px solid rgba(255, 59, 48, 0.45);
  color: #fda4af; font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: background .15s, color .15s, transform .12s;
}
.auth-submit-btn:hover { background: rgba(215, 0, 21, 0.5); color: #fff; }
.auth-submit-btn:active { transform: scale(0.98); }
@keyframes fadeBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

body.frame-active .topbar { display: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); box-shadow: none; color: var(--accent);
}
.brand-mark .ic { width: 17px; height: 17px; }
.brand-name { font-weight: 700; color: #fff; font-size: 14.5px; letter-spacing: -0.02em; }
.brand-muted { color: var(--muted); font-weight: 600; }
.brand-tag { color: var(--muted-2); }

/* Buttons */
.btn { border-radius: 10px; }
.btn-sm { border-radius: 9px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: none; border-color: transparent; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { background: #141416; border-color: rgba(255,255,255,0.09); color: #d4d4d8; }
.btn-ghost:hover { background: #1c1c1f; color: #fff; border-color: rgba(255,255,255,0.14); }
.btn-danger { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.3); color: #fca5a5; }
.btn-danger:hover { background: rgba(239,68,68,0.16); }
.btn-success { background: rgba(34,197,94,0.08); border-color: rgba(34,197,94,0.3); color: #86efac; }

/* Cards, inputs, badges */
.card { background: var(--bg-card); border: 1px solid rgba(255,255,255,0.07); border-radius: 18px; box-shadow: none; }
.eyebrow, .label { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #71717a; }
.icon-tile { width: 34px; height: 34px; border-radius: 10px; background: #222226; border: 1px solid rgba(255,255,255,0.06); color: var(--accent); }
.input { background: #111114; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; color: #fff; }
.input::placeholder { color: var(--muted-2); }
.input:focus { border-color: rgba(255,59,48,0.5); box-shadow: 0 0 0 3px rgba(255,59,48,0.12); }
.input-accent { border-color: rgba(255,59,48,0.28); }
select.input option { background: #1c1c1f; color: #fff; }
.tag { background: #141416; border-color: rgba(255,255,255,0.08); color: var(--muted); }
.codeblock { background: #0c0c0e; border: 1px solid rgba(255,255,255,0.07); color: #ffb4ab; border-radius: 12px; }
.gradient-text { background: linear-gradient(135deg, #ffffff 10%, #ff8a80 55%, #ff3b30); -webkit-background-clip: text; background-clip: text; color: transparent; }
.table th { color: #71717a; background: #161618; }
.table th, .table td { border-bottom-color: rgba(255,255,255,0.06); }
.table tbody tr:hover { background: rgba(255,255,255,0.025); }
.range-btn { background: #111113; border-color: rgba(255,255,255,0.08); color: var(--muted); }
.range-btn:hover { color: #fff; }
.range-btn.is-active { background: #26262b; border-color: rgba(255,255,255,0.1); color: #fff; }
.is-copied { color: #ff8a80 !important; border-color: rgba(255,59,48,0.35) !important; background: rgba(255,59,48,0.12) !important; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); }
* { scrollbar-color: rgba(255,255,255,0.16) transparent; }

/* Generic modals (key created, shortcuts) */
.modal-card {
  background: #1c1c1f; border: 1px solid rgba(255,255,255,0.08); border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7); padding: 20px;
  scrollbar-width: thin;
}
#apiKeyOnceModal, #apiDocsModal { background: rgba(0,0,0,0.62) !important; backdrop-filter: blur(3px); }
#oneTimeApiKeyBox { background: #0c0c0e !important; border-color: rgba(255,59,48,0.35) !important; color: #ffb4ab !important; }

/* Toasts */
.toast-ok, .toast-err { border-radius: 14px; background: #1c1c1f; box-shadow: 0 20px 50px rgba(0,0,0,0.6); }
.toast-ok { border: 1px solid rgba(255,255,255,0.1); color: #e4e4e7; }
.toast-err { border: 1px solid rgba(239,68,68,0.35); color: #fca5a5; background: #1f1416; }

/* Landing / auth (guests) */
.hero .tag {
  background: rgba(28,28,32,0.75);
  border-color: rgba(255,255,255,0.1);
}
.feature-grid .card {
  padding: 1.25rem;
  background: rgba(24,24,28,0.82);
  border-color: rgba(255,255,255,0.09);
  box-shadow: 0 12px 32px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.07);
}
#footerContainer { border-top-color: rgba(255,255,255,0.06); color: var(--muted-2); }

/* ---------- App frame: admin / profile ---------- */
#appFrame:not(.hidden) { display: flex; }
.vh-frame {
  --vh-side: #18181b; --vh-side-2: #222226; --vh-side-3: #2a2a2f; --vh-line: rgba(255,255,255,0.07);
  --vh-muted: #8b8b94; --vh-muted-2: #5f5f68; --vh-blue: #ff3b30;
  width: 100%; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; background: #000; color: #f4f4f5;
}
.vh-frame-side { padding-bottom: 0; }
.vh-side-scroll { flex: 1 1 auto; min-height: 0; margin: 0 -12px; padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.vh-nav-label { margin: 14px 4px 6px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--vh-muted-2); }
.vh-nav-label:first-child { margin-top: 4px; }
.vh-nav, .vh-frame .adm-nav, .vh-frame .prof-nav {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px;
  border-radius: 10px; border: 1px solid transparent; background: transparent;
  color: #a1a1aa; font-size: 13px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer;
  transition: background .12s, color .12s;
}
.vh-nav .ic, .vh-frame .adm-nav .ic, .vh-frame .prof-nav .ic { width: 16px; height: 16px; color: #71717a; }
.vh-nav span, .vh-frame .adm-nav span, .vh-frame .prof-nav span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vh-nav-end { width: 13px; height: 13px; color: #5f5f68; }
.vh-nav:hover, .vh-frame .adm-nav:hover, .vh-frame .prof-nav:hover { background: rgba(255,255,255,0.05); color: #fff; }
.vh-nav.is-active, .vh-frame .adm-nav.is-active, .vh-frame .prof-nav.is-active {
  background: #26262b; border-color: rgba(255,255,255,0.06); color: #fff;
}
.vh-nav.is-active .ic, .vh-frame .adm-nav.is-active .ic, .vh-frame .prof-nav.is-active .ic { color: var(--vh-blue); }
.vh-frame #admCatBtn_dashboard, .vh-frame #admCatBtn_domaine, .vh-frame #admCatBtn_users,
.vh-frame #admCatBtn_settings, .vh-frame #admCatBtn_tutos { border-radius: 10px !important; }
.vh-subnav { display: flex; flex-direction: column; gap: 2px; }
.vh-subnav.hidden { display: none !important; }
.vh-side-foot {
  display: flex; align-items: center; gap: 10px; margin: 0 -12px; padding: 12px 14px;
  border-top: 1px solid var(--vh-line);
}
.vh-avatar-sm { width: 28px; height: 28px; font-size: 12px; box-shadow: none; }
.vh-side-user { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: #e4e4e7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vh-mini-btn {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: #71717a; transition: .12s;
}
.vh-mini-btn svg { width: 15px; height: 15px; }
.vh-mini-btn:hover { color: #f87171; background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.25); }

.vh-frame-main { flex: 1 1 auto; min-width: 0; min-height: 0; background: #000; }
.vh-page { max-width: 1180px; margin: 0 auto; padding: 28px 32px 48px; }
.vh-page > .flex:first-child h2, .vh-page > .flex:first-child h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.vh-content { min-width: 0; }
.vh-frame .card { background: #1c1c1f; }
.vh-frame .card .bg-bgElevated, .vh-frame .card .bg-bgMain { background: #141416; }

@media (max-width: 760px) {
  .vh-frame { flex-direction: column; height: auto; min-height: 100dvh; overflow: visible; }
  .vh-frame-side { width: 100%; flex: 0 0 auto; border-right: 0; border-bottom: 1px solid var(--vh-line); padding-bottom: 8px; }
  .vh-side-scroll { flex-direction: row; flex-wrap: wrap; overflow: visible; gap: 4px; }
  .vh-side-scroll .vh-nav-label { width: 100%; margin: 8px 4px 2px; }
  .vh-side-scroll .vh-nav, .vh-frame .adm-nav, .vh-frame .prof-nav { width: auto; flex: 0 0 auto; }
  .vh-subnav { flex-direction: row; flex-wrap: wrap; gap: 4px; width: 100%; }
  .vh-side-foot { display: none; }
  .vh-frame-main { overflow: visible; }
  .vh-page { padding: 20px 14px 40px; }
}
.vh-side > .vh-side-scroll { flex-shrink: 1; }
body.frame-active #footerContainer,
#appFrame:not(.hidden) ~ #footerContainer { display: none; }
@media (min-width: 761px) { body.frame-active { overflow: hidden; } }
.vh-side-scroll > * { flex-shrink: 0; }

/* =====================================================================
   New UI components (1-click random, OTP banner, attachments, iframe)
   & smooth animations
   ===================================================================== */
.vh-quick-random {
  width: 100%; height: 36px; margin-bottom: 10px; padding: 0 11px;
  display: flex; align-items: center; gap: 8px;
  border-radius: 11px;
  background: rgba(255,59,48,0.1);
  border: 1px solid rgba(255,59,48,0.28);
  color: #fecdd3; font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.vh-quick-random:hover {
  background: rgba(255,59,48,0.18);
  border-color: rgba(255,59,48,0.5);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255,59,48,0.16);
}
.vh-quick-random:active { transform: scale(0.98); }
.vh-quick-random:disabled { opacity: 0.55; cursor: wait; }
.vh-dice-ic { width: 15px; height: 15px; color: var(--vh-blue); transition: transform .28s cubic-bezier(.34,1.56,.64,1); }
.vh-quick-random:hover .vh-dice-ic,
.vh-accent-btn:hover .vh-dice-ic { transform: rotate(90deg) scale(1.08); }
.vh-quick-label { white-space: nowrap; }
.vh-quick-dom { margin-left: auto; font-size: 11px; color: #ff8a80; opacity: 0.85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vh-empty-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; }
.vh-empty-actions .vh-ghost-btn { margin-top: 0; }
.vh-accent-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 9px;
  background: rgba(255,59,48,0.14); border: 1px solid rgba(255,59,48,0.38);
  color: #ffe4e6; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.vh-accent-btn:hover { background: rgba(255,59,48,0.24); border-color: rgba(255,59,48,0.58); color: #fff; }
.vh-accent-btn:active { transform: scale(0.97); }

/* OTP Banner */
.vh-otp-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px; padding: 10px 14px; border-radius: 12px;
  background: linear-gradient(90deg, rgba(255,59,48,0.14), rgba(215,0,21,0.06));
  border: 1px solid rgba(255,59,48,0.35);
  animation: readerSlideIn .22s ease-out;
}
.vh-otp-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vh-otp-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #ff8a80; }
.vh-otp-code { font-size: 16px; font-weight: 700; letter-spacing: .12em; color: #fff; background: rgba(0,0,0,0.45); padding: 3px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); }
.vh-otp-copy {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px;
  background: var(--vh-blue); border: 0; color: #fff; font-size: 11.5px; font-weight: 700; cursor: pointer;
  transition: filter .15s, transform .12s;
}
.vh-otp-copy:hover { filter: brightness(1.1); }
.vh-otp-copy:active { transform: scale(0.96); }

/* Attachments Bar */
.vh-att-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.vh-att-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border-radius: 9px;
  background: #141418; border: 1px solid rgba(255,255,255,0.1); color: #e4e4e7;
  font-size: 12px; font-weight: 500; text-decoration: none;
  transition: background .15s, border-color .15s, transform .12s;
}
.vh-att-btn:hover { background: #1e1e24; border-color: rgba(255,59,48,0.4); color: #fff; }
.vh-att-size { font-family: var(--mono); font-size: 10.5px; color: var(--vh-muted); }

/* Sandboxed HTML iframe */
.vh-html-frame {
  width: 100%;
  height: 100%;
  min-height: 460px;
  border: 0;
  border-radius: 10px;
  background: transparent;
}
.vh-html-frame.hidden { display: none; }

/* Animations */
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes msgFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes readerSlideIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes popIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.toast-ok, .toast-err { animation: toastSlideIn .22s cubic-bezier(.22,1,.36,1); }
.vh-msg { transition: background .12s; }
.vh-msg:active { transform: scale(0.99); }
.vh-reader:not(.hidden) { animation: readerSlideIn .2s ease-out; }
.vh-popover:not(.hidden) { animation: popIn .16s cubic-bezier(.22,1,.36,1); }
.vh-acc, .modal-card { animation: modalIn .18s cubic-bezier(.22,1,.36,1); }
.btn:active, .vh-ghost-btn:active, .vh-danger-btn:active { transform: scale(0.97); }

/* Slide to verify captcha */
.vh-slide-wrap { user-select: none; -webkit-user-select: none; }
.vh-slide-track {
  position: relative;
  height: 46px;
  border-radius: 12px;
  background: #141417;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, background .25s;
}
.vh-slide-track.is-dragging { border-color: rgba(255,59,48,0.5); }
.vh-slide-track.is-verified {
  background: rgba(34,197,94,0.16);
  border-color: rgba(34,197,94,0.45);
}
.vh-slide-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0; width: 0;
  background: linear-gradient(90deg, rgba(153,27,27,0.85), rgba(215,0,21,0.6));
  pointer-events: none;
  transition: background .2s;
}
.vh-slide-track.is-verified .vh-slide-fill {
  background: rgba(34,197,94,0.18);
  transition: width .2s ease;
}
.vh-slide-label {
  position: relative; z-index: 1;
  font-size: 13px; font-weight: 600; color: #9ca3af;
  pointer-events: none;
}
.vh-slide-check {
  position: absolute; right: 14px; z-index: 1;
  width: 16px; height: 16px; color: #52525b;
  display: grid; place-items: center; pointer-events: none;
}
.vh-slide-track.is-verified .vh-slide-check { opacity: 0; }
.vh-slide-handle {
  position: absolute; left: 4px; top: 4px; bottom: 4px; width: 38px; z-index: 2;
  border-radius: 9px;
  background: #2c2c31;
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  display: grid; place-items: center;
  cursor: grab;
  touch-action: none;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.vh-slide-handle:hover { background: #37373e; }
.vh-slide-handle:active { cursor: grabbing; }
.vh-slide-handle svg { width: 17px; height: 17px; }
.vh-slide-done-ic { display: none; }
.vh-slide-track.is-verified .vh-slide-handle {
  background: #22c55e;
  border-color: #4ade80;
  box-shadow: 0 0 18px rgba(34,197,94,0.45);
  cursor: default;
}
.vh-slide-track.is-verified .vh-slide-arrow { display: none; }
.vh-slide-track.is-verified .vh-slide-done-ic { display: block; color: #fff; }
.vh-slide-hint {
  margin: 6px 2px 0;
  font-size: 11.5px;
  color: #71717a;
  transition: color .2s;
}
.vh-slide-hint.is-verified { color: #4ade80; font-weight: 500; }
@keyframes slideShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.vh-slide-track.is-shake { animation: slideShake .35s ease; border-color: rgba(248,113,113,0.6); }

/* iOS Top-Center Pill Toast */
.ios-toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 11px;
  min-width: 260px; max-width: 100%;
  padding: 9px 14px 9px 10px;
  border-radius: 999px;
  background: rgba(34, 34, 38, 0.92);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.08);
  animation: iosToastIn .22s cubic-bezier(.32,.72,0,1);
}
@keyframes iosToastIn {
  from { opacity: 0; transform: translateY(-14px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.ios-toast-ic {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
}
.ios-toast-ic svg { width: 16px; height: 16px; }
.ios-toast.is-ok .ios-toast-ic { background: rgba(34,197,94,0.16); border: 1px solid rgba(34,197,94,0.35); color: #4ade80; }
.ios-toast.is-err .ios-toast-ic { background: rgba(239,68,68,0.16); border: 1px solid rgba(239,68,68,0.35); color: #f87171; }
.ios-toast-body { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.ios-toast-k { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8b8b94; }
.ios-toast-v { font-size: 13px; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ios-toast-x {
  width: 24px; height: 24px; border-radius: 999px; border: 0; background: transparent;
  color: #71717a; display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
  transition: color .12s, background .12s;
}
.ios-toast-x svg { width: 13px; height: 13px; }
.ios-toast-x:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* iOS Confirm Modal */
.vh-confirm {
  width: min(360px, 100%);
  background: rgba(28, 28, 32, 0.94);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 26px;
  padding: 20px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.08);
  animation: modalIn .16s cubic-bezier(.32,.72,0,1);
}
.vh-confirm-icon {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 14px;
  background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.32); color: #f87171;
}
.vh-confirm-icon svg { width: 18px; height: 18px; }
.vh-confirm-title { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: #fff; }
.vh-confirm-body { margin: 0 0 18px; font-size: 12.5px; line-height: 1.5; color: #a1a1aa; }
.vh-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vh-confirm-cancel, .vh-confirm-ok {
  height: 38px; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer; border: 0;
  transition: filter .15s, transform .12s;
}
.vh-confirm-cancel { background: rgba(255,255,255,0.1); color: #f4f4f5; }
.vh-confirm-cancel:hover { background: rgba(255,255,255,0.16); }
.vh-confirm-ok { background: #ef4444; color: #fff; }
.vh-confirm-ok:hover { filter: brightness(1.1); }
.vh-confirm-cancel:active, .vh-confirm-ok:active { transform: scale(0.97); }

/* Custom iOS domain picker */
.vh-dom-picker { position: relative; flex: 1; min-width: 0; }
.vh-mb-dom {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 999px;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  background: #121215; border: 1px solid rgba(255,255,255,0.1);
  color: #e4e4e7; font-size: 12.5px; outline: 0; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.vh-mb-dom:hover { background: #18181c; border-color: rgba(255,255,255,0.18); }
.vh-mb-dom span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vh-dom-chev { width: 14px; height: 14px; color: #71717a; flex-shrink: 0; transition: transform .18s; }
.vh-mb-dom[aria-expanded="true"] .vh-dom-chev { transform: rotate(180deg); }
.vh-dom-menu {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 40;
  background: rgba(32, 32, 37, 0.94);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 18px; padding: 6px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.7);
  display: flex; flex-direction: column; gap: 2px;
  animation: popIn .15s cubic-bezier(.32,.72,0,1);
}
.vh-dom-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 9px 11px; border-radius: 12px; border: 0;
  background: transparent; color: #d4d4d8; font-size: 12.5px; text-align: left; cursor: pointer;
  transition: background .12s, color .12s;
}
.vh-dom-opt:hover { background: rgba(255,255,255,0.08); color: #fff; }
.vh-dom-opt.is-active { background: rgba(255,255,255,0.12); color: #fff; font-weight: 600; }
.vh-dom-tick { width: 14px; height: 14px; color: #a1a1aa; flex-shrink: 0; }

/* Global iOS pill & squircle polish */
.btn { border-radius: 999px !important; transition: transform .14s cubic-bezier(.32,.72,0,1), filter .15s, background .15s; }
.btn-sm { border-radius: 999px !important; }
.card { border-radius: 22px !important; }
.input { border-radius: 14px !important; }
.codeblock, #oneTimeApiKeyBox { border-radius: 18px !important; }
.toast-ok, .toast-err { border-radius: 999px !important; padding: 0.7rem 1.15rem !important; }
.vh-picker { border-radius: 999px !important; }
.vh-quick-random { border-radius: 999px !important; }
.vh-search { border-radius: 999px !important; }
.vh-mb-msearch { border-radius: 999px !important; }
.vh-mb-alias { border-radius: 999px !important; padding: 0 14px !important; height: 38px !important; }
.vh-mb-addbtn { border-radius: 999px !important; width: 38px !important; height: 38px !important; }
.vh-mb-modal { border-radius: 26px !important; }
.vh-mb-item { border-radius: 16px !important; }
.vh-msg { border-radius: 16px !important; }
.vh-meta-card { border-radius: 16px !important; }
.vh-seg, .vh-seg button { border-radius: 999px !important; }
.vh-ghost-btn, .vh-danger-btn, .vh-accent-btn { border-radius: 999px !important; }
.vh-sq, .vh-mini, .vh-back { border-radius: 999px !important; }
.vh-otp-banner { border-radius: 18px !important; }
.vh-otp-copy, .vh-att-btn { border-radius: 999px !important; }
.vh-json-card { border-radius: 18px !important; }
.vh-acc, .modal-card { border-radius: 26px !important; }
.vh-acc-card, .vh-acc-link, .vh-acc-logout { border-radius: 18px !important; }
.vh-slide-track, .vh-slide-handle { border-radius: 999px !important; }
.vh-nav, .vh-frame .adm-nav, .vh-frame .prof-nav { border-radius: 999px !important; }
