/* MecIA design system.
   Layout concept: a navy workshop console — dense left rail, calm light work surface, data set in tabular figures,
   plates rendered like Mercosul plates. Display: Sora (headings, numbers). Body: IBM Plex Sans. Data: IBM Plex Mono. */
:root {
  --navy: #0f1e3d;
  --navy-2: #172a52;
  --navy-3: #22386a;
  --btn-primary: #0f1e3d;
  --btn-primary-hover: #22386a;
  --graphite: #2b2f36;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f6;
  --surface-3: #e7eaf0;
  --border: #dde1e8;
  --border-strong: #c7cdd8;
  --text: #161b26;
  --text-2: #4a5263;
  --text-3: #6b7385;
  --on-navy: #e8ecf5;
  --on-navy-2: #a9b3c9;
  --accent: #1f4fd1;
  --accent-soft: #e6edfd;
  --green: #15803d;
  --green-strong: #16a34a;
  --green-soft: #e3f5e9;
  --amber: #b45309;
  --amber-soft: #fdf1dc;
  --red: #c42b2b;
  --red-soft: #fce8e8;
  --blue: #1d4ed8;
  --blue-soft: #e5ecfd;
  --purple: #6d3fc9;
  --purple-soft: #efe8fb;
  --gray-soft: #eceef2;
  --dark-soft: #dcdfe5;
  --bubble-in: #ffffff;
  --bubble-out: #e7f3ec;
  --bubble-ai: #eef1fb;
  --chat-bg: #eef0f3;
  --shadow-sm: 0 1px 2px rgba(15, 30, 61, 0.06);
  --shadow: 0 1px 3px rgba(15, 30, 61, 0.08), 0 6px 16px rgba(15, 30, 61, 0.06);
  --shadow-lg: 0 20px 48px rgba(15, 30, 61, 0.18);
  --overlay: rgba(10, 16, 32, 0.48);
  --focus: 0 0 0 3px rgba(31, 79, 209, 0.28);
  --font-display: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
  --sidebar-w: 248px;
  --header-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #0a1430; --navy-2: #121f40; --navy-3: #1d2f5a; --btn-primary: #3358c9; --btn-primary-hover: #4468d6; --graphite: #d7dbe3;
    --bg: #0e1320; --surface: #151b2a; --surface-2: #1b2334; --surface-3: #242d41; --border: #2a3448; --border-strong: #3a465e;
    --text: #e8ebf2; --text-2: #b4bccb; --text-3: #8b94a7; --on-navy: #e8ecf5; --on-navy-2: #9aa5bd;
    --accent: #7ea2ff; --accent-soft: #1d2a4d; --green: #4ade80; --green-strong: #22c55e; --green-soft: #133024;
    --amber: #fbbf24; --amber-soft: #3a2a0c; --red: #f87171; --red-soft: #3d1717; --blue: #93b4ff; --blue-soft: #1a2750;
    --purple: #c4a8ff; --purple-soft: #2c2050; --gray-soft: #232b3c; --dark-soft: #2d3547;
    --bubble-in: #1b2334; --bubble-out: #16322a; --bubble-ai: #1e2745; --chat-bg: #111726;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.3); --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
    --overlay: rgba(0, 0, 0, 0.6); --focus: 0 0 0 3px rgba(126, 162, 255, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --navy: #0a1430; --navy-2: #121f40; --navy-3: #1d2f5a; --btn-primary: #3358c9; --btn-primary-hover: #4468d6; --graphite: #d7dbe3;
  --bg: #0e1320; --surface: #151b2a; --surface-2: #1b2334; --surface-3: #242d41; --border: #2a3448; --border-strong: #3a465e;
  --text: #e8ebf2; --text-2: #b4bccb; --text-3: #8b94a7; --on-navy: #e8ecf5; --on-navy-2: #9aa5bd;
  --accent: #7ea2ff; --accent-soft: #1d2a4d; --green: #4ade80; --green-strong: #22c55e; --green-soft: #133024;
  --amber: #fbbf24; --amber-soft: #3a2a0c; --red: #f87171; --red-soft: #3d1717; --blue: #93b4ff; --blue-soft: #1a2750;
  --purple: #c4a8ff; --purple-soft: #2c2050; --gray-soft: #232b3c; --dark-soft: #2d3547;
  --bubble-in: #1b2334; --bubble-out: #16322a; --bubble-ai: #1e2745; --chat-bg: #111726;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.3); --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
  --overlay: rgba(0, 0, 0, 0.6); --focus: 0 0 0 3px rgba(126, 162, 255, 0.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 14.5px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
#root { min-height: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text); margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 1.55rem; font-weight: 650; }
h2 { font-size: 1.15rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-3); }
.muted-2 { color: var(--text-2); }
.small { font-size: 0.85rem; }
.xsmall { font-size: 0.78rem; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.spacer { flex: 1; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }

/* ── Buttons ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: var(--surface); color: var(--text); font-weight: 550; font-size: 0.9rem; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--btn-primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--btn-primary-hover); }
.btn-success { background: var(--green-strong); color: #fff; }
.btn-success:hover:not(:disabled) { filter: brightness(0.95); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--red); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--red-soft); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 0.84rem; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 0.98rem; }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }
.btn-block { width: 100%; }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Forms ───────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.label { font-size: 0.83rem; font-weight: 600; color: var(--text-2); }
.label .req { color: var(--red); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; min-width: 0; height: 38px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--red); }
.input-group { position: relative; display: flex; align-items: center; }
.input-group .prefix { position: absolute; left: 11px; color: var(--text-3); pointer-events: none; font-size: 0.9rem; }
.input-group .input.has-prefix { padding-left: 34px; }
.input-group svg.prefix { width: 16px; height: 16px; }
.field-error { color: var(--red); font-size: 0.8rem; }
.field-help { color: var(--text-3); font-size: 0.8rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 767px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.check { display: inline-flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 0.9rem; }
.check input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--navy); flex: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 38px; height: 22px; border-radius: 22px; background: var(--border-strong); position: relative; transition: background 0.15s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: var(--shadow-sm); }
.switch input:checked + .track { background: var(--green-strong); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: var(--focus); }
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; padding: 5px 11px; border-radius: 5px; cursor: pointer; font-size: 0.85rem; color: var(--text-2); font-weight: 550; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ── Cards, badges ───────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-head h2, .card-head h3 { font-size: 0.98rem; }
.card-body { padding: 16px 20px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.divider { height: 1px; background: var(--border); margin: 4px 0; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 0.76rem; font-weight: 600;
  white-space: nowrap; border: 1px solid transparent;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.no-dot::before { display: none; }
.badge-gray { background: var(--gray-soft); color: var(--text-2); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-dark { background: var(--dark-soft); color: var(--text); }
.badge-navy { background: var(--accent-soft); color: var(--accent); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.78rem; color: var(--text-2); }
.sim-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 5px; font-size: 0.72rem; font-weight: 600; color: var(--amber); background: var(--amber-soft); border: 1px dashed currentColor; }

/* Mercosul-style plate chip */
.plate { display: inline-flex; flex-direction: column; align-items: stretch; border: 1.5px solid var(--text); border-radius: 4px; overflow: hidden; line-height: 1; background: #fff; color: #111; min-width: 72px; }
.plate .band { background: #1646b8; color: #fff; font-size: 6.5px; letter-spacing: 0.14em; text-align: center; padding: 1.5px 0; font-family: var(--font-body); font-weight: 700; }
.plate .code { font-family: var(--font-mono); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.08em; text-align: center; padding: 2px 6px 3px; }

/* ── App shell ───────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: var(--navy); color: var(--on-navy); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 16px 12px; gap: 6px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; color: #fff; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand-name span { color: #6fe39a; }
.org-switch { margin: 0 4px 10px; padding: 9px 10px; border-radius: 9px; background: var(--navy-2); border: 1px solid rgba(255, 255, 255, 0.08); color: var(--on-navy); display: flex; align-items: center; gap: 9px; cursor: pointer; text-align: left; width: calc(100% - 8px); }
.org-switch:hover { background: var(--navy-3); }
.org-logo { width: 28px; height: 28px; border-radius: 7px; background: rgba(255, 255, 255, 0.12); display: grid; place-items: center; font-weight: 700; font-size: 0.8rem; flex: none; overflow: hidden; color: #fff; }
.org-logo img { width: 100%; height: 100%; object-fit: cover; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-section { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-navy-2); padding: 12px 10px 4px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--on-navy-2); font-weight: 500; text-decoration: none; font-size: 0.92rem;
}
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: inset 2px 0 0 #6fe39a; }
.nav .count { margin-left: auto; background: #e24b4b; color: #fff; font-size: 0.72rem; border-radius: 999px; padding: 0 7px; line-height: 18px; font-weight: 700; }
.sidebar-foot { margin-top: auto; padding: 10px; font-size: 0.78rem; color: var(--on-navy-2); display: flex; flex-direction: column; gap: 8px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--header-h); background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; padding: 0 24px;
}
.topbar .search-trigger {
  flex: 1; max-width: 460px; display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface-2); color: var(--text-3); cursor: pointer; text-align: left;
}
.topbar .search-trigger svg { width: 16px; height: 16px; }
.kbd { font-family: var(--font-mono); font-size: 0.72rem; padding: 1px 6px; border: 1px solid var(--border-strong); border-radius: 5px; color: var(--text-3); background: var(--surface); }
.content { padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 20px; min-width: 0; max-width: 1480px; width: 100%; }
.content.full { max-width: none; padding: 0; gap: 0; }
.menu-btn { display: none; }
.mobile-nav { display: none; }
@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 60; transform: translateX(-100%); transition: transform 0.2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-backdrop { position: fixed; inset: 0; background: var(--overlay); z-index: 55; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 12px; padding-top: env(safe-area-inset-top, 0px); }
  .content { padding: 16px 16px 88px; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: var(--surface);
    border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 8px; font-size: 0.7rem; color: var(--text-3); text-decoration: none; position: relative; }
  .mobile-nav a svg { width: 20px; height: 20px; }
  .mobile-nav a[aria-current="page"] { color: var(--navy); font-weight: 600; }
  :root[data-theme="dark"] .mobile-nav a[aria-current="page"] { color: var(--accent); }
  .mobile-nav .dot { position: absolute; top: 5px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
  .topbar .search-trigger .kbd { display: none; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mobile-nav a[aria-current="page"] { color: var(--accent); } }

.demo-banner {
  display: flex; align-items: center; gap: 10px; padding: 8px 24px; background: var(--amber-soft); color: var(--amber); font-size: 0.84rem; font-weight: 500;
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.demo-banner svg { width: 16px; height: 16px; flex: none; }
.demo-banner .btn { height: 28px; }
.preview-banner { background: var(--surface-2); color: var(--text-2); }

/* ── Page header ─────────────────────────────── */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head .titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.page-head .desc { color: var(--text-2); max-width: 70ch; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumbs { display: flex; gap: 6px; align-items: center; font-size: 0.82rem; color: var(--text-3); flex-wrap: wrap; }
.breadcrumbs a { color: var(--text-3); }
.breadcrumbs svg { width: 13px; height: 13px; }

/* ── Metrics ─────────────────────────────────── */
.metric { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
a.metric:hover { border-color: var(--border-strong); box-shadow: var(--shadow); text-decoration: none; }
.metric .m-label { display: flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 0.84rem; font-weight: 500; }
.metric .m-label svg { width: 16px; height: 16px; color: var(--text-3); }
.metric .m-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1.15; }
.metric .m-sub { font-size: 0.8rem; color: var(--text-3); }
.metric.attention { border-color: color-mix(in srgb, var(--red) 40%, var(--border)); }
.metric.attention .m-value { color: var(--red); }

/* ── Tables ──────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; font-weight: 600; color: var(--text-3); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface); }
.table th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.table th button:focus-visible { box-shadow: var(--focus); }
.table th svg { width: 12px; height: 12px; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover td { background: var(--surface-2); }
.table td.right, .table th.right { text-align: right; }
.table .muted-row td { color: var(--text-3); }
.cards-list { display: none; }
@media (max-width: 767px) {
  .table-wrap.responsive { display: none; }
  .cards-list { display: flex; flex-direction: column; }
  .list-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; cursor: pointer; }
  .list-card:last-child { border-bottom: 0; }
  .list-card .lc-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-width: 0; }
}
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.toolbar .search { flex: 1 1 240px; max-width: 420px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 0.84rem; color: var(--text-3); flex-wrap: wrap; }
.chip-filter { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-size: 0.83rem; color: var(--text-2); font-weight: 500; }
.chip-filter[aria-pressed="true"] { background: var(--btn-primary); color: #fff; border-color: var(--btn-primary); }
.chip-filter .n { font-variant-numeric: tabular-nums; opacity: 0.8; }

/* ── States ──────────────────────────────────── */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px 20px; }
.empty .e-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; color: var(--text-3); border: 1px solid var(--border); }
.empty .e-icon svg { width: 24px; height: 24px; }
.empty h3 { font-size: 1.02rem; }
.empty p { color: var(--text-2); max-width: 46ch; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton, .spinner { animation: none; } * { transition: none !important; } }
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); font-size: 0.9rem; align-items: flex-start; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert-info { background: var(--blue-soft); color: var(--text); border-color: color-mix(in srgb, var(--blue) 25%, transparent); }
.alert-info svg { color: var(--blue); }
.alert-warn { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.alert-warn svg { color: var(--amber); }
.alert-danger { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.alert-danger svg { color: var(--red); }
.alert-success { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.alert-success svg { color: var(--green); }

/* ── Overlays ────────────────────────────────── */
.overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade 0.12s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; border: 1px solid var(--border); }
.modal.wide { max-width: 820px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--surface); z-index: 101; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slide 0.18s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: 0.4; } }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 50; min-width: 220px; padding: 6px; }
.dropdown .dd-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border-radius: 7px; background: none; border: 0; text-align: left; cursor: pointer; color: var(--text); font-size: 0.9rem; text-decoration: none; }
.dropdown .dd-item:hover { background: var(--surface-2); text-decoration: none; }
.dropdown .dd-item svg { width: 16px; height: 16px; color: var(--text-3); }
.dropdown .dd-sep { height: 1px; background: var(--border); margin: 5px 2px; }
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: var(--graphite); color: #fff; box-shadow: var(--shadow-lg); font-size: 0.9rem; animation: fade 0.15s; }
:root[data-theme="dark"] .toast { background: var(--surface-3); color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast { background: var(--surface-3); color: var(--text); } }
.toast svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.toast.success svg { color: #6fe39a; }
.toast.error svg { color: #ff9b9b; }
@media (max-width: 1023px) { .toasts { bottom: 76px; right: 16px; left: 16px; max-width: none; } }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; color: var(--text-3); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: 0.9rem; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--navy); }
:root[data-theme="dark"] .tabs button[aria-selected="true"] { border-bottom-color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabs button[aria-selected="true"] { border-bottom-color: var(--accent); } }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 0.78rem; flex: none; overflow: hidden; }
.avatar.lg { width: 44px; height: 44px; font-size: 0.95rem; }
.icon-bubble { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.icon-bubble svg { width: 17px; height: 17px; }

/* ── Key/value ───────────────────────────────── */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; font-size: 0.9rem; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ── Timeline ────────────────────────────────── */
.timeline { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding-bottom: 14px; position: relative; }
.tl-item::before { content: ''; position: absolute; left: 10px; top: 20px; bottom: 0; width: 1px; background: var(--border); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 21px; height: 21px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-strong); display: grid; place-items: center; color: var(--text-3); }
.tl-dot svg { width: 11px; height: 11px; }
.tl-dot.green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.tl-dot.red { background: var(--red-soft); color: var(--red); border-color: transparent; }
.tl-dot.blue { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.tl-dot.amber { background: var(--amber-soft); color: var(--amber); border-color: transparent; }

/* ── Inbox ───────────────────────────────────── */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr) 300px; height: calc(100vh - var(--header-h)); min-height: 0; }
.inbox.with-banner { height: calc(100vh - var(--header-h) - 37px); }
.inbox-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.inbox-list .il-head { padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--border); }
.inbox-items { overflow-y: auto; flex: 1; }
.conv-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; background: none; border-left: 3px solid transparent; width: 100%; text-align: left; border-top: 0; border-right: 0; }
.conv-item:hover { background: var(--surface-2); }
.conv-item[aria-current="true"] { background: var(--accent-soft); border-left-color: var(--navy); }
.conv-item .ci-name { font-weight: 600; font-size: 0.92rem; }
.conv-item .ci-preview { color: var(--text-3); font-size: 0.84rem; }
.conv-item .ci-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; font-size: 0.75rem; color: var(--text-3); }
.unread { min-width: 20px; height: 20px; border-radius: 10px; background: var(--green-strong); color: #fff; font-size: 0.72rem; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.thread { display: flex; flex-direction: column; min-height: 0; background: var(--chat-bg); }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; min-height: 62px; }
.thread-body { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.day-sep { align-self: center; font-size: 0.74rem; color: var(--text-3); background: var(--surface); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); margin: 6px 0; }
.bubble-row { display: flex; flex-direction: column; max-width: min(78%, 560px); gap: 3px; }
.bubble-row.in { align-self: flex-start; }
.bubble-row.out { align-self: flex-end; align-items: flex-end; }
.bubble { padding: 9px 12px 7px; border-radius: 12px; box-shadow: var(--shadow-sm); font-size: 0.92rem; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid var(--border); }
.bubble-row.in .bubble { background: var(--bubble-in); border-top-left-radius: 4px; }
.bubble-row.out .bubble { background: var(--bubble-out); border-top-right-radius: 4px; }
.bubble-row.out.ai .bubble { background: var(--bubble-ai); }
.bubble-meta { display: flex; gap: 6px; align-items: center; font-size: 0.72rem; color: var(--text-3); padding: 0 4px; flex-wrap: wrap; }
.who { font-weight: 700; font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; }
.who.ai { background: var(--purple-soft); color: var(--purple); }
.who.you { background: var(--green-soft); color: var(--green); }
.who.customer { background: var(--gray-soft); color: var(--text-2); }
.system-event { align-self: center; max-width: 90%; display: flex; gap: 7px; align-items: center; font-size: 0.8rem; color: var(--text-2); background: var(--surface); border: 1px dashed var(--border-strong); padding: 5px 12px; border-radius: 999px; text-align: center; }
.system-event svg { width: 13px; height: 13px; flex: none; }
.audio { display: flex; align-items: center; gap: 10px; min-width: 230px; }
.audio .play { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--btn-primary); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.audio .play svg { width: 15px; height: 15px; }
.wave { display: flex; align-items: center; gap: 2px; height: 26px; flex: 1; }
.wave i { display: block; width: 3px; border-radius: 2px; background: var(--text-3); opacity: 0.55; }
.wave.playing i { background: var(--navy); opacity: 0.9; }
:root[data-theme="dark"] .wave.playing i { background: var(--accent); }
.transcript { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.86rem; white-space: pre-wrap; }
.transcript .t-label { display: flex; gap: 6px; align-items: center; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); margin-bottom: 3px; }
.quote-card { margin-top: 8px; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 6px; min-width: 220px; white-space: normal; }
.composer { background: var(--surface); border-top: 1px solid var(--border); padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.composer .row textarea { min-height: 42px; height: 42px; resize: none; }
.sim-panel { border: 1.5px dashed var(--amber); border-radius: var(--radius); padding: 10px 12px; background: var(--amber-soft); display: flex; flex-direction: column; gap: 8px; }
.sim-panel .sp-title { font-size: 0.78rem; font-weight: 700; color: var(--amber); display: flex; align-items: center; gap: 6px; }
.sim-panel .sp-title svg { width: 14px; height: 14px; }
.inbox-side { border-left: 1px solid var(--border); background: var(--surface); overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.side-block { display: flex; flex-direction: column; gap: 8px; }
.side-block h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); font-family: var(--font-body); font-weight: 700; }
.summary-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 0.88rem; }
@media (max-width: 1279px) { .inbox { grid-template-columns: 300px minmax(0, 1fr); } .inbox-side { display: none; } .inbox-side.as-sheet { display: flex; } }
@media (max-width: 767px) {
  .inbox, .inbox.with-banner { grid-template-columns: minmax(0, 1fr); height: calc(100vh - var(--header-h) - 62px); }
  .inbox.show-thread .inbox-list { display: none; }
  .inbox:not(.show-thread) .thread { display: none; }
  .bubble-row { max-width: 88%; }
  .thread-body { padding: 14px 12px; }
}

