/* Payroll console — Ink + Signal Green design system */
:root {
  --ink: #12100F;
  --ink-2: #1F1D1B;
  --bg: #F5F5F3;
  --surface: #FFFFFF;
  --line: #E6E4E0;
  --line-strong: #D3D0CB;
  --muted: #6B6762;
  --text: #1F1D1B;
  --green: #00875A;
  --green-fill: #00734C;
  --green-hover: #005F3F;
  --green-soft: #E6F4EE;
  --green-on-dark: #43B189;
  --danger: #B42318;
  --danger-soft: #FEE4E2;
  --warn: #B54708;
  --warn-soft: #FEF0C7;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(18,16,15,.05), 0 2px 8px rgba(18,16,15,.04);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; line-height: 1.45; }
a { color: var(--green-fill); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: 1.55rem; font-weight: 650; }
h2 { font-size: 1.05rem; font-weight: 650; }
h3 { font-size: .92rem; font-weight: 600; }
p { margin: 0 0 .75rem; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }

/* Shell */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: #fff; padding: 22px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--green); display: grid; place-items: center; font-weight: 800; color: #fff; font-size: .9rem; }
.brand .name { font-weight: 650; font-size: 1rem; letter-spacing: -0.01em; }
.brand .sub { font-size: .72rem; color: rgba(255,255,255,.55); display: block; margin-top: -2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: rgba(255,255,255,.78); font-weight: 500; font-size: .93rem; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.nav a.active { background: rgba(67,177,137,.16); color: #fff; box-shadow: inset 3px 0 0 var(--green-on-dark); }
.nav a svg { width: 17px; height: 17px; opacity: .8; }
.nav .group { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.4); padding: 16px 12px 6px; font-weight: 600; }
.sidebar .spacer { flex: 1; }
.userbox { border-top: 1px solid rgba(255,255,255,.1); padding: 14px 10px 4px; font-size: .82rem; color: rgba(255,255,255,.7); }
.userbox strong { color: #fff; display: block; font-weight: 600; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; }
.userbox form { margin-top: 8px; }
.userbox button { background: none; border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.8); padding: 5px 10px; border-radius: 6px; cursor: pointer; font: inherit; font-size: .8rem; }
.userbox button:hover { border-color: rgba(255,255,255,.5); color: #fff; }

.main { padding: 34px 44px 60px; max-width: 1240px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-head .crumbs { font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.page-head .crumbs a { color: var(--muted); }
.page-head .lead { color: var(--muted); margin: 4px 0 0; font-size: .92rem; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Flash */
.flash { padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: .92rem; border: 1px solid; display: flex; gap: 10px; align-items: center; }
.flash.ok { background: var(--green-soft); border-color: #BFE3D3; color: #0B5E41; }
.flash.error { background: var(--danger-soft); border-color: #F7C6C2; color: #8A1B12; }
.flash.warn { background: var(--warn-soft); border-color: #F5DFA6; color: #7A3009; }

/* Cards & grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 20px; }
.card.tight { padding: 0; overflow: hidden; }
.card.tight .card-head { padding: 16px 22px; }
.card.tight table { border-radius: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-size: 1rem; }
.card-head .hint { color: var(--muted); font-size: .84rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .label { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.stat .value { font-size: 1.5rem; font-weight: 650; color: var(--ink); margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat .foot { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.stat.accent { border-color: #BFE3D3; background: linear-gradient(180deg, #F3FAF6 0%, #FFFFFF 100%); }
.stat.accent .value { color: var(--green-fill); }

.section-title { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.sub { color: var(--muted); font-size: .82rem; margin-top: 2px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: .9rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.empty { padding: 34px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 4px; }
.notice { border-left: 3px solid var(--warn); background: var(--warn-soft); padding: 10px 14px; border-radius: 6px; font-size: .88rem; color: #7A3009; margin-bottom: 16px; }
.notice.info { border-color: var(--green); background: var(--green-soft); color: #0B5E41; }
.help { font-size: .8rem; color: var(--muted); margin-top: 4px; }

/* Tables */
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #FAFAF8; white-space: nowrap; }
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: #FBFBFA; }
table.data .num, table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tfoot td { font-weight: 650; border-top: 2px solid var(--ink); background: #FAFAF8; }
table.data tr.excluded td { opacity: .5; }
table.data td .err { color: var(--danger); font-size: .8rem; margin-top: 4px; }
table.data td .warn { color: var(--warn); font-size: .8rem; margin-top: 4px; }
table.data a.row-link { color: var(--ink); font-weight: 600; }
.tbl-scroll { overflow-x: auto; }

/* Pills */
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 650; letter-spacing: .02em; }
.pill.ok { background: var(--green-soft); color: #0B5E41; }
.pill.muted { background: #EEEDEA; color: var(--muted); }
.pill.warn { background: var(--warn-soft); color: #7A3009; }
.pill.danger { background: var(--danger-soft); color: #8A1B12; }
.pill.ink { background: var(--ink); color: #fff; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 8px; font: inherit; font-size: .9rem; font-weight: 600; border: 1px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.2; transition: background .12s, border-color .12s; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--green-fill); color: #fff; }
.btn-primary:hover { background: var(--green-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #F0B9B4; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-ghost { background: transparent; color: var(--green-fill); padding-left: 6px; padding-right: 6px; }
.btn-sm { padding: 5px 10px; font-size: .82rem; border-radius: 6px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Forms */
form { margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-grid .span-2 { grid-column: span 2; }
.field label { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field label .opt { color: var(--muted); font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 7px; font: inherit; font-size: .9rem; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(0,135,90,.25); border-color: var(--green); }
input.money, input.hrs { text-align: right; font-variant-numeric: tabular-nums; }
input.hrs { width: 76px; padding: 6px 8px; }
input.money.inline { width: 110px; padding: 6px 8px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; padding: 6px 0; }
.check input { width: 16px; height: 16px; accent-color: var(--green-fill); }
.form-section { padding: 18px 0; border-top: 1px solid var(--line); }
.form-section:first-child { border-top: 0; padding-top: 0; }
.form-section h3 { margin-bottom: 4px; }
.form-section .desc { color: var(--muted); font-size: .84rem; margin-bottom: 14px; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); margin-top: 6px; }
.errors { background: var(--danger-soft); border: 1px solid #F7C6C2; color: #8A1B12; padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .9rem; }
.errors ul { margin: 4px 0 0 18px; padding: 0; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { min-width: 140px; }
.extra-row { display: flex; gap: 6px; margin-bottom: 4px; }
.extra-row select { width: 124px; padding: 6px 6px; font-size: .82rem; }
.extra-row input.money.inline { width: 88px; }
table.data.draft td, table.data.draft th { padding-left: 7px; padding-right: 7px; }
table.data.draft input.hrs { width: 56px; }
table.data.draft .extra-row select { width: 112px; }
table.data.draft .extra-row input.money.inline { width: 80px; }

/* Public layout */
.public { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }
.public .box { width: 100%; max-width: 440px; }
.public .card { padding: 30px 32px; }
.public .brand { padding: 0 0 20px; color: var(--ink); }
.public .brand .sub { color: var(--muted); }
.public h1 { font-size: 1.35rem; margin-bottom: 4px; }
.public .lead { color: var(--muted); font-size: .92rem; margin-bottom: 20px; }
.public .field { margin-bottom: 14px; }
.public .btn { width: 100%; justify-content: center; padding: 10px; }
.public .foot { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 16px; }

/* Verify page */
.verify .box { max-width: 620px; }
.verify .status { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); margin-bottom: 20px; }
.verify .status.valid { background: var(--green-soft); border: 1px solid #BFE3D3; }
.verify .status.void { background: var(--danger-soft); border: 1px solid #F7C6C2; }
.verify .status.missing { background: var(--warn-soft); border: 1px solid #F5DFA6; }
.verify .status .icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.2rem; flex: none; }
.verify .status.valid .icon { background: var(--green); }
.verify .status.void .icon { background: var(--danger); }
.verify .status.missing .icon { background: var(--warn); }
.verify .status strong { display: block; font-size: 1.05rem; color: var(--ink); }
.verify .status span { color: var(--muted); font-size: .88rem; }
.verify .figures { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.verify .fig { padding: 10px 0; border-bottom: 1px solid var(--line); }
.verify .fig .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; }
.verify .fig .val { font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.verify .fig.wide { grid-column: span 2; }

/* Stub preview (HTML rendering of the statement) */
.stub { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 0 26px; box-shadow: var(--shadow); overflow: hidden; }
.stub > *:not(.band):not(.strip) { margin-left: 34px; margin-right: 34px; }
.stub .band { background: var(--ink); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 34px; border-bottom: 3px solid var(--green); }
.stub .band-left { display: flex; align-items: center; gap: 16px; }
.stub .band .logo { max-height: 44px; max-width: 160px; display: block; }
.stub .band .co { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; }
.stub .band .co-sub { color: rgba(255,255,255,.7); font-size: .8rem; margin-top: 2px; }
.stub .band-right { text-align: right; font-size: .86rem; color: rgba(255,255,255,.9); }
.stub .band-right .t { color: var(--green-on-dark); font-weight: 750; letter-spacing: .07em; font-size: .78rem; margin-bottom: 2px; }
.stub .band-right .void-tag { color: #F97066; font-weight: 800; letter-spacing: .1em; }
.stub .strip { display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 34px 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.stub .strip .tile { padding: 12px 14px; text-align: center; background: var(--bg); border-right: 1px solid var(--line); }
.stub .strip .tile:last-child { border-right: 0; }
.stub .strip .tl { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; }
.stub .strip .tv { font-size: 1.25rem; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 2px; letter-spacing: -0.01em; }
.stub .strip .tile.net { background: var(--green-soft); box-shadow: inset 0 0 0 1.5px var(--green); }
.stub .strip .tile.net .tv { font-size: 1.5rem; font-weight: 750; }
.stub .emp-name { font-weight: 650; font-size: 1rem; }
.stub .blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 18px; font-size: .88rem; }
.stub .blocks .kv { gap: 3px 14px; }
.stub table.data { font-size: .88rem; margin-bottom: 16px; }
.stub table.data.recap { border: 1px solid var(--line); border-radius: 6px; }
.stub .section-title { margin-bottom: 6px; }
.stub .netbox { background: var(--green-soft); border: 1px solid var(--green); border-radius: var(--radius-sm); padding: 14px 18px; text-align: right; }
.stub .netbox .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; }
.stub .netbox .value { font-size: 1.7rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stub .summary { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.stub .verify-foot { display: flex; gap: 16px; align-items: center; border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; font-size: .82rem; color: var(--muted); }
.stub .verify-foot .qr { width: 84px; height: 84px; flex: none; }
.stub .verify-foot .qr svg { width: 84px; height: 84px; display: block; }
.stub.voided { position: relative; }
.stub.voided::after { content: "VOIDED"; position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg); font-size: 5rem; font-weight: 800; color: rgba(180,35,24,.12); letter-spacing: .1em; pointer-events: none; }

/* Responsive */
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .sidebar .spacer, .nav .group { display: none; }
  .nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .main { padding: 22px 18px 50px; }
  .stats, .grid-2, .grid-3, .form-grid, .form-grid.cols-3, .verify .figures, .stub .blocks, .stub .summary { grid-template-columns: 1fr; }
  .form-grid .span-2, .verify .fig.wide { grid-column: span 1; }
}
@media print {
  .sidebar, .actions, .flash, .no-print { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; max-width: none; }
  body { background: #fff; }
}

/* ---- Public landing page ---- */
.btn-lg { padding: 12px 22px; font-size: 1rem; border-radius: 9px; }
body.lp { background: #fff; }
.lp-nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 32px; max-width: 1080px; margin: 0 auto; }
.lp-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.lp-brand:hover { text-decoration: none; }
.lp-brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--green-fill); color: #fff; display: grid; place-items: center; font-weight: 800; }
.lp-brand .name { font-size: 1.05rem; letter-spacing: -0.01em; }
.lp-nav-links { display: flex; align-items: center; gap: 18px; }
.lp-nav-links a { color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.lp-hero { max-width: 820px; margin: 0 auto; padding: 60px 32px 40px; text-align: center; }
.lp-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 700; color: var(--green-fill); margin-bottom: 18px; }
.lp-eyebrow.dark { color: var(--green-on-dark); }
.lp-hero h1 { font-size: 2.7rem; line-height: 1.08; letter-spacing: -0.025em; margin-bottom: 18px; }
.lp-sub { font-size: 1.12rem; line-height: 1.6; color: var(--muted); max-width: 640px; margin: 0 auto 26px; }
.lp-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.lp-note { margin-top: 18px; font-size: .86rem; color: var(--muted); }
.lp-band { background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 48px 32px; margin-top: 30px; }
.lp-grid3 { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.lp-feat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; box-shadow: var(--shadow); }
.lp-feat .lp-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--green-soft); color: var(--green-fill); display: grid; place-items: center; font-weight: 800; margin-bottom: 14px; }
.lp-feat h3 { font-size: 1.08rem; margin-bottom: 8px; }
.lp-feat p { color: var(--muted); font-size: .94rem; line-height: 1.55; margin: 0; }
.lp-verify { background: var(--ink); color: #fff; padding: 64px 32px; }
.lp-verify-inner { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 44px; align-items: center; }
.lp-verify h2 { color: #fff; font-size: 1.9rem; line-height: 1.12; letter-spacing: -0.02em; margin-bottom: 20px; }
.lp-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.lp-checks li { position: relative; padding-left: 30px; color: rgba(255,255,255,.82); line-height: 1.5; font-size: .96rem; }
.lp-checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: .72rem; font-weight: 800; }
.lp-checks b { color: #fff; }
.lp-verify-card { background: #fff; color: var(--ink); border-radius: 14px; padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.lp-vc-badge { display: inline-block; background: var(--green-soft); color: #0B5E41; font-weight: 700; font-size: .84rem; padding: 6px 12px; border-radius: 999px; margin-bottom: 16px; }
.lp-vc-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.lp-vc-row span { color: var(--muted); }
.lp-vc-fingerprint { margin-top: 14px; font-family: ui-monospace, Consolas, monospace; font-size: .76rem; color: var(--muted); }
.lp-vc-cap { margin-top: 6px; font-size: .74rem; color: var(--muted); }
.lp-final { text-align: center; padding: 64px 32px; max-width: 640px; margin: 0 auto; }
.lp-final h2 { font-size: 2rem; letter-spacing: -0.02em; margin-bottom: 12px; }
.lp-final p { color: var(--muted); font-size: 1.05rem; margin-bottom: 24px; }
.lp-foot { border-top: 1px solid var(--line); padding: 28px 32px; max-width: 1000px; margin: 0 auto; display: flex; justify-content: space-between; gap: 24px; align-items: baseline; flex-wrap: wrap; }
.lp-foot > div:first-child { font-weight: 700; color: var(--ink); }
.lp-foot-note { color: var(--muted); font-size: .8rem; max-width: 620px; }
@media (max-width: 820px) {
  .lp-hero h1 { font-size: 2.05rem; }
  .lp-grid3 { grid-template-columns: 1fr; }
  .lp-verify-inner { grid-template-columns: 1fr; gap: 28px; }
}
