/* ChatBill — sistem de design (site public + aplicație). v3, 2026.
   Token-uri: culori, tipografie, spațiere, raze, umbre. Temă deschisă + întunecată (automat sau data-theme). */
:root {
  /* culori */
  --bg: #f6f7fb;
  --bg-grad: radial-gradient(1200px 600px at 85% -10%, #e7e6ff 0%, transparent 60%), radial-gradient(900px 500px at -10% 10%, #dcfce7 0%, transparent 55%);
  --surface: #ffffff;
  --surface-2: #f2f3f8;
  --surface-3: #e9ebf3;
  --text: #0f1222;
  --text-2: #2b3047;
  --muted: #5b6178;
  --line: #e4e6ef;
  --line-strong: #d3d6e3;
  --brand: #4f46e5;
  --brand-2: #4338ca;
  --brand-ink: #ffffff;
  --brand-soft: #eef0ff;
  --accent: #16a34a;
  --wa: #128c4a;
  --wa-soft: #e8f7ee;
  --ok: #047857;
  --ok-soft: #e6f6ee;
  --warn: #b45309;
  --warn-soft: #fff4e5;
  --bad: #b91c1c;
  --bad-soft: #fdeceb;
  --focus: color-mix(in srgb, var(--brand) 55%, transparent);
  /* tipografie */
  --font: 'Inter', 'InterVariable', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  /* spațiere (scară 4px) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px; --s20: 80px;
  /* raze, umbre */
  --r-sm: 8px;
  --radius: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 2px 6px rgba(16, 24, 40, 0.05), 0 24px 48px -12px rgba(16, 24, 40, 0.18);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b0d16;
    --bg-grad: radial-gradient(1200px 600px at 85% -10%, rgba(99, 91, 255, 0.18) 0%, transparent 60%), radial-gradient(900px 500px at -10% 10%, rgba(34, 197, 94, 0.1) 0%, transparent 55%);
    --surface: #131624;
    --surface-2: #1a1e2f;
    --surface-3: #232840;
    --text: #eceef6;
    --text-2: #cdd1e0;
    --muted: #9ca3ba;
    --line: #262b40;
    --line-strong: #343a55;
    --brand: #8b85ff;
    --brand-2: #a39eff;
    --brand-ink: #0b0d16;
    --brand-soft: #22204a;
    --accent: #4ade80;
    --wa: #4ccb83;
    --wa-soft: #10251a;
    --ok: #4cc795;
    --ok-soft: #10261c;
    --warn: #f2b65e;
    --warn-soft: #2a1f0e;
    --bad: #f38383;
    --bad-soft: #2d1515;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 6px 20px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 30px 60px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0b0d16;
  --bg-grad: radial-gradient(1200px 600px at 85% -10%, rgba(99, 91, 255, 0.18) 0%, transparent 60%), radial-gradient(900px 500px at -10% 10%, rgba(34, 197, 94, 0.1) 0%, transparent 55%);
  --surface: #131624;
  --surface-2: #1a1e2f;
  --surface-3: #232840;
  --text: #eceef6;
  --text-2: #cdd1e0;
  --muted: #9ca3ba;
  --line: #262b40;
  --line-strong: #343a55;
  --brand: #8b85ff;
  --brand-2: #a39eff;
  --brand-ink: #0b0d16;
  --brand-soft: #22204a;
  --accent: #4ade80;
  --wa: #4ccb83;
  --wa-soft: #10251a;
  --ok: #4cc795;
  --ok-soft: #10261c;
  --warn: #f2b65e;
  --warn-soft: #2a1f0e;
  --bad: #f38383;
  --bad-soft: #2d1515;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 6px 20px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 30px 60px -12px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ bază */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; font-size: var(--fs-md); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; font-feature-settings: 'cv11', 'ss01'; }
body.site { background: var(--bg-grad), var(--bg); background-repeat: no-repeat; }
a { color: var(--brand); text-underline-offset: 3px; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.022em; color: var(--text); font-weight: 750; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.25rem); letter-spacing: -0.03em; }
h3 { font-size: 1.08rem; letter-spacing: -0.012em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--brand) 25%, transparent); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.mono { font-family: var(--mono); font-size: 0.92em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 200; background: var(--surface); padding: 8px 12px; border-radius: 8px; box-shadow: var(--shadow); }
.skip:focus { top: 8px; }
.eyebrow { display: inline-block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); margin-bottom: var(--s3); }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ico.lg { width: 22px; height: 22px; }

