/* Chama Management System */
:root {
  --bg: #f3f5f2;
  --surface: #ffffff;
  --surface-2: #f7f9f6;
  --ink: #16201a;
  --ink-2: #44544a;
  --muted: #69786e;
  --line: #dfe6e0;
  --brand: #145a32;
  --brand-2: #1f7a4d;
  --brand-soft: #e1f3e8;
  --accent: #b9670e;
  --accent-soft: #fdf1dc;
  --danger: #b42318;
  --danger-soft: #fde8e6;
  --info: #175cd3;
  --info-soft: #e5efff;
  --side: #0e2618;
  --side-ink: #c9ddcf;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 40, 24, .06), 0 1px 1px rgba(16, 40, 24, .04);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .6rem; line-height: 1.25; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.05rem; }
h3 { font-size: .95rem; margin-top: 1rem; }
p { margin: 0 0 .8rem; }
code, .mono { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.pos { color: var(--brand-2); }
.neg { color: var(--danger); }
.warn { color: var(--accent); }
ul.tight { margin: .3rem 0 .6rem; padding-left: 1.2rem; }
ul.tight li { margin-bottom: .2rem; }

/* ---------- App shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 248px; flex: 0 0 248px; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.platform .sidebar { background: #1b1f3a; }
.brand { display: flex; gap: .7rem; align-items: center; padding: 1rem; border-bottom: 1px solid rgba(255,255,255,.08); color: inherit; text-decoration: none !important; }
.brand-mark { width: 38px; height: 38px; border-radius: 9px; background: var(--brand-2); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; font-size: .85rem; }
.brand-logo { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; background: #fff; flex: none; }
.brand-name { color: #fff; font-weight: 650; font-size: .88rem; line-height: 1.25; }
.brand-sub { font-size: .72rem; opacity: .65; }
.sidebar nav { padding: .4rem .5rem 1rem; flex: 1; }
.sidebar nav a { display: flex; align-items: center; gap: .6rem; color: var(--side-ink); padding: .45rem .7rem; border-radius: 7px; font-size: .88rem; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.sidebar nav a.active { background: rgba(134, 239, 172, .14); color: #fff; font-weight: 600; }
.ico { width: 1.2rem; text-align: center; opacity: .85; }
.nav-section { text-transform: uppercase; font-size: .66rem; letter-spacing: .08em; opacity: .5; padding: .9rem .7rem .25rem; }
.sidebar-foot { padding: .8rem 1rem; font-size: .72rem; opacity: .45; }
.badge { display: inline-block; min-width: 1.2rem; padding: 0 .35rem; border-radius: 99px; background: #f59e0b; color: #1b1b1b; font-size: .7rem; font-weight: 800; text-align: center; margin-left: auto; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: .9rem; padding: .7rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.page-title { font-size: 1.12rem; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell { position: relative; font-size: 1.05rem; text-decoration: none !important; }
.bell .badge { position: absolute; top: -.5rem; right: -.8rem; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; font-size: .86rem; color: var(--ink-2); padding: .3rem .5rem; border-radius: 6px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu .menu { position: absolute; right: 0; top: 2.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.12); min-width: 220px; padding: .4rem; z-index: 20; }
.user-menu .menu a { display: block; padding: .45rem .6rem; border-radius: 6px; color: var(--ink); }
.user-menu .menu a:hover { background: var(--surface-2); text-decoration: none; }
.menu-head { padding: .3rem .6rem .5rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; }
.menu-btn { display: none; border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: .3rem .6rem; font-size: 1.1rem; cursor: pointer; }
.content { padding: 1.3rem 1.5rem 3rem; max-width: 1400px; width: 100%; }
.nav-backdrop { display: none; }

/* ---------- Cards & grids ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem; margin-bottom: 1.1rem; }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 780px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 1.2rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card-head.plain { padding: 0 0 .6rem; border: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-bottom: 1.1rem; }
.grid-main-side { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 1.1rem; align-items: start; margin-bottom: 1.1rem; }
.grid-2 > *, .grid-main-side > * { min-width: 0; }
.grid-2 > .card, .grid-main-side > .card, .grid-main-side > div > .card:last-child { margin-bottom: 0; }
.section-title { font-size: 1rem; margin: 1.5rem 0 .8rem; padding-bottom: .35rem; border-bottom: 2px solid var(--line); color: var(--brand); }

/* ---------- KPIs ---------- */
.kpis { display: grid; gap: .8rem; margin: .3rem 0 1.1rem; }
.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; box-shadow: var(--shadow); min-width: 0; }
.card .kpi { box-shadow: none; background: var(--surface-2); }
.kpi-label { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 1.3rem; font-weight: 750; margin-top: .1rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi-sub { font-size: .76rem; color: var(--muted); margin-top: .15rem; }
.kpi-strong { background: var(--brand) !important; border-color: var(--brand); color: #fff; }
.kpi-strong .kpi-label, .kpi-strong .kpi-sub { color: rgba(255,255,255,.82); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: .52rem .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; background: var(--surface-2); white-space: nowrap; }
.table tbody tr:hover { background: #fafcf9; }
.table tfoot td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--line); }
.table.compact th, .table.compact td { padding: .34rem .55rem; font-size: .84rem; }
.table .num { text-align: right; white-space: nowrap; }
.table .empty, .empty { text-align: center; color: var(--muted); padding: 1.5rem; }
.table.summary td { padding: .38rem .2rem; font-size: .88rem; }
.table.summary tr.sep td { border-top: 2px solid var(--line); padding-top: .7rem; }
.table.summary tr.total td { font-weight: 800; font-size: .98rem; color: var(--brand); border-top: 2px solid var(--brand); }
tr.clickable { cursor: pointer; }
tr.muted td { color: var(--muted); }
tr.unread td { background: #fbfdf9; font-weight: 600; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions > * { margin-left: .5rem; }
.sticky-col { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 150px; }
thead .sticky-col, tfoot .sticky-col { background: var(--surface-2); }
.grid-table td.cell-ok { background: #ecf8f0; color: #155c34; }
.grid-table td.cell-part { background: var(--accent-soft); color: #8a4a06; }
.grid-table td.cell-due { background: #fdeceb; color: var(--danger); }
.grid-table td.cell-ex { background: #f0f2f1; color: var(--muted); font-size: .75rem; }

/* ---------- Pills ---------- */
.pill { display: inline-block; font-size: .7rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: #eef2ef; color: var(--ink-2); white-space: nowrap; vertical-align: middle; }
.pill-green { background: var(--brand-soft); color: var(--brand); }
.pill-blue { background: var(--info-soft); color: var(--info); }
.pill-amber { background: var(--accent-soft); color: #8a4a06; }
.pill-red { background: var(--danger-soft); color: var(--danger); }
.pill-grey { background: #eceff0; color: #5b6770; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: .84rem; margin-bottom: .75rem; color: var(--ink-2); }
input, select, textarea { display: block; width: 100%; margin-top: .25rem; font: inherit; font-weight: 400; color: var(--ink); padding: .5rem .65rem; border: 1px solid #cbd5ce; border-radius: 7px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
input[type=file] { padding: .35rem; }
input[type=color] { padding: .15rem; height: 2.4rem; }
input[type=checkbox], input[type=radio] { width: auto; display: inline-block; margin: .2rem .45rem 0 0; flex: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.span-2 { grid-column: span 2; }
.hint { display: inline; font-weight: 400; font-size: .78rem; color: var(--muted); }
p.hint { display: block; margin: -.2rem 0 .8rem; }
.actions { display: flex; gap: .6rem; align-items: center; margin-top: .4rem; flex-wrap: wrap; }
.inline { display: inline; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; padding: .8rem 1.2rem; border-top: 1px solid var(--line); }
.inline-form.top, .card:not(.flush) .inline-form { padding: .5rem 0 0; border-top: 0; }
.inline-form input, .inline-form select { width: auto; margin: 0; min-width: 0; }
.inline-label { display: flex; align-items: center; gap: .45rem; margin: 0; }
.inline-label select, .inline-label input { width: auto; margin: 0; }
.check { display: flex; align-items: flex-start; gap: .1rem; font-weight: 400; }
.inline-check { display: inline-flex; margin: 0 .6rem .2rem 0; font-size: .82rem; }
.roles-form { display: flex; flex-wrap: wrap; align-items: center; }
.role-checks .check { margin-bottom: .45rem; }
details.rev { margin: .3rem 0; }
details.rev > summary { cursor: pointer; display: inline-block; list-style: none; font-size: .86rem; }
details.rev > summary::-webkit-details-marker { display: none; }
.inline-details { display: inline-block; }
.inline-details[open] { display: block; text-align: left; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; font: inherit; font-weight: 650; font-size: .87rem; padding: .5rem .95rem; border-radius: 7px; border: 1px solid transparent; cursor: pointer; text-decoration: none !important; white-space: nowrap; line-height: 1.3; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: #cbd5ce; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost { background: #fff; color: var(--danger); border-color: #f1b4b0; }
.btn-light { background: #fff; color: var(--brand); }
.btn-sm { padding: .28rem .6rem; font-size: .8rem; }
.btn-lg { padding: .75rem 1.3rem; font-size: 1rem; }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--brand-2); font: inherit; cursor: pointer; }
.link:hover { text-decoration: underline; }
.link.danger, .danger { color: var(--danger); }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.toolbar .spacer { flex: 1; }
.filters { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; flex: 1; }
.filters input, .filters select { width: auto; margin: 0; min-width: 0; }
.filters input[name=q] { min-width: 200px; }

/* ---------- Alerts ---------- */
.alert { padding: .7rem .95rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; font-size: .9rem; }
.alert-success { background: #f0fbf4; border-color: #b6e8c8; color: #124b2b; }
.alert-error { background: #fef3f2; border-color: #fecdca; color: #7a271a; }
.alert-warn { background: #fffaeb; border-color: #fedf89; color: #7a2e0e; }
.alert-info { background: #f0f6ff; border-color: #c4dafb; color: #194185; }

/* ---------- Misc components ---------- */
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0 0 .8rem; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.profile { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.profile-name { font-size: 1.25rem; font-weight: 750; }
.loan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .6rem; }
.progress { height: 8px; background: #eaefeb; border-radius: 99px; overflow: hidden; margin: .3rem 0 .2rem; }
.progress > div { height: 100%; background: var(--brand-2); border-radius: 99px; }
.bar-row { margin-bottom: .65rem; }
.bar-label { display: flex; justify-content: space-between; gap: .5rem; font-size: .84rem; margin-bottom: .2rem; }
.bar { height: 8px; background: #eaefeb; border-radius: 99px; overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); border-radius: 99px; }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 240px; }
.pre { background: #0f1f16; color: #d1fae5; padding: .65rem .8rem; border-radius: 7px; font: .8rem/1.5 var(--mono); white-space: pre-wrap; word-break: break-all; margin: .25rem 0 .9rem; cursor: copy; }
.notes { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; margin: .8rem 0; }
.file-list { list-style: none; padding: 0; margin: 0; }
.file-list li { padding: .35rem 0; border-bottom: 1px solid var(--line); display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.checklist { list-style: none; padding: 0; margin: 0 0 1rem; }
.steps li { margin-bottom: .45rem; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-bottom: 1rem; }
.dialog { border: 0; border-radius: 12px; padding: 1.4rem; max-width: 460px; width: calc(100% - 2rem); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.dialog::backdrop { background: rgba(10, 25, 15, .45); }
.big-number { font-size: 2rem; font-weight: 800; color: var(--brand); margin-bottom: .5rem; }
.highlight { border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
.attachments .att { padding: .25rem 0; }
.g-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .3rem 0; border-bottom: 1px solid var(--line); }
.month-strip { display: flex; flex-wrap: wrap; gap: .25rem; margin: .4rem 0; }
.ms { display: inline-block; min-width: 2.4rem; text-align: center; font-size: .72rem; font-weight: 700; padding: .2rem .25rem; border-radius: 5px; background: #eceff0; color: #5b6770; }
.ms-ok { background: #d9f2e2; color: #155c34; }
.ms-part { background: var(--accent-soft); color: #8a4a06; }
.ms-due { background: #fde3e1; color: var(--danger); }
.setup-card { border-left: 4px solid var(--accent); }
.setup-list { list-style: none; padding: 0; margin: 0 0 .6rem; display: grid; grid-template-columns: 1fr 1fr; gap: .35rem 1.2rem; }
.setup-list li { display: flex; gap: .5rem; align-items: center; }
.setup-list .tick { width: 1.3rem; height: 1.3rem; border-radius: 50%; border: 2px solid #cbd5ce; display: grid; place-items: center; font-size: .72rem; color: #fff; flex: none; }
.setup-list li.done .tick { background: var(--brand-2); border-color: var(--brand-2); }
.setup-list li.done a { color: var(--muted); text-decoration: line-through; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.report-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; color: var(--ink); box-shadow: var(--shadow); }
.report-card:hover { border-color: var(--brand-2); text-decoration: none; }
.report-card strong { display: block; color: var(--brand); margin-bottom: .2rem; }
.report-card span { font-size: .82rem; color: var(--muted); }
.rec-summary { display: flex; gap: 1.5rem; align-items: flex-end; flex-wrap: wrap; margin: 1rem 0 .5rem; }
.rec-summary label { margin: 0; }
.pay-box { background: var(--brand-soft); border-radius: 8px; padding: .8rem 1rem; font-weight: 600; }
.je-table input, .je-table select { margin: 0; }
.chama-list { display: grid; gap: .5rem; margin-bottom: 1rem; }
.chama-pick { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; padding: .8rem 1rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font: inherit; }
.chama-pick:hover { border-color: var(--brand-2); background: #fff; }

/* ---------- Auth ---------- */
.auth-body { background: linear-gradient(155deg, #0e2618 0%, #145a32 60%, #1f7a4d 100%); min-height: 100vh; }
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 6vh 1rem 2rem; }
.auth-wrap.wide { max-width: 760px; padding-top: 3vh; }
.auth-card { padding: 1.6rem; }
.auth-logo { margin-bottom: 1rem; display: inline-flex; }
.auth-links { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .8rem; }

/* ---------- Public site ---------- */
.site { background: #fbfcfa; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 1.2rem; }
.narrow-wrap { max-width: 640px; }
.site-head { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-head-in { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.site-logo { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none !important; }
.site-logo strong { display: block; font-size: 1rem; }
.site-logo small { display: block; font-size: .72rem; color: var(--muted); }
.site-logo.light { color: #fff; }
.logo-dot { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); position: relative; flex: none; }
.logo-dot::after { content: ""; position: absolute; inset: 7px; border: 3px solid #fff; border-radius: 50%; }
.site-logo.light .logo-dot { background: #fff; }
.site-logo.light .logo-dot::after { border-color: var(--brand); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1.1rem; font-size: .9rem; }
.site-nav a { color: var(--ink-2); }
.site-nav a.btn-primary { color: #fff; }
.site-menu-btn { margin-left: auto; }
.hero { background: radial-gradient(1200px 400px at 85% -10%, #d6efe0 0%, transparent 60%), linear-gradient(180deg, #f4faf6, #fbfcfa); padding: 4.2rem 0 3.4rem; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2.5rem; align-items: center; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-2); background: var(--brand-soft); padding: .2rem .6rem; border-radius: 99px; margin-bottom: .9rem; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -.02em; margin-bottom: 1rem; color: #0e2618; }
.lead { font-size: 1.08rem; color: var(--ink-2); max-width: 36rem; }
.hero-cta { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.4rem 0 .8rem; }
.hero-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 60px -30px rgba(14, 38, 24, .35); padding: 1.2rem; transform: rotate(-1deg); }
.hc-head { display: flex; align-items: center; gap: .5rem; font-weight: 700; margin-bottom: .9rem; }
.hc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand-2); }
.hc-head .pill { margin-left: auto; }
.hc-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .9rem; }
.hc-kpis div { background: var(--surface-2); border-radius: 10px; padding: .6rem .7rem; }
.hc-kpis small { display: block; color: var(--muted); font-size: .72rem; }
.hc-kpis strong { font-size: 1.05rem; }
.hc-rows div { display: flex; justify-content: space-between; gap: .6rem; font-size: .8rem; padding: .45rem 0; border-top: 1px dashed var(--line); }
.hc-rows span { color: var(--ink-2); }
.hc-foot { font-size: .7rem; color: var(--muted); text-align: right; margin-top: .4rem; }
.section { padding: 3.4rem 0; }
.section.alt { background: #f2f6f3; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-h { font-size: 1.7rem; letter-spacing: -.01em; margin-bottom: .4rem; color: #0e2618; }
.section-sub { color: var(--muted); max-width: 44rem; margin-bottom: 1.8rem; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; }
.feature-no { display: inline-block; font-weight: 800; color: var(--accent); font-size: .85rem; margin-bottom: .4rem; }
.feature h3 { margin: 0 0 .35rem; font-size: 1rem; }
.feature p { font-size: .88rem; color: var(--ink-2); margin: 0; }
.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; }
.type-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .8rem .9rem; display: flex; flex-direction: column; gap: .2rem; }
.type-card span { font-size: .8rem; color: var(--muted); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.6rem; }
.step-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem; }
.step-n { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: .6rem; }
.step-card p { color: var(--ink-2); font-size: .9rem; margin: 0; }
.login-help { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; background: var(--brand-soft); border-radius: 12px; padding: 1.2rem 1.4rem; flex-wrap: wrap; }
.login-help p { margin: 0; color: var(--ink-2); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 300px)); gap: 1rem; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.3rem; display: flex; flex-direction: column; }
.plan h3 { margin: 0; font-size: 1.15rem; }
.plan-aud { color: var(--muted); font-size: .84rem; margin-bottom: .7rem; }
.plan-price { font-size: 1.7rem; font-weight: 800; color: var(--brand); margin-bottom: .6rem; }
.plan-price small { font-size: .85rem; color: var(--muted); font-weight: 500; }
.plan ul { padding-left: 1.1rem; margin: 0 0 1rem; font-size: .88rem; color: var(--ink-2); flex: 1; }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.trust div { border-left: 3px solid var(--brand-2); padding-left: .9rem; }
.trust strong { display: block; margin-bottom: .2rem; }
.trust span { color: var(--muted); font-size: .9rem; }
.cta-band { background: var(--brand); color: #fff; padding: 2.4rem 0; }
.cta-in { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.cta-in h2 { font-size: 1.4rem; margin-bottom: .3rem; }
.cta-in p { margin: 0; opacity: .85; }
.site-foot { background: #0e2618; color: #b7cdbf; padding: 2.4rem 0 1rem; }
.site-foot a { color: #e1f3e8; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 1.6rem; padding-top: 1rem; opacity: .7; }
.reg-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 2.5rem; align-items: start; }
.reg-steps { padding-left: 1.2rem; color: var(--ink-2); }
.reg-steps li { margin-bottom: .5rem; }
.reg-card h2 { margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.reg-card h2:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.verify-form { display: flex; gap: .5rem; margin: 1rem 0 1.4rem; }
.verify-form input { margin: 0; font-family: var(--mono); text-transform: uppercase; }
.verify-result.ok { border-color: #8bd3a6; }
.verify-result.bad { border-color: #f5a39b; }
.verify-badge { font-weight: 800; font-size: 1.1rem; margin-bottom: .8rem; }
.verify-result.ok .verify-badge { color: var(--brand-2); }
.verify-result.bad .verify-badge { color: var(--danger); }

/* ---------- Printable documents ---------- */
.print-body { background: #e9eeea; }
.doc-actions { max-width: 820px; margin: 1rem auto; display: flex; gap: .5rem; padding: 0 1rem; }
.doc { max-width: 820px; margin: 0 auto 2rem; background: #fff; padding: 2rem 2.2rem; box-shadow: 0 4px 30px rgba(0,0,0,.08); position: relative; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; border-bottom: 3px solid var(--brand); padding-bottom: .9rem; margin-bottom: 1.2rem; }
.doc-org { font-size: 1.25rem; font-weight: 800; color: var(--brand); }
.doc-title { font-weight: 800; letter-spacing: .08em; color: var(--ink-2); text-align: right; }
.doc-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin-bottom: 1.2rem; }
.doc-meta div { background: var(--surface-2); border-radius: 6px; padding: .45rem .6rem; }
.doc-meta span { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.doc-line { font-size: 1.02rem; border-bottom: 1px dotted #c9d2cc; padding: .35rem 0; }
.doc-amount { font-size: 1.2rem; }
.doc-sign { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.4rem; align-items: flex-end; flex-wrap: wrap; }
.verify-box { border: 1px dashed var(--line); padding: .5rem .7rem; border-radius: 6px; font-size: .8rem; max-width: 340px; }
.sign-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; font-size: .85rem; }
.sig-line { border-top: 1px solid #333; margin-top: 2.6rem; padding-top: .2rem; font-size: .75rem; color: var(--muted); }
.stamp { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg); font-size: 4rem; font-weight: 900; color: rgba(180, 35, 24, .18); border: 6px solid rgba(180, 35, 24, .18); padding: .2rem 1rem; border-radius: 10px; pointer-events: none; }
.doc-foot { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.print-head { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main-side { grid-template-columns: 1fr; }
  .feature-grid, .type-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 30; transform: translateX(-100%); transition: transform .2s ease; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 20; }
  .menu-btn { display: block; }
  .topbar { padding: .55rem 1rem; }
  .content { padding: 1rem 1rem 3rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero-grid, .reg-grid { grid-template-columns: 1fr; }
  .hero-card { transform: none; }
  .steps-grid, .trust, .foot-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: .8rem 1.2rem 1.2rem; border-bottom: 1px solid var(--line); gap: .6rem; }
  body.site-nav-open .site-nav { display: flex; }
  .setup-list { grid-template-columns: 1fr; }
  .doc { padding: 1.2rem; }
  .doc-meta { grid-template-columns: 1fr 1fr; }
  .sign-grid { grid-template-columns: 1fr; }
}
@media (min-width: 881px) { .site-menu-btn { display: none; } }
@media (max-width: 560px) {
  .kpis-4 { grid-template-columns: 1fr; }
  .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .filters input[name=q] { min-width: 0; width: 100%; }
  .feature-grid, .type-grid { grid-template-columns: 1fr; }
  .hero { padding: 2.4rem 0 2rem; }
  .user-menu summary { max-width: 8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .verify-form { flex-direction: column; }
}

/* ---------- Print ---------- */
@media print {
  .sidebar, .topbar, .no-print, .toolbar, .nav-backdrop, .doc-actions { display: none !important; }
  body, .print-body { background: #fff; font-size: 11px; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .doc { box-shadow: none; margin: 0; padding: 0; max-width: none; }
  .print-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .8rem; border-bottom: 2px solid #000; }
  .kpi-strong { background: #fff !important; color: #000; border: 2px solid #000; }
  .kpi-strong .kpi-label, .kpi-strong .kpi-sub { color: #333; }
  a { color: #000; }
  details:not([open]) { display: none; }
}

.table td a[href*="p=journal&"], .table td a[href*="p=receipt&"], .table td a[href*="p=voucher&"] { white-space: nowrap; }
