/* ═══════════════════════════════════════════════════════════════════════
   AutoReply AI — web app
   Same design language as the landing page: identical tokens, type and
   motion, so moving from autoreplyai.in into /app feels like one site.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Tokens (mirror of index.html) ──────────────────────────────────── */
:root {
  --paper: #F2F1EE;
  --surface: #FAFAF8;
  --ink: #101010;
  --muted: #6F6F69;
  --line: #E0DFDA;
  --black: #0C0C0C;
  --wa: #25D366; --tg: #229ED9; --ig: #E1306C; --em: #EA4335;
  --danger: #C4362F;
  --font-display: 'Clash Display', 'Satoshi', sans-serif;
  --font-body: 'Satoshi', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.5, 1);
  --pad-x: clamp(24px, 5vw, 72px);
  --nav-h: 72px;
  --side-w: 236px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
::selection { background: var(--ink); color: var(--paper); }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

/* Film grain — the landing page's signature texture. */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 2000;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.02 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Custom cursor ──────────────────────────────────────────────────── */
@media (hover: hover) and (pointer: fine) {
  .cursor-dot, .cursor-ring {
    position: fixed; top: 0; left: 0;
    pointer-events: none; z-index: 3000; border-radius: 50%;
    mix-blend-mode: difference;
  }
  .cursor-dot { width: 8px; height: 8px; background: #fff; transition: transform .18s var(--ease); }
  .cursor-ring { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.7); transition: transform .3s var(--ease); }
  .cursor-hover .cursor-dot { transform: scale(0.5); }
  .cursor-hover .cursor-ring { transform: scale(1.5); }
}
@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ── Nav (identical to landing) ─────────────────────────────────────────
   Scoped to #nav-host: the sidebar uses semantic <nav> elements too, and a
   bare `nav` selector would drag them up here. */
#nav-host nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad-x);
  height: var(--nav-h);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  font-family: var(--font-display); font-weight: 600; font-size: 19px;
  letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 9px;
}
.logo-mark { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); position: relative; }
.logo-mark::after { content:''; position:absolute; inset:-4px; border:1px solid var(--ink); border-radius:50%; opacity:.25; animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0%{ transform: scale(.6); opacity:.4 } 80%,100%{ transform: scale(1.4); opacity:0 } }

.nav-links { display: flex; gap: 30px; list-style: none; align-items: center; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--muted);
  transition: color .2s; position: relative; padding: 24px 0;
  display: inline-block;
}
.nav-links a:hover { color: var(--ink); }
/* Active in-app destination: the underline that tells you where you are. */
.nav-links a.on { color: var(--ink); font-weight: 700; }
.nav-links a.on::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 22px;
  height: 1.5px; background: var(--ink);
  animation: underline .4s var(--ease);
}
@keyframes underline { from { transform: scaleX(0); } to { transform: none; } }
.nav-sep { width: 1px; height: 18px; background: var(--line); }

