/* invoice-gen.net — stylesheet
   Direction A, "Fresh SaaS": bright white canvas with soft lavender and sky
   light, a violet-to-blue brand gradient used for the main action and the
   brand mark, floating white cards with soft violet shadows.
   One typeface: Plus Jakarta Sans (self-hosted). */
@font-face { font-family: "Plus Jakarta Sans"; src: url("/assets/fonts/PlusJakartaSans-Variable.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
:root {
  --paper: #ffffff;
  --desk: #f6f7fb;
  --night: #151a2d;
  --night-2: #232a45;
  --ink: #151a2d;
  --ink-2: #2a3150;
  --muted: #4f587a;
  --faint: #8c93ad;
  --rule: #e6e8f2;
  --rule-2: #eff1f7;
  --brand: #5b4dff;
  --brand-2: #4a3cf0;
  --brand-ink: #4436d8;
  --brand-soft: #f3f1ff;
  --grad: linear-gradient(135deg, #6d4dff 0%, #4f7bff 100%);
  --ion: #12b76a;
  --hl: #dcd6ff;
  --hl-soft: #f3f1ff;
  --ok: #0b8a52;
  --ok-bg: #e8f8ef;
  --info: #3b5bdb;
  --info-bg: #edf1ff;
  --warn: #a15c07;
  --warn-bg: #fef4e2;
  --bad: #d92d20;
  --bad-bg: #fdeceb;
  --font: "Plus Jakarta Sans", "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
  --r: 10px;
  --r-lg: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --max: 1220px;
  --shadow-1: 0 1px 2px rgba(21, 26, 45, .05), 0 0 0 1px #eceef6;
  --shadow-2: 0 0 0 1px #eceefb, 0 24px 50px -24px rgba(53, 46, 140, .28);
  --shadow-3: 0 0 0 1px #eceefb, 0 40px 80px -30px rgba(53, 46, 140, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--hl); text-decoration-thickness: 3px; }
h1, h2, h3, h4 { font-family: var(--font); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; text-wrap: balance; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 2.4vw, 1.95rem); }
h3 { font-size: 1.08rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
::selection { background: var(--hl); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--hl); border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: 24px; }
[hidden] { display: none !important; }
.ico { width: 18px; height: 18px; flex: none; }
.lede { color: var(--muted); font-size: 1.05rem; max-width: 56ch; }
.hint { font-size: .86rem; color: var(--muted); }
button, a, input, select, textarea { touch-action: manipulation; }
@media (max-width: 600px) { .wrap { padding-inline: 16px; } }

/* ---------- header ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--paper); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font: 700 1.1rem/1 var(--font); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand .brand-mark { width: 30px; height: 30px; flex: none; border-radius: 7px; }
.brand-name { white-space: nowrap; }
.brand-name .tld { color: var(--faint); font-weight: 500; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .94rem; padding: 7px 11px; border-radius: var(--r); }
.nav a:hover { color: var(--ink); background: var(--desk); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--hl); border-radius: 0; }
.nav a.btn { margin-left: 8px; color: #fff; }
.nav a.btn:hover { background: #1e293b; color: #fff; }
.nav-toggle { display: none; margin-left: auto; width: 42px; height: 42px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s; }
.nav-toggle span:nth-child(1) { top: 14px; } .nav-toggle span:nth-child(2) { top: 20px; } .nav-toggle span:nth-child(3) { top: 26px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 62px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--rule); padding: 6px 16px 16px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 2px; border-radius: 0; border-bottom: 1px solid var(--rule-2); font-size: 1.02rem; }
  .nav a[aria-current="page"] { box-shadow: none; }
  .nav a.btn { margin: 14px 0 0; border-bottom: 0; justify-content: center; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 16px; border-radius: var(--r);
  border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
  font: 600 .94rem/1 var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; user-select: none;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary, .btn-dark, .btn-ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-primary:hover, .btn-dark:hover, .btn-ink:hover { background: #1e293b; border-color: #1e293b; color: #fff; }
.btn-white, .btn-line, .btn-ghost { background: var(--paper); color: var(--ink); border-color: #cdd4df; }
.btn-white:hover, .btn-line:hover, .btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-soft { background: var(--desk); border-color: var(--desk); color: var(--ink); }
.btn-soft:hover { border-color: #cdd4df; color: var(--ink); }
.btn-glass { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-danger { background: var(--paper); color: var(--bad); border-color: #e7b8b4; }
.btn-danger:hover { background: var(--bad-bg); color: var(--bad); }
.btn-lg { min-height: 50px; padding: 13px 22px; font-size: 1rem; }
.btn-sm { min-height: 36px; padding: 7px 12px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.done-pop { box-shadow: 0 0 0 4px var(--hl); }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink); font: 500 .92rem var(--font); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { text-decoration-color: var(--hl); text-decoration-thickness: 3px; }
.link-btn.danger { color: var(--bad); }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: var(--r); border: 1px solid var(--rule); background: var(--paper); color: var(--ink); cursor: pointer; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- form controls ---------- */
.f { display: grid; gap: 6px; margin-bottom: 14px; min-width: 0; }
.f-label { font-size: .86rem; font-weight: 600; }
.in {
  width: 100%; min-height: 42px; padding: 9px 11px; border-radius: var(--r);
  border: 1px solid #d3d9e3; background: var(--paper); color: var(--ink); font: 400 .97rem/1.4 var(--font);
}
.in::placeholder { color: #98a2b3; }
.in:hover { border-color: #a7b1c0; }
.in:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--hl); }
textarea.in { min-height: 72px; resize: vertical; line-height: 1.5; }
select.in { appearance: none; -webkit-appearance: none; padding-right: 32px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23111' stroke-width='1.5'/%3E%3C/svg%3E") right 11px center / 11px no-repeat; cursor: pointer; }
.in.invalid, .fi.invalid { border-color: var(--bad) !important; box-shadow: 0 0 0 3px var(--bad-bg) !important; }
.shake { animation: shake .4s; }
@keyframes shake { 25%, 75% { transform: translateX(-4px); } 50% { transform: translateX(4px); } }
.check-line { display: flex; gap: 8px; align-items: center; font-size: .92rem; color: var(--muted); margin-bottom: 8px; }
.check-line input { accent-color: var(--ink); width: 17px; height: 17px; }
.seg { display: inline-flex; border: 1px solid #d3d9e3; border-radius: var(--r); overflow: hidden; flex: none; }
.seg button { border: 0; background: var(--paper); padding: 6px 10px; font: 600 .82rem var(--font); color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid #d3d9e3; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.chip { border: 1px solid #d3d9e3; background: var(--paper); color: var(--ink); font: 500 .82rem var(--font); padding: 5px 10px; border-radius: 999px; cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.span-2 { grid-column: 1 / -1; }
@media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } }

/* reveal: content stays visible; nothing waits on scroll */
.reveal { opacity: 1; transform: none; }

/* =====================================================================
   Generator
   ===================================================================== */
.gen { background: var(--desk); padding-block: 22px 72px; border-bottom: 1px solid var(--rule); }
.gen-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.gen-head h1 { margin: 0 0 4px; }
.gen-head p { margin: 0; color: var(--muted); }
.gen-ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .88rem; color: var(--muted); }
.gen-ticks li { display: inline-flex; align-items: center; gap: 6px; }
.gen-ticks svg { width: 15px; height: 15px; color: var(--ink); stroke-width: 2.6; }
.gen-grid { display: grid; grid-template-columns: minmax(0, 1fr) 286px; gap: 20px; align-items: start; }
.sheet-col { min-width: 0; }

.sheet { --accent: #5b4dff; position: relative; background: var(--paper); border: 1px solid #dbe1ea; border-radius: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 24px -16px rgba(0, 0, 0, .18); padding: clamp(18px, 4.2vw, 46px); view-transition-name: invoice-sheet; }
::view-transition-old(invoice-sheet), ::view-transition-new(invoice-sheet) { animation-duration: .25s; }

.fi { width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid #d8dee8; border-radius: 4px; padding: 7px 9px; line-height: 1.4; transition: border-color .12s, box-shadow .12s; }
.fi::placeholder { color: #98a2b3; }
.fi:hover { border-color: #b2bccb; }
.fi:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--hl); }
textarea.fi { resize: none; overflow: hidden; display: block; }
select.fi { appearance: none; -webkit-appearance: none; padding-right: 28px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23111' stroke-width='1.5'/%3E%3C/svg%3E") right 9px center / 11px no-repeat; cursor: pointer; }
.fi[type="date"] { -webkit-appearance: none; appearance: none; min-height: 36px; display: block; }
.fi[type="date"]::-webkit-date-and-time-value { text-align: left; }
.fi-strong { font-weight: 600; }
.fi-strong::placeholder { color: #6b7587; font-weight: 500; }
.sh-label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 7px; }

.sh-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 6px; }
.sheet .logo-drop { width: 168px; height: 88px; border: 1px dashed #b8c1cf; border-radius: 4px; background: var(--paper); color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none; overflow: hidden; }
.sheet .logo-drop:hover, .sheet .logo-drop.drag { border-color: var(--ink); color: var(--ink); background: var(--hl-soft); }
.sheet .logo-drop.has-logo { border-color: transparent; }
.sheet .logo-drop.has-logo:hover { border-color: var(--rule); background: transparent; }
.sheet .logo-drop img { max-width: 100%; max-height: 80px; object-fit: contain; }
.logo-empty { display: grid; justify-items: center; gap: 4px; font-size: .85rem; }
.logo-empty svg { width: 20px; height: 20px; }
.logo-empty b { font-weight: 500; }
.logo-remove { font-size: .82rem; margin: 0 0 8px; }
.sh-title { text-align: right; min-width: 0; width: 320px; max-width: 100%; }
.fi-doc { font: 700 clamp(1.7rem, 3.2vw, 2.25rem)/1.1 var(--font); letter-spacing: -0.03em; color: var(--accent); text-align: right; border-color: transparent; padding: 2px 6px; margin-bottom: 12px; }
.fi-doc:hover { border-color: #d8dee8; }
.sh-meta { display: grid; grid-template-columns: auto 168px; gap: 6px 10px; align-items: center; justify-content: end; font-size: .9rem; }
.sh-meta label { color: var(--muted); text-align: right; }
.sh-meta .fi { padding: 6px 8px; font-variant-numeric: tabular-nums; }

.sh-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 26px 0 30px; }
.party { display: grid; gap: 6px; align-content: start; }
.party .fi { font-size: .93rem; }

.items-head, .item-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 102px 112px 32px; gap: 8px; }
.sheet .items-head { background: var(--accent); color: #fff; border-radius: 3px; padding: 9px 10px; font-size: .8rem; font-weight: 600; margin-bottom: 4px; }
.items-head span:nth-child(n+2) { text-align: right; }
.sheet .item-row { padding: 6px 0; border-bottom: 1px solid var(--rule-2); align-items: start; }
.sheet .item-row .fi { min-height: 36px; font-size: .94rem; }
.ir-qty .fi, .ir-rate .fi { text-align: right; font-variant-numeric: tabular-nums; }
.ir-amt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; padding: 8px 2px 0 0; }
.ir-l { display: none; }
.ir-x { width: 32px; height: 32px; margin-top: 2px; display: grid; place-items: center; border: 0; background: none; color: var(--faint); border-radius: 4px; cursor: pointer; }
.ir-x svg { width: 15px; height: 15px; }
.ir-x:hover { color: var(--bad); background: var(--bad-bg); }
.item-row.row-in { animation: rowIn .35s var(--ease); }
.item-row.row-out { opacity: 0; transition: opacity .18s; }
@keyframes rowIn { from { background: var(--hl-soft); } }
.add-line { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; background: var(--paper); border: 1px dashed #b8c1cf; color: var(--ink); font: 600 .88rem var(--font); padding: 8px 13px; border-radius: 4px; cursor: pointer; }
.add-line svg { width: 15px; height: 15px; }
.add-line:hover { border-style: solid; border-color: var(--ink); background: var(--hl-soft); }

.sh-bottom { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 32px; margin-top: 22px; }
.sh-notes { display: grid; gap: 7px; align-content: start; }
.sh-notes .sh-label:not(:first-child) { margin-top: 10px; }
.sh-notes .fi { font-size: .92rem; }
.note-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-totals { font-size: .93rem; }
.t-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 5px 0; color: var(--muted); }
.t-row b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; min-width: 90px; }
.t-adj { grid-template-columns: minmax(0, 1fr) auto auto; }
.t-in { display: inline-flex; align-items: center; gap: 4px; }
.t-in .fi { width: 70px; text-align: right; padding: 5px 7px; font-variant-numeric: tabular-nums; }
.t-in em { font-style: normal; color: var(--faint); }
.t-tax .fi-label { width: 106px; padding: 5px 7px; }
.seg-xs button { padding: 4px 7px; font-size: .74rem; }
.t-total { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 11px; color: var(--ink); font-weight: 700; font-size: 1.08rem; }
.t-total b { font-weight: 700; }
.t-due { margin-top: 6px; background: var(--desk); padding: 11px 12px; color: var(--ink); font-weight: 700; border-radius: 3px; }
.t-due b { font-weight: 700; font-size: 1.1rem; }
.t-due.bump b { background: var(--hl); }
.sheet .sheet-foot { margin-top: 36px; padding-top: 12px; border-top: 1px solid var(--rule-2); font-size: .78rem; color: var(--faint); }
.sheet .stamp { position: absolute; z-index: 3; right: 350px; bottom: 150px; border: 3px solid var(--ok); color: var(--ok); border-radius: 6px; padding: 3px 14px; font: 800 1.8rem/1 var(--font); letter-spacing: .08em; text-transform: uppercase; transform: rotate(-10deg); opacity: .85; pointer-events: none; mix-blend-mode: multiply; }

.sheet.t-modern .sh-top { background: var(--accent); margin: calc(-1 * clamp(18px, 4.2vw, 46px)) calc(-1 * clamp(18px, 4.2vw, 46px)) 8px; padding: clamp(18px, 3.4vw, 32px) clamp(18px, 4.2vw, 46px); border-radius: 3px 3px 0 0; align-items: center; }
.sheet.t-modern .fi-doc { color: #fff; }
.sheet.t-modern .fi-doc:hover { border-color: rgba(255, 255, 255, .3); }
.sheet.t-modern .sh-meta label { color: rgba(255, 255, 255, .78); }
.sheet.t-modern .sh-top .fi:not(.fi-doc) { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .28); color: #fff; color-scheme: dark; }
.sheet.t-modern .sh-top .fi::placeholder { color: rgba(255, 255, 255, .6); }
.sheet.t-modern .logo-drop { background: #fff; border-color: transparent; }
.sheet.t-modern .t-due { background: var(--accent); color: #fff; }
.sheet.t-modern .t-due b { color: #fff; }
.sheet.t-modern .t-due.bump b { color: var(--ink); }
.sheet.t-modern .logo-remove { margin-top: 10px; }
.sheet.t-minimal .fi-doc { color: var(--ink); font-weight: 500; }
.sheet.t-minimal .sh-top { padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.sheet.t-minimal .items-head { background: none; color: var(--ink); border-bottom: 2px solid var(--accent); border-radius: 0; padding-inline: 0; }
.sheet.t-minimal .t-total { border-top: 1px solid var(--rule); }
.sheet.t-minimal .t-due { background: none; border-top: 2px solid var(--accent); border-radius: 0; padding-inline: 0; color: var(--accent); }
.sheet.t-minimal .t-due b { color: var(--accent); }

/* side panel */
.side-panel { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 78px); background: var(--paper); border: 1px solid #dbe1ea; border-radius: 4px; }
.sp-sheet-head, .sp-scrim { display: none; }
.sp-card { padding: 16px; border-bottom: 1px solid var(--rule-2); }
.sp-card:last-child { border-bottom: 0; }
.sp-actions { display: grid; gap: 8px; }
.sp-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sp-row:has(> [hidden]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sp-mini { display: grid; justify-items: center; gap: 3px; border: 1px solid var(--rule); background: var(--paper); border-radius: 4px; padding: 8px 2px; font: 500 .74rem var(--font); color: var(--muted); cursor: pointer; }
.sp-mini svg { width: 17px; height: 17px; color: var(--ink); }
.sp-mini:hover { border-color: var(--ink); color: var(--ink); }
.sp-note { margin: 2px 0 0; font-size: .8rem; color: var(--muted); line-height: 1.45; }
.sp-h { display: block; font: 600 .8rem var(--font); color: var(--muted); margin: 0 0 8px; }
.sp-card .sp-h:not(:first-child) { margin-top: 14px; }
.sp-field { display: block; margin-bottom: 12px; }
.sp-field .in { min-height: 38px; padding-block: 7px; font-size: .92rem; }
.tpl-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tpl-btn { display: grid; justify-items: center; gap: 6px; border: 1px solid var(--rule); background: var(--paper); border-radius: 4px; padding: 8px 4px 7px; font: 500 .78rem var(--font); color: var(--muted); cursor: pointer; }
.tpl-btn:hover { border-color: #a7b1c0; color: var(--ink); }
.tpl-btn[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); font-weight: 600; box-shadow: inset 0 -3px 0 var(--hl); }
.tpl-thumb { width: 40px; height: 52px; border-radius: 2px; background: #fff; border: 1px solid var(--rule); display: grid; align-content: start; gap: 3px; padding: 6px 5px; overflow: hidden; }
.tpl-thumb i { display: block; height: 3px; background: #dde3ec; }
.tpl-thumb i:nth-child(3) { height: 5px; margin-top: 3px; }
.tpl-thumb.t-classic i:nth-child(3) { background: var(--ink); }
.tpl-thumb.t-modern { background: linear-gradient(var(--ink) 0 14px, #fff 14px); padding-top: 18px; }
.tpl-thumb.t-modern i:nth-child(3) { background: var(--ink); }
.tpl-thumb.t-minimal i:nth-child(3) { background: none; border-bottom: 2px solid var(--ink); height: 4px; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.sp-profile { display: inline-flex; align-items: center; gap: 6px; text-align: left; font-size: .86rem; }
.sp-profile svg { width: 15px; height: 15px; flex: none; }

@media (max-width: 1080px) { .gen-grid { grid-template-columns: minmax(0, 1fr) 260px; } .sh-bottom { grid-template-columns: 1fr; } .sh-totals { max-width: 380px; margin-left: auto; width: 100%; } }

/* ---------- phone: app layout ---------- */
.mobile-bar { display: none; }
@media (max-width: 900px) {
  .fi, .in, select.in, textarea.fi, .sheet .item-row .fi, .t-in .fi, .sh-meta .fi { font-size: 16px; }
  .sheet .fi-doc { font-size: 1.8rem; }
  .gen { padding-block: 14px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .gen-head { margin-bottom: 12px; }
  .gen-head p { font-size: .94rem; }
  .gen-ticks { display: none; }
  .gen-grid { display: block; }
  .sheet { padding: 18px 14px 20px; }
  .sheet.t-modern .sh-top { margin: -18px -14px 8px; padding: 20px 14px; }

  .side-panel { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 90; border: 0; border-radius: 14px 14px 0 0;
    max-height: min(86dvh, 760px); overflow-y: auto; overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, .25); transform: translateY(105%); visibility: hidden; transition: transform .32s var(--ease), visibility 0s .32s; }
  .side-panel.open { transform: none; visibility: visible; transition: transform .32s var(--ease); }
  .sp-sheet-head { display: flex; position: sticky; top: 0; z-index: 2; align-items: center; justify-content: space-between; background: var(--paper); padding: 18px 16px 12px; border-bottom: 1px solid var(--rule-2); }
  .sp-sheet-head b { font-size: 1.05rem; }
  .sp-grab { position: absolute; left: 50%; top: 7px; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: #d2d9e3; }
  .sp-actions #downloadBtn, .sp-actions #sendBtn { display: none; }
  .sp-scrim { display: block; position: fixed; inset: 0; z-index: 85; background: rgba(0, 0, 0, .4); }
  .sp-scrim[hidden] { display: none; }
  html.sheet-open, html.sheet-open body { overflow: hidden; }

  .mobile-bar { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 4px; align-items: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--paper); border-top: 1px solid var(--rule); transform: translateY(110%); transition: transform .3s var(--ease); }
  .mobile-bar.show { transform: none; }
  .mb-btn { display: grid; justify-items: center; gap: 2px; min-width: 60px; padding: 5px 6px; border: 0; background: none; color: var(--ink); font: 500 .72rem var(--font); border-radius: var(--r); cursor: pointer; }
  .mb-btn svg { width: 21px; height: 21px; }
  .mb-btn[aria-expanded="true"] { background: var(--hl); }
  .mb-main { min-height: 48px; font-size: 1rem; margin-left: 4px; }
  .toast-zone { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 680px) {
  .sh-top { flex-direction: column-reverse; align-items: stretch; gap: 14px; }
  .sh-title { width: 100%; text-align: left; }
  .fi-doc { text-align: left; padding-left: 0; }
  .sh-meta { grid-template-columns: auto 1fr; justify-content: stretch; }
  .sh-meta label { text-align: left; }
  .sheet .logo-drop { width: 100%; height: 64px; }
  .sh-parties { grid-template-columns: 1fr; gap: 20px; margin-top: 18px; }
  .sheet .stamp { right: 24px; bottom: 260px; font-size: 1.4rem; }
}
@media (max-width: 560px) {
  .sheet .items-head { display: none; }
  .sheet .item-row { grid-template-columns: 1fr 1fr 1fr 32px; gap: 6px 8px; padding: 12px 0; }
  .sheet .item-row .ir-desc { grid-column: 1 / 4; }
  .sheet .item-row .ir-x { grid-column: 4; grid-row: 1; }
  .ir-l { display: block; font-size: .72rem; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
  .ir-qty .fi, .ir-rate .fi { text-align: left; }
  .ir-amt { text-align: left; align-self: end; padding: 0 0 8px; }
  .t-tax .fi-label { width: 84px; }
  .t-in .fi { width: 62px; }
}

/* ---------- dialogs & toasts ---------- */
.modal { border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 0; width: min(520px, calc(100% - 24px)); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .35); color: var(--ink); }
.modal::backdrop { background: rgba(0, 0, 0, .45); }
.modal-body { padding: 26px 26px 6px; }
.modal-body h2 { font-size: 1.4rem; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 26px 22px; flex-wrap: wrap; }
.ready .modal-body { text-align: center; padding-top: 30px; }
.ready-ico { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--hl); color: var(--ink); }
.ready-ico svg { width: 24px; height: 24px; stroke-width: 2.6; }
.ready h2 { margin-bottom: 4px; }
.ready-name { color: var(--muted); font-size: .92rem; word-break: break-all; margin-bottom: 18px; }
.ready-actions { display: grid; gap: 8px; }
.ready-hint { margin: 12px 0 0; }
.ready .modal-foot { justify-content: center; }
@media (max-width: 560px) {
  .modal { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 14px 14px 0 0; max-height: 92dvh; border: 0; }
  .modal-body { padding: 22px 18px 4px; }
  .modal-foot { padding: 10px 18px calc(18px + env(safe-area-inset-bottom, 0px)); }
  .modal-foot .btn { flex: 1 1 auto; }
}
.toast-zone { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(440px, calc(100% - 28px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r); font-size: .93rem; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .4); border-left: 4px solid var(--hl); }
.toast.err { border-left-color: #ff6b5e; }
.toast.ok { border-left-color: #5bd38a; }
.form-msg { font-size: .92rem; border-radius: var(--r); padding: 10px 12px; margin-bottom: 14px; }
.form-msg.err { background: var(--bad-bg); color: var(--bad); }
.form-msg.ok { background: var(--ok-bg); color: var(--ok); }

/* =====================================================================
   Content sections (home)
   ===================================================================== */
.band { padding-block: 64px; }
.band-line { border-top: 1px solid var(--rule); }
.split-2 { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 56px; align-items: start; }
.how { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: how; border-top: 2px solid var(--ink); }
.how li { counter-increment: how; padding: 20px 24px 0 0; display: grid; gap: 6px; align-content: start; }
.how li + li { padding-left: 24px; border-left: 1px solid var(--rule); }
.how li::before { content: counter(how); font: 700 2.2rem/1 var(--font); letter-spacing: -0.04em; margin-bottom: 10px; }
.how b { font-size: 1.05rem; }
.how span { color: var(--muted); }
.feat { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.feat div { padding: 14px 0; border-top: 1px solid var(--rule); }
.feat dt { font-weight: 600; }
.feat dt em { font-style: normal; font-weight: 500; font-size: .74rem; background: var(--hl-soft); padding: 1px 6px; border-radius: 3px; margin-left: 4px; white-space: nowrap; }
.feat dd { margin: 3px 0 0; color: var(--muted); font-size: .95rem; }
.designs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 28px; }
.designs figure { margin: 0; }
.designs figcaption { margin-top: 12px; color: var(--muted); font-size: .95rem; }
.designs figcaption b { color: var(--ink); margin-right: 4px; }
.doc-thumb { display: flex; flex-direction: column; gap: 8px; width: 100%; aspect-ratio: 1 / 1.2; background: #fff; border: 1px solid #dbe1ea; border-radius: 3px; padding: 22px 20px; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); transition: border-color .15s, box-shadow .15s; }
.doc-thumb:hover { border-color: var(--ink); box-shadow: 0 0 0 3px var(--hl); }
.doc-thumb i { display: block; height: 7px; background: #e4e9f0; }
.doc-thumb i:nth-child(1) { width: 40%; height: 14px; align-self: flex-end; background: var(--ink); }
.doc-thumb i:nth-child(2) { width: 60%; margin-top: 8px; }
.doc-thumb i:nth-child(3) { height: 14px; margin-top: 14px; background: var(--ink); }
.doc-thumb b { margin-top: auto; align-self: flex-end; width: 50%; height: 18px; background: #edf0f5; }
.doc-thumb.t-modern { background: linear-gradient(var(--ink) 0 26%, #fff 26%); }
.doc-thumb.t-modern i:nth-child(1) { background: #fff; }
.doc-thumb.t-modern i:nth-child(2) { margin-top: 30%; }
.doc-thumb.t-modern b { background: var(--ink); }
.doc-thumb.t-minimal i:nth-child(1) { background: #b8c1cf; height: 12px; }
.doc-thumb.t-minimal i:nth-child(3) { background: none; border-bottom: 2px solid var(--ink); height: 10px; }
.doc-thumb.t-minimal b { background: none; border-top: 2px solid var(--ink); }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.ledger { border: 1px solid #dbe1ea; border-radius: 4px; background: #fff; font-size: .92rem; overflow: hidden; }
.ledger > div { display: grid; grid-template-columns: 1fr 1.4fr 1fr auto; gap: 10px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--rule-2); font-variant-numeric: tabular-nums; }
.ledger .lg-head { border-top: 0; background: var(--desk); font-size: .8rem; font-weight: 600; color: var(--muted); }
.st, .pill-s { justify-self: start; font-size: .76rem; font-weight: 600; padding: 3px 8px; border-radius: 3px; background: var(--desk); color: var(--muted); }
.st-paid, .s-paid { background: var(--ok-bg); color: var(--ok); }
.st-sent, .s-sent { background: var(--info-bg); color: var(--info); }
.st-over, .s-overdue { background: var(--bad-bg); color: var(--bad); }
.faq { border-top: 2px solid var(--ink); }
.qa { border-bottom: 1px solid var(--rule); }
.qa summary { cursor: pointer; font-weight: 600; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; line-height: 1; }
.qa[open] summary::after { content: "−"; }
.qa-body p { color: var(--muted); margin: 0; padding: 0 32px 18px 0; }
.guides { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--ink); }
.guides li + li { border-left: 1px solid var(--rule); }
.guides a { display: grid; gap: 4px; align-content: start; padding: 18px 20px 6px 0; text-decoration: none; color: var(--ink); }
.guides li + li a { padding-left: 20px; }
.guides a b { font-size: 1.05rem; display: inline-flex; align-items: center; gap: 8px; }
.guides a b::after { content: "\2192"; font-weight: 500; transition: transform .2s var(--ease); }
.guides a:hover b::after { transform: translateX(4px); }
.guides a:hover b { box-shadow: inset 0 -.45em 0 var(--hl-soft); }
.guides a span { color: var(--muted); font-size: .95rem; }
@media (max-width: 860px) {
  .band { padding-block: 52px; }
  .split-2, .how, .feat, .designs, .guides { grid-template-columns: 1fr; gap: 0; }
  .split-2 { gap: 22px; }
  .how li, .how li + li { padding: 16px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .designs { gap: 26px; }
  .designs figure { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: center; }
  .doc-thumb { padding: 12px 10px; gap: 5px; }
  .doc-thumb i { height: 4px; } .doc-thumb i:nth-child(1), .doc-thumb i:nth-child(3) { height: 8px; } .doc-thumb b { height: 10px; }
  .designs figcaption { margin: 0; }
  .guides li + li { border-left: 0; }
  .guides a, .guides li + li a { padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .ledger > div { grid-template-columns: 1fr 1fr auto; }
  .ledger > div > span:nth-child(2) { display: none; }
}

/* ---------- article pages ---------- */
.page-head { padding-block: 48px 36px; border-bottom: 1px solid var(--rule); background: var(--desk); }
.page-head .wrap { max-width: 820px; }
.page-head .crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 12px; }
.page-head .crumbs a { color: var(--muted); }
.page-head h1 { margin: 0; font-size: clamp(2rem, 4.4vw, 3rem); max-width: 22ch; }
.article { max-width: 820px; margin: 0 auto; padding: 44px 24px 88px; }
.article > *:not(table):not(.cta-box) { max-width: 68ch; }
.article h2 { margin-top: 1.7em; font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
.article p, .article li { font-size: 1.05rem; color: #262626; }
.article ul, .article ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.article li { margin-bottom: .45em; }
.article li::marker { font-weight: 700; }
.article table { width: 100%; border-collapse: collapse; font-size: .97rem; margin-bottom: 1.4em; border-top: 2px solid var(--ink); }
.article th, .article td { text-align: left; padding: 11px 12px 11px 0; border-bottom: 1px solid var(--rule); }
.article th { font-weight: 600; }
.cta-box { background: var(--desk); border: 1px solid var(--rule); border-left: 6px solid var(--hl); border-radius: 4px; padding: 26px 28px; margin: 44px 0 0; }
.cta-box h2 { margin-top: 0; }
.cta-box p { color: var(--muted); }
.notfound { padding-top: 88px; }
.nf-code { font: 800 6rem/1 var(--font); letter-spacing: -0.06em; margin: 0 0 8px; }
.nf-code::after { content: ""; display: block; width: 72px; height: 10px; background: var(--hl); margin-top: 8px; }
.nf-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 52px 0 0; font-size: .92rem; color: var(--muted); background: var(--paper); }
.site-footer .brand { color: var(--ink); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 28px; }
.foot-brand p { margin: 14px 0 18px; max-width: 34ch; }
.site-footer h2 { font: 600 .9rem var(--font); letter-spacing: 0; color: var(--ink); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a:not(.btn):not(.brand) { color: var(--muted); text-decoration: none; }
.site-footer a:not(.btn):not(.brand):hover { color: var(--ink); text-decoration: underline; }
.foot-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; border-top: 1px solid var(--rule); margin-top: 44px; padding-block: 18px 26px; font-size: .84rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } body:has(.mobile-bar) .site-footer { padding-bottom: 80px; } }
@media (max-width: 480px) { .foot-grid { gap: 28px 16px; } .foot-grid > div:last-child { grid-column: 1 / -1; } .foot-grid > div:last-child ul { grid-template-columns: 1fr 1fr; } }

/* =====================================================================
   Log in
   ===================================================================== */
.auth { min-height: calc(100vh - 62px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-form { display: grid; place-items: center; padding: 48px 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 2rem; margin-bottom: .25em; }
.auth-sub { color: var(--muted); margin-bottom: 22px; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; margin: 14px 0 0; font-size: .9rem; }
.auth-foot { margin-top: 24px; line-height: 1.6; }
#googleBtn svg { width: 18px; height: 18px; }
.auth-side { background: var(--desk); border-left: 1px solid var(--rule); padding: 56px 52px; display: flex; flex-direction: column; justify-content: center; }
.auth-side h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); max-width: 16ch; }
.auth-side ul { list-style: none; padding: 0; margin: 6px 0 30px; display: grid; gap: 10px; color: var(--ink-2); }
.auth-side li { display: flex; gap: 10px; align-items: center; }
.auth-side li svg { width: 18px; height: 18px; padding: 2px; background: var(--hl); stroke-width: 3; flex: none; }
.auth-card-mini { background: #fff; border: 1px solid #dbe1ea; border-radius: 4px; padding: 6px 16px; max-width: 360px; font-size: .9rem; }
.auth-card-mini div { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--rule-2); }
.auth-card-mini div:last-child { border-bottom: 0; }
.auth-card-mini .tag { font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 3px; background: var(--ok-bg); color: var(--ok); }
.auth-card-mini div:last-child .tag { background: var(--info-bg); color: var(--info); }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }
.tabs { display: flex; border: 1px solid #d3d9e3; border-radius: var(--r); overflow: hidden; margin-bottom: 20px; }
.tabs button { flex: 1; border: 0; background: var(--paper); padding: 10px 12px; font: 600 .92rem var(--font); color: var(--muted); cursor: pointer; }
.tabs button + button { border-left: 1px solid #d3d9e3; }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: .85rem; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

/* =====================================================================
   Dashboard
   ===================================================================== */
.app-body { background: var(--desk); }
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 18px 12px; background: var(--paper); border-right: 1px solid var(--rule); z-index: 70; }
.side .brand { padding: 2px 8px 18px; }
.side-nav { display: grid; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; color: var(--muted); font: 500 .94rem var(--font); padding: 9px 10px; border-radius: var(--r); cursor: pointer; text-align: left; }
.side-link svg { width: 18px; height: 18px; }
.side-link:hover { background: var(--desk); color: var(--ink); }
.side-link[aria-current="page"] { background: var(--ink); color: #fff; }
.side-link[aria-current="page"] svg { color: var(--hl); }
.nav-count { margin-left: auto; font-size: .76rem; font-weight: 600; color: inherit; opacity: .7; }
.nav-count:empty { display: none; }
.side-new { margin-top: 14px; }
.side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 2px; border-top: 1px solid var(--rule-2); }
.side-user-text { min-width: 0; display: grid; }
.side-user-text b { font-size: .86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .link-btn { font-size: .82rem; text-align: left; color: var(--muted); }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 .86rem var(--font); color: var(--ink); background: var(--hl); }
.avatar.sm { width: 32px; height: 32px; font-size: .76rem; background: var(--desk); border: 1px solid var(--rule); }
.side-scrim { display: none; }
.app-main { min-width: 0; padding: 0 28px 60px; }
.demo-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0 0; padding: 10px 14px; background: var(--hl-soft); border: 1px solid #c9d6ff; border-radius: var(--r); font-size: .92rem; }
.demo-banner > span { display: inline-flex; align-items: center; gap: 8px; }
.demo-banner svg { width: 17px; height: 17px; }
.app-top { display: flex; align-items: center; gap: 14px; padding: 24px 0 20px; }
.app-title { flex: 1; min-width: 0; }
.app-title h1 { font-size: clamp(1.6rem, 2.6vw, 2rem); margin: 0 0 2px; }
.app-title p { margin: 0; color: var(--muted); }
.side-toggle { display: none; }

.card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); padding: 20px; margin-bottom: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2 { font-size: 1.02rem; margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); }
.kpi { padding: 18px 20px; display: grid; gap: 2px; }
.kpi + .kpi { border-left: 1px solid var(--rule-2); }
.kpi-ico { display: none; }
.kpi small { color: var(--muted); font-weight: 500; font-size: .86rem; }
.kpi b { font: 700 1.55rem/1.2 var(--font); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; color: var(--faint); font-size: .82rem; }
.kpi:nth-child(2) b { color: var(--ok); }
.kpi:nth-child(4) b { color: var(--bad); }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
.legend { display: flex; gap: 14px; font-size: .82rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span::before { content: ""; width: 10px; height: 10px; }
.lg-inv::before { background: #d3d9e3; }
.lg-paid::before { background: var(--ink); }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--rule-2); stroke-width: 1; }
.chart .ax { fill: var(--faint); font: 500 11px var(--font); }
.chart .b-inv { fill: #d3d9e3; }
.chart .b-paid { fill: var(--ink); }
.chart rect { transform-box: fill-box; transform-origin: bottom; }
@media (prefers-reduced-motion: no-preference) { .chart rect { animation: grow .6s var(--ease) both; animation-delay: var(--d); } }
@keyframes grow { from { transform: scaleY(0); } }
.attn { list-style: none; margin: 0; padding: 0; }
.attn li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--rule-2); }
.attn li:last-child { border-bottom: 0; }
.attn li > div { min-width: 0; flex: 1; display: grid; }
.attn b { font-size: .92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attn small { color: var(--muted); font-size: .82rem; }
.attn-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--faint); }
.attn-overdue .attn-dot { background: var(--bad); }
.attn-soon .attn-dot { background: #e0a100; }
.attn-amt { font-weight: 600; font-variant-numeric: tabular-nums; font-size: .92rem; }
.attn-empty { display: grid !important; text-align: center; padding: 26px 0 !important; }

.rows-head, .row { display: grid; grid-template-columns: minmax(0, 1fr) 130px 96px 40px; align-items: center; gap: 12px; }
.rows-head { padding: 10px 18px; font-size: .78rem; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--rule); background: #f8fafc; }
.rows-head span:nth-child(2), .row-amt { text-align: right; }
.row { padding: 11px 18px; border-bottom: 1px solid var(--rule-2); position: relative; }
.rows .row:last-child { border-bottom: 0; }
.row:hover { background: #f8fafc; }
#recent .row { padding-inline: 0; }
#recent .row:hover { background: none; }
.row-main { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: var(--ink); }
.row-main:hover b { text-decoration: underline; text-decoration-color: var(--hl); text-decoration-thickness: 3px; }
.row-text { display: grid; min-width: 0; }
.row-text b { font-size: .94rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-text small { color: var(--faint); font-size: .82rem; }
.row-amt { font-weight: 600; font-variant-numeric: tabular-nums; }
.row-menu { position: relative; justify-self: end; }
.icon-btn.sm { width: 32px; height: 32px; border-color: transparent; background: none; }
.icon-btn.sm:hover { border-color: var(--rule); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 180px; background: var(--paper); border: 1px solid #d3d9e3; border-radius: var(--r); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .3); padding: 4px; display: grid; }
.menu-pop a, .menu-pop button { display: block; text-align: left; border: 0; background: none; padding: 9px 11px; border-radius: 4px; font: 500 .92rem var(--font); color: var(--ink); text-decoration: none; cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--desk); }
.menu-pop .danger { color: var(--bad); }

.list-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.filters { display: flex; border: 1px solid #d3d9e3; border-radius: var(--r); overflow: hidden; background: var(--paper); }
.filter { border: 0; background: none; color: var(--muted); font: 500 .88rem var(--font); padding: 8px 12px; cursor: pointer; }
.filter + .filter { border-left: 1px solid #d3d9e3; }
.filter span { margin-left: 3px; color: var(--faint); }
.filter[aria-selected="true"] { background: var(--ink); color: #fff; }
.filter[aria-selected="true"] span { color: var(--hl); }
.search { position: relative; display: block; min-width: 240px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.search .in { padding-left: 34px; }

.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.client-grid > .empty { grid-column: 1 / -1; }
.client-card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); padding: 18px; display: grid; gap: 14px; }
.cc-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cc-top .avatar { background: var(--desk); border: 1px solid var(--rule); }
.cc-top div { display: grid; min-width: 0; }
.cc-top b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-top small { color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; border-top: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule-2); padding: 10px 0; }
.cc-stats dt { font-size: .74rem; color: var(--muted); }
.cc-stats dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; font-size: .92rem; }
.cc-stats dd.owed { color: var(--warn); }
.cc-actions { display: flex; align-items: center; justify-content: space-between; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.acc-email { color: var(--muted); }
.acc-email b { color: var(--ink); word-break: break-all; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 1.2rem; margin-bottom: .3em; }
.empty-art { width: 64px; height: 80px; margin: 0 auto 16px; border: 1px solid #d3d9e3; border-top: 6px solid var(--ink); border-radius: 2px; background: repeating-linear-gradient(#fff 0 12px, #edf0f5 12px 14px); }
.empty-art span { display: none; }

@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi:nth-child(3) { border-left: 0; } .kpi:nth-child(n+3) { border-top: 1px solid var(--rule-2); } }
@media (max-width: 1000px) { .ov-grid, .settings-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; height: auto; transform: translateX(-100%); visibility: hidden; transition: transform .3s var(--ease), visibility 0s .3s; }
  .side.open { transform: none; visibility: visible; box-shadow: 20px 0 50px -20px rgba(0, 0, 0, .35); transition: transform .3s var(--ease); }
  .side-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, .35); }
  .side-scrim[hidden] { display: none; }
  .side-toggle { display: inline-grid; }
  .app-main { padding: 0 14px 44px; }
  .app-top { padding: 16px 0 14px; flex-wrap: wrap; }
  .app-title { order: 3; flex-basis: 100%; }
  .top-new { margin-left: auto; }
  .top-new span { display: none; }
  .rows-head { display: none; }
  .row { grid-template-columns: minmax(0, 1fr) auto 34px; grid-template-areas: "main amt menu" "main pill menu"; row-gap: 4px; padding: 11px 14px; }
  .row-main { grid-area: main; } .row-amt { grid-area: amt; } .row .pill-s { grid-area: pill; justify-self: end; } .row-menu { grid-area: menu; }
  .filters { overflow-x: auto; max-width: 100%; }
  .search { min-width: 0; flex: 1; }
}
@media (max-width: 520px) { .kpi { padding: 14px; } .kpi b { font-size: 1.2rem; } }

/* ---------- print: only the invoice ---------- */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; }
  body > *:not(main), main > *:not(#create), .toast-zone, #create .gen-head, .side-panel, .add-line, .ir-x, .note-chips, .logo-remove, .client-pick, .mobile-bar { display: none !important; }
  .gen { padding: 0; background: none; border: 0; }
  .gen .wrap { padding: 0; max-width: none; }
  .gen-grid { display: block; }
  .sheet { border: 0; box-shadow: none; padding: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sheet .fi { border-color: transparent !important; box-shadow: none !important; }
  .sheet .fi::placeholder { color: transparent; }
  .sheet .logo-drop:not(.has-logo) { visibility: hidden; }
}
.designs { grid-template-columns: repeat(3, minmax(0, 250px)); justify-content: start; gap: 32px; }
.ledger > div { grid-template-columns: 90px minmax(0, 1fr) 110px 76px; }
.ledger > div > span:nth-child(3) { text-align: right; }
.ledger > div > span:nth-child(4) { justify-self: end; }
@media (max-width: 860px) { .designs { grid-template-columns: 1fr; } .ledger > div { grid-template-columns: 80px 1fr 76px; } }

/* Paper feel: filled fields read like printed text; empty ones stay as soft boxes to fill in. */
:where(.sheet .sh-top, .sheet .party, .sheet .item-rows, .sheet .sh-notes) .fi:not(:placeholder-shown):not(:hover):not(:focus) { border-color: transparent; background: transparent; }
:where(.sheet .sh-top, .sheet .party, .sheet .item-rows, .sheet .sh-notes) .fi:placeholder-shown:not(:focus) { background: #f8fafc; border-color: #e2e7ef; }
.sheet .fi { transition: border-color .15s, background-color .15s, box-shadow .15s; }

.foot-base { border-top: 0; position: relative; }
.foot-base::before { content: ""; position: absolute; top: 0; left: 24px; right: 24px; border-top: 1px solid var(--rule); }
@media (max-width: 600px) { .foot-base::before { left: 16px; right: 16px; } }

@media (max-width: 860px) {
  .how li, .how li + li { grid-template-columns: 44px 1fr; column-gap: 8px; row-gap: 4px; }
  .how li::before { grid-row: 1 / span 2; font-size: 1.9rem; margin: 0; }
}

.article .lead { font-size: 1.2rem; line-height: 1.55; color: var(--ink); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 28px 0 8px; border-top: 2px solid var(--ink); max-width: none !important; }
.facts div { display: grid; gap: 4px; align-content: start; padding: 16px 20px 4px 0; }
.facts div + div { padding-left: 20px; border-left: 1px solid var(--rule); }
.facts b { font-size: 1.02rem; }
.facts span { color: var(--muted); font-size: .97rem; }
.contact-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 22px 24px; margin: 24px 0 8px; border: 1px solid #dbe1ea; border-radius: var(--r); background: var(--paper); }
.contact-card > div { display: grid; gap: 2px; }
.cc-label { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.article a.cc-mail { font-size: 1.3rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.cc-note { color: var(--muted); font-size: .93rem; }
@media (max-width: 700px) { .facts { grid-template-columns: 1fr; } .facts div, .facts div + div { padding: 14px 0; border-left: 0; border-bottom: 1px solid var(--rule); } }
@media (max-width: 600px) { .article { padding-inline: 16px; } }

.form-msg.info { background: var(--hl-soft); color: var(--ink); }
.form-msg a { color: inherit; font-weight: 600; }
.auth-card-mini { max-width: 380px; padding: 4px 18px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05); }
.auth-card-mini div { display: grid; grid-template-columns: 1fr auto 72px; gap: 12px; font-variant-numeric: tabular-nums; }
.auth-card-mini div > span:first-child { display: grid; }
.auth-card-mini small { color: var(--muted); font-size: .78rem; }
.auth-card-mini .st { justify-self: end; }
@media (max-width: 900px) { .auth { min-height: 0; } .auth-form { place-items: start center; padding: 36px 16px 56px; } }

.m-brand { display: none; }
@media (max-width: 860px) {
  .app-main { display: flex; flex-direction: column; }
  .app-main > * { min-width: 0; }
  .app-top { order: -1; margin: 0 -14px; padding: 10px 14px 0; background: var(--paper); border-bottom: 1px solid var(--rule); row-gap: 0; }
  .m-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
  .m-brand .brand-mark { width: 28px; height: 28px; }
  .app-top .app-title { order: 3; flex-basis: 100%; margin: 0 -14px; padding: 18px 14px 14px; background: var(--desk); border-top: 1px solid transparent; }
  .top-new { width: 40px; height: 40px; padding: 0; justify-content: center; }
  .app-top { padding-bottom: 0; }
  .app-top > .side-toggle, .app-top > .m-brand, .app-top > .top-new { margin-bottom: 10px; }
  .demo-banner { margin: 12px 0 0; font-size: .88rem; }
  .app-main > .panel { margin-top: 12px; }
}
.ov-grid { margin-bottom: 16px; } .ov-grid > .card { margin-bottom: 0; }

.row .pill-s, .ledger .st { min-width: 64px; text-align: center; }
.cc-actions .link-btn.danger { color: var(--muted); text-decoration: none; font-size: .88rem; }
.cc-actions .link-btn.danger:hover { color: var(--bad); text-decoration: underline; text-decoration-color: currentColor; text-decoration-thickness: 1px; }

/* logged-in header without a flash: a saved session shows the account links straight away */
html.has-session .nav [data-auth="out"] { display: none !important; }
html.has-session .nav a[data-auth="in"][hidden] { display: block !important; }
html.has-session .nav a.btn[data-auth="in"][hidden] { display: inline-flex !important; }
/* dashboard waits for the account check before showing anything */
.app-body:not(.app-ready) .app { visibility: hidden; }
.app-body:not(.app-ready)::after { content: ""; position: fixed; top: 50%; left: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border: 3px solid var(--rule); border-top-color: var(--ink); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.app-ready .app { animation: appIn .25s var(--ease) both; }
@keyframes appIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .app-ready .app { animation: none; } }

.chart-empty { min-height: 200px; display: grid; place-content: center; text-align: center; gap: 4px; color: var(--muted); font-size: .93rem; border: 1px dashed var(--rule); border-radius: var(--r); padding: 20px; }
.chart-empty b { color: var(--ink); font-weight: 600; }


/* =====================================================================
   Fresh SaaS layer
   ===================================================================== */
body { color: var(--ink); }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.035em; }
h3 { font-weight: 700; }
a:hover { text-decoration-color: var(--brand); text-decoration-thickness: 2px; }
::selection { background: var(--hl); color: var(--ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; box-shadow: none; border-radius: 8px; }
.lede { color: var(--muted); }
.link-btn:hover { text-decoration-color: var(--brand); text-decoration-thickness: 2px; }

/* brand */
.brand { font-weight: 800; letter-spacing: -0.03em; font-size: 1.12rem; color: var(--ink); }
.brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 6px 14px -6px rgba(91, 77, 255, .6); }
.brand-name .tld { color: var(--faint); font-weight: 600; }

/* header */
.site-header { background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid #eceef6; }
.site-header .wrap { height: 66px; }
.nav a { color: var(--muted); font-weight: 600; font-size: .93rem; border-radius: 10px; }
.nav a:hover { color: var(--brand-ink); background: var(--brand-soft); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--brand); border-radius: 0; }
.nav a.btn, .site-header .nav a.btn { background: var(--grad); border: 0; color: #fff; padding: 10px 16px; box-shadow: 0 10px 22px -10px rgba(91, 77, 255, .75); }
.nav a.btn:hover { background: var(--grad); filter: brightness(1.06); color: #fff; }
.nav-toggle { border-color: var(--rule); border-radius: 10px; }
@media (max-width: 860px) { .nav { top: 66px; } .nav a { border-radius: 0; } }

/* buttons */
.btn { border-radius: var(--r); font-weight: 700; transition: background .15s, color .15s, box-shadow .2s, transform .15s, filter .15s; }
.btn-primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 10px 24px -10px rgba(91, 77, 255, .7); }
.btn-primary:hover { background: var(--grad); color: #fff; filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(91, 77, 255, .8); }
.btn-primary:active { transform: translateY(0); }
.btn-dark, .btn-ink { background: var(--night); border-color: var(--night); color: #fff; }
.btn-dark:hover, .btn-ink:hover { background: var(--night-2); border-color: var(--night-2); color: #fff; }
.btn-white, .btn-line, .btn-ghost { background: #fff; border: 0; box-shadow: inset 0 0 0 1px #dfe3ee; color: var(--ink); }
.btn-white:hover, .btn-line:hover, .btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--brand-ink); }
.btn-soft { background: var(--brand-soft); border-color: var(--brand-soft); color: var(--brand-ink); }
.btn-soft:hover { border-color: var(--hl); color: var(--brand-ink); }
.btn.done-pop { box-shadow: 0 0 0 4px rgba(18, 183, 106, .3); }
.icon-btn { border-radius: 10px; }
.icon-btn:hover, .chip:hover { border-color: var(--brand); color: var(--brand-ink); }
.seg { border-radius: 8px; border-color: #dfe3ee; }
.seg button[aria-pressed="true"] { background: var(--brand); }
.check-line input { accent-color: var(--brand); }

/* inputs */
.in { border-radius: var(--r); border-color: #dfe3ee; }
.in:hover { border-color: #c5cadb; }
.in:focus, .fi:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(91, 77, 255, .14); }
.fi { border-radius: 8px; border-color: #e1e4ef; }
.fi:hover { border-color: #c5cadb; }
:where(.sheet .sh-top, .sheet .party, .sheet .item-rows, .sheet .sh-notes) .fi:placeholder-shown:not(:focus) { background: #f8f9fd; border-color: #e6e8f2; }

/* generator hero */
.gen { position: relative; background:
    radial-gradient(900px 520px at 88% -80px, #e9e4ff 0, rgba(233, 228, 255, 0) 70%),
    radial-gradient(800px 600px at -10% 70%, #e0f3ff 0, rgba(224, 243, 255, 0) 65%),
    #fff;
  border-bottom: 1px solid #eef0f7; padding-block: 34px 80px; }
.gen-head { align-items: flex-end; margin-bottom: 26px; }
.gen-pill { display: inline-flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 5px 14px 5px 5px; font-size: .84rem; font-weight: 600; color: var(--muted); box-shadow: inset 0 0 0 1px #e6e8f2; margin-bottom: 14px; }
.gen-pill b { background: var(--ok-bg); color: var(--ok); border-radius: 999px; padding: 2px 10px; font-weight: 700; }
.gen-head h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); letter-spacing: -0.045em; line-height: 1.02; margin: 0 0 10px; }
.gen-head p { color: var(--muted); font-size: 1.06rem; max-width: 56ch; }
.gen-ticks { color: var(--muted); font-weight: 500; gap: 6px 18px; }
.gen-ticks svg { color: var(--ok); }
.gen .sheet { border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-3); }
.gen .side-panel { border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: hidden; }
.sp-card { border-bottom-color: #f0f1f7; }
.sp-mini, .tpl-btn { border-radius: 12px; border-color: #e6e8f2; }
.sp-mini:hover { border-color: var(--brand); color: var(--brand-ink); }
.sp-mini svg { color: var(--brand); }
.tpl-btn[aria-pressed="true"] { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand); }
.chip { border-color: #dfe3ee; }
.t-due { background: var(--accent); color: #fff; border-radius: 12px; padding: 12px 14px; }
.t-due.bump b { background: rgba(255, 255, 255, .22); }
.logo-drop { border-radius: 12px; }

@media (prefers-reduced-motion: no-preference) {
  .js .gen .sheet { animation: settle .8s var(--ease) .06s backwards; }
  .js .gen-head > div { animation: fadeIn .6s var(--ease) backwards; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 861px) { .js .gen .side-panel { animation: settle .8s var(--ease) .18s backwards; } }
@keyframes settle { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* content sections */
.band-line { border-top: 0; }
.band:nth-of-type(even) { background: var(--desk); }
.how { border-top: 0; gap: 16px; }
.how li, .how li + li { background: #fff; border: 0; border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-1); }
.how li::before { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 1.05rem; font-weight: 800; letter-spacing: 0; margin-bottom: 12px; box-shadow: 0 8px 18px -8px rgba(91, 77, 255, .7); }
.feat { gap: 12px; }
.feat div { background: #fff; border: 0; border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-1); }
.feat dt em { background: var(--brand-soft); color: var(--brand-ink); border-radius: 999px; padding: 2px 8px; }
.ledger { border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-3); }
.ledger .lg-head { background: #f8f9fd; }
.faq { border-top: 0; display: grid; gap: 10px; }
.qa { background: #fff; border: 0; border-radius: 14px; box-shadow: var(--shadow-1); padding: 0 18px; }
.qa summary::after { color: var(--brand); }
.guides { border-top: 0; gap: 14px; }
.guides li, .guides li + li { border: 0; }
.guides a, .guides li + li a { background: #fff; border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--shadow-1); height: 100%; transition: box-shadow .2s, transform .2s; }
.guides a:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.guides a:hover b { box-shadow: none; color: var(--brand-ink); }
.guides a b::after { color: var(--brand); }
@media (max-width: 860px) { .how li, .how li + li { padding: 18px; border-bottom: 0; } .how { gap: 12px; } .guides { gap: 10px; } }

.cta-box { background: var(--grad); color: #fff; border: 0; border-radius: 20px; padding: 30px 32px; box-shadow: 0 30px 60px -30px rgba(91, 77, 255, .8); }
.cta-box h2 { color: #fff; }
.cta-box p { color: rgba(255, 255, 255, .85); }
.cta-box .btn-primary { background: #fff; color: var(--brand-ink); box-shadow: none; }

/* page heads */
.page-head { background: radial-gradient(700px 400px at 90% -100px, #e9e4ff, rgba(233, 228, 255, 0) 70%), radial-gradient(600px 400px at 0% 120%, #e0f3ff, rgba(224, 243, 255, 0) 70%), #fff; border-bottom: 1px solid #eef0f7; }
.page-head h1 { letter-spacing: -0.045em; }
.facts { border-top: 0; gap: 12px; }
.facts div, .facts div + div { background: #fff; border: 0; border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-1); }
.contact-card { border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.article table { border-top-color: var(--brand); }
.toast { background: var(--night); border-left-color: var(--brand); border-radius: 12px; }
.toast.ok { border-left-color: var(--ion); }

/* footer */
.site-footer { background: #f7f8fc; border-top: 1px solid #eceef6; }
.site-footer .btn-dark { background: var(--grad); border: 0; }

/* auth */
.auth-side { background: radial-gradient(500px 400px at 100% 0%, rgba(255, 255, 255, .25), transparent 60%), radial-gradient(500px 500px at 0% 100%, rgba(79, 230, 255, .25), transparent 60%), var(--grad); color: #fff; border-left: 0; }
.auth-side h2 { color: #fff; letter-spacing: -0.045em; }
.auth-side ul { color: rgba(255, 255, 255, .92); }
.auth-side li svg { background: rgba(255, 255, 255, .2); color: #fff; border-radius: 50%; padding: 3px; width: 20px; height: 20px; }
.auth-card-mini { border: 0; border-radius: var(--r-lg); box-shadow: 0 30px 60px -20px rgba(30, 20, 120, .55); color: var(--ink); }
.tabs { border-color: #dfe3ee; border-radius: 12px; padding: 4px; gap: 4px; background: #f6f7fb; }
.tabs button { border-radius: 9px; background: transparent; }
.tabs button + button { border-left: 0; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(21, 26, 45, .12); }
.form-msg.info { background: var(--brand-soft); color: var(--brand-ink); }

/* dashboard */
.app-body { background: var(--desk); }
.side { background: #fff; border-right: 1px solid #eceef6; }
.side-link { border-radius: 10px; font-weight: 600; }
.side-link:hover { background: var(--desk); color: var(--ink); }
.side-link[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.side-link[aria-current="page"] svg { color: var(--brand); }
.avatar { background: var(--grad); color: #fff; }
.avatar.sm { background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }
.kpis, .card { border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.chart .b-paid { fill: var(--brand); }
.chart .b-inv { fill: #dcd6ff; }
.lg-paid::before { background: var(--brand); border-radius: 3px; }
.lg-inv::before { background: #dcd6ff; border-radius: 3px; }
.demo-banner { border-radius: 12px; }
