:root {
  color-scheme: light;
  --ink: var(--zf-ink);
  --muted: var(--zf-muted);
  --line: var(--zf-line);
  --paper: var(--zf-paper);
  --white: #fff;
  --link: var(--brand-link, var(--zf-green));
  --action: var(--zf-orange);
  --action-hover: var(--zf-orange-dark);
  --action-ink: var(--zf-orange-ink);
  --danger: #a72f3a;
  --radius: 13px;
}

* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.55 var(--zf-font); color: var(--ink); background: var(--paper); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a.brand { color: inherit; }
button, input, select, textarea { font: inherit; }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--action);
  color: var(--action-ink);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 17px;
  font-weight: 650;
  cursor: pointer;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
}

button:hover, .button:hover { background: var(--action-hover); color: #fff; text-decoration: none; }
button:disabled { opacity: .55; cursor: wait; }
.secondary { background: var(--white); color: var(--ink); border-color: var(--line); }
.secondary:hover { background: var(--zf-sage); color: var(--ink); }
.danger { background: #fff6f5; color: var(--danger); border-color: #efcfd2; }
.danger:hover { background: #f9e2e4; color: var(--danger); }
.text-button { padding: 4px 0; border: 0; color: var(--muted); background: transparent; font-weight: 400; }
.text-button:hover { background: transparent; color: var(--link); }

input, select, textarea {
  display: block;
  width: 100%;
  min-width: 0;
  border: 1px solid #9aaea3;
  border-radius: 8px;
  background: var(--white);
  padding: 10px 11px;
  color: var(--ink);
}

input:focus, select:focus, textarea:focus { border-color: var(--link); }
input[type=checkbox] { width: 17px; height: 17px; display: inline; flex: none; accent-color: var(--zf-green); }
label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 600; }
label small { font-weight: 400; }
.check { flex-direction: row; align-items: center; font-weight: 400; }

.sidebar {
  position: fixed;
  width: 228px;
  inset: 0 auto 0 0;
  background: var(--zf-forest);
  color: var(--zf-paper);
  padding: 27px 20px 18px;
  display: flex;
  flex-direction: column;
  z-index: 10;
  overflow: auto;
}

.sidebar a:focus-visible { outline-color: var(--zf-orange); }
.sidebar .eyebrow { color: var(--zf-sage); font-size: 9px; margin: 28px 10px 10px; }
.sidebar nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar nav a {
  padding: 7px 10px;
  border-inline-start: 3px solid transparent;
  border-radius: 7px;
  color: var(--zf-paper);
  font-size: 13px;
}
.sidebar nav a:hover, .sidebar nav a.active { background: #ffffff20; text-decoration: none; }
.sidebar nav a.active { border-inline-start-color: var(--zf-orange); font-weight: 700; }
.nav-label { font-size: 9px; font-weight: 650; text-transform: uppercase; letter-spacing: 1.1px; color: var(--zf-sage); margin: 16px 12px 5px; }
.sidebar-footer { margin-top: auto; padding: 20px 12px 0; color: var(--zf-sage); font-size: 11px; }
.sidebar-footer a { color: inherit; }

.public-workspace .topbar {
  padding-inline: clamp(1.125rem, 4.5vw, 4rem);
  background: var(--zf-paper);
}

.public-sign-in { background: var(--zf-forest); color: #fff; }
.public-sign-in:hover { background: var(--zf-green); }

.card.public-page {
  padding: clamp(1.25rem, 4vw, 2.75rem);
  border-top: 4px solid var(--zf-orange);
}
.public-page h1 { font-size: clamp(1.85rem, 5vw, 2.9rem); margin: 0 0 .75rem; }
.public-page p:not(.eyebrow) { color: var(--muted); font-size: 1rem; }
.public-page .button { margin-top: .5rem; }

.workspace{margin-left:228px}.topbar{height:76px;background:var(--white);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 38px;gap:18px}.company-switch{font-weight:650;color:var(--ink)}.company-switch span{color:var(--muted);margin-left:10px}.topbar-right{display:flex;align-items:center;gap:24px;font-size:12px}.topbar-right a{color:var(--ink)}main{padding:35px 38px 50px;max-width:1500px;margin:0 auto;min-height:calc(100vh - 130px)}.public-workspace main{max-width:1120px}.page-head{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:27px}.page-head h1{margin:3px 0 4px}.page-head p{margin:4px 0}h1{font-size:29px;line-height:1.2;letter-spacing:-.8px;margin:0 0 26px;font-weight:650}h2{font-size:17px;line-height:1.3;letter-spacing:-.2px;margin:0 0 17px}h3{font-size:15px}.eyebrow{font-size:10px;letter-spacing:1.5px;font-weight:650;color:var(--link);text-transform:uppercase}.muted,small{color:var(--muted)}small{display:block;font-size:11px;font-weight:400}.strong{font-weight:650}.card{background:var(--white);border:1px solid var(--line);border-radius:var(--radius);padding:25px;margin:0 0 22px;box-shadow:0 3px 9px #183c3207}.grid{display:grid;gap:22px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid>.card{margin-bottom:0}.grid{margin-bottom:22px}.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:18px;margin-bottom:28px}.stat{background:var(--white);border:1px solid var(--line);border-radius:var(--radius);padding:23px;display:flex;flex-direction:column;gap:12px}.stat>span:first-child{font-size:12px;color:var(--muted)}.stat strong,.big-number{font-size:30px;line-height:1.2;font-weight:650;letter-spacing:-1px;font-variant-numeric:tabular-nums}.stat a,.stat>span:last-child{font-size:11px}.stat:first-child{background:var(--zf-sage);border-color:var(--line)}.section-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:15px}.section-head h2{margin:0}.section-head select{max-width:270px}.section-head a{font-size:12px}.action-card{display:block;color:var(--ink);transition:transform .15s}.action-card:hover{transform:translateY(-2px);text-decoration:none;border-color:#9bb9a6}.action-card>span{font-size:9px;letter-spacing:1.6px;color:var(--link)}.action-card h2{margin:17px 0 8px}.action-card p{color:var(--muted);font-size:12px;margin:0}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.full,.form-actions{grid-column:1/-1}.form-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding-top:8px}.stack{display:flex;flex-direction:column;gap:17px}.stack>.card{margin:0}.stack>button{align-self:flex-start}.inline{display:flex;align-items:center;gap:10px}.inline form{margin:0}.inline select{max-width:280px}.wrap{flex-wrap:wrap}.filters{display:flex;gap:10px;align-items:flex-end;margin-bottom:20px;flex-wrap:wrap}.filters>input{max-width:330px}.filters select{width:190px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}th{color:var(--muted);font-size:10px;font-weight:550;letter-spacing:.3px;border-bottom:1px solid var(--line);padding:12px 13px;white-space:nowrap;background:var(--paper)}td{padding:17px 13px;border-bottom:1px solid var(--line);vertical-align:top}tbody tr:last-child td{border-bottom:0}td small{margin-top:5px}.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.badge{padding:4px 8px;font-size:10px;border-radius:5px;display:inline-block;background:#f0f2ee;color:#6c796f;white-space:nowrap}.badge.sent,.badge.received{background:#e9f0fa;color:#42659b}.badge.paid,.badge.accepted{background:#e6f3e8;color:#287447}.badge.cancelled,.badge.refused,.badge.disputed{background:#fbe9e8;color:#a24c4f}.badge.simulated{background:#fbf1db;color:#8a6b21}.empty{padding:40px;text-align:center;color:var(--muted)}.notice{padding:15px 18px;border:1px solid #e4dcb9;background:#fff9e8;border-radius:9px;margin-bottom:22px}.notice.success{background:#eaf5ec;border-color:#c6dfce}.notice.error,.errorlist{color:var(--danger);background:#fff0ef;border-color:#f2c7ca}.errorlist{padding:8px 15px;font-size:12px;list-style:none}.narrow{max-width:720px;margin:20px auto}.auth-card{max-width:440px;margin:45px auto;padding:36px}.auth-card .stack>button{align-self:stretch}.auth-card h1{margin-bottom:27px}.auth-card>p:last-child{font-size:12px}.pagination{display:flex;justify-content:center;gap:25px;font-size:12px}.page-footer{display:flex;justify-content:center;gap:16px;color:var(--muted);font-size:11px;padding:0 20px 20px}.page-footer a{color:inherit}.line-editor{min-width:880px}.line-editor td{padding:11px 5px;vertical-align:top}.line-editor input,.line-editor select{padding:8px 7px;font-size:12px}.line-editor td:first-child{width:30%;min-width:220px}.line-editor td:first-child input+input{margin-top:6px;font-size:10px}.line-editor td:nth-child(2){width:8%}.line-editor td:nth-child(3){width:9%}.line-editor td:nth-child(4){width:12%}.line-editor td:nth-child(5){width:8%}.line-editor td:nth-child(6){width:12%}.line-editor td:nth-child(7){text-align:right;min-width:85px;vertical-align:middle}.line-editor button{padding:6px 9px}.totals-preview{text-align:right;font-size:15px;padding:20px 0 0;font-weight:650}.totals-display{width:min(100%,360px);margin:30px 0 25px auto}.totals-display p{display:flex;justify-content:space-between;padding:5px 0;margin:0}.totals-display .grand{border-top:1px solid var(--line);margin-top:9px;padding-top:13px;font-size:18px}.clean-list{list-style:none;padding:0}.clean-list li{padding:10px 0;border-bottom:1px solid var(--line)}.timeline{list-style:none;padding:0 0 0 14px;border-left:2px solid var(--line)}.timeline li{margin-bottom:18px;font-size:12px}.timeline small{margin-top:4px}.invitation{padding:17px 0;border-bottom:1px solid var(--line)}.invitation p{font-size:12px}.product-image{max-width:140px;max-height:140px;object-fit:contain}.code,code{font-family:ui-monospace,SFMono-Regular,monospace;font-size:12px}.code,pre{white-space:pre-wrap;overflow-wrap:anywhere}.email-body{font-size:13px;line-height:1.6}.secret{display:block;overflow-wrap:anywhere;padding-top:8px}.break{overflow-wrap:anywhere}details{margin:15px 0}summary{cursor:pointer;color:var(--link)}
@media(min-width:1600px){main{padding-top:45px}}@media(max-width:1100px){.sidebar{width:190px;padding:25px 12px}.workspace{margin-left:190px}.topbar{padding:0 24px}main{padding:28px 24px}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.page-head{align-items:flex-start;flex-wrap:wrap}.grid.two{grid-template-columns:1fr}.grid.two>.card{margin:0}}
@media(max-width:700px){.sidebar{position:static;width:auto;border-right:0;border-bottom:1px solid var(--line);padding:14px 18px}.sidebar .eyebrow,.sidebar-footer,.nav-label{display:none}.sidebar nav{flex-direction:row;overflow:auto;margin-top:12px;gap:3px}.sidebar nav a{white-space:nowrap;font-size:12px;padding:7px 10px}.workspace{margin:0}.topbar{height:auto;min-height:64px;padding:14px 18px;flex-wrap:wrap}.topbar-right{gap:15px}main{padding:24px 16px}.card{padding:19px;border-radius:11px}.form-grid{grid-template-columns:1fr}.stats{gap:10px}.stat{padding:17px}.stat strong{font-size:26px}h1{font-size:26px}.page-head{margin-bottom:22px}.page-footer{flex-wrap:wrap}.inline{flex-wrap:wrap}.filters>input{max-width:100%}.auth-card{margin:20px auto;padding:27px}.section-head{flex-wrap:wrap}td,th{padding:12px 9px}.company-switch{max-width:100%;overflow-wrap:anywhere}}

dialog{width:min(90vw,480px);border:1px solid var(--line);border-radius:16px;padding:28px;box-shadow:0 20px 80px #12342b33}dialog::backdrop{background:#16392a66}[hidden]{display:none!important}

fieldset{border:1px solid var(--line);border-radius:9px;padding:15px}fieldset label{margin:9px 0}legend{color:var(--muted);font-size:12px}.comparison-stats .stat:first-child{background:var(--white)}.comparison-stats .stat strong{font-size:25px}.comparison-stats .stat>span:last-child{line-height:1.6}.filters .full{flex-basis:100%}hr{border:0;border-top:1px solid var(--line);margin:24px 0}

/* Client presentation and accessible small-screen controls. */
.skip-link{position:absolute;left:12px;top:-100px;z-index:100;background:var(--white);padding:12px;border:2px solid var(--link)}.skip-link:focus{top:12px}.branding-preview{max-width:220px;max-height:120px;object-fit:contain;align-self:flex-start}.totp-qr{width:220px;max-width:100%;height:auto;align-self:flex-start}.recovery-codes{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;list-style:none;padding:0}.recovery-codes li{padding:7px;background:var(--paper);border-radius:5px}.card,.grid>*,fieldset,details{min-width:0}.card p,li,code{overflow-wrap:anywhere}dialog{background:var(--white)}[data-density=compact] td{padding-top:9px;padding-bottom:9px}[data-density=compact] .card{padding:20px}.company-switch{overflow-wrap:anywhere}
:root[data-theme=dark]{color-scheme:dark;--ink:#e3ede9;--muted:#a2b6ac;--line:#34453e;--paper:#111c17;--white:#1b2a23;--link:var(--brand-dark-link,#accbbb)}
@media(prefers-color-scheme:dark){:root[data-theme=system]{color-scheme:dark;--ink:#e3ede9;--muted:#a2b6ac;--line:#34453e;--paper:#111c17;--white:#1b2a23;--link:var(--brand-dark-link,#accbbb)}}
html[data-theme=dark] th,html[data-theme=dark] .stat:first-child{background:#25382d;color:var(--ink)}html[data-theme=dark] .notice{background:#3a3522;border-color:#665735;color:#f1e2b4}html[data-theme=dark] .notice.success{background:#1c3b29;color:#c4e3ce}html[data-theme=dark] .notice.error,html[data-theme=dark] .errorlist{background:#48282c;color:#ffc1c7}html[data-theme=dark] .secondary:hover{background:#344b3e;color:var(--ink)}html[data-theme=dark] td{border-color:var(--line)}
@media(prefers-color-scheme:dark){html[data-theme=system] th,html[data-theme=system] .stat:first-child{background:#25382d;color:var(--ink)}html[data-theme=system] .notice{background:#3a3522;border-color:#665735;color:#f1e2b4}html[data-theme=system] .notice.success{background:#1c3b29;color:#c4e3ce}html[data-theme=system] .notice.error,html[data-theme=system] .errorlist{background:#48282c;color:#ffc1c7}html[data-theme=system] .secondary:hover{background:#344b3e;color:var(--ink)}html[data-theme=system] td{border-color:var(--line)}}
@media(max-width:700px){button,.button{min-height:44px;max-width:100%;white-space:normal;text-align:center}.sidebar nav a{min-height:44px;display:flex;align-items:center}.sidebar nav{max-width:100%}.brand-name{max-width:240px}.topbar-right{flex-wrap:wrap}.stack>button{align-self:stretch}input[type=color]{height:46px}.notice{overflow-wrap:anywhere}.filters label{max-width:100%}.card .inline>code{max-width:100%}.recovery-codes{grid-template-columns:1fr}.auth-card h1{overflow-wrap:anywhere}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
@media print{.sidebar,.topbar,.page-footer,.form-actions{display:none}.workspace{margin:0}.recovery-codes{grid-template-columns:repeat(2,1fr)}html{color-scheme:light!important}body,.card{background:white!important;color:black!important}}

input[type=color]{height:46px;padding:6px}