/* ------------------------------------------------------------------ antet + subsol site public */
.site-head { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.site-head .wrap { display: flex; align-items: center; gap: var(--s4); height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.12rem; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #6366f1 0%, #4f46e5 45%, #22c55e 130%); display: grid; place-items: center; color: #fff; font-size: 0.78rem; font-weight: 800; letter-spacing: 0; box-shadow: 0 4px 12px -4px rgba(79, 70, 229, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.nav { display: flex; gap: var(--s5); margin-left: auto; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 550; font-size: 0.94rem; }
.nav a:hover { color: var(--text); }
.nav .btn { color: var(--brand-ink); }
.nav .btn.secondary { color: var(--text); }
@media (max-width: 860px) { .nav .hide-m { display: none; } .nav { gap: var(--s3); } }
@media (max-width: 400px) { .nav .hide-xs { display: none; } }
.theme-btn { background: none; border: 1px solid var(--line); color: var(--muted); width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; cursor: pointer; padding: 0; flex: none; }
.theme-btn:hover { color: var(--text); background: var(--surface-2); }
.site-foot { border-top: 1px solid var(--line); margin-top: var(--s16); padding: var(--s12) 0 var(--s8); color: var(--muted); font-size: 0.9rem; }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--s6); }
@media (max-width: 760px) { .site-foot .cols { grid-template-columns: 1fr 1fr; } .site-foot .cols > :first-child { grid-column: 1 / -1; } }
.site-foot b { color: var(--text); display: block; margin-bottom: 6px; font-size: 0.86rem; }
.site-foot a { color: var(--muted); text-decoration: none; display: block; padding: 3px 0; }
.site-foot a:hover { color: var(--text); }
.site-foot p.small a, .site-foot .legal-line a { display: inline; padding: 0; }
.site-foot a.foot-wa { color: var(--text-2); font-weight: 600; }
.site-foot p.made-by { margin-top: var(--s6); text-align: center; font-size: 0.875rem; color: var(--muted); }
.site-foot p.made-by a { display: inline; padding: 0; font-size: inherit; color: var(--brand); font-weight: 700; text-underline-offset: 4px; }
.site-foot p.made-by a:hover { color: var(--brand); text-decoration: underline; }
.site-foot .legal-line { margin-top: var(--s8); padding-top: var(--s5); border-top: 1px solid var(--line); font-size: var(--fs-xs); display: flex; gap: var(--s4); flex-wrap: wrap; justify-content: space-between; }

/* ------------------------------------------------------------------ butoane, formulare */
.btn { --b: var(--brand); display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; background: var(--b); color: var(--brand-ink); padding: 10px 16px; min-height: 40px; border-radius: 11px; font-weight: 620; font-size: 0.94rem; cursor: pointer; text-decoration: none; line-height: 1.2; font-family: inherit; letter-spacing: -0.005em; transition: background 0.15s var(--ease), transform 0.15s var(--ease), box-shadow 0.15s var(--ease), border-color 0.15s; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.14); white-space: nowrap; }
.btn:hover { background: var(--brand-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); box-shadow: var(--shadow-xs); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--brand); border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.wa { background: var(--wa); color: #fff; }
.btn.dark { background: var(--text); color: var(--bg); }
.btn.lg { padding: 13px 22px; min-height: 48px; font-size: 1rem; border-radius: 13px; }
.btn.sm { padding: 6px 11px; min-height: 32px; font-size: 0.84rem; border-radius: 9px; }
.btn.block { width: 100%; }
.btn .ico { width: 16px; height: 16px; }
.btn.loading { color: transparent !important; position: relative; pointer-events: none; }
.btn.loading::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid currentColor; border-color: var(--brand-ink) transparent var(--brand-ink) transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
label { display: block; font-size: 0.84rem; font-weight: 600; color: var(--text-2); margin: 0 0 6px; }
input, select, textarea { width: 100%; padding: 10px 12px; min-height: 42px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 0.95rem; min-width: 0; transition: border-color 0.15s, box-shadow 0.15s; }
textarea { min-height: 84px; resize: vertical; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--line-strong)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
input[aria-invalid='true'] { border-color: var(--bad); }
input[type='checkbox'], input[type='radio'] { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand); vertical-align: -3px; }
input[type='color'] { padding: 3px; height: 42px; width: 64px; }
.field { margin-bottom: var(--s4); }
.hint { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.err { font-size: var(--fs-xs); color: var(--bad); margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--text-2); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
@media (max-width: 900px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .grid4 { grid-template-columns: minmax(0, 1fr); } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: var(--s3); }
.spacer { flex: 1; }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; font: inherit; font-weight: 600; font-size: 0.9rem; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed='true'] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.seg .save { color: var(--ok); font-size: var(--fs-xs); margin-left: 4px; }

