/* Navigation and forms share the same spacing and control system. */
:root { --ink:#202c23; --secondary:#526257; --accent:#27772d; --surface:#fff; --divider:#dce5dd; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif; }
[hidden] { display:none !important; }
.side { position:sticky; top:0; height:100dvh; gap:22px; }
.nav { gap:0; }
.nav-group { padding:16px 0; border-top:1px solid var(--divider); gap:4px; }
.nav-group:first-child { padding-top:0; border-top:0; }
.nav-heading { padding:0 12px 8px; font-size:.75rem; letter-spacing:.02em; color:#526257; text-transform:none; }
.nav button { min-height:44px; }
.nav button.active { box-shadow:inset 3px 0 var(--accent); }
.nav-icon { display:inline-flex !important; align-items:center; justify-content:flex-start; }
.nav-icon svg,.tab-icon svg { display:block; width:20px; height:20px; }
.nav button:hover { background:#f0f5ef; }
.steps > span.step { border:0; border-radius:6px; background:#eaf0e8; color:#526257; }
button:active,.btn:active { filter:brightness(.94); }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; max-width:100%; white-space:normal; overflow-wrap:anywhere; text-align:center; line-height:1.35; }
.seg { max-width:100%; flex-wrap:wrap; }
.seg button { min-height:44px; }
select:not([multiple]) { appearance:none; -webkit-appearance:none; padding-right:44px !important; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none' stroke='%23526257' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 7.5 5 5 5-5'/%3E%3C/svg%3E") !important; background-repeat:no-repeat !important; background-position:right 14px center !important; background-size:16px !important; cursor:pointer; }
select:disabled { cursor:default; opacity:.7; }
@media (forced-colors:active) { select:not([multiple]) { appearance:auto; background-image:none !important; } }
.demo-input input,.demo-input select,.demo-input textarea { line-height:1.4; }
.demo-input input[type=date],.demo-input input[type=time] { display:block; min-width:0; }
.demo-check { cursor:pointer; }
.demo-check input { flex:0 0 22px; }
.table-tabs { flex-wrap:wrap; overflow:visible; }
.table-tabs a { display:flex; align-items:center; min-height:44px; white-space:normal; }
.table-tabs a strong { font-weight:500; }
.table-tabs a.active strong { font-weight:700; }
.tables-section { margin:24px 0; }
.tables-section h2 { font-size:1.125rem; margin:0 0 12px; }
.table-tabs.table-hub { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.table-hub a { justify-content:space-between; gap:12px; min-width:0; padding:14px; border-radius:12px; }
.table-hub a:hover { border-color:#80ba74; background:#f4faf2; }
.table-hub a strong { display:block; font-size:.9375rem; font-weight:700; color:#26352b; }
.table-hub a small { display:block; font-size:.8125rem; margin-top:4px; color:#59675d; }
.table-hub a > span:last-child { font-size:1.5rem; }
.workflow-toolbar { display:flex; flex-wrap:wrap; align-items:end; gap:12px; margin:0 0 18px; }
.workflow-toolbar .demo-input { flex:1 1 220px; }
.workflow-toolbar .btn { flex:0 1 auto; }
.workflow-list { display:grid; gap:10px; }
.workflow-row { display:flex; align-items:center; justify-content:space-between; gap:16px; width:100%; padding:16px; border:1px solid var(--divider); border-radius:12px; color:var(--ink); background:var(--surface); text-align:left; min-width:0; }
button.workflow-row:hover { background:#f6faf4; border-color:#80ba74; }
.workflow-copy { display:grid; gap:5px; min-width:0; }
.workflow-copy strong { font-size:1rem; overflow-wrap:anywhere; }
.workflow-copy small { font-size:.875rem; color:var(--secondary); overflow-wrap:anywhere; }
.workflow-row > span:last-child { flex-shrink:0; color:var(--secondary); }
.workflow-empty { padding:24px; border:1px dashed #b9c8bb; border-radius:12px; background:#fff; }
.workflow-empty p { color:var(--secondary); }
.workflow-form { max-width:860px; }
.workflow-form .demo-card { margin-bottom:16px; }
.workflow-form .demo-form-actions { margin-top:16px; }
.workflow-help { display:block; color:var(--secondary); font-size:.8125rem; font-weight:400; }
.workflow-error { color:#96352f; background:#fff1ef; padding:12px; border:1px solid #d9a39c; border-radius:9px; margin-bottom:16px; }
.workflow-error:empty { display:none; }
.workflow-permission { display:grid; grid-template-columns:minmax(0,1fr) minmax(170px,.7fr); gap:16px; align-items:center; padding:12px 0; border-bottom:1px solid var(--divider); }
.workflow-permission > span { display:grid; gap:4px; }
.workflow-permission small { font-weight:400; color:var(--secondary); }
.workflow-permission select { min-width:0; }
.workflow-ranks { margin:16px 0 0; padding-left:20px; color:var(--secondary); font-size:.875rem; }
.workflow-draft { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; color:var(--secondary); font-size:.8125rem; margin-bottom:16px; }
.workflow-draft .btn { font-size:.8125rem; }
.demo-form > .workflow-draft { grid-column:1 / -1; margin-bottom:0; }
.demo-form .demo-form-note { grid-row:2 / span 2; }
.demo-form > .demo-card:nth-of-type(2) { grid-column:1; }
.workflow-select-wrap { position:relative; display:block; min-width:0; width:100%; }
.workflow-select-wrap select { position:absolute; inset:0; width:100%; height:100%; min-height:100%; opacity:0; z-index:1; }
.workflow-select-value { display:block; width:100%; min-height:46px; border:1px solid #b9c8bb; border-radius:9px; padding:10px 44px 10px 12px; background:#fff; color:#202c23; font-size:1rem; line-height:1.4; font-weight:400; white-space:normal; overflow-wrap:anywhere; pointer-events:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none' stroke='%23526257' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 7.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 14px center; }
.workflow-select-wrap:focus-within { outline:3px solid #276f31; outline-offset:2px; border-radius:9px; }
.workflow-permission > .workflow-select-wrap { display:block; }
@media (forced-colors:active) { .workflow-select-wrap select { opacity:1; position:static; } .workflow-select-value { display:none; } }
.demo-form-actions { scroll-margin-bottom:100px; }
.demo-form-actions.is-keyboard { position:static; }
.calendar-day,.month .event,.more,.demo-toast button { min-width:44px; min-height:44px; }
.event.unpaid,.agenda-event.unpaid { border-left-color:#dc6c64; }
.demo-input input[readonly] { background:#edf1ed; color:var(--secondary); cursor:default; }
.demo-toast { pointer-events:none; }
.demo-toast button { pointer-events:auto; }
.avatar { color:var(--accent); }
.day-time { color:var(--secondary); font-size:.8125rem; }
.demo-program-finance { grid-column:1; }
.demo-review { margin-block:16px; }
.demo-review .demo-form-grid { margin-top:16px; }
.demo-review .btn { margin-top:12px; }
.demo-review-status { font-weight:700; color:var(--accent); }
.demo-input input:disabled,.demo-input select:disabled { background:#edf1ed; color:var(--secondary); opacity:1; }
.workflow-select-wrap:has(select:disabled) .workflow-select-value { background:#edf1ed; color:var(--secondary); }
.demo-table td.is-number,.demo-table th.is-number { text-align:right; font-variant-numeric:tabular-nums; }
@media(max-width:1100px) { .table-tabs.table-hub { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:900px) { .table-tabs:not(.table-hub) { display:none; } }
@media(max-width:900px) { .demo-form .demo-form-note { grid-row:auto; } }
@media(max-width:700px) { .topbar { height:auto; min-height:58px; padding-block:calc(12px + env(safe-area-inset-top)) 12px; } }
@media(max-height:550px) { .demo-form-actions { position:static; } }
@media(max-width:700px) { .table-tabs.table-hub { grid-template-columns:minmax(0,1fr); } .workflow-row { padding:14px; gap:10px; } .workflow-toolbar { align-items:stretch; } .workflow-toolbar .btn { width:100%; } .workflow-permission { grid-template-columns:minmax(0,1fr); gap:8px; } .workflow-form .demo-form-actions { margin-top:12px; } .demo-form-actions { flex-wrap:wrap; } .demo-form-actions .btn { flex:1 1 10rem; overflow-wrap:normal; } .mobile-nav button { padding:4px 0; } }