.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-login { font-size: 14px; font-weight: 500; color: var(--muted); transition: color .2s; white-space: nowrap; cursor: pointer; }
.nav-login:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--black); color: var(--surface);
  border: 1px solid var(--black);
  padding: 13px 26px; border-radius: 100px;
  font-family: var(--font-body); font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), opacity .2s;
  white-space: nowrap;
}
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover { transform: translateY(-1px); }
.btn:hover .arr { transform: translateX(4px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { padding: 9px 18px; font-size: 13px; }
.btn.big { padding: 17px 34px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.busy { opacity: .5; pointer-events: none; }
#nav-host nav .btn { padding: 11px 22px; }

/* Account chip in the nav */
.acct { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 6px; border-radius: 100px; transition: background .2s; }
.acct:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.acct-av { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--surface); display: grid; place-items: center; font-size: 12px; font-weight: 700; object-fit: cover; }
.acct-name { font-size: 13.5px; font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; color: var(--ink); }
.mobile-menu {
  position: fixed; inset: 0; z-index: 200; background: var(--paper);
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--pad-x);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(28px, 7vw, 44px);
  padding: 8px 0; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.mobile-menu a span { font-size: 13px; font-family: var(--font-body); color: var(--muted); font-weight: 500; }
.menu-close { position: absolute; top: 16px; right: var(--pad-x); background: none; border: 0; cursor: pointer; padding: 12px; color: var(--ink); }

/* ── App scaffolding ────────────────────────────────────────────────── */
.app-main { padding: calc(var(--nav-h) + 40px) var(--pad-x) 100px; min-height: 100svh; }
.wrap { max-width: 1180px; margin: 0 auto; }

/* ── Sidebar ────────────────────────────────────────────────────────────
   The product's navigation, distinct from the marketing nav above it. */
.side {
  position: fixed; left: 0; top: var(--nav-h); bottom: 0;
  width: var(--side-w);
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 60%, var(--paper));
  padding: 26px 14px 20px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 90;
  overflow-y: auto;
}
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-bottom { margin-top: auto; }
.side-h {
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); padding: 0 12px; margin-bottom: 10px;
}
.side-bottom .side-h { margin-top: 18px; }
.side-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--muted);
  position: relative;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.side-item:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.side-ic { display: grid; place-items: center; width: 18px; height: 18px; flex: none; }
.side-ic svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.side-l { flex: 1; }
.side-item.on { color: var(--surface); background: var(--ink); font-weight: 700; }
.side-item.on .side-ic svg { stroke: var(--surface); }
.side-badge {
  min-width: 19px; height: 19px; padding: 0 6px; border-radius: 100px;
  background: var(--ink); color: var(--surface);
  font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center;
}
.side-item.on .side-badge { background: var(--surface); color: var(--ink); }
.side-plan {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px; margin-top: 12px;
  border: 1px solid var(--line); border-radius: 12px;
}

/* Content sits beside the sidebar. */
.has-side .app-main { margin-left: var(--side-w); }

/* ── Full-bleed views (chats) ───────────────────────────────────────────
   No page padding, no card: the inbox owns the whole content area. */
.app-main.flush { padding: 0; margin-top: var(--nav-h); min-height: 0; height: calc(100svh - var(--nav-h)); }

.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 34px; height: 1px; background: var(--ink); }

h1.page {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(34px, 4.4vw, 54px); line-height: 1.02; letter-spacing: -0.025em;
}
h1.page .dim { color: var(--muted); }
.page-sub { font-size: 16px; color: var(--muted); margin-top: 12px; max-width: 560px; line-height: 1.6; }

h2.sec {
  font-family: var(--font-display); font-weight: 600;
  font-size: 21px; letter-spacing: -0.015em;
}
h3.card-t { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 38px; }