/* ------------------------------------------------------------------ carduri, tabele, insigne */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); box-shadow: var(--shadow-xs); }
.card + .card { margin-top: var(--s4); }
:is(.grid2, .grid3, .grid4, .plans, .features, .steps, .stack, .row) > .card + .card { margin-top: 0; }
.card h2 { font-size: 1.12rem; letter-spacing: -0.015em; }
.card.pad-lg { padding: var(--s8); }
.card.soft { background: var(--surface-2); box-shadow: none; }
.card.hover { transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s; }
.card.hover:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card-head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.card-head h2, .card-head h3 { margin: 0; }
.stat { font-size: 1.65rem; font-weight: 780; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi { display: grid; gap: 2px; }
.kpi .label { font-size: var(--fs-sm); color: var(--muted); font-weight: 550; }
.kpi .delta { font-size: var(--fs-xs); font-weight: 650; }
.table-wrap { overflow-x: auto; margin: 0 calc(var(--s5) * -1); padding: 0 var(--s5); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th { text-align: left; font-weight: 650; color: var(--muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr { transition: background 0.12s; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  table.stack-m thead { display: none; }
  table.stack-m tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.stack-m td { border: 0; padding: 0; }
  table.stack-m td.num { text-align: right; }
  table.stack-m td[data-hide-m] { display: none; }
}
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 0.74rem; font-weight: 650; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid transparent; line-height: 1.6; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.badge.plain::before { display: none; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--text); font-size: 0.93rem; border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent); }
.notice.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.notice.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.notice.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.notice > div { flex: 1; min-width: 0; }
.empty { padding: var(--s10) var(--s4); text-align: center; color: var(--muted); display: grid; justify-items: center; gap: var(--s2); }
.empty .empty-ic { width: 52px; height: 52px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: var(--s2); }
.empty b { color: var(--text); font-size: 1.02rem; }
.empty .btn { margin-top: var(--s2); }
.skel { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; min-height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.meter { display: grid; gap: 6px; }
.meter .top { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-sm); }
.meter .top b { font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 60%, var(--accent))); transition: width 0.6s var(--ease); }
.bar.warn > i { background: var(--warn); }
.bar.bad > i { background: var(--bad); }
.divider { height: 1px; background: var(--line); margin: var(--s5) 0; border: 0; }
kbd { font-family: var(--mono); font-size: 0.8em; padding: 1px 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); }