/* ── Quote editor & doc ──────────────────────── */
.line-item { display: grid; grid-template-columns: minmax(0, 2.4fr) 90px 70px 120px 110px 110px 36px; gap: 8px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.line-item.head { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); font-weight: 600; padding-top: 8px; padding-bottom: 8px; }
.line-item .sub { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 2px 0 0 12px; border-left: 2px solid var(--border); margin-left: 4px; }
@media (max-width: 900px) {
  .line-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .line-item.head { display: none; }
  .line-item > .li-desc { grid-column: 1 / -1; }
}
.summary-list { display: flex; flex-direction: column; gap: 8px; font-variant-numeric: tabular-nums; }
.summary-list .s-row { display: flex; justify-content: space-between; gap: 10px; font-size: 0.92rem; }
.summary-list .s-total { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 2px; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.sticky-side { position: sticky; top: calc(var(--header-h) + 16px); }
.doc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.doc-head { padding: 22px 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.doc-body { padding: 20px 24px; }

/* ── Public quote page ───────────────────────── */
.public { min-height: 100vh; background: var(--bg); padding: 0 16px 120px; }
.public-inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; padding-top: 20px; }
.public-brand { display: flex; align-items: center; gap: 12px; }
.public-brand .pb-logo { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 700; font-family: var(--font-display); overflow: hidden; flex: none; }
.public-brand .pb-logo img { width: 100%; height: 100%; object-fit: cover; }
.total-hero { padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.total-hero .th-value { font-family: var(--font-display); font-size: 2.3rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pub-item { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.pub-item:last-child { border-bottom: 0; }
.public-cta { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 30; box-shadow: 0 -8px 24px rgba(15, 30, 61, 0.08); }
.public-cta .inner { max-width: 720px; margin: 0 auto; display: flex; gap: 8px; flex-wrap: wrap; }
.public-cta .inner .btn-success { flex: 1 1 100%; }
.public-cta .inner .btn-secondary { flex: 1 1 0; }

/* ── Auth ────────────────────────────────────── */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth-side { background: var(--navy); color: var(--on-navy); padding: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.auth-side h2 { color: #fff; font-size: 1.7rem; line-height: 1.25; max-width: 18ch; }
.auth-main { display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 900px) { .auth { grid-template-columns: minmax(0, 1fr); } .auth-side { display: none; } }

/* ── Landing ─────────────────────────────────── */
.lp { background: var(--bg); }
.lp-nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.lp-nav .in { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 12px; }
.lp-nav .brand { color: var(--text); padding: 0; }
.lp-nav .brand .brand-name span { color: var(--green-strong); }
.lp-section { max-width: 1180px; margin: 0 auto; padding: 64px 20px; }
.lp-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; padding-top: 48px; }
.lp-hero h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); line-height: 1.07; letter-spacing: -0.035em; font-weight: 700; }
.lp-hero h1 em { font-style: normal; color: var(--green-strong); }
.lp-hero .lead { font-size: 1.1rem; color: var(--text-2); max-width: 52ch; }
.eyebrow { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; color: var(--accent); }
.lp h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); letter-spacing: -0.025em; line-height: 1.15; }
.lp-visual { position: relative; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: 14px; align-items: end; }
.phone { background: var(--graphite); border-radius: 28px; padding: 10px; box-shadow: var(--shadow-lg); }
:root[data-theme="dark"] .phone { background: #000; }
.phone .screen { background: var(--chat-bg); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.phone .ph-head { background: var(--navy); color: #fff; padding: 12px; font-size: 0.8rem; display: flex; gap: 8px; align-items: center; }
.phone .ph-body { padding: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 0.78rem; min-height: 320px; }
.phone .b { max-width: 88%; padding: 6px 9px; border-radius: 10px; background: var(--bubble-in); border: 1px solid var(--border); }
.phone .b.me { align-self: flex-end; background: var(--bubble-ai); }
.mini-dash { padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 0.8rem; }
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; counter-reset: s; }
.step { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.step .n { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); font-weight: 600; }
.feature { padding: 18px; display: flex; gap: 12px; }
.lp-cta { background: var(--navy); color: var(--on-navy); border-radius: 20px; padding: 44px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.lp-cta h2 { color: #fff; }
.lp-footer { border-top: 1px solid var(--border); }
.lp-footer .in { max-width: 1180px; margin: 0 auto; padding: 24px 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--text-3); font-size: 0.85rem; }
@media (max-width: 1023px) { .lp-hero { grid-template-columns: minmax(0, 1fr); } .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .lp-visual { grid-template-columns: minmax(0, 1fr); } .lp-visual .card { display: none; } .steps { grid-template-columns: minmax(0, 1fr); } .lp-cta { padding: 28px 22px; } .lp-section { padding: 44px 16px; } }

/* ── Onboarding ──────────────────────────────── */
.onb { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.onb-top { display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.onb-steps { display: flex; gap: 6px; flex: 1; justify-content: center; flex-wrap: wrap; }
.onb-step { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-3); padding: 4px 8px; border-radius: 999px; }
.onb-step .sn { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border-strong); display: grid; place-items: center; font-size: 0.72rem; font-weight: 700; }
.onb-step.active { color: var(--text); font-weight: 600; background: var(--surface-2); }
.onb-step.active .sn { background: var(--btn-primary); color: #fff; border-color: var(--btn-primary); }
.onb-step.done .sn { background: var(--green-strong); color: #fff; border-color: var(--green-strong); }
.onb-main { flex: 1; display: flex; justify-content: center; padding: 28px 16px 60px; }
.onb-card { width: 100%; max-width: 760px; }
@media (max-width: 767px) { .onb-step .st { display: none; } }

.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > div { height: 100%; background: var(--green-strong); border-radius: 999px; }
.checklist { display: flex; flex-direction: column; }
.checklist a { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 0.9rem; }
.checklist a:last-child { border-bottom: 0; }
.checklist a:hover { color: var(--accent); }
.checklist .ck { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; flex: none; }
.checklist .ck.done { background: var(--green-strong); border-color: var(--green-strong); color: #fff; }
.checklist .ck svg { width: 12px; height: 12px; }
.checklist .done-text { color: var(--text-3); text-decoration: line-through; }

.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--text-3); font-size: 11px; font-family: var(--font-body); }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.8rem; color: var(--text-2); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bar-list { display: flex; flex-direction: column; gap: 9px; }
.bar-list .bl-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 0.86rem; }
.bar-list .bl-track { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.bar-list .bl-fill { height: 100%; border-radius: 5px; }
.cmdk-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer; text-decoration: none; color: var(--text); }
.cmdk-item[aria-selected="true"], .cmdk-item:hover { background: var(--surface-2); text-decoration: none; }
.cmdk-group { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); padding: 10px 12px 4px; font-weight: 700; }
.notif-item { display: flex; gap: 10px; padding: 10px; border-radius: 8px; text-decoration: none; color: var(--text); cursor: pointer; background: none; border: 0; width: 100%; text-align: left; }
.notif-item:hover { background: var(--surface-2); text-decoration: none; }
.notif-item.unread-n { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 6px; }
.logo-drop { width: 84px; height: 84px; border-radius: 16px; border: 1.5px dashed var(--border-strong); display: grid; place-items: center; overflow: hidden; background: var(--surface-2); color: var(--text-3); cursor: pointer; flex: none; }
.logo-drop img { width: 100%; height: 100%; object-fit: cover; }
.hours-row { display: grid; grid-template-columns: 130px 70px 1fr 1fr; gap: 8px; align-items: center; }
@media (max-width: 600px) { .hours-row { grid-template-columns: 1fr auto; } .hours-row .input { grid-column: span 1; } }
.code-block { font-family: var(--font-mono); font-size: 0.8rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; overflow-x: auto; white-space: pre; }
.pill-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-choice label { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--border-strong); border-radius: 999px; cursor: pointer; font-size: 0.87rem; background: var(--surface); }
.pill-choice input { accent-color: var(--navy); margin: 0; }
.pill-choice label:has(input:checked) { border-color: var(--navy); background: var(--accent-soft); }

.flip { transform: rotate(180deg); }
.faint { opacity: 0.35; }

.chip-filter { white-space: nowrap; flex: none; }
.thread-head > .stack-sm { min-width: 180px !important; }
.banner-inline { flex-wrap: nowrap; align-items: flex-start; }
.banner-inline svg { margin-top: 2px; }
.topbar .search-trigger { min-width: 0; }
@media (max-width: 767px) {
  .topbar { gap: 6px; }
  .topbar .spacer { display: none; }
  .demo-banner { padding: 6px 16px; font-size: 0.78rem; gap: 6px; }
  .demo-banner .btn { height: 26px; font-size: 0.76rem; padding: 0 8px; }
  .thread-head { padding: 8px 12px; gap: 8px; min-height: 0; }
  .thread-head .btn-sm { height: 28px; padding: 0 8px; font-size: 0.78rem; }
}

/* ── Landing (clean) ─────────────────────────────
   Calm page: one hero with a live conversation, four steps, six features, one CTA.
   Motion: staggered hero entrance, scripted chat, scroll-linked reveals (only where supported). */
.lx { background: var(--bg); min-height: 100vh; overflow-x: clip; }
.lx-wrap { max-width: 1120px; margin: 0 auto; padding-inline: 20px; width: 100%; }
.lx-nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.lx-nav .lx-wrap { padding-block: 12px; gap: 8px; }
.lx-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: center; padding-block: 72px 56px; }
.lx-hero-copy { display: flex; flex-direction: column; gap: 22px; }
.lx-kicker { font-size: 0.8rem; font-weight: 600; color: var(--text-3); letter-spacing: 0.02em; }
.lx-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.06; letter-spacing: -0.04em; font-weight: 700; max-width: 16ch; }
.lx-hero h1 em { font-style: normal; color: var(--green-strong); }
.lx-lead { font-size: 1.12rem; color: var(--text-2); max-width: 46ch; line-height: 1.55; }
.lx-note { display: inline-flex; align-items: center; gap: 7px; font-size: 0.85rem; color: var(--text-3); }
.lx-hero-visual { display: flex; justify-content: center; }
.lx-muted { color: var(--text-3); font-size: 0.72rem; }
.lx-muted-on { color: var(--on-navy-2); font-size: 0.78rem; }