/* Reveal on mount */
.rv { opacity: 0; transform: translateY(20px); animation: rvIn .7s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes rvIn { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .rv { animation: none; opacity: 1; transform: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Cards ──────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}
.card.pad-lg { padding: clamp(24px, 2.4vw, 34px); }
.card.dark { background: var(--black); color: var(--surface); border-color: var(--black); }
.card.dark .muted { color: rgba(250,250,248,.55); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }

.muted { color: var(--muted); }
.tiny { font-size: 12.5px; }
.hr { height: 1px; background: var(--line); border: 0; }

/* Cursor-reactive 3D tilt */
.tilt { transform-style: preserve-3d; transition: transform .35s var(--ease), box-shadow .35s var(--ease); will-change: transform; }
.tilt.live { transition: transform .08s linear, box-shadow .35s var(--ease); }
.tilt:hover { box-shadow: 0 26px 60px -28px rgba(12,12,12,.35); }

/* ── Stat blocks (hero-stats language) ──────────────────────────────── */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
.stat-cell { padding: 26px 24px; border-right: 1px solid var(--line); position: relative; }
.stat-cell:last-child { border-right: 0; }
.stat-cell b { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.025em; display: block; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-cell span { font-size: 12.5px; color: var(--muted); display: block; margin-top: 10px; }
.stat-cell .delta { font-size: 11.5px; font-weight: 700; margin-top: 6px; display: inline-block; }
.delta.up { color: var(--ink); }
.delta.flat { color: var(--muted); }

/* ── Rows (channel-row language) ────────────────────────────────────── */
.rows { border-top: 1px solid var(--line); }
.row {
  border-bottom: 1px solid var(--line);
  display: grid; align-items: center; gap: 18px;
  padding: 18px 0;
  transition: padding-left .3s var(--ease), background .2s;
}
.row.link { cursor: pointer; }
.row.link:hover { padding-left: 10px; }
.row-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); flex: none; }
.row-ic svg { width: 20px; height: 20px; stroke: var(--ink); fill: none; stroke-width: 1.7; }
.row-t { font-weight: 700; font-size: 14.5px; letter-spacing: -0.01em; }
.row-d { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.row-chev { color: var(--muted); transition: transform .25s var(--ease); }
.row.link:hover .row-chev { transform: translateX(4px); }

/* ── Tags ───────────────────────────────────────────────────────────── */
.tag { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 6px 13px; border-radius: 100px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.tag.live { background: var(--ink); color: var(--surface); }
.tag.live::before { content:''; width: 6px; height: 6px; border-radius: 50%; background: var(--wa); }
.tag.soon { border: 1px solid var(--line); color: var(--muted); }
.tag.warn { border: 1px solid var(--ink); color: var(--ink); }
.tag.off { border: 1px solid var(--line); color: var(--muted); }
.tag.off::before { content:''; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }

/* ── Channel switcher ───────────────────────────────────────────────── */
.chan-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.chan {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 18px; border-radius: 100px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  cursor: pointer; transition: all .25s var(--ease);
}
.chan:hover { border-color: var(--ink); color: var(--ink); }
.chan .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .45; }
.chan.on { background: var(--ink); border-color: var(--ink); color: var(--surface); font-weight: 700; }
.chan.on .dot { opacity: 1; }
.chan.locked { opacity: .55; }
.chan.locked:hover { opacity: 1; }
.chan svg { width: 13px; height: 13px; }

/* ── Toggle (ink, no brand colour) ──────────────────────────────────── */
/* Test-your-AI playground */
.try-log { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; padding: 2px; }
.try-bub { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.try-bub.in { align-self: flex-end; background: var(--ink); color: var(--surface); border-bottom-right-radius: 4px; }
.try-bub.out { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.try-bub.sys { align-self: stretch; max-width: none; text-align: center; background: transparent; border: 1px dashed var(--line); color: var(--muted); font-size: 12.5px; }

/* Off: white track, black knob. On: black track, white knob. Never grey —
   grey reads as "disabled", not "off". */
.tgl { width: 46px; height: 26px; border-radius: 100px; background: var(--surface); border: 1.5px solid var(--ink); position: relative; cursor: pointer; transition: background .3s var(--ease), border-color .3s var(--ease); flex: none; }
.tgl::after { content: ''; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: var(--ink); transition: transform .3s var(--spring), background .3s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.tgl.on { background: var(--ink); border-color: var(--ink); }
.tgl.on::after { transform: translateX(20px); background: var(--surface); }
.tgl[aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* ── Meter ──────────────────────────────────────────────────────────── */
.meter { height: 3px; background: var(--line); border-radius: 100px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ink); border-radius: 100px; transition: width .9s var(--ease); }

/* ── Forms ──────────────────────────────────────────────────────────── */
label.fl { display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.inp, textarea.inp, select.inp {
  width: 100%; background: var(--paper);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; font-family: var(--font-body); font-size: 15px; color: var(--ink);
  transition: border-color .2s;
}
.inp:focus { outline: none; border-color: var(--ink); }
.inp::placeholder { color: var(--muted); }
textarea.inp { resize: vertical; min-height: 96px; line-height: 1.6; }
.field { margin-bottom: 20px; }
.field-hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.field-err { font-size: 12.5px; color: var(--danger); margin-top: 8px; font-weight: 500; display: none; }
.field-err.show { display: block; }
.otp { letter-spacing: .5em; text-align: center; font-size: 22px; font-family: var(--font-display); }

/* ── Empty / state blocks ───────────────────────────────────────────── */
.state { text-align: center; padding: 70px 24px; }
.state svg { width: 30px; height: 30px; stroke: var(--muted); fill: none; stroke-width: 1.5; margin-bottom: 16px; }
.state h3 { font-family: var(--font-display); font-weight: 600; font-size: 19px; margin-bottom: 8px; }
.state p { font-size: 14.5px; color: var(--muted); max-width: 380px; margin: 0 auto; line-height: 1.6; }

/* ── Skeleton ───────────────────────────────────────────────────────── */
.sk { background: linear-gradient(90deg, var(--line) 25%, color-mix(in srgb, var(--line) 40%, var(--paper)) 50%, var(--line) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Toast ──────────────────────────────────────────────────────────── */
.toast-host { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 2500; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  background: var(--black); color: var(--surface);
  padding: 13px 22px; border-radius: 100px; font-size: 13.5px; font-weight: 500;
  box-shadow: 0 18px 40px -12px rgba(12,12,12,.5);
  animation: toastIn .4s var(--spring);
  display: flex; align-items: center; gap: 10px;
}
.toast.err { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ── Modal ──────────────────────────────────────────────────────────── */
.modal-host { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; padding: 24px; background: color-mix(in srgb, var(--black) 45%, transparent); backdrop-filter: blur(6px); animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 30px; max-width: 460px; width: 100%; animation: modalIn .35s var(--spring); }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.modal h3 { font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -0.015em; margin-bottom: 10px; }
.modal p { font-size: 14.5px; color: var(--muted); line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 26px; }
.warn-box { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: 13.5px; line-height: 1.55; margin-bottom: 18px; }

/* ── Boot screen ────────────────────────────────────────────────────── */
#boot { position: fixed; inset: 0; z-index: 900; background: var(--paper); display: grid; place-items: center; transition: opacity .45s var(--ease); }
#boot.hide { opacity: 0; pointer-events: none; }
.boot-in { text-align: center; }
.boot-mark { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); margin: 0 auto 20px; position: relative; }
.boot-mark::after { content:''; position:absolute; inset:-6px; border:1px solid var(--ink); border-radius:50%; opacity:.3; animation: ping 1.6s var(--ease) infinite; }
.boot-in span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ── Login ──────────────────────────────────────────────────────────── */
.login-shell { min-height: 100svh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-art { position: relative; overflow: hidden; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 38px; padding: calc(var(--nav-h) + 40px) var(--pad-x) 120px; }
/* The orb field is anchored to the lower-right corner so it frames the copy
   instead of running through it, and fades out toward the text — the same
   masking idea as the hero. */
#hero-3d {
  position: absolute;
  right: -8%; bottom: -18%;
  width: 74%; height: 62%;
  z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom right, transparent 4%, #000 42%);
  mask-image: linear-gradient(to bottom right, transparent 4%, #000 42%);
}
.login-art-in { position: relative; z-index: 1; max-width: 460px; }
.login-art h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(34px, 3.6vw, 50px); line-height: 1.02; letter-spacing: -0.025em; margin-bottom: 20px; }
.login-art h2 .dim { color: var(--muted); }
.login-art p { font-size: 16px; color: var(--muted); line-height: 1.65; }
.login-pts { list-style: none; border-top: 1px solid var(--line); position: relative; z-index: 1; max-width: 420px; }
.login-pts li { display: flex; gap: 14px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.login-pts b { font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--muted); min-width: 26px; }
.login-panel { display: grid; place-items: center; padding: calc(var(--nav-h) + 30px) clamp(28px, 4vw, 64px) 40px; background: var(--surface); }
.login-box { width: 100%; max-width: 380px; }
.login-box h1 { font-family: var(--font-display); font-weight: 600; font-size: 34px; letter-spacing: -0.025em; margin-bottom: 10px; }
.login-box h1 .dim { color: var(--muted); }
.login-box .lead { font-size: 14.5px; color: var(--muted); line-height: 1.6; margin-bottom: 30px; }
.gbtn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--black); color: var(--surface); border: 1px solid var(--black);
  padding: 16px 24px; border-radius: 100px; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: transform .25s var(--ease), opacity .2s;
}
.gbtn:hover { transform: translateY(-1px); }
.gbtn.busy { opacity: .55; pointer-events: none; }
.gbtn img { width: 19px; height: 19px; background: #fff; border-radius: 50%; padding: 1px; }
.login-terms { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin-top: 22px; text-align: center; }
.login-terms a { text-decoration: underline; text-underline-offset: 2px; }
.tabs { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 100px; padding: 4px; margin-bottom: 26px; }
.tabs button { border: 0; background: none; padding: 8px 20px; border-radius: 100px; font-size: 13.5px; font-weight: 700; color: var(--muted); cursor: pointer; transition: all .25s var(--ease); }
.tabs button.on { background: var(--ink); color: var(--surface); }

/* ── Onboarding ─────────────────────────────────────────────────────── */
.steps { display: flex; gap: 8px; margin-bottom: 34px; }
.step-pip { flex: 1; height: 2px; background: var(--line); border-radius: 100px; overflow: hidden; }
.step-pip i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .6s var(--ease); }
.step-pip.done i, .step-pip.on i { width: 100%; }
.ob-wrap { max-width: 620px; margin: 0 auto; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.choice {
  border: 1px solid var(--line); background: var(--surface); border-radius: 14px;
  padding: 16px; cursor: pointer; text-align: left;
  transition: all .25s var(--ease); font-size: 14px; font-weight: 500;
}
.choice:hover { border-color: var(--ink); transform: translateY(-2px); }
.choice.on { background: var(--ink); color: var(--surface); border-color: var(--ink); font-weight: 700; }
.choice small { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; font-weight: 400; }
.choice.on small { color: rgba(250,250,248,.6); }

/* ── Inbox ──────────────────────────────────────────────────────────────
   Full-height, edge to edge. Not a card floating on a page — the inbox is
   the page. */
.chat-split { display: grid; grid-template-columns: 366px 1fr; height: 100%; background: var(--surface); }
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: color-mix(in srgb, var(--surface) 55%, var(--paper)); }
.chat-lead { padding: 24px 22px 16px; border-bottom: 1px solid var(--line); }
.chat-lead h1 { font-family: var(--font-display); font-weight: 600; font-size: 26px; letter-spacing: -0.025em; }
.chat-lead h1 .dim { color: var(--muted); }
.chat-lead p { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.chat-search { padding: 14px 16px; }
.chat-search .inp { border-radius: 100px; background: var(--surface); font-size: 13.5px; padding: 11px 16px; }
.chat-filters { display: flex; gap: 6px; padding: 0 16px 14px; overflow-x: auto; scrollbar-width: none; }
.chat-filters::-webkit-scrollbar { display: none; }
.chat-channels { display: flex; gap: 6px; padding: 14px 16px 0; overflow-x: auto; scrollbar-width: none; }
.chat-channels::-webkit-scrollbar { display: none; }
.chat-channels .chip { display: inline-flex; align-items: center; gap: 6px; }
.ch-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.ch-n { font-size: 11px; opacity: .65; }
.chip.on .ch-n { opacity: .85; }

/* FAQs page */
.faq-page { display: grid; grid-template-columns: 1fr; gap: 16px; max-width: 760px; }
.faq-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.faq-item:first-child { border-top: 0; padding-top: 4px; }
.faq-num { width: 26px; height: 26px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 5px; }
.faq-fields { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.faq-del { border: 0; background: transparent; color: var(--muted); cursor: pointer; width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-top: 3px; transition: all .2s; flex: none; }
.faq-del:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.faq-del svg { width: 16px; height: 16px; }
.faq-actions { display: flex; gap: 10px; margin-top: 22px; }
.faq-tip { display: flex; gap: 14px; align-items: flex-start; }
.faq-tip .row-ic { flex: none; }

/* Handoff alerts — nav bell, dashboard banner, in-chat marker */
/* border/background reset: this is a <button>, so it would otherwise inherit
   the browser's default ring and fill. */
.nav-bell { position: relative; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 100px; background: transparent; color: var(--muted); cursor: pointer; transition: all .2s; }
.nav-bell:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink); }
.nav-bell svg { width: 19px; height: 19px; }
.nav-bell.has { color: var(--ink); }
.nav-bell-badge { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 100px; background: var(--danger); color: #fff; font-size: 9.5px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.nav-bell-badge[hidden] { display: none; }

/* Pre-launch maintenance overlay — shown to brand-new visitors. */
#maintenance-screen { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 24px; background: var(--paper); }
#maintenance-screen .mnt-box { max-width: 460px; text-align: center; }
#maintenance-screen .mnt-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--wa); margin: 0 auto 26px; box-shadow: 0 0 0 0 color-mix(in srgb, var(--wa) 60%, transparent); animation: mntPulse 2s var(--ease) infinite; }
@keyframes mntPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--wa) 55%, transparent); } 70% { box-shadow: 0 0 0 14px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
#maintenance-screen h1 { font-family: var(--font-display); font-size: clamp(30px, 6vw, 42px); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); line-height: 1.05; }
#maintenance-screen h1 .dim { color: var(--muted); }
#maintenance-screen p { margin-top: 18px; font-size: 15px; line-height: 1.6; color: var(--muted); }
#maintenance-screen .mnt-thanks { margin-top: 14px; color: var(--ink); font-weight: 500; }
#maintenance-screen .mnt-btn { display: inline-block; margin-top: 30px; padding: 13px 26px; border-radius: 100px; background: var(--black); color: var(--surface); font-size: 14px; font-weight: 600; text-decoration: none; transition: opacity .2s; }
#maintenance-screen .mnt-btn:hover { opacity: .85; }

/* FAQ page nudge — the payoff for filling this page in. */
.faq-slogan { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 26px; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--ink) 4%, var(--surface)); font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.faq-slogan svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--ink); }
.faq-slogan b { color: var(--ink); font-weight: 700; }

/* Bell popup — triage every waiting chat before choosing where to go. */
.nav-bell-wrap { position: relative; }
.nav-alerts { position: absolute; top: calc(100% + 10px); right: 0; width: 340px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 0, 0, .14); overflow: hidden; z-index: 60; }
.nav-alerts[hidden] { display: none; }
.na-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink); }
.na-count { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.na-scroll { max-height: 320px; overflow-y: auto; }
.na-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-bottom: 1px solid var(--line); transition: background .15s; }
.na-item:last-child { border-bottom: 0; }
.na-item:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.na-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: none; }
.na-body { display: block; flex: 1; min-width: 0; }
.na-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.na-nm { font-size: 13.5px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.na-ago { font-size: 11px; color: var(--muted); flex: none; }
.na-rs { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.na-ch { display: inline-block; margin-top: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.na-empty { padding: 30px 16px; text-align: center; color: var(--muted); }
.na-empty svg { width: 26px; height: 26px; opacity: .5; }
.na-empty p { margin-top: 8px; font-size: 12.5px; }
.na-foot { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px; border-top: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--ink); }
.na-foot:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }

.attn-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding: 13px 16px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line)); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); color: var(--ink); transition: border-color .2s; }
.attn-banner:hover { border-color: color-mix(in srgb, var(--danger) 55%, var(--line)); }
.attn-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--danger); color: #fff; flex: none; }
.attn-ic svg { width: 17px; height: 17px; }
.attn-txt { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.5; }
.attn-cta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.attn-cta svg { width: 15px; height: 15px; }