/* ------------------------------------------------------------------ aplicație: bară laterală + conținut */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: var(--s4) var(--s3); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.side .logo { padding: 6px 10px 18px; }
.side .nav-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; padding: 14px 10px 6px; }
.side a.nav-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-weight: 550; font-size: 0.92rem; transition: background 0.12s, color 0.12s; }
.side a.nav-item .ico { color: var(--muted); }
.side a.nav-item:hover { background: var(--surface-2); color: var(--text); }
.side a.nav-item.active { background: var(--brand-soft); color: var(--brand); }
.side a.nav-item.active .ico { color: var(--brand); }
.side .company-switch { margin: 0 4px 10px; }
.side .side-foot { margin-top: auto; padding-top: var(--s3); display: grid; gap: var(--s2); }
.plan-chip { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: var(--fs-sm); }
.plan-chip b { font-weight: 700; }
.plan-chip .bar { flex: 1; height: 6px; }
.main { padding: var(--s6) var(--s8); min-width: 0; max-width: 1280px; width: 100%; }
.main-head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s5); flex-wrap: wrap; }
.main-head h1, .main-head .h1 { font-size: 1.6rem; margin: 0; letter-spacing: -0.03em; }
.main-head .sub { width: 100%; margin: -6px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.mobile-bar { display: none; }
.scrim { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); transform: translateX(-102%); transition: transform 0.25s var(--ease); z-index: 60; box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .side.open + .scrim, .scrim.show { display: block; position: fixed; inset: 0; background: rgba(8, 10, 20, 0.45); z-index: 55; }
  .mobile-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 30; width: 100%; }
  .mobile-bar .spacer { flex: 1; }
  .main { padding: var(--s4); }
  .main-head h1, .main-head .h1 { font-size: 1.35rem; }
}
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: var(--s5); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; color: var(--muted); font: inherit; font-weight: 600; font-size: 0.92rem; cursor: pointer; white-space: nowrap; text-decoration: none; margin-bottom: -1px; }
.tabs button:hover, .tabs a:hover { color: var(--text); }
.tabs button.active, .tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ------------------------------------------------------------------ dialog */
dialog { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0; background: var(--surface); color: var(--text); width: min(940px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow-lg); }
dialog[open] { animation: pop 0.2s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.985); } }
dialog::backdrop { background: rgba(8, 10, 20, 0.5); backdrop-filter: blur(3px); }
.dlg-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); gap: 10px; }
.dlg-head h2 { margin: 0; font-size: 1.1rem; }
.dlg-body { padding: 18px 20px; overflow-y: auto; max-height: calc(100vh - 180px); }
.dlg-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
@media (max-width: 640px) {
  dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; border: 0; }
  .dlg-body { max-height: none; flex: 1; }
  dialog[open] { display: flex; flex-direction: column; }
  .dlg-foot { border-radius: 0; position: sticky; bottom: 0; }
}

/* ------------------------------------------------------------------ autocompletare */
.ac { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto; display: none; padding: 4px; }
.ac-list.show { display: block; }
.ac-list div { padding: 8px 10px; cursor: pointer; font-size: 0.92rem; border-radius: 8px; }
.ac-list div:hover, .ac-list div.hl { background: var(--surface-2); }