/* Chat mock */
.lx-chat { width: 100%; max-width: 400px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 30px 60px -20px rgba(15, 30, 61, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.02); overflow: hidden; display: flex; flex-direction: column; position: relative; }
.lx-chat::before { content: ''; position: absolute; inset: -40% -30% auto auto; width: 70%; height: 70%; background: radial-gradient(circle, color-mix(in srgb, var(--green-strong) 18%, transparent), transparent 70%); pointer-events: none; }
.lx-chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--navy); color: #fff; font-size: 0.88rem; position: relative; }
.lx-dot { width: 9px; height: 9px; border-radius: 50%; background: #6fe39a; box-shadow: 0 0 0 0 rgba(111, 227, 154, 0.6); animation: lx-pulse 2s infinite; }
@keyframes lx-pulse { 70% { box-shadow: 0 0 0 8px rgba(111, 227, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(111, 227, 154, 0); } }
.lx-chat-body { height: 380px; overflow-y: auto; scrollbar-width: none; padding: 16px 14px; display: flex; flex-direction: column; gap: 9px; background: var(--chat-bg); position: relative; }
.lx-chat-body::-webkit-scrollbar { display: none; }
.lx-msg { max-width: 84%; padding: 9px 12px; border-radius: 14px; font-size: 0.86rem; line-height: 1.4; display: flex; flex-direction: column; gap: 6px; animation: lx-pop 0.38s cubic-bezier(0.2, 0.8, 0.2, 1) both; box-shadow: var(--shadow-sm); }
.lx-msg.client { align-self: flex-start; background: var(--bubble-in); border: 1px solid var(--border); border-top-left-radius: 5px; transform-origin: top left; }
.lx-msg.ai { align-self: flex-end; background: var(--bubble-ai); border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border)); border-top-right-radius: 5px; transform-origin: top right; }
@keyframes lx-pop { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: none; } }
.lx-transcript { font-style: normal; color: var(--text-2); }
.lx-audio { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.lx-wave { display: inline-flex; align-items: center; gap: 2px; height: 16px; }
.lx-wave i { width: 3px; border-radius: 2px; background: currentColor; opacity: 0.55; animation: lx-wave 1.1s ease-in-out infinite; }
.lx-wave i:nth-child(odd) { animation-delay: -0.4s; }
.lx-wave i:nth-child(3n) { animation-delay: -0.7s; }
@keyframes lx-wave { 50% { transform: scaleY(0.45); } }
.lx-typing { flex-direction: row; gap: 4px; padding: 12px 14px; }
.lx-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: lx-typing 1s infinite; }
.lx-typing i:nth-child(2) { animation-delay: 0.15s; }
.lx-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes lx-typing { 0%, 60%, 100% { opacity: 0.3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.lx-quote { align-self: flex-end; width: 88%; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 13px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 0.82rem; animation: lx-rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; box-shadow: var(--shadow); }
@keyframes lx-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.lx-quote-row { display: flex; justify-content: space-between; gap: 10px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.lx-quote-row span:last-child { white-space: nowrap; }
.lx-quote-total { display: flex; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.lx-approve { display: inline-flex; justify-content: center; align-items: center; gap: 6px; background: var(--green-strong); color: #fff; border-radius: 9px; padding: 8px; font-weight: 600; animation: lx-rise 0.5s 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.lx-caption { font-size: 0.72rem; color: var(--text-3); text-align: center; padding: 8px; border-top: 1px solid var(--border); background: var(--surface); }

/* Sections */
.lx-section { padding-block: 56px; display: flex; flex-direction: column; gap: 28px; }
.lx h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.03em; line-height: 1.15; }
.lx-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; position: relative; }
.lx-steps::before { content: ''; position: absolute; top: 22px; left: 22px; right: 22px; height: 1px; background: linear-gradient(90deg, var(--border-strong), var(--border-strong) 60%, transparent); z-index: 0; }
.lx-step { display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 1; }
.lx-step-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--accent); box-shadow: var(--shadow-sm); transition: transform 0.2s, border-color 0.2s; }
.lx-step:hover .lx-step-icon { transform: translateY(-2px); border-color: var(--accent); }
.lx-step-n { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-3); margin-top: 6px; }
.lx-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 32px; }
.lx-feature { display: flex; flex-direction: column; gap: 6px; }
.lx-feature-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--green-strong) 12%, transparent); color: var(--green); margin-bottom: 6px; transition: transform 0.2s; }
.lx-feature:hover .lx-feature-icon { transform: rotate(-6deg) scale(1.05); }
.lx-cta { background: var(--navy); color: var(--on-navy); border-radius: 22px; padding: 44px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; position: relative; overflow: hidden; }
.lx-cta::after { content: ''; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(111, 227, 154, 0.22), transparent 70%); pointer-events: none; }
.lx-cta h2 { color: #fff; }
.lx-footer { border-top: 1px solid var(--border); color: var(--text-3); font-size: 0.85rem; }
.lx-footer .lx-wrap { padding-block: 22px; }

/* Entrance (hero, on load) */
.lx-in { animation: lx-fade-up 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes lx-fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Scroll-linked reveals: only in browsers with scroll timelines; everything is fully visible elsewhere. */
@supports (animation-timeline: view()) {
  .lx-reveal { animation: lx-reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  @keyframes lx-reveal { from { opacity: 0.15; transform: translateY(22px); } to { opacity: 1; transform: none; } }
  .lx-steps::before { transform-origin: left; animation: lx-draw linear both; animation-timeline: view(); animation-range: entry 20% cover 45%; }
  @keyframes lx-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

@media (max-width: 900px) {
  .lx-hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 40px 24px; }
  .lx-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lx-steps::before { display: none; }
  .lx-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .lx-hide-sm { display: none; }
  .lx-steps, .lx-features { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .lx-cta { padding: 28px 22px; }
  .lx-chat-body { height: 340px; }
  .lx-section { padding-block: 40px; }
}
/* Reduced motion: nothing moves or slides; the demo conversation still appears message by message with soft fades. */
@keyframes lx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lx-blink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .lx-reveal, .lx-steps::before, .lx-dot, .lx-wave i { animation: none !important; }
  .lx-in { animation: lx-fade 0.6s ease both !important; }
  .lx-msg, .lx-quote { animation: lx-fade 0.35s ease both !important; }
  .lx-approve { animation: lx-fade 0.35s 0.45s ease both !important; }
  .lx-typing i { animation: lx-blink 1.2s ease-in-out infinite !important; }
}

/* Legal pages (Termos / Privacidade / Tratamento de dados) */
.legal-body { width: 100%; max-width: 760px; margin: 0 auto; padding: 32px 16px 48px; display: flex; flex-direction: column; gap: 12px; line-height: 1.65; }
.legal-body h1 { font-size: 1.7rem; margin: 8px 0 0; }
.legal-body h2 { font-size: 1.1rem; margin: 18px 0 0; }
.legal-body p, .legal-body li { color: var(--text-2); }
.legal-body ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
h2[id], section[id] { scroll-margin-top: 80px; }
.legal-table { border: 1px solid var(--border); border-radius: 12px; margin-block: 4px; }
.legal-table td { vertical-align: top; color: var(--text-2); font-size: 0.9rem; }

/* Public institutional pages (Sobre, Ajuda, Contato, Status) */
.lx { min-height: 100vh; display: flex; flex-direction: column; }
.lx > main { flex: 1; }
.pub-main { display: flex; flex-direction: column; gap: 28px; padding-block: 48px 64px; max-width: 880px; }
.pub-main.pub-wide { max-width: 1120px; }
.pub-head { display: flex; flex-direction: column; gap: 12px; }
.pub-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.12; letter-spacing: -0.03em; max-width: 22ch; }
.pub-section { display: flex; flex-direction: column; gap: 14px; }
.pub-section h2 { font-size: 1.25rem; }
.pub-section p { color: var(--text-2); line-height: 1.65; max-width: 70ch; }
.pub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pub-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.pub-card p { margin: 0; font-size: 0.92rem; }
.pub-facts { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px 20px; margin: 0; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.pub-facts dt { color: var(--text-3); font-size: 0.88rem; }
.pub-facts dd { margin: 0; color: var(--text); }
.pub-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.pub-search { position: relative; max-width: 560px; }
.pub-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.pub-search .input { padding-left: 42px; height: 48px; font-size: 1rem; border-radius: 12px; }
.pub-article { padding: 0 2px 18px; color: var(--text-2); line-height: 1.6; display: flex; flex-direction: column; gap: 10px; }
.pub-article ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.pub-article p { margin: 0; max-width: 70ch; }
.pub-contact { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status-summary { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--text-3); flex: none; }
.status-success .status-dot { background: var(--green-strong); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green-strong) 18%, transparent); }
.status-warn .status-dot { background: #d97706; box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.18); }
.status-danger .status-dot { background: #dc2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.18); }
.status-list { display: flex; flex-direction: column; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.status-row:last-child { border-bottom: 0; }
@media (max-width: 767px) {
  .pub-grid, .pub-contact { grid-template-columns: minmax(0, 1fr); }
  .pub-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pub-facts dd { margin-bottom: 10px; }
  .pub-main { padding-block: 32px 48px; }
}
.auth-legal { color: var(--text-3); }
.auth-legal a { color: var(--text-3); }

/* ─── Landing: nav, pains, rules, pricing, FAQ, footer ───────────────────── */
.lx-nav-row { display: flex; align-items: center; gap: 6px; }
.lx-links { display: flex; gap: 4px; margin-left: 18px; }
.lx-links a { color: var(--text-2); font-size: 0.9rem; font-weight: 500; padding: 6px 10px; border-radius: 8px; text-decoration: none; }
.lx-links a:hover { color: var(--text); background: var(--surface-2, color-mix(in srgb, var(--text) 5%, transparent)); }
.lx-menu-btn { display: none; }
.lx-mobile-menu { display: flex; flex-direction: column; padding-block: 6px 14px; }
.lx-mobile-menu a { padding: 11px 4px; color: var(--text); text-decoration: none; font-weight: 500; border-top: 1px solid var(--border); }
.lx-section-head { display: flex; flex-direction: column; gap: 8px; }
.lx-center { text-align: center; }

.lx-pains { display: flex; flex-direction: column; gap: 22px; padding-block: 24px 48px; }
.lx-pain-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.lx-pain-list li { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-weight: 500; font-size: 0.93rem; line-height: 1.35; }
.lx-pain-icon { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--amber, #d97706) 14%, transparent); color: var(--amber, #b45309); }
.lx-pain-answer { font-size: 1.08rem; font-weight: 600; color: var(--text); }

.lx-rules { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 48px; align-items: center; }
.lx-rules-copy { display: flex; flex-direction: column; gap: 22px; }
.lx-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.lx-checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); line-height: 1.45; }
.lx-checks li svg { flex: none; margin-top: 3px; color: var(--green-strong); }
.lx-handoff { background: var(--chat-bg); border: 1px solid var(--border); border-radius: 20px; padding: 22px 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.lx-handoff-tag { align-self: center; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 0.8rem; font-weight: 600; color: var(--accent); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; }

.lx-faq-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); max-width: 820px; }
.lx-faq-item { border-bottom: 1px solid var(--border); }
.lx-faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 2px; font-weight: 600; }
.lx-faq-item summary::-webkit-details-marker { display: none; }
.lx-faq-item summary svg { flex: none; color: var(--text-3); transition: transform 0.2s; }
.lx-faq-item[open] summary svg { transform: rotate(180deg); }
.lx-faq-item p { margin: 0 0 18px; color: var(--text-2); line-height: 1.6; max-width: 70ch; }

.lx-footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 28px; padding-block: 40px 20px; }
.lx-footer-brand { color: var(--text-3); gap: 8px; }
.lx-footer-brand strong { color: var(--text); }
.lx-footer-col { display: flex; flex-direction: column; gap: 8px; }
.lx-footer-col strong { color: var(--text); font-size: 0.85rem; margin-bottom: 2px; }
.lx-footer-col a { color: var(--text-3); text-decoration: none; }
.lx-footer-col a:hover { color: var(--text); }
.lx-footer-bottom { border-top: 1px solid var(--border); padding-block: 16px 22px; font-size: 0.8rem; display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }
.lx-footer-mail { color: var(--text-2); text-decoration: none; font-weight: 500; }