.chat-attn { display: flex; align-items: center; gap: 10px; padding: 11px 18px; background: color-mix(in srgb, var(--danger) 8%, var(--surface)); border-bottom: 1px solid color-mix(in srgb, var(--danger) 25%, var(--line)); color: var(--ink); font-size: 13px; font-weight: 500; }
.chat-attn svg { width: 17px; height: 17px; color: var(--danger); flex: none; }
.chat-attn span { flex: 1; min-width: 0; }
.attn-resume { margin-left: auto; flex: none; padding: 6px 14px; border: 0; border-radius: 100px; background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 700; cursor: pointer; transition: opacity .2s; }
.attn-resume:hover { opacity: .85; }
.attn-resume:disabled { opacity: .5; cursor: default; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 100px; padding: 6px 13px; font-size: 12.5px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; transition: all .2s; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); font-weight: 700; }
.chat-scroll { overflow-y: auto; flex: 1; min-height: 0; border-top: 1px solid var(--line); }
.chat-item { padding: 15px 18px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .18s; display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: start; position: relative; }
.chat-item:hover { background: var(--surface); }
.chat-item.on { background: var(--surface); }
.chat-item.on::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--ink); }
.chat-av { width: 38px; height: 38px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.chat-nm { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-pv { font-size: 12.5px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-meta { text-align: right; font-size: 11px; color: var(--muted); }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 100px; background: var(--ink); color: var(--surface); font-size: 10.5px; font-weight: 700; margin-top: 5px; }

/* Thread */
.chat-pane { display: flex; flex-direction: column; min-height: 0; background: var(--paper); }
.chat-top {
  padding: 16px 28px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  flex: none;
}
.chat-body { flex: 1; overflow-y: auto; padding: 30px 28px; min-height: 0; }
.chat-thread { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; }
.msg-row { display: flex; margin-bottom: 16px; animation: msgIn .4s var(--ease) both; }
.msg-row.me { justify-content: flex-end; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.msg { max-width: 62%; padding: 14px 18px; border-radius: 18px; font-size: 14.5px; line-height: 1.6; }
.msg.in { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.out { background: var(--ink); color: var(--surface); border-bottom-right-radius: 6px; }
.msg-t { font-size: 10.5px; opacity: .5; margin-top: 7px; display: block; }
.msg-ai { font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .45; margin-bottom: 6px; display: block; }
.day-rule { display: flex; align-items: center; gap: 14px; margin: 10px 0 22px; }
.day-rule::before, .day-rule::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.day-rule span { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sys-note { text-align: center; margin: 16px 0; }
.sys-note span { font-size: 11.5px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 6px 14px; border-radius: 100px; }

/* Composer */
.chat-input { padding: 16px 28px 22px; border-top: 1px solid var(--line); background: var(--surface); flex: none; }
.chat-input-in { max-width: 780px; margin: 0 auto; display: flex; gap: 10px; align-items: flex-end; }
.chat-input textarea.inp {
  border-radius: 20px; resize: none; min-height: 48px; max-height: 160px;
  padding: 13px 18px; font-size: 14.5px; line-height: 1.5; background: var(--paper);
}
.chat-send { height: 48px; width: 48px; padding: 0; border-radius: 50%; flex: none; }
.chat-send svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.chat-hint { max-width: 780px; margin: 10px auto 0; font-size: 11.5px; color: var(--muted); display: flex; gap: 7px; align-items: center; }
.chat-hint svg { width: 13px; height: 13px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* ── Plans ──────────────────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.plan { border: 1px solid var(--line); border-radius: 18px; padding: 26px; background: var(--surface); display: flex; flex-direction: column; transition: all .3s var(--ease); }
.plan:hover { transform: translateY(-3px); border-color: var(--ink); }
.plan.on { background: var(--black); color: var(--surface); border-color: var(--black); }
.plan.on .muted, .plan.on .plan-f li { color: rgba(250,250,248,.6); }
.plan.on .plan-f li::before { background: rgba(250,250,248,.5); }
.plan-n { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.plan.on .plan-n { color: rgba(250,250,248,.5); }
.plan-p { font-family: var(--font-display); font-weight: 600; font-size: 36px; letter-spacing: -0.03em; margin: 12px 0 4px; }
.plan-per { font-size: 12.5px; color: var(--muted); }
.plan-f { list-style: none; margin: 20px 0; flex: 1; }
.plan-f li { font-size: 13.5px; color: var(--muted); padding: 6px 0 6px 18px; position: relative; line-height: 1.5; }
.plan-f li::before { content: ''; position: absolute; left: 0; top: 13px; width: 6px; height: 1px; background: var(--muted); }
.plan-f li b { color: var(--ink); font-weight: 700; }
.plan.on .plan-f li b { color: var(--surface); }
.plan-badge { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 5px 11px; border-radius: 100px; background: var(--ink); color: var(--surface); }
.plan.on .plan-badge { background: var(--surface); color: var(--ink); }

/* ── Grids ──────────────────────────────────────────────────────────── */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gap { height: 16px; }
.mt-lg { margin-top: 44px; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  :root { --side-w: 208px; }
  .chat-split { grid-template-columns: 300px 1fr; }
}
@media (max-width: 1080px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-art { display: none; }
}
@media (max-width: 900px) {
  .nav-links, .nav-sep { display: none; }
  .menu-toggle { display: block; }
  .acct-name { display: none; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat-cell:nth-child(2) { border-right: 0; }
  .stat-cell:nth-child(1), .stat-cell:nth-child(2) { border-bottom: 1px solid var(--line); }
  #nav-host nav .btn { display: none; }

  /* Sidebar becomes a bottom bar — thumbs, not cursors. */
  .side {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; height: auto;
    flex-direction: row; align-items: center; justify-content: space-around;
    border-right: 0; border-top: 1px solid var(--line);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    overflow: visible;
  }
  .side-group { flex-direction: row; gap: 2px; flex: 1; justify-content: space-around; }
  .side-bottom { margin-top: 0; flex: 0 0 auto; }
  .side-h, .side-plan { display: none; }
  .side-bottom [href="/app/billing"] { display: none; }
  .side-item { flex-direction: column; gap: 4px; padding: 8px 10px; font-size: 10.5px; }
  .side-item.on { background: transparent; color: var(--ink); }
  .side-item.on .side-ic { background: var(--ink); border-radius: 8px; }
  .side-item.on .side-ic svg { stroke: var(--surface); }
  .side-ic { width: 30px; height: 26px; border-radius: 8px; transition: background .2s var(--ease); }
  .side-badge { position: absolute; top: 2px; right: 6px; }
  .has-side .app-main { margin-left: 0; padding-bottom: 110px; }
  .app-main.flush { height: calc(100svh - var(--nav-h) - 68px); }
}
@media (max-width: 760px) {
  .chat-split { grid-template-columns: 1fr; }
  .chat-list { border-right: 0; }
  .chat-split.has-open .chat-list { display: none; }
  .chat-split:not(.has-open) .chat-pane { display: none; }
  .chat-top, .chat-body, .chat-input { padding-left: 16px; padding-right: 16px; }
  .msg { max-width: 80%; }
  .row { grid-template-columns: 1fr auto !important; }
  .row-ic { display: none; }
}
@media (max-width: 520px) {
  .stat-row { grid-template-columns: 1fr; }
  .stat-cell { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat-cell:last-child { border-bottom: 0; }
}
