/* Billia — main stylesheet. No frameworks, no build step. */
:root {
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --bg: #f8fafc;
  --card: #ffffff;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eff6ff;
  --accent-glow: rgba(37, 99, 235, .35);
  --green: #059669;
  --green-soft: #ecfdf5;
  --amber: #d97706;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .06), 0 20px 44px -16px rgba(15, 23, 42, .18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #1e40af);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-soft); font-weight: 600; font-size: 14.5px; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: var(--line-soft); text-decoration: none; color: var(--ink); }
.nav .btn { margin-left: 8px; }

/* ---------- buttons / inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px;
  font: 600 15px/1 var(--font); padding: 12px 20px; cursor: pointer;
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, #3d8bfd, var(--accent));
  color: #fff;
  box-shadow: 0 8px 20px -8px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .28);
  text-shadow: 0 1px 1px rgba(15, 40, 120, .25);
}
.btn-primary:hover { background: linear-gradient(180deg, #5aa0ff, var(--accent-dark)); transform: translateY(-1px); box-shadow: 0 12px 24px -8px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .28); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 4px 10px -6px var(--accent-glow); }
.btn-secondary { background: #fff; border-color: var(--line); color: var(--ink); transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease; }
.btn-secondary:hover { border-color: #bfdbfe; background: var(--accent-soft); transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgba(37, 99, 235, .35); }
.btn-secondary:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--muted); padding: 8px 10px; font-size: 14px; }
.btn-ghost:hover { color: var(--red); background: var(--red-soft); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 8px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  font: 500 15px var(--font); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; background: #fff; width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .16), 0 2px 8px -2px rgba(37, 99, 235, .25);
}
.field textarea { resize: vertical; min-height: 74px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ---------- hero ---------- */
.hero {
  padding: 72px 0 40px; text-align: center; position: relative; overflow: hidden;
  background:
    radial-gradient(640px 300px at 15% 0%, rgba(37, 99, 235, .10), transparent 70%),
    radial-gradient(640px 300px at 85% 10%, rgba(56, 189, 248, .12), transparent 70%),
    linear-gradient(180deg, #f0f7ff 0%, var(--bg) 78%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-soft); color: var(--green);
  font-weight: 700; font-size: 13.5px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid #a7f3d0; margin-bottom: 20px;
  box-shadow: 0 4px 12px -6px rgba(5, 150, 105, .35);
  animation: rise .6s ease both;
}
.hero h1 { font-size: clamp(32px, 5vw, 52px); letter-spacing: -.03em; line-height: 1.12; margin: 0 0 16px; animation: rise .6s .08s ease both; }
.hero h1 .free { background: linear-gradient(120deg, var(--accent), #0ea5e9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 auto 28px; animation: rise .6s .16s ease both; }
.hero-ctas { animation: rise .6s .24s ease both; }
.hero-ctas .btn { box-shadow: 0 10px 24px -10px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .28); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-trust { margin-top: 22px; color: var(--faint); font-size: 13.5px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.hero-trust span::before { content: "✓ "; color: var(--green); font-weight: 700; }

/* ---------- builder ---------- */
.builder { padding: 24px 0 72px; }
.builder-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.builder-head h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }

.seg { display: inline-flex; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button {
  border: 0; background: transparent; border-radius: 8px; cursor: pointer;
  font: 700 13.5px var(--font); color: var(--muted); padding: 9px 16px;
  display: inline-flex; align-items: center; gap: 7px;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg .dot { width: 22px; height: 16px; border-radius: 4px; border: 1px solid var(--line); display: inline-block; }

/* ---------- template dropdown ---------- */
.tpl-select-wrap { display: flex; align-items: center; gap: 10px; }
.tpl-select-wrap label { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.tpl-select-wrap select {
  appearance: none; -webkit-appearance: none;
  font: 600 14px var(--font); color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232563eb' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 10px 36px 10px 14px; cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.tpl-select-wrap select:hover { border-color: #bfdbfe; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.tpl-select-wrap select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }

/* ---------- template dropdown sits right above the invoice preview ---------- */
.preview-col .tpl-select-wrap { margin: 0 0 14px; }

/* ---------- Pro template lock ---------- */
.preview-lock-wrap { position: relative; }
.pro-locked #preview { filter: blur(9px); pointer-events: none; user-select: none; -webkit-user-select: none; }
.pro-lock-overlay {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: linear-gradient(180deg, rgba(239, 246, 255, .55), rgba(239, 246, 255, .75));
  border-radius: 10px;
}
.pro-lock-overlay[hidden] { display: none; }
.pro-lock-card {
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid #dbeafe; border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 28px 26px; max-width: 340px; text-align: center;
  animation: pop .28s cubic-bezier(.2, .9, .3, 1.2);
}
.pro-lock-icon { font-size: 34px; margin-bottom: 8px; }
.pro-lock-title { font-size: 18px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 6px; }
.pro-lock-text { font-size: 14px; color: var(--ink-soft); margin: 0 0 16px; }
.pro-lock-card .btn { width: 100%; margin-bottom: 6px; }
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- logo remove + crop ---------- */
.logo-thumb-wrap { position: relative; display: inline-block; }
.logo-thumb-wrap[hidden] { display: none; }
.logo-edit {
  position: absolute; bottom: -9px; right: -9px;
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid #fff; background: var(--accent); color: #fff;
  font: 700 14px/1 var(--font); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .35);
  transition: transform .12s ease, background .12s ease;
}
.logo-edit:hover { background: var(--accent-dark); transform: scale(1.1); }
.logo-upload {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 18px; cursor: pointer;
  border: 2px dashed #bfdbfe; background: #f0f7ff;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
  touch-action: manipulation;
}
.logo-upload[hidden] { display: none; }
.logo-upload:hover { border-color: var(--accent); background: #e3efff; transform: translateY(-1px); }
.logo-upload:active { transform: scale(.96); }
.logo-upload-plus { font: 400 34px/1 var(--font); color: var(--accent); user-select: none; -webkit-user-select: none; }
.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  opacity: 0; pointer-events: none; overflow: hidden; clip: rect(0 0 0 0);
}
.crop-overlay {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(15, 23, 42, .6);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.crop-overlay[hidden] { display: none; }
.crop-modal {
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg);
  padding: 22px; width: 100%; max-width: 440px; max-height: 92vh; max-height: 92dvh;
  overflow-y: auto; text-align: center;
  animation: pop .25s cubic-bezier(.2, .9, .3, 1.2);
}
.crop-modal h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.01em; }
.crop-modal .muted { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.crop-stage { position: relative; display: inline-block; max-width: 100%; border-radius: 10px; touch-action: none; cursor: grab; }
.crop-stage:active { cursor: grabbing; }
.crop-viewport { overflow: hidden; border-radius: 10px; }
.crop-stage img {
  display: block; max-width: min(76vw, 360px); max-height: 44vh;
  border-radius: 10px; user-select: none; -webkit-user-select: none;
  -webkit-user-drag: none; pointer-events: none;
  transform-origin: center center; will-change: transform;
}
/* fixed WhatsApp-style frame: the photo moves behind it, the frame never moves */
.crop-frame {
  position: absolute; border: 2.5px solid #fff; border-radius: 4px;
  outline: 1px solid rgba(15, 23, 42, .35);
  pointer-events: none;
}
.crop-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.crop-actions .btn { flex: 1; }

.builder-grid { display: grid; grid-template-columns: 430px 1fr; gap: 22px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); animation: rise .5s ease both; }
.panel-pad { padding: 22px; }
.panel h3 { margin: 0 0 4px; font-size: 16px; letter-spacing: -.01em; }
.panel .hint { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }
.section-title { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 22px 0 12px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.section-title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.logo-row { display: flex; align-items: center; gap: 12px; }
.logo-thumb { width: 52px; height: 52px; border-radius: 10px; border: 1.5px solid var(--line); object-fit: contain; background: #fff; display: block; }

.items-head { display: grid; grid-template-columns: 1fr 64px 90px 26px; gap: 8px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin-bottom: 6px; padding: 0 2px; }
.item-row { display: grid; grid-template-columns: 1fr 64px 90px 26px; gap: 8px; margin-bottom: 8px; align-items: center; }
/* Item field labels: on desktop the label wrappers vanish from layout
   (display:contents) so inputs stay direct grid items; on mobile they become
   the visible card labels. */
.il { display: contents; }
.il-label { display: none; }
.item-row input { font: 500 14px var(--font); border: 1.5px solid var(--line); border-radius: 8px; padding: 9px 10px; width: 100%; }
.item-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.item-row.has-catalog { grid-template-columns: 1fr 64px 90px 118px 26px; }
.item-catalog { font: 500 13px var(--font); color: var(--accent); border: 1.5px solid var(--line); border-radius: 8px; padding: 9px 4px; background: #fff; max-width: 118px; cursor: pointer; }
.item-catalog:focus { outline: none; border-color: var(--accent); }
.item-del { border: 0; background: transparent; color: var(--faint); font-size: 18px; cursor: pointer; border-radius: 6px; line-height: 1; padding: 4px; }
.item-del:hover { color: var(--red); background: var(--red-soft); }
.add-item { width: 100%; margin-top: 4px; border-style: dashed; }

/* ---------- preview ---------- */
.preview-col { position: sticky; top: 84px; }
.preview-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.preview-shell {
  background: linear-gradient(180deg, #eef4fc, #e3ebf6);
  border: 1px solid #d7e3f5; border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .7);
  animation: rise .5s .1s ease both;
}
.doc { background: #fff; border-radius: 6px; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(37, 99, 235, .06); padding: 48px 52px; min-height: 640px; font-size: 14px; color: var(--ink); transition: box-shadow .2s ease; }
.doc table { width: 100%; border-collapse: collapse; }
.doc .meta-row { display: flex; justify-content: space-between; gap: 24px; }

/* template: minimal */
.tpl-minimal .doc-kind { font-size: 30px; font-weight: 800; letter-spacing: .14em; color: #cbd5e1; text-align: right; margin: 0; }
.tpl-minimal .biz-name { font-size: 19px; font-weight: 800; margin: 0 0 4px; }
.tpl-minimal .small { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.tpl-minimal .doc-meta { text-align: right; font-size: 13px; color: var(--ink-soft); line-height: 1.9; }
.tpl-minimal .doc-meta b { color: var(--ink); }
.tpl-minimal .billto { margin: 30px 0 6px; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--faint); text-transform: uppercase; }
.tpl-minimal .billto-name { font-weight: 700; font-size: 15px; }
.tpl-minimal table.items { margin-top: 18px; }
.tpl-minimal table.items th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 10px 8px; border-bottom: 2px solid var(--ink); }
.tpl-minimal table.items td { padding: 12px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tpl-minimal .num { text-align: right; font-variant-numeric: tabular-nums; }
.tpl-minimal .totals { width: 260px; margin: 18px 0 0 auto; font-size: 13.5px; }
.tpl-minimal .totals td { padding: 5px 0; }
.tpl-minimal .totals .grand td { font-size: 17px; font-weight: 800; border-top: 2px solid var(--ink); padding-top: 10px; }
.tpl-minimal .notes { margin-top: 34px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 14px; white-space: pre-line; }
.tpl-minimal .notes .k { font-weight: 800; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); display: block; margin-bottom: 4px; }

/* template: modern */
.tpl-modern .doc { padding: 0; overflow: hidden; }
.tpl-modern .band { background: linear-gradient(120deg, var(--accent), #1e40af); color: #fff; padding: 36px 52px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.tpl-modern .doc-kind { font-size: 34px; font-weight: 800; letter-spacing: .1em; margin: 0; }
.tpl-modern .biz-name { font-size: 18px; font-weight: 800; margin: 0 0 4px; }
.tpl-modern .band .small { color: rgba(255,255,255,.82); font-size: 12.5px; line-height: 1.6; }
.tpl-modern .body { padding: 34px 52px 48px; }
.tpl-modern .doc-meta { display: flex; gap: 34px; font-size: 13px; margin-bottom: 8px; flex-wrap: wrap; }
.tpl-modern .doc-meta .k { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); display: block; }
.tpl-modern .doc-meta .v { font-weight: 700; }
.tpl-modern .billto { margin: 22px 0 4px; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--accent); text-transform: uppercase; }
.tpl-modern .billto-name { font-weight: 700; font-size: 15px; }
.tpl-modern .small { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.tpl-modern table.items { margin-top: 16px; border-radius: 8px; overflow: hidden; }
.tpl-modern table.items th { background: var(--ink); color: #fff; text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 11px 12px; }
.tpl-modern table.items td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tpl-modern table.items tr:nth-child(even) td { background: #f8fafc; }
.tpl-modern .num { text-align: right; font-variant-numeric: tabular-nums; }
.tpl-modern .totals { width: 260px; margin: 18px 0 0 auto; font-size: 13.5px; }
.tpl-modern .totals td { padding: 5px 0; }
.tpl-modern .totals .grand td { font-size: 17px; font-weight: 800; color: var(--accent-dark); border-top: 2px solid var(--accent); padding-top: 10px; }
.tpl-modern .notes { margin-top: 30px; font-size: 12.5px; color: var(--muted); background: var(--accent-soft); border-radius: 8px; padding: 14px 16px; white-space: pre-line; }
.tpl-modern .notes .k { font-weight: 800; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); display: block; margin-bottom: 4px; }

/* template: classic */
.tpl-classic .doc-head { text-align: center; border-bottom: 3px double var(--ink); padding-bottom: 18px; margin-bottom: 8px; }
.tpl-classic .biz-name { font-size: 24px; font-weight: 800; margin: 0 0 4px; font-family: Georgia, "Times New Roman", serif; }
.tpl-classic .small { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.tpl-classic .doc-kind { font-size: 22px; font-weight: 800; letter-spacing: .22em; margin: 22px 0 4px; font-family: Georgia, "Times New Roman", serif; }
.tpl-classic .doc-meta { font-size: 13px; color: var(--ink-soft); line-height: 1.9; }
.tpl-classic .billto { margin: 24px 0 4px; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--faint); text-transform: uppercase; }
.tpl-classic .billto-name { font-weight: 700; font-size: 15px; }
.tpl-classic table.items { margin-top: 16px; border: 1px solid var(--line); }
.tpl-classic table.items th { text-align: left; font-size: 12px; padding: 10px 12px; border: 1px solid var(--line); background: #f1f5f9; }
.tpl-classic table.items td { padding: 11px 12px; border: 1px solid var(--line); vertical-align: top; }
.tpl-classic .num { text-align: right; font-variant-numeric: tabular-nums; }
.tpl-classic .totals { width: 280px; margin: 0 0 0 auto; font-size: 13.5px; border: 1px solid var(--line); border-top: 0; }
.tpl-classic .totals td { padding: 7px 12px; border-bottom: 1px solid var(--line-soft); }
.tpl-classic .totals .grand td { font-size: 16px; font-weight: 800; background: #f1f5f9; }
.tpl-classic .notes { margin-top: 28px; font-size: 12.5px; color: var(--muted); white-space: pre-line; }
.tpl-classic .notes .k { font-weight: 800; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); display: block; margin-bottom: 4px; }

/* template: bold (Pro) */
.tpl-bold .doc { padding: 0; overflow: hidden; }
.tpl-bold .band { background: #171a29; color: #fff; padding: 36px 52px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 6px solid #cc1a33; }
.tpl-bold .doc-kind { font-size: 13px; font-weight: 800; letter-spacing: .28em; margin: 0; color: #cc1a33; }
.tpl-bold .doc-num { font-size: 38px; font-weight: 800; margin: 6px 0 0; letter-spacing: -.01em; }
.tpl-bold .kind-wrap { text-align: right; }
.tpl-bold .biz-name { font-size: 18px; font-weight: 800; margin: 0 0 4px; }
.tpl-bold .band .small { color: rgba(255,255,255,.75); font-size: 12.5px; line-height: 1.6; }
.tpl-bold .body { padding: 30px 52px 48px; }
.tpl-bold .doc-meta { display: flex; gap: 34px; font-size: 13px; margin-bottom: 8px; flex-wrap: wrap; }
.tpl-bold .doc-meta .k { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); display: block; }
.tpl-bold .doc-meta .v { font-weight: 700; }
.tpl-bold .billto { margin: 22px 0 4px; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: #cc1a33; text-transform: uppercase; }
.tpl-bold .billto-name { font-weight: 700; font-size: 15px; }
.tpl-bold .small { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.tpl-bold table.items { margin-top: 16px; }
.tpl-bold table.items th { background: #171a29; color: #fff; text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 11px 12px; border-bottom: 3px solid #cc1a33; }
.tpl-bold table.items td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tpl-bold table.items tr:nth-child(even) td { background: #f8fafc; }
.tpl-bold .num { text-align: right; font-variant-numeric: tabular-nums; }
.tpl-bold .totals { width: 260px; margin: 18px 0 0 auto; font-size: 13.5px; }
.tpl-bold .totals td { padding: 5px 0; }
.tpl-bold .totals .grand td { font-size: 18px; font-weight: 800; color: #cc1a33; border-top: 3px solid #cc1a33; padding-top: 10px; }
.tpl-bold .notes { margin-top: 30px; font-size: 12.5px; color: var(--muted); background: #fff1f2; border-radius: 8px; padding: 14px 16px; white-space: pre-line; }
.tpl-bold .notes .k { font-weight: 800; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #cc1a33; display: block; margin-bottom: 4px; }

/* template: elegant (Pro) */
.tpl-elegant .doc-head { text-align: center; padding: 28px 0 6px; }
.tpl-elegant .rule { width: 200px; margin: 18px auto 4px; border-top: 1px solid #947848; }
.tpl-elegant .rule:after { content: ""; display: block; border-top: 1px solid #947848; margin-top: 3px; }
.tpl-elegant .biz-name { font-size: 27px; font-weight: 700; margin: 0 0 6px; font-family: Georgia, "Times New Roman", serif; }
.tpl-elegant .small { color: var(--muted); font-size: 13px; line-height: 1.8; }
.tpl-elegant .doc-kind { font-size: 21px; font-weight: 700; letter-spacing: .3em; text-indent: .3em; margin: 26px 0 6px; font-family: Georgia, "Times New Roman", serif; color: #73706b; }
.tpl-elegant .doc-meta { text-align: center; font-size: 13px; color: var(--ink-soft); line-height: 2; margin-bottom: 10px; }
.tpl-elegant .doc-meta .num-line { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 14.5px; }
.tpl-elegant .billto { margin: 34px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .24em; text-indent: .24em; color: #947848; text-transform: uppercase; }
.tpl-elegant .billto-name { font-weight: 700; font-size: 16px; font-family: Georgia, "Times New Roman", serif; }
.tpl-elegant table.items { margin-top: 20px; }
.tpl-elegant table.items th { text-align: left; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: #73706b; padding: 12px 6px; border-top: 1px solid #947848; border-bottom: 1px solid #947848; font-family: Georgia, "Times New Roman", serif; }
.tpl-elegant table.items td { padding: 14px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: top; font-size: 14px; }
.tpl-elegant .num { text-align: right; font-variant-numeric: tabular-nums; }
.tpl-elegant .totals { width: 280px; margin: 20px 0 0 auto; font-size: 14px; }
.tpl-elegant .totals td { padding: 7px 0; }
.tpl-elegant .totals .grand td { font-size: 18px; font-weight: 700; font-family: Georgia, "Times New Roman", serif; color: #947848; border-top: 1px solid #947848; border-bottom: 1px solid #947848; padding: 12px 0; }
.tpl-elegant .notes { margin-top: 40px; font-size: 13px; color: var(--muted); white-space: pre-line; line-height: 1.8; }
.tpl-elegant .notes .k { font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #947848; display: block; margin-bottom: 6px; }

/* template: compact (Pro) */
.tpl-compact { font-size: 13px; }
.tpl-compact .meta-row { align-items: flex-start; border-bottom: 2px solid var(--ink); padding-bottom: 12px; }
.tpl-compact .doc-kind { font-size: 17px; font-weight: 800; letter-spacing: .1em; margin: 0; text-align: right; }
.tpl-compact .biz-name { font-size: 15px; font-weight: 800; margin: 0 0 2px; }
.tpl-compact .small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.tpl-compact .doc-meta { text-align: right; font-size: 11.5px; color: var(--ink-soft); line-height: 1.7; }
.tpl-compact .doc-meta b { color: var(--ink); }
.tpl-compact .billto { margin: 14px 0 2px; font-size: 10px; font-weight: 800; letter-spacing: .1em; color: var(--faint); text-transform: uppercase; }
.tpl-compact .billto-name { font-weight: 700; font-size: 13px; }
.tpl-compact table.items { margin-top: 10px; }
.tpl-compact table.items th { text-align: left; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 6px; border-bottom: 1px solid var(--ink); }
.tpl-compact table.items td { padding: 6px; border-bottom: 1px solid var(--line-soft); vertical-align: top; font-size: 12.5px; }
.tpl-compact .num { text-align: right; font-variant-numeric: tabular-nums; }
.tpl-compact .totals { width: 230px; margin: 10px 0 0 auto; font-size: 12.5px; }
.tpl-compact .totals td { padding: 3px 0; }
.tpl-compact .totals .grand td { font-size: 15px; font-weight: 800; border-top: 2px solid var(--ink); padding-top: 6px; }
.tpl-compact .notes { margin-top: 18px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 10px; white-space: pre-line; }
.tpl-compact .notes .k { font-weight: 800; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); display: block; margin-bottom: 2px; }

/* Pro badge in the template picker */
.pro-badge { display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: .08em; background: var(--accent-soft); color: var(--accent-dark); border-radius: 5px; padding: 2px 6px; margin-left: 5px; vertical-align: 2px; }
.seg button[aria-pressed="true"] .pro-badge { background: rgba(255,255,255,.22); color: #fff; }

.doc-logo { max-height: 56px; max-width: 180px; object-fit: contain; margin-bottom: 10px; display: block; }
.empty-line { color: var(--faint); font-style: italic; }

/* ---------- saved invoices ---------- */
.saved { padding: 0 0 72px; }
.saved-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.saved-head h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.saved-head p { margin: 0; color: var(--muted); font-size: 14px; }
.saved-list { display: grid; gap: 10px; }
.saved-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.saved-row:hover { transform: translateY(-2px); border-color: #bfdbfe; box-shadow: 0 10px 22px -12px rgba(37, 99, 235, .35); }
.saved-row .n { font-weight: 800; }
.saved-row .t { color: var(--muted); font-size: 13.5px; }
.saved-row .amt { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.saved-row .actions { display: flex; gap: 6px; }
.icon-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; font: 600 13px var(--font); color: var(--ink-soft); padding: 7px 11px; cursor: pointer; }
.icon-btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.icon-btn.danger:hover { color: var(--red); border-color: #fecaca; background: var(--red-soft); }
.saved-empty { text-align: center; color: var(--muted); padding: 34px; border: 1.5px dashed var(--line); border-radius: 12px; background: #fff; font-size: 14.5px; }

/* ---------- faq / footer ---------- */
.faq { padding: 0 0 72px; }
.faq h2 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 16px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 16px 18px; }
.faq summary { font-weight: 700; cursor: pointer; font-size: 15.5px; }
.faq summary::marker { color: var(--accent); }
.faq details p { color: var(--muted); margin: 10px 0 0; font-size: 14.5px; }

.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 36px 0; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; gap: 18px; }

/* ---------- pricing page ---------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 860px; margin: 36px auto 72px; }
.plan { background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 32px; box-shadow: var(--shadow); position: relative; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #bfdbfe; }
.plan.pro { border-color: var(--accent); box-shadow: 0 16px 40px -16px var(--accent-glow); }
.plan .flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font: 700 12px var(--font); letter-spacing: .06em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px; }
.plan h2 { margin: 0 0 4px; font-size: 20px; }
.plan .price { font-size: 40px; font-weight: 800; letter-spacing: -.03em; margin: 12px 0 4px; }
.plan .price small { font-size: 15px; color: var(--muted); font-weight: 600; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 24px; }
.plan li { padding: 8px 0 8px 28px; position: relative; font-size: 14.5px; color: var(--ink-soft); border-bottom: 1px solid var(--line-soft); }
.plan li::before { content: "✓"; position: absolute; left: 4px; color: var(--green); font-weight: 800; }
.plan li.soon::before { content: "◷"; color: var(--amber); }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; font: 600 14px var(--font);
  padding: 12px 20px; border-radius: 10px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- mobile sticky action bar (shown only on small screens) ---------- */
.mobile-bar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .builder-grid { grid-template-columns: 1fr; }
  .preview-col { position: static; }
}
@media (max-width: 640px) {
  /* ----- header: brand + CTA + login only, compact ----- */
  .site-header .wrap { gap: 10px; height: 60px; }
  .nav a:not(.btn) { display: none; }
  .nav .btn, .acct-slot .btn { min-height: 44px; padding: 10px 16px; }
  .acct-slot { margin-left: 0; }
  .acct-email { display: none; }

  /* ----- hero: stacked, thumb-sized CTAs ----- */
  .hero { padding: 48px 0 28px; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; min-height: 52px; }

  /* ----- touch targets everywhere; 16px inputs stop iOS zoom ----- */
  .btn { min-height: 48px; font-size: 16px; }
  .btn-sm { min-height: 44px; font-size: 14.5px; }
  .field input, .field select, .field textarea,
  .bacct-modal input, .bacct-modal select, .bacct-modal textarea,
  .biz-form input, .biz-form select, .biz-form textarea,
  .bacct-backup input[type="email"] { font-size: 16px; }
  .field input, .field select { min-height: 52px; padding: 12px 14px; }
  .seg button { min-height: 44px; }
  .icon-btn { min-height: 44px; padding: 10px 14px; font-size: 14px; }

  /* ----- template dropdown sits above the preview, full width ----- */
  .builder-head { align-items: stretch; }
  .builder-head > div { min-width: 0; }
  .tpl-select-wrap { width: 100%; }
  .tpl-select-wrap select { flex: 1; min-width: 0; }

  /* ----- line items: crushed grid becomes stacked cards ----- */
  .items-head { display: none; }
  .item-row, .item-row.has-catalog {
    grid-template-columns: 1fr 1fr 52px;
    gap: 10px; align-items: end;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    padding: 12px; margin-bottom: 10px;
  }
  .item-row .il { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
  .item-row .il-desc { grid-column: 1 / -1; }
  .item-row .il-catalog { grid-column: 1 / -1; }
  .il-label { display: block; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
  .item-row input { font-size: 16px; padding: 12px; min-height: 52px; }
  .item-catalog { max-width: none; width: 100%; font-size: 16px; min-height: 52px; padding: 12px 8px; }
  .item-del { width: 52px; height: 52px; font-size: 26px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  /* ----- toolbar is replaced by the sticky bottom bar ----- */
  .preview-toolbar { display: none; }
  .has-mobile-bar { padding-bottom: 98px; }
  .mobile-bar {
    display: flex; gap: 8px; align-items: stretch;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .95);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -12px rgba(15, 23, 42, .18);
  }
  .mbtn {
    min-height: 54px; min-width: 54px; border-radius: 12px;
    border: 1.5px solid var(--line); background: #fff;
    font: 700 15px var(--font); color: var(--ink); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; padding: 0 12px;
  }
  .mbtn:active { transform: translateY(1px); }
  .mbtn-primary {
    flex: 1; min-width: 0; background: linear-gradient(180deg, #3d8bfd, var(--accent)); border-color: var(--accent); color: #fff;
    font-size: 16px; white-space: nowrap;
    box-shadow: 0 6px 16px -6px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .25);
    text-shadow: 0 1px 1px rgba(15, 40, 120, .25);
  }
  #m-pdf-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* ----- toasts float above the bar ----- */
  .toast { bottom: 116px; }

  /* ----- preview: legible, no horizontal overflow ----- */
  .preview-shell { padding: 12px; }
  .doc { padding: 28px 20px; min-height: 0; font-size: 13.5px; overflow-wrap: break-word; }
  .doc .meta-row { flex-direction: column; }
  .doc table.items th, .doc table.items td { padding-left: 6px; padding-right: 6px; }
  .doc table.items td:first-child { overflow-wrap: anywhere; }
  .doc .num { white-space: nowrap; }
  .tpl-minimal .totals, .tpl-modern .totals, .tpl-classic .totals,
  .tpl-bold .totals, .tpl-elegant .totals, .tpl-compact .totals { width: 100%; }
  .tpl-minimal .doc-kind, .tpl-minimal .doc-meta { text-align: left; }
  .tpl-modern .band { padding: 26px 22px; flex-direction: column; }
  .tpl-modern .body { padding: 24px 22px 32px; }
  .tpl-bold .band { padding: 26px 22px; flex-direction: column; }
  .tpl-bold .kind-wrap { text-align: left; }
  .tpl-bold .body { padding: 24px 22px 32px; }

  /* ----- login / upsell modal becomes a bottom sheet -----
     (body-qualified: account base styles live later in this file) ----- */
  body .bacct-overlay { align-items: flex-end; padding: 0; }
  body .bacct-modal {
    max-width: none; width: 100%;
    border-radius: 18px 18px 0 0;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
    max-height: 92vh; max-height: 92dvh; overflow-y: auto;
  }
  body .bacct-modal .btn { width: 100%; }
  body .bacct-close { font-size: 30px; padding: 12px 16px; top: 2px; right: 4px; }
  body .bacct-toast { bottom: 116px; }
  body .bacct-backup { bottom: 112px; }
  body .bacct-backup form { flex-direction: column; }
  body .bacct-backup form .btn { width: 100%; min-height: 48px; }

  /* ----- saved invoices: readable rows, big actions ----- */
  .saved-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .saved-row { padding: 16px; gap: 10px; }
  .saved-row .t { flex-basis: 100%; }
  .saved-row .amt { margin-left: auto; }
  .saved-row .actions { width: 100%; }
  .saved-row .actions .icon-btn { flex: 1; }

  /* ----- account dashboard widgets ----- */
  .form-row { grid-template-columns: 1fr; }
  /* Workspace tabs: wrapped pill row instead of a horizontal scroller —
     every section stays visible and tappable, nothing hides off-screen. */
  body .dash-tabs { overflow-x: visible; flex-wrap: wrap; gap: 8px; border-bottom: none; margin-bottom: 14px; }
  body .dash-tab { flex: 1 1 100px; text-align: center; border: 1px solid #e2e8f0; border-radius: 999px; padding: 10px 8px; margin-bottom: 0; background: #f8fafc; font-size: 13.5px; }
  body .dash-tab.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

  /* ----- pricing page ----- */
  .plans { grid-template-columns: 1fr; margin: 28px auto 56px; }
  .plan { padding: 26px 20px; }

  /* ----- footer stacks ----- */
  .site-footer .wrap { flex-direction: column; align-items: flex-start; gap: 14px; }

  /* ----- guides / template articles: no overflow ----- */
  .wrap .article h1 { font-size: 1.65rem; }
  .wrap .article table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .wrap .article .cta-band { padding: 24px 18px; margin: 32px 0 8px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- print: only the invoice ---------- */
@media print {
  .site-header, .hero, .builder-head, .form-col, .preview-toolbar,
  .saved, .faq, .site-footer, .toast, .mobile-bar { display: none !important; }
  body { background: #fff; padding-bottom: 0 !important; }
  .builder, .builder-grid { display: block; padding: 0; }
  .preview-shell { border: 0; padding: 0; box-shadow: none; background: #fff; }
  .doc { box-shadow: none; border-radius: 0; }
  .wrap { max-width: none; padding: 0; }
}

/* ---------- Billia account layer (Phase 1, additive) ---------- */
.acct-slot { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; }
.acct-email { font-size: 13px; color: #475569; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bacct-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
.bacct-modal { background: #fff; border-radius: 12px; padding: 24px; max-width: 400px; width: 100%; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.bacct-modal h3 { margin: 0 0 8px; }
.bacct-modal .muted { color: #64748b; font-size: 14px; margin: 0 0 12px; }
.bacct-modal form { display: flex; flex-direction: column; gap: 10px; }
.bacct-modal input[type="email"] { padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 15px; }
.bacct-msg { font-size: 13px; color: #475569; min-height: 18px; margin: 8px 0 0; }
.bacct-close { position: absolute; top: 8px; right: 12px; border: 0; background: none; font-size: 22px; cursor: pointer; color: #94a3b8; }
.bacct-backup { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 80; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 16px 18px; max-width: 420px; width: calc(100% - 32px); }
.bacct-backup .muted { color: #64748b; font-size: 13px; margin: 6px 0 10px; }
.bacct-backup form { display: flex; gap: 8px; }
.bacct-backup input[type="email"] { flex: 1; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; min-width: 0; }
.bacct-toast { position: fixed; left: 50%; transform: translateX(-50%) translateY(10px); bottom: 24px; background: #0f172a; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px; opacity: 0; transition: opacity .3s, transform .3s; z-index: 100; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.bacct-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.cloud-wrap { margin-top: 18px; }
.cloud-wrap h3 { font-size: 16px; margin: 0 0 10px; color: #334155; }
@media print { .bacct-backup, .bacct-toast, .bacct-overlay { display: none !important; } }

/* Billia workspace dashboard (Phase 2 Pro) */
.dash-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.dash-head h3 { font-size: 17px; margin: 0; color: #334155; }
.pro-badge { display: inline-block; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; padding: 3px 9px; border-radius: 999px; }
.dash-tabs { display: flex; gap: 4px; border-bottom: 2px solid #e2e8f0; margin-bottom: 16px; }
.dash-tab { border: none; background: none; font: 600 14px var(--font); color: var(--muted); padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.dash-tab:hover { color: var(--ink); }
.dash-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.dash-body { min-height: 120px; }
.dash-actions { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.biz-form label { display: block; font-size: 13.5px; font-weight: 600; color: #334155; margin: 10px 0; max-width: 640px; }
.biz-form input, .biz-form select, .biz-form textarea { width: 100%; box-sizing: border-box; margin-top: 4px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 15px; font-family: inherit; }
.biz-form .bacct-msg { font-size: 13.5px; color: #15803d; }
.dash-row { align-items: center; }
.dash-row .actions { flex-wrap: wrap; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; background: #f1f5f9; color: #64748b; white-space: nowrap; }
.pill-paid { background: #dcfce7; color: #15803d; }
.pill-over { background: #fee2e2; color: #b91c1c; }
.stripe-card { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 16px; margin: 12px 0 4px; font-size: 14px; }
.linklike { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 13px; text-decoration: underline; padding: 0; }
.icon-btn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.pro-lock { border: 1px dashed #c7d2fe; background: var(--accent-soft); border-radius: 12px; padding: 28px 20px; text-align: center; max-width: 520px; margin: 8px auto; }
.pro-lock p { margin: 8px 0 16px; }
.bacct-modal label { display: block; font-size: 13.5px; font-weight: 600; color: #334155; margin: 10px 0; }
.bacct-modal input, .bacct-modal select, .bacct-modal textarea { width: 100%; box-sizing: border-box; margin-top: 4px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 15px; font-family: inherit; }
.bacct-modal textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row label { margin: 10px 0; }