/* ─── Plan cards (landing + subscription) ─────────────────────────────────── */
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); text-align: left; color: inherit; font: inherit; }
.plan-card.featured { border-color: color-mix(in srgb, var(--green-strong) 55%, var(--border)); box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--green-strong) 60%, transparent); }
.plan-card-select { cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.plan-card-select:hover { transform: translateY(-2px); }
.plan-card-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan-card.selected { border-color: var(--navy); box-shadow: 0 0 0 2px var(--navy); }
.plan-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-card-name { font-family: var(--font-display); font-size: 1.1rem; }
.plan-tag { font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--green-strong) 14%, transparent); color: var(--green); white-space: nowrap; }
.plan-tag-muted { background: color-mix(in srgb, var(--navy) 10%, transparent); color: var(--text-2); }
.plan-card-desc { color: var(--text-3); font-size: 0.88rem; line-height: 1.4; min-height: 2.5em; }
.plan-card-price { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; letter-spacing: -0.03em; }
.plan-card-per { font-size: 0.9rem; font-weight: 500; color: var(--text-3); margin-left: 2px; letter-spacing: 0; }
.plan-card-list { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.88rem; color: var(--text-2); flex: 1; }
.plan-card-list li { display: flex; gap: 8px; align-items: flex-start; }
.plan-card-list svg { flex: none; margin-top: 2px; color: var(--green-strong); }