/* ------------------------------------------------------------------ toast */
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 1000; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
#toast div { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; background: var(--text); color: var(--bg); padding: 12px 14px; border-radius: 12px; font-size: 0.92rem; box-shadow: var(--shadow-lg); animation: toastIn 0.25s var(--ease); }
#toast div.bad { background: var(--bad); color: #fff; }
#toast div.ok::before { content: '✓'; font-weight: 800; color: var(--accent); }
#toast a { color: inherit; font-weight: 700; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* ------------------------------------------------------------------ WhatsApp (machetă landing) */
.phone { position: relative; background: linear-gradient(160deg, #1f2937, #0b1015); border-radius: 44px; padding: 10px; width: min(360px, 100%); margin: 0 auto; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.06) inset; }
.phone::before { content: ''; position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 92px; height: 24px; border-radius: 14px; background: #000; z-index: 2; }
.phone-screen { border-radius: 35px; overflow: hidden; background: #efeae2; display: flex; flex-direction: column; height: 600px; }
.wa-top { background: #075e54; color: #fff; padding: 46px 14px 10px; display: flex; align-items: center; gap: 10px; }
.wa-top .av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #22c55e); display: grid; place-items: center; font-weight: 800; font-size: 0.75rem; }
.wa-top b { display: block; font-size: 0.95rem; }
.wa-top small { opacity: 0.8; font-size: 0.74rem; }
.chat { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; overflow: hidden; justify-content: flex-end; background-color: #efeae2; background-image: radial-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px); background-size: 14px 14px; }
.wa-input { display: flex; gap: 8px; align-items: center; padding: 8px; background: #f0f2f5; }
.wa-input span { flex: 1; background: #fff; border-radius: 20px; padding: 8px 12px; color: #667781; font-size: 0.8rem; min-height: 34px; }
.wa-input i { width: 34px; height: 34px; border-radius: 50%; background: #00a884; display: grid; place-items: center; color: #fff; font-style: normal; }
.msg { max-width: 84%; padding: 6px 9px 7px; border-radius: 9px; line-height: 1.38; box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13); white-space: pre-line; color: #111b21; position: relative; }
.msg.in { background: #ffffff; align-self: flex-start; border-top-left-radius: 2px; }
.msg.out { background: #d9fdd3; align-self: flex-end; border-top-right-radius: 2px; }
.msg .t { float: right; font-size: 0.66rem; color: #667781; margin: 6px 0 -4px 10px; }
.msg .btns { display: grid; gap: 1px; margin: 6px -9px -7px; border-top: 1px solid #e9edef; }
.msg .btns span { color: #027eb5; text-align: center; padding: 7px; font-weight: 600; background: #fff; }
.msg .btns span + span { border-top: 1px solid #e9edef; }
.msg.doc { display: flex; align-items: center; gap: 10px; padding: 8px; min-width: 220px; }
.msg.doc .pdf { width: 34px; height: 40px; border-radius: 4px; background: #e2513b; color: #fff; font-size: 0.6rem; font-weight: 800; display: grid; place-items: center; flex: none; }
.msg.doc small { display: block; color: #667781; font-size: 0.7rem; }
.msg.voice { display: flex; align-items: center; gap: 8px; min-width: 200px; }
.msg.voice .wave { flex: 1; height: 20px; background: repeating-linear-gradient(90deg, #8696a0 0 2px, transparent 2px 5px); mask: linear-gradient(90deg, #000 0 60%, rgba(0, 0, 0, 0.4) 60%); -webkit-mask: linear-gradient(90deg, #000 0 60%, rgba(0, 0, 0, 0.4) 60%); border-radius: 2px; }
.typing { align-self: flex-start; background: #fff; border-radius: 9px; padding: 9px 12px; display: flex; gap: 4px; box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #8696a0; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.chat > * { animation: msgIn 0.35s var(--ease) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.float-card { position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow-lg); font-size: 0.8rem; display: flex; gap: 10px; align-items: center; z-index: 3; }
.float-card .dot { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
@media (max-width: 900px) { .float-card { display: none; } }

/* ------------------------------------------------------------------ secțiuni landing */
.hero { padding: var(--s16) 0 var(--s12); position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: var(--s12); align-items: center; }
@media (max-width: 960px) { .hero { padding-top: var(--s10); } .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: var(--s10); } }
.hero h1 .grad { background: linear-gradient(90deg, var(--brand) 0%, #7c3aed 45%, var(--accent) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 580px; }
.pill { display: inline-flex; gap: 8px; align-items: center; padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-weight: 600; font-size: 0.83rem; margin-bottom: var(--s5); box-shadow: var(--shadow-xs); }
.pill .tag { background: var(--wa-soft); color: var(--wa); padding: 2px 8px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; }
.trust-row { display: flex; gap: var(--s5); flex-wrap: wrap; margin-top: var(--s5); color: var(--muted); font-size: var(--fs-sm); }
.trust-row span { display: inline-flex; gap: 6px; align-items: center; }
.trust-row .ico { color: var(--ok); }
.section { padding: var(--s16) 0; }
.section.tight { padding: var(--s10) 0; }
.section-head { max-width: 680px; margin: 0 auto var(--s10); text-align: center; }
.section-head p { color: var(--muted); font-size: 1.06rem; }
.band { background: var(--surface); border-block: 1px solid var(--line); }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .features { grid-template-columns: minmax(0, 1fr); } }
.feature p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.feature .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: var(--s4); }
.feature.wide { grid-column: span 2; }
@media (max-width: 600px) { .feature.wide { grid-column: auto; } }
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.step p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--text); color: var(--bg); font-weight: 750; margin-bottom: var(--s4); font-size: 0.9rem; }
.trust { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s10); align-items: center; }
@media (max-width: 900px) { .trust { grid-template-columns: minmax(0, 1fr); } }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist li::before { content: ''; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23047857' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 13px no-repeat; margin-top: 2px; }
.flow { display: grid; gap: 10px; }
.flow-step { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 0.92rem; }
.flow-step .n { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 750; font-size: 0.8rem; flex: none; }
.flow-step code { font-family: var(--mono); font-size: 0.8rem; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }

/* ------------------------------------------------------------------ prețuri */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); align-items: stretch; }
@media (max-width: 1080px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .plans { grid-template-columns: minmax(0, 1fr); } }
.plan { display: flex; flex-direction: column; position: relative; padding: var(--s6); }
.plan h3 { font-size: 1.05rem; margin-bottom: 4px; }
.plan .price { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 0.9rem; font-weight: 550; color: var(--muted); letter-spacing: 0; }
.plan .per { font-size: var(--fs-sm); color: var(--muted); min-height: 1.6em; }
.plan ul { list-style: none; padding: 0; margin: var(--s5) 0 var(--s6); flex: 1; display: grid; gap: 9px; align-content: start; font-size: 0.92rem; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li::before { content: ''; flex: none; width: 18px; height: 18px; margin-top: 2px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 15px no-repeat; }
.plan li.no { color: var(--muted); }
.plan li.no::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E"); }
.plan.featured { border: 1.5px solid var(--brand); box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow); }
.plan .ribbon { position: absolute; top: -12px; left: var(--s6); background: var(--brand); color: var(--brand-ink); font-size: 0.72rem; font-weight: 750; padding: 3px 10px; border-radius: 999px; letter-spacing: 0.02em; }
.plan.current { border-color: var(--ok); }
.compare td, .compare th { text-align: center; }
.compare td:first-child, .compare th:first-child { text-align: left; }
details.faq { border-bottom: 1px solid var(--line); padding: 4px 0; }
details.faq summary { cursor: pointer; font-weight: 650; list-style: none; padding: 14px 36px 14px 0; position: relative; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: ''; position: absolute; right: 4px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform 0.2s var(--ease); }
details.faq[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details.faq p { margin: 0 0 14px; color: var(--muted); }
.cta { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: var(--s12) var(--s6); text-align: center; color: #fff; background: radial-gradient(600px 300px at 15% 0%, rgba(34, 197, 94, 0.35), transparent 60%), radial-gradient(700px 400px at 100% 100%, rgba(124, 58, 237, 0.5), transparent 60%), #1e1b4b; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, 0.78); }
.cta .btn.secondary { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.22); }
.cta .btn:not(.secondary) { background: #fff; color: #1e1b4b; }
.legal { padding-top: var(--s10); }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.legal h2 { margin-top: 1.8em; font-size: 1.25rem; }
.legal li { margin-bottom: 0.4em; }
.legal p, .legal li { color: var(--text-2); }

/* ------------------------------------------------------------------ autentificare */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { background: radial-gradient(500px 300px at 20% 10%, rgba(34, 197, 94, 0.3), transparent 60%), radial-gradient(600px 400px at 100% 100%, rgba(124, 58, 237, 0.45), transparent 60%), #1e1b4b; color: #fff; padding: var(--s12); display: flex; flex-direction: column; justify-content: space-between; gap: var(--s8); }
.auth-side .logo { color: #fff; }
.auth-side h2 { color: #fff; font-size: clamp(1.6rem, 2.6vw, 2.2rem); max-width: 460px; }
.auth-side p, .auth-side li { color: rgba(255, 255, 255, 0.78); }
.auth-side .checklist li::before { background-color: rgba(255, 255, 255, 0.14); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386efac' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); }
.auth-main { display: flex; flex-direction: column; padding: var(--s6) var(--s4); }
.auth-main .top { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); max-width: 420px; width: 100%; margin: 0 auto; }
.auth-card { width: 100%; max-width: 420px; margin: auto; padding: var(--s8) 0; }
.auth-card h1 { font-size: 1.75rem; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: var(--s6); }
.wizard-steps.registration-progress { list-style: none; padding: 0; width: 100%; max-width: 420px; margin: 24px auto 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.registration-progress li { padding: 10px 4px; text-align: center; font-size: 0.78rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.registration-progress li.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.registration-progress li.done { color: var(--ok); }
.pw { position: relative; }
.pw input { padding-right: 46px; }
.pw button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); width: 38px; height: 34px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.pw button:hover { color: var(--text); background: var(--surface-2); }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.strength i { height: 4px; border-radius: 4px; background: var(--surface-3); }
.strength[data-s='1'] i:nth-child(-n + 1) { background: var(--bad); }
.strength[data-s='2'] i:nth-child(-n + 2) { background: var(--warn); }
.strength[data-s='3'] i:nth-child(-n + 3) { background: #65a30d; }
.strength[data-s='4'] i { background: var(--ok); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: var(--fs-sm); margin: var(--s5) 0; }
.or::before, .or::after { content: ''; height: 1px; background: var(--line); flex: 1; }
@media (max-width: 900px) { .auth { grid-template-columns: minmax(0, 1fr); } .auth-side { display: none; } }

/* ------------------------------------------------------------------ ghid de pornire */
.wizard-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: var(--s5); counter-reset: w; }
.wizard-steps span { position: relative; padding: 10px 12px 10px 40px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 0.84rem; font-weight: 600; }
.wizard-steps span::before { counter-increment: w; content: counter(w); position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); font-size: 0.74rem; }
.wizard-steps span.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.wizard-steps span.on::before { background: var(--brand); color: var(--brand-ink); }
.wizard-steps span.done { color: var(--ok); }
.wizard-steps span.done::before { content: '✓'; background: var(--ok); color: #fff; }
.preview-frame { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
@media (max-width: 760px) { .preview-frame { height: 460px; } }

/* ------------------------------------------------------------------ upgrade (limită de plan) */
.upsell { display: flex; gap: var(--s4); align-items: center; padding: var(--s4) var(--s5); border-radius: var(--radius); background: linear-gradient(120deg, var(--brand-soft), color-mix(in srgb, var(--wa-soft) 70%, var(--brand-soft))); border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent); flex-wrap: wrap; }
.upsell > div { flex: 1; min-width: 200px; }
.upsell b { display: block; }

.fade-up { animation: msgIn 0.5s var(--ease) both; }
.hidden { display: none !important; }

/* ------------------------------------------------------------------ chat (ca ChatGPT): prima pagină + aplicație */
.chat-app { display: flex; flex-direction: column; min-height: 0; height: 100%; width: 100%; }
.chat-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.chat-list { max-width: 780px; margin: 0 auto; padding: var(--s6) var(--s4) var(--s4); display: flex; flex-direction: column; gap: 14px; }
.chat-intro { text-align: center; padding: 8vh 0 var(--s6); }
.chat-intro h1 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); margin: 14px 0 6px; }
.chat-intro p { max-width: 520px; margin: 0 auto; }
.chat-logo .logo-mark { width: 52px; height: 52px; border-radius: 16px; font-size: 1.05rem; margin: 0 auto; }
.chat-row { display: flex; gap: 10px; align-items: flex-end; animation: msgIn 0.25s var(--ease) both; }
.chat-row.me { justify-content: flex-end; }
.chat-row .avatar { width: 30px; height: 30px; border-radius: 10px; flex: none; display: grid; place-items: center; font-size: 0.68rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #6366f1, #4f46e5 45%, #22c55e 130%); }
.chat-row .msg { max-width: min(560px, 86%); padding: 10px 14px; border-radius: 18px; line-height: 1.5; font-size: 0.95rem; overflow-wrap: anywhere; }
.chat-row.bot .msg { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.chat-row.me .msg { background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 6px; }
.chat-row.me .msg a { color: inherit; }
.chat-row .msg.card { width: min(560px, 86%); box-shadow: var(--shadow-xs); }
.msg-text b { font-weight: 700; }
.msg-meta { display: flex; justify-content: flex-end; gap: 8px; font-size: 0.7rem; opacity: 0.65; margin-top: 4px; }
.msg-meta .via { font-weight: 600; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.msg-actions .btn:disabled { opacity: 0.45; }
.msg-actions .btn.chosen:disabled { opacity: 1; outline: 2px solid var(--focus); }
.doc-card { display: flex; gap: 12px; align-items: center; }
.doc-card .pdf { width: 38px; height: 46px; border-radius: 6px; background: #e2513b; color: #fff; font-size: 0.66rem; font-weight: 800; display: grid; place-items: center; flex: none; }
.doc-meta { display: grid; min-width: 0; }
.doc-meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-frame { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: 10px; margin-top: 10px; background: #fff; }
.dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
.chat-dock { padding: 8px var(--s4) calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.chat-dock > * { max-width: 780px; margin-left: auto; margin-right: auto; }
.chat-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.chat-chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 0.86rem; cursor: pointer; white-space: nowrap; max-width: 86vw; overflow: hidden; text-overflow: ellipsis; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chat-composer { display: flex; align-items: flex-end; gap: 8px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 22px; padding: 8px 8px 8px 16px; box-shadow: var(--shadow); }
.chat-composer:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent), var(--shadow); }
.chat-composer textarea { border: 0; box-shadow: none !important; outline: none; padding: 8px 0; min-height: 40px; max-height: 180px; resize: none; background: transparent; font-size: 1rem; line-height: 1.45; }
.chat-send { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; cursor: pointer; flex: none; }
.chat-send .ico { transform: rotate(-90deg); }
.chat-send:hover { background: var(--brand-2); }
.chat-foot { text-align: center; margin-top: 8px; }
.signup-card label { font-size: 0.8rem; }
/* prima pagină: chatul e eroul */
.hero-chat { height: calc(100dvh - 64px); min-height: 520px; display: flex; }
.hero-chat .chat-app { flex: 1; }
/* aplicația: chatul umple ecranul */
.main.chat-main { padding: 0; max-width: none; height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.chat-top { display: flex; align-items: center; gap: 10px; padding: 12px var(--s5); border-bottom: 1px solid var(--line); }
.chat-top h1 { font-size: 1.05rem; margin: 0; }
@media (max-width: 900px) {
  .main.chat-main { height: calc(100dvh - 57px); }
  .chat-top { display: none; }
  .chat-row .msg, .chat-row .msg.card { max-width: 88%; width: auto; }
  .chat-row .msg.card { width: 88%; }
  .chat-intro { padding-top: 4vh; }
}
.side details.more summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; color: var(--muted); font-weight: 550; font-size: 0.92rem; }
.side details.more summary::-webkit-details-marker { display: none; }
.side details.more summary:hover { background: var(--surface-2); color: var(--text); }
.side details.more[open] summary { color: var(--text); }
.err:empty { display: none; }

/* ---------- Facturi din SPV (js/spv-view.js) ---------- */
.spv-cos { display: grid; gap: 12px; }
.spv-co + .spv-co { border-top: 1px solid var(--line); padding-top: 12px; }
.spv-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px 12px; margin-bottom: 16px; padding: 14px 16px; }
.spv-filters .field { margin: 0; }
.spv-filters .spv-search { grid-column: span 2; }
.spv-kpis .stat { font-size: 1.35rem; }
.spv-mini { font-size: 0.88rem; }
.spv-mini td { padding: 7px 6px; }
.spv-barcell { width: 38%; }
.spv-barcell .bar { height: 6px; }
.spv-table tbody tr { cursor: pointer; }
.spv-table tr.is-overdue td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.spv-table tr.is-soon td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.spv-msg { padding: 12px 0; border-bottom: 1px solid var(--line); }
.spv-msg:last-child { border-bottom: 0; }
.spv-msg-text { margin-top: 6px; white-space: pre-line; font-size: 0.92rem; overflow-wrap: anywhere; }
.spv-back { margin-bottom: 4px; }
.spv-doc { display: grid; gap: 18px; }
.spv-doc .eyebrow { margin-bottom: 4px; color: var(--muted); }
.spv-doc-top { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.spv-meta { display: grid; grid-template-columns: repeat(4, minmax(110px, auto)); gap: 10px 22px; }
.spv-meta > div { display: grid; gap: 2px; align-content: start; }
.spv-meta .badge { justify-self: start; }
.spv-due.bad b { color: var(--bad); }
.spv-due.warn b { color: var(--warn); }
.spv-big { text-align: right; }
.spv-parties { gap: 14px; }
.spv-party { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.spv-party-name { font-weight: 720; font-size: 1.05rem; overflow-wrap: anywhere; }
.spv-refs { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.88rem; }
.spv-lines .spv-line-m { display: none; }
.spv-bottom { align-items: start; gap: 18px; }
.spv-totals .spv-total { font-size: 1.12rem; }
.spv-iban { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 0; }
.spv-iban .mono { font-size: 0.95rem; letter-spacing: 0.02em; }
.spv-notes p { margin: 4px 0; }
.spv-notes .notice + .notice { margin-top: 6px; }
.spv-foot { margin: 0; border-top: 1px solid var(--line); padding-top: 12px; }
@media (max-width: 760px) {
  .spv-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spv-big { text-align: left; }
  .spv-filters .spv-search { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .spv-lines .spv-line-m { display: block; }
  .spv-table tr { grid-template-columns: 1fr auto; }
  .spv-barcell { width: 30%; }
}
@media print {
  .side, .mobile-bar, .main-head .row, .spv-back, #toast, .skip { display: none !important; }
  .app, .main { display: block; padding: 0; margin: 0; }
  body { background: #fff; }
  .spv-doc { box-shadow: none; border: 0; padding: 0; }
  .card { break-inside: avoid; }
}

/* extras bancar reconciliat */
.bank-tx { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-width: 0; }
.bank-tx .small { overflow-wrap: anywhere; }
.bank-tx select { max-width: 100%; }
.stack > * { min-width: 0; }
.bank-tx .row > p { flex: 1 1 220px; min-width: 0; margin: 0; }