/* ─── Subscription page + blocked frame ───────────────────────────────────── */
.sub-wrap { width: 100%; max-width: 1040px; margin: 0 auto; }
.sub-head { display: flex; flex-direction: column; gap: 6px; }
.sub-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.03em; }
.sub-checkout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.sub-summary { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.sub-summary-strong { font-weight: 700; font-size: 1.05rem; }
.sub-secure { display: flex; gap: 6px; align-items: flex-start; line-height: 1.4; }
.sub-secure svg { flex: none; margin-top: 1px; }
.sub-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.sub-center { min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.sub-center .spinner { width: 28px; height: 28px; color: var(--accent); }
.blocked { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.blocked-head { display: flex; align-items: center; gap: 10px; padding: 12px max(16px, calc((100vw - 1072px) / 2)); border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.blocked-org { padding-left: 10px; border-left: 1px solid var(--border); }
.blocked-switch { max-width: 200px; }
.blocked-main { flex: 1; padding: 32px 16px 48px; }
.blocked-foot { border-top: 1px solid var(--border); padding: 16px; display: flex; justify-content: center; color: var(--text-3); }

@media (max-width: 900px) {
  .lx-links { display: none; }
  .lx-menu-btn { display: inline-flex; }
  .lx-pain-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lx-rules { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .plan-grid { grid-template-columns: minmax(0, 1fr); max-width: 460px; margin-inline: auto; width: 100%; }
  .lx-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lx-footer-brand { grid-column: 1 / -1; }
  .legal-table td, .legal-table th { padding: 8px 10px; }
  .sub-checkout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .lx-pain-list { grid-template-columns: minmax(0, 1fr); }
  .blocked-org { display: none; }
}
.link-btn { all: unset; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:focus-visible { box-shadow: var(--focus); border-radius: 4px; }
.mfa-qr { width: 184px; height: 184px; padding: 10px; background: #fff; border-radius: 12px; border: 1px solid var(--border); flex: none; }
.mfa-secret { font-family: var(--font-mono); font-size: 0.82rem; word-break: break-all; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.usage-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 24px; background: color-mix(in srgb, var(--amber, #d97706) 12%, var(--surface)); border-bottom: 1px solid color-mix(in srgb, var(--amber, #d97706) 30%, var(--border)); font-size: 0.85rem; color: var(--text); }
.usage-banner.over { background: color-mix(in srgb, var(--red, #dc2626) 10%, var(--surface)); border-bottom-color: color-mix(in srgb, var(--red, #dc2626) 30%, var(--border)); }
.usage-banner > svg { width: 16px; height: 16px; flex: none; color: var(--amber, #b45309); }
.usage-banner.over > svg { color: var(--red, #dc2626); }
.usage-banner .btn { height: 28px; }
@media (max-width: 767px) { .usage-banner { padding: 8px 16px; font-size: 0.8rem; } }

/* ─── Landing (review 02/10): chip, flow, product screens, security, support ─ */
.lx-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; box-shadow: var(--shadow-sm); }
.lx-chip svg { color: var(--green-strong); }
.lx-hero h1 { max-width: 17ch; }
.lx-points { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.lx-points li { display: inline-flex; align-items: center; gap: 7px; font-size: 0.9rem; font-weight: 500; color: var(--text-2); }
.lx-points svg { color: var(--accent); }
.lx-kicker-on { color: var(--on-navy-2); }
.lx-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; position: relative; }
.lx-flow::before { content: ''; position: absolute; top: 22px; left: 22px; right: 22px; height: 2px; background: repeating-linear-gradient(90deg, var(--border-strong) 0 6px, transparent 6px 12px); z-index: 0; }
.lx-flow-step { display: flex; flex-direction: column; gap: 6px; position: relative; z-index: 1; }
.lx-flow-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--accent); box-shadow: var(--shadow-sm); transition: transform 0.2s, border-color 0.2s; }
.lx-flow-step:nth-child(5) .lx-flow-icon { color: #b45309; }
.lx-flow-step:nth-child(6) .lx-flow-icon { color: var(--green-strong); }
.lx-flow-step:hover .lx-flow-icon { transform: translateY(-2px); border-color: var(--accent); }
.lx-screens { display: flex; flex-direction: column; gap: 18px; }
.lx-screen-tabs { display: inline-flex; align-self: center; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); flex-wrap: wrap; justify-content: center; }
.lx-screen-tabs button { all: unset; cursor: pointer; padding: 8px 14px; border-radius: 9px; font-size: 0.9rem; font-weight: 600; color: var(--text-2); }
.lx-screen-tabs button.active { background: var(--navy); color: #fff; }
.lx-screen-tabs button:focus-visible { box-shadow: var(--focus); }
.lx-screen { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 2.2fr); gap: 28px; align-items: center; }
.lx-screen-copy { display: flex; flex-direction: column; gap: 8px; }
.lx-screen-copy strong { font-size: 1.15rem; font-family: var(--font-display); }
.lx-screen-copy p { margin: 0; color: var(--text-2); line-height: 1.6; }
.lx-frame { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 30px 60px -28px rgba(15, 30, 61, 0.45); }
.lx-frame.phone { max-width: 300px; justify-self: center; border-radius: 28px; }
.lx-frame-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.lx-frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.lx-frame img { display: block; width: 100%; height: auto; }
.lx-frame-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 260px; color: var(--text-3); font-size: 0.9rem; }
.lx-security { background: var(--navy); color: var(--on-navy); padding-block: 64px; margin-block: 24px; }
.lx-security h2 { color: #fff; }
.lx-sec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lx-sec-item { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); }
.lx-sec-item strong { color: #fff; }
.lx-sec-item span:last-child { color: var(--on-navy-2); font-size: 0.9rem; line-height: 1.5; }
.lx-sec-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(111, 227, 154, 0.14); color: #6fe39a; margin-bottom: 4px; }
.lx-sec-links { gap: 18px; }
.lx-sec-links a { color: #fff; font-weight: 500; font-size: 0.9rem; }
.lx-support { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lx-support-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color 0.2s, transform 0.2s; }
.lx-support-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.lx-support-card svg { color: var(--accent); }
.lx-support-card span { color: var(--text-2); font-size: 0.9rem; }
@media (max-width: 1080px) {
  .lx-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
  .lx-flow::before { display: none; }
}
@media (max-width: 900px) {
  .lx-screen { grid-template-columns: minmax(0, 1fr); }
  .lx-sec-grid, .lx-support { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .lx-flow { grid-template-columns: minmax(0, 1fr); }
  .lx-sec-grid, .lx-support { grid-template-columns: minmax(0, 1fr); }
  .lx-security { padding-block: 44px; }
}
@media (prefers-reduced-motion: reduce) { .lx-support-card, .lx-flow-icon { transition: none; } }
.lx-frame.phone .lx-frame-bar { display: none; }
.work-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.work-step { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 0.86rem; font-weight: 500; color: var(--text-2); }
.work-step:hover { border-color: var(--accent); color: var(--text); }
.work-step.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.work-step:focus-visible { box-shadow: var(--focus); }
.work-step[disabled] { opacity: 0.6; cursor: default; }
.work-step .spinner { width: 12px; height: 12px; }
.pq-progress { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--green-strong) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--green-strong) 30%, var(--border)); }
