@font-face{font-family:Univers;src:url('/assets/brand/univers-light.otf') format('opentype');font-weight:300;font-display:swap}@font-face{font-family:Univers;src:url('/assets/brand/univers-bold.otf') format('opentype');font-weight:700;font-display:swap}
:root{--accent:#cbff8c;--ink:#0e1320;--paper:#fafbf7;--muted:#616777;--border:#dce2d5;--surface:#edf0e9;--radius:8px}*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--paper);font:15px/1.55 Arial,Helvetica,sans-serif}a{color:inherit;text-decoration:none}a:hover{text-decoration:underline}button,input,textarea,select{font:inherit}button,.button{display:inline-flex;justify-content:center;align-items:center;gap:22px;border:1px solid var(--ink);border-radius:4px;background:var(--ink);color:var(--paper);padding:11px 18px;cursor:pointer;font-weight:600;font-size:14px;line-height:1.4;text-decoration:none;min-height:43px}button:hover,.button:hover{background:#28333e;text-decoration:none}button:disabled{opacity:.55;cursor:wait}.secondary{background:transparent;color:var(--ink);border-color:#c5cdbd}.secondary:hover{background:var(--surface)}.quiet{background:none;color:inherit;border:0;padding:8px;min-height:0;font-size:12px}.quiet:hover{background:#ffffff15}.small{font-size:12px;padding:8px 10px;min-height:32px}.full{width:100%}h1,h2,h3,p{margin-top:0}h1{font:700 clamp(32px,4vw,52px)/1.08 Univers,Arial,sans-serif;letter-spacing:-1.7px;margin-bottom:14px}h2{font:700 21px/1.2 Univers,Arial,sans-serif;letter-spacing:-.4px;margin:0}h3{font-size:16px;margin:16px 0 10px}small{font-size:12px}hr{border:0;border-top:1px solid var(--border);margin:24px 0}.muted{color:var(--muted)}.strong{font-weight:600}.lead{font-size:17px;color:var(--muted);max-width:700px}.sidebar{position:fixed;inset:0 auto 0 0;width:238px;background:var(--ink);color:var(--paper);padding:35px 20px 24px;display:flex;flex-direction:column}.brand{display:flex;flex-direction:column;gap:12px;padding:0 15px 28px;border-bottom:1px solid #ffffff20}.brand img{display:block;width:155px;height:51px;object-fit:contain;object-position:left}.brand span{font-size:13px;letter-spacing:2px;color:#b5b9be}.sidebar nav{padding-top:24px;display:grid;gap:3px}.sidebar nav a{display:flex;justify-content:space-between;align-items:center;border-radius:4px;padding:10px 14px;color:#c9cdd4;font-size:14px}.sidebar nav a span:last-child{opacity:0}.sidebar nav a:hover{background:#ffffff0a;text-decoration:none}.sidebar nav a[aria-current]{background:var(--accent);color:var(--ink);font-weight:600}.sidebar nav a[aria-current] span:last-child{opacity:1}.sidebar-footer{margin-top:auto;padding:30px 14px 0;color:#b4b9c1}.sidebar-footer small{display:block;margin-top:24px;font-size:10px;color:#747d8b}.workspace{margin-left:238px}.topbar{height:78px;padding:0 42px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;font-size:13px}.account{display:flex;gap:18px;align-items:center}.account .quiet{color:var(--muted)}main{max-width:1600px;margin:auto;padding:23px 42px 50px}.test-strip{min-height:28px}.test-label{font-size:11px;color:#7b6428;display:inline-flex;align-items:center;gap:8px}.test-label:before{content:'';width:6px;height:6px;background:#c6a04a;border-radius:100%}.page-heading{margin:20px 0 32px}.page-heading p{color:var(--muted);margin:0}.heading-dot{color:#6a913e}.heading-actions{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-bottom:24px}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:26px}.metric{border:1px solid var(--border);background:#fff;border-radius:var(--radius);padding:24px 23px;min-height:158px}.metric p{font-size:13px;color:var(--muted);margin-bottom:22px}.metric strong{display:block;font-size:clamp(20px,2.1vw,30px);font-weight:500;letter-spacing:-.9px;white-space:nowrap}.metric small{display:block;color:var(--muted);margin-top:6px;font-size:11px}.metric.warning{background:#f3eee5;border-color:#e8ddc8}.metric.warning strong{color:#8e4c2a}.quick-actions{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 34px}.quick-actions .button:first-child{background:var(--accent);border-color:var(--accent);color:var(--ink)}.panel{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:26px;margin-bottom:24px;overflow:hidden}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:24px}.panel-head>a{font-size:12px;white-space:nowrap}.panel-head h2{font-size:20px}.table-scroll{overflow:auto}table{width:100%;border-collapse:collapse;font-size:13px;text-align:left}th{padding:12px 14px;color:var(--muted);background:#f6f7f2;font-size:11px;font-weight:500;white-space:nowrap;border-bottom:1px solid var(--border)}td{padding:17px 14px;border-bottom:1px solid #edf0e9;vertical-align:middle}tr:last-child td{border-bottom:0}td small{display:block;color:var(--muted);font-size:11px;margin-top:4px;max-width:280px}.amount{white-space:nowrap;font-weight:600}.badge{display:inline-block;padding:4px 9px;font-size:11px;border-radius:4px;white-space:nowrap;background:#edf0e9;color:#5c665b}.badge.paid,.badge.accepted,.badge.active{background:#e5f0df;color:#3e622c}.badge.overdue,.badge.failed,.badge.disabled{background:#f6e8df;color:#a14d2b}.badge.shared,.badge.queued,.badge.retry{background:#f5efda;color:#8a7029}.badge.sent,.badge.invoiced{background:#e4ebf3;color:#446587}.columns{display:grid;grid-template-columns:1.15fr 1fr;gap:24px}.columns .panel{min-width:0}.columns .panel th,.columns .panel td{padding:13px 9px}.next-steps{display:flex;justify-content:space-between;gap:20px;font-size:13px}.empty{text-align:center;color:var(--muted);padding:24px}.stack{display:flex;flex-direction:column;gap:18px}.field{display:flex;flex-direction:column;gap:7px;min-width:0}.field>span{font-size:12px;color:var(--muted)}input,textarea,select{width:100%;min-width:0;border:1px solid #ccd4c5;border-radius:4px;padding:11px 12px;color:var(--ink);background:#fff;min-height:43px}textarea{min-height:100px;resize:vertical}input:focus,textarea:focus,select:focus{outline:2px solid #7d9b58;outline-offset:2px}input[type=checkbox]{width:17px;min-height:17px;margin:0;accent-color:#54783c;flex-shrink:0}.check{display:flex;align-items:flex-start;gap:10px;font-size:13px}.check input{margin-top:3px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.inline{display:inline-flex;gap:12px;align-items:end}.inline .field{max-width:160px}.actions{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:16px}.actions:last-child{margin-bottom:0}.filters{display:flex;flex-wrap:wrap;gap:14px;align-items:end;margin-bottom:25px}.filters .field{max-width:220px;flex:1}.notice{border:1px solid #bfd1ac;background:#eef5e6;color:#3d562a;padding:17px 20px;border-radius:6px;margin-bottom:24px}.notice.error{background:#fcefe8;border-color:#e4b19d;color:#8e3f25}.versions{display:flex;flex-wrap:wrap;gap:10px;margin:25px 0}.versions a{border:1px solid var(--border);padding:12px 20px;border-radius:4px;font-weight:600}.versions a[aria-current]{border-color:#709450;background:#edf4e4}.versions small{display:block;color:var(--muted);font-weight:400}.document-preview{background:#fff;border:1px solid var(--border);border-radius:8px;padding:40px;margin:24px 0}.document-top{display:flex;justify-content:space-between;align-items:center;padding-bottom:24px;border-bottom:1px solid var(--border);margin-bottom:30px}.document-top img{width:160px;height:55px;object-fit:contain;object-position:left}.document-top span{color:var(--muted);font-size:13px}.document-preview>h2{margin:30px 0 14px}.document-total{display:flex;align-items:end;flex-direction:column;gap:12px;padding:24px 12px}.document-total span{font-size:12px;color:var(--muted)}.document-total strong{font-size:28px;letter-spacing:-1px}.items-editor{display:flex;flex-direction:column;gap:13px}.item-head,.item-row{display:grid;grid-template-columns:minmax(180px,3fr) 85px 90px 110px 30px;gap:10px;align-items:center}.item-head{font-size:11px;color:var(--muted)}.item-row .field>span{display:none}.item-row textarea{min-height:65px}.item-row input{padding:10px}.items-editor>button{align-self:start}.items-editor template{display:none}fieldset{border:1px solid var(--border);padding:18px;display:flex;flex-direction:column;gap:12px}legend{font-weight:600;padding:0 8px}details{padding:15px 0;border-bottom:1px solid var(--border)}details.panel{padding:22px 26px}summary{cursor:pointer;font-weight:600}details[open] summary{margin-bottom:22px}.prose{font-size:14px;line-height:1.8;max-width:900px}code{font-size:11px;overflow-wrap:anywhere}.page-footer{display:flex;justify-content:space-between;padding:20px 42px;border-top:1px solid var(--border);font-size:11px;color:var(--muted)}.login-grid{display:grid;grid-template-columns:1fr 1fr;gap:55px;max-width:1080px}.login-intro{padding:35px 15px}.login-intro h2{font-size:clamp(32px,4vw,55px);letter-spacing:-2px;line-height:1.1}.login-intro p{color:var(--muted);max-width:320px;margin:25px 0}.login-shape{width:150px;height:150px;margin-top:40px;background:var(--accent);border-radius:30px;font-size:120px;line-height:140px;text-align:center}.login-grid .panel h2{font-size:27px;margin-bottom:15px}.public-layout .sidebar nav{display:none}.public-layout main{max-width:1150px}.public-layout .document-preview{max-width:100%}@media(min-width:1700px){main{padding-top:30px}}@media(max-width:1200px){.sidebar{width:205px;padding-inline:12px}.workspace{margin-left:205px}main{padding:20px 25px 40px}.topbar{padding:0 25px}.columns{grid-template-columns:1fr}.metrics{grid-template-columns:repeat(2,1fr)}.login-grid{gap:25px}.metric strong{font-size:27px}}@media(max-width:760px){.sidebar{position:relative;width:100%;padding:20px;display:block}.brand{padding:0;border:0;flex-direction:row;align-items:center;justify-content:space-between}.brand img{width:125px;height:36px}.brand span{font-size:12px}.sidebar nav{display:flex;overflow:auto;padding-top:20px;gap:7px}.sidebar nav a{white-space:nowrap;padding:8px 11px}.sidebar nav a span:last-child{display:none}.sidebar-footer{display:none}.workspace{margin:0}.topbar{padding:12px 20px;height:auto;gap:10px;flex-wrap:wrap}.topbar>span{font-size:11px}.account{gap:12px;font-size:11px}main{padding:16px 18px 35px}.page-heading{margin:15px 0 24px}h1{font-size:36px}.metrics{gap:10px}.metric{padding:17px 15px;min-height:140px}.metric strong{font-size:23px}.metric p{margin-bottom:15px;font-size:12px}.metric small{font-size:10px}.panel{padding:19px 15px}.panel-head{align-items:flex-start}.panel-head h2{font-size:19px}.form-grid{grid-template-columns:1fr}.item-head{display:none}.item-row{grid-template-columns:1fr 1fr 1fr 30px;border-bottom:1px solid var(--border);padding-bottom:13px}.item-row>.field:first-child{grid-column:1/-1}.item-row .field>span{display:block}.document-preview{padding:22px 15px}.next-steps{flex-direction:column}.login-grid{grid-template-columns:1fr}.login-intro{display:none}.quick-actions{gap:8px}.quick-actions .button{flex:1;font-size:12px;padding:10px}.page-footer{padding:20px}.public-layout .sidebar{display:block}.public-layout .sidebar nav{display:none}.filters .field{min-width:100px}.heading-actions{gap:12px}}

/* Live job timers: dense desktop table, touch-friendly mobile cards. */
.time-tracker [hidden]{display:none!important}
.time-summary{display:flex;align-items:center;gap:35px;padding:23px 26px;margin-bottom:24px;background:var(--ink);color:var(--paper);border-radius:8px}
.time-summary>div{display:flex;flex-direction:column;gap:5px}.time-summary>div>span{font-size:12px;color:#c9cdd4}.time-summary strong{font-size:27px;font-weight:500;font-variant-numeric:tabular-nums;letter-spacing:-.5px}
.time-sync{margin:0 0 0 auto;font-size:11px;color:var(--accent);max-width:230px}.time-sync:before{content:'●';margin-right:7px}.time-sync[data-connected=false]{color:#f1c080}
.time-toolbar{display:flex;align-items:end;gap:16px;flex-wrap:wrap;margin-bottom:17px}.time-toolbar>.field:first-child{flex:2;min-width:180px}.time-toolbar>.field:nth-child(2){flex:1;min-width:180px}.time-toolbar .check{padding-bottom:12px;white-space:nowrap}.time-help{font-size:12px;color:var(--muted);margin-bottom:21px}
.time-table-wrap{border:1px solid var(--border);border-radius:8px;background:#fff;overflow:hidden}.time-table{table-layout:fixed}.time-table th,.time-table td{padding:17px 12px}.time-table th:nth-child(1){width:17%}.time-table th:nth-child(2){width:24%}.time-table th:nth-child(3){width:12%}.time-table th:nth-child(4){width:12%}.time-table th:nth-child(5){width:12%}.time-table th:nth-child(6){width:12%}.time-table th:nth-child(7){width:165px}
.time-customer,.time-job{display:block;overflow-wrap:anywhere}.time-job{font-weight:600}.time-table small{font-size:11px;line-height:1.45}.time-description{max-height:48px;overflow:hidden}.time-table tr[data-status=running]{background:#f0f7e7}.time-table tr[data-status=running] .time-state{color:#426923}.time-state:before{content:'●';font-size:9px;margin-right:6px}.time-state{font-size:12px;color:var(--muted);white-space:nowrap}.time-clock,.time-total,.time-quoted{font-variant-numeric:tabular-nums;white-space:nowrap}.time-clock{font-size:15px}.time-total{font-size:16px}.time-table tr[data-over-budget=true] [data-time-budget]{color:#a14d2b}
.time-controls{white-space:nowrap}.time-action{display:inline-flex;vertical-align:middle;margin-right:4px}.time-action:last-child{margin-right:0}.timer-button{width:44px;height:44px;min-height:44px;padding:0;gap:0;border-radius:5px}.timer-button>span:first-child{font-size:17px;line-height:1}.timer-start{background:var(--accent);border-color:#a2c87b;color:var(--ink)}.timer-start:hover{background:#b9e789}.timer-pause{background:#fff;border-color:#a4b48f;color:#526d37}.timer-pause:hover{background:#edf4e4}.timer-finish{background:#fff;border-color:#d8bdb0;color:#9c5131}.timer-finish:hover{background:#f7ebe4}.timer-button:disabled{opacity:.28;cursor:default}.timer-label{display:none}.time-controls:has([data-busy=true]){opacity:.7}.time-table tr[data-busy=true]{opacity:.65}.time-confirm{max-width:480px;padding:30px;border:1px solid var(--border);border-radius:10px;color:var(--ink);box-shadow:0 20px 70px #0004}.time-confirm::backdrop{background:#0e132088}.time-confirm h2{margin-bottom:20px}.time-confirm .actions{margin-top:25px}.time-confirm p{font-size:14px}.time-confirm [data-time-confirm-title]{font-weight:600}
@media(min-width:1400px){.time-table th:nth-child(7){width:165px}.time-table th:nth-child(2){width:27%}}
@media(max-width:1200px) and (min-width:761px){.time-table th,.time-table td{padding:14px 8px}.time-table th:nth-child(1){width:16%}.time-table th:nth-child(2){width:22%}.time-table th:nth-child(3){width:12%}.time-table th:nth-child(4){width:12%}.time-table th:nth-child(5){width:12%}.time-table th:nth-child(6){width:12%}.time-table th:nth-child(7){width:150px}.time-clock,.time-total{font-size:13px}}
@media(max-width:1050px){
 .time-summary{gap:24px;flex-wrap:wrap}.time-sync{flex-basis:100%;max-width:none;margin-left:0}.time-summary strong{font-size:25px}.time-table-wrap{border:0;background:transparent;overflow:visible}.time-table,.time-table tbody{display:block}.time-table thead{display:none}.time-table tbody{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.time-table tr{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--border);border-radius:8px;background:#fff;padding:18px;gap:15px;min-width:0}.time-table td{display:block;padding:0;border:0;min-width:0}.time-table td:nth-child(1),.time-table td:nth-child(2),.time-table td:nth-child(3),.time-table td:nth-child(7){grid-column:1/-1}.time-table td:nth-child(1){display:flex;align-items:center;justify-content:space-between;gap:10px}.time-table td:nth-child(1) small{margin:0;white-space:nowrap}.time-table td:nth-child(2){padding-bottom:12px;border-bottom:1px solid var(--border)}.time-job{font-size:17px;line-height:1.4}.time-table td:nth-child(3){display:flex;align-items:center;justify-content:space-between}.time-table td:nth-child(3) small{margin:0}.time-table td:nth-child(4)::before,.time-table td:nth-child(5)::before,.time-table td:nth-child(6)::before{content:attr(data-label);display:block;color:var(--muted);font-size:11px;margin-bottom:5px}.time-table td:nth-child(6){grid-column:1/-1;display:flex;align-items:center;gap:12px}.time-table td:nth-child(6)::before{margin:0}.time-table td:nth-child(6) small{margin:0 0 0 auto}.time-clock,.time-total{font-size:23px}.time-table .time-controls{display:flex;gap:8px;padding-top:15px;border-top:1px solid var(--border)}.time-action{flex:1;margin:0;min-width:0}.timer-button{width:100%;height:48px;gap:7px;font-size:12px;padding:0 8px}.timer-label{display:inline;font-size:11px}.timer-button>span:first-child{font-size:15px}
}
@media(max-width:620px){.time-summary{gap:22px 26px;padding:20px}.time-summary>div:nth-child(2){order:3;flex-basis:100%}.time-sync{order:4}.time-toolbar{gap:12px}.time-toolbar>.field{flex-basis:100%!important}.time-toolbar .check{padding:8px 0;flex:1}.time-toolbar>.button{font-size:12px}.time-table tbody{grid-template-columns:1fr}.time-table tr{padding:18px}.timer-label{font-size:12px}.time-summary strong{font-size:28px}.time-clock,.time-total{font-size:26px}.time-confirm{width:calc(100% - 32px);padding:23px}.time-confirm .actions{flex-direction:column}.time-confirm button{width:100%}}
.time-layout .topbar{height:64px}.time-layout .page-heading{margin:12px 0 22px}.time-layout h1{font-size:38px}.time-layout main{padding-top:15px}.time-layout .time-summary{padding:17px 23px;margin-bottom:20px}.time-layout .time-table th,.time-layout .time-table td{padding-top:14px;padding-bottom:14px}
@media(max-width:1050px){.time-layout .time-table td{padding-top:0;padding-bottom:0}.time-layout .time-table td:nth-child(2){padding-bottom:12px}.time-layout .time-table .time-controls{padding-top:15px}}
@media(max-width:760px){.time-layout .topbar{height:auto}.time-layout h1{font-size:32px}}

/* Original NSB Media hosting arrows: same geometry, stroke and rounded ends. */
.arrow-icon{display:inline-block;width:21px;height:21px;flex:0 0 auto;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.button .arrow-icon{width:24px;height:24px}
.arrow-icon.direction-down{transform:rotate(135deg)}
.sidebar nav .arrow-icon{width:21px;height:21px}
.login-shape{display:flex;align-items:center;justify-content:center}
.login-shape .arrow-icon{width:98px;height:98px}

/* Staged sign-in and first-admin onboarding. */
.auth-panel{max-width:560px;width:100%;overflow:visible}.auth-panel h2{margin-bottom:18px}.auth-panel .notice{margin:18px 0}.auth-hint{font-size:12px;color:var(--muted);margin:14px 0;line-height:1.6}.google-login{gap:12px;margin-top:24px}.google-login>span{font:bold 20px Arial}.google-login:disabled{cursor:default;opacity:.55}.auth-divider{display:flex;align-items:center;gap:12px;margin:24px 0;color:var(--muted);font-size:12px}.auth-divider:before,.auth-divider:after{content:'';height:1px;background:var(--border);flex:1}.auth-recovery{font-size:13px;margin:22px 0 0;text-decoration:underline}.auth-qr{background:#fff;padding:16px;border:1px solid var(--border);border-radius:8px;width:240px;max-width:100%;margin:24px auto}.auth-qr svg{display:block;width:100%;height:auto}.auth-manual{margin:20px 0;font-size:13px}.auth-manual code{display:block;overflow-wrap:anywhere;padding:15px;background:var(--surface);margin:12px 0}.auth-steps{padding-left:22px;font-size:14px}.auth-steps li{padding-left:5px;margin:10px 0}

/* Primary actions consistently finish on the right. */
.form-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap}
.stack>button{align-self:flex-end}
.actions,.quick-actions{justify-content:flex-end}
.actions>.button:not(.secondary),.actions>.inline:has(>button:not(.secondary)),.quick-actions>.button:not(.secondary){order:1}
.filters>button:first-of-type{margin-left:auto}
.heading-actions>.button:last-child,.heading-actions>.inline:last-child{margin-left:auto}
.time-confirm .actions{flex-direction:row;align-items:stretch;justify-content:space-between;flex-wrap:wrap}
.time-confirm .actions>[data-time-cancel]{margin-right:auto}
.time-confirm .actions>button{width:auto;max-width:100%}
@media(max-width:620px){.time-confirm .actions>button{flex:1;min-width:0}.quick-actions .button{flex:0 1 auto}}

/* Navigable records and actions at the end of each row. */
tr[data-row-href]{cursor:pointer}tr[data-row-href]:hover{background:#f0f5e9}tr[data-row-href]:focus-visible{outline:2px solid #567638;outline-offset:-2px}
.row-actions{text-align:right;white-space:nowrap}.row-action-buttons{display:flex;gap:7px;justify-content:flex-end}.row-action-buttons .button,.row-action-buttons button{font-size:12px;min-height:36px;padding:7px 10px}.row-action-buttons button:disabled{cursor:not-allowed;opacity:.4}.danger{color:#973f2d;background:#fff;border-color:#d6b9af}.danger:hover{background:#f8eae4;color:#7b2c1d}.actions>.secondary:first-child{margin-right:auto}.log-details{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:620px){
 .record-list,.record-list tbody{display:block}.record-list thead{display:none}.record-list tbody{display:grid;gap:14px}.record-list tr[data-row-href]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--border);border-radius:7px;padding:15px;gap:14px;background:#fff}.record-list tr[data-row-href]:hover{background:#f0f5e9}.record-list tr[data-row-href] td{display:block;border:0;padding:0;min-width:0;overflow-wrap:anywhere}.record-list tr[data-row-href] td:before{content:attr(data-label);display:block;font-size:10px;color:var(--muted);margin-bottom:4px}.record-list tr[data-row-href] td:first-child{grid-column:1/-1;font-weight:600;font-size:15px}.record-list tr[data-row-href] td:first-child:before{display:none}.record-list tr[data-row-href] .row-actions{grid-column:1/-1;border-top:1px solid var(--border);padding-top:12px}.record-list .row-actions:before{display:none!important}.record-list .row-action-buttons .button,.record-list .row-action-buttons button{min-height:44px}.record-list .inline,.record-list .stack{max-width:100%;flex-wrap:wrap}.record-list .field{min-width:0}.record-list input,.record-list select{max-width:100%}
}

/* Searchable entity selectors retain the native select as the form's value. */
.entity-picker{position:relative;min-width:0}.entity-picker>input{padding-right:30px}.entity-picker:after{content:'⌄';position:absolute;right:12px;top:10px;pointer-events:none}.entity-options{position:absolute;z-index:30;top:calc(100% + 5px);left:0;right:0;max-height:290px;overflow:auto;overscroll-behavior:contain;background:#fff;border:1px solid #a9ba97;border-radius:5px;box-shadow:0 8px 24px #0e132026}.entity-options[hidden]{display:none}.entity-option{padding:12px;min-height:44px;cursor:pointer;font-size:14px;overflow-wrap:anywhere}.entity-option:hover,.entity-option.active{background:#eaf4df}.entity-option[aria-selected=true]{font-weight:600}.entity-empty{padding:14px;font-size:13px;color:var(--muted)}.entity-status,.entity-native{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap;border:0!important}.table-scroll:has(.entity-options:not([hidden])){overflow:visible}.record-list tr[data-row-href] td .entity-option{font-size:13px}

/* Column sorting is available from headers and from mobile card controls. */
th .table-sort-button{display:inline-flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:34px;padding:0;border:0;background:transparent;color:inherit;border-radius:2px;font:inherit;text-align:left;white-space:nowrap}th .table-sort-button:hover{background:#e9efdf;color:var(--ink)}th .table-sort-button:focus-visible{outline:2px solid #7d9b58;outline-offset:3px}th[aria-sort=ascending],th[aria-sort=descending]{color:var(--ink)}.table-sort-button>span:last-child{font-size:17px;font-weight:600}.table-sort-controls{display:none}.sort-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}@media(max-width:620px){.table-sort-controls{display:flex;align-items:end;gap:10px;margin-bottom:16px}.table-sort-controls>.field{flex:1}.table-sort-controls .sort-direction{min-height:44px;min-width:44px;font-size:20px}}

.vat-setting-row{display:grid;grid-template-columns:minmax(180px,2fr) minmax(100px,1fr);gap:13px;align-items:end;padding:16px;border:1px solid var(--border);border-radius:5px}.vat-setting-row .check{align-self:center}.vat-setting-row>.quiet{justify-self:end}.vat-setting-row small{font-size:11px;color:var(--muted)}.vat-setting-row input[type=radio]{width:17px;min-height:17px;flex-shrink:0;margin-top:3px;accent-color:#54783c}@media(max-width:620px){.vat-setting-row{grid-template-columns:1fr}.vat-setting-row>.quiet{justify-self:end}}

.editor-totals{align-self:end;width:min(100%,420px);margin-top:15px;padding:20px;border:1px solid var(--border);border-radius:6px;background:#f6f8f1}.editor-totals>div{display:flex;justify-content:space-between;align-items:baseline;gap:20px;font-size:14px;padding:6px 0}.editor-totals>div>span:last-child,.editor-grand-total>strong:last-child{white-space:nowrap;font-variant-numeric:tabular-nums}.editor-totals .editor-grand-total{border-top:1px solid #cbd5c0;margin-top:9px;padding-top:15px;font-size:23px}.editor-total-hint{margin-top:12px;font-size:12px;color:#8e3f25}.editor-total-hint[hidden]{display:none}@media(max-width:620px){.editor-totals{width:100%;padding:16px}.editor-totals>div{font-size:12px;gap:12px}.editor-totals .editor-grand-total{font-size:21px}}

.hourly-rate-control{display:flex;align-items:end;gap:18px;flex-wrap:wrap;margin-bottom:8px;padding:16px;background:#f6f8f1;border:1px solid var(--border);border-radius:5px}.hourly-rate-control .field{width:260px;max-width:100%}.hourly-rate-control small{flex:1;min-width:180px;font-size:12px;color:var(--muted);padding-bottom:9px}.item-description{display:flex;flex-direction:column;gap:8px;min-width:0}.item-description input{font-weight:600}.item-description textarea{font-size:13px;font-weight:400;color:#646e7d;line-height:1.6}.position-title{display:block;font-size:14px;font-weight:600}.position-details{color:#687281;font-size:12px;font-weight:400;line-height:1.65;margin-top:5px;white-space:normal}.document-preview .position-details{font-size:13px}@media(max-width:760px){.item-row>.item-description{grid-column:1/-1}.hourly-rate-control .field{width:100%}.hourly-rate-control small{min-width:0;padding:0}.item-description .field>span{display:block}}

/* Ordered item controls retain each input and its manual price. */
.item-controls{display:flex;flex-direction:column;gap:4px;align-items:center}.item-controls>button{width:30px;min-height:30px;padding:3px;font-size:17px;line-height:1;border-radius:3px}.item-controls>button:disabled{opacity:.25;cursor:default}.item-controls>.quiet{font-size:19px}
.document-editor-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:26px;align-items:start}.document-editor-layout>.panel{overflow:visible;min-width:0}.document-total-bar{position:sticky;top:12px;z-index:15;align-self:flex-end;display:flex;align-items:baseline;gap:18px;background:var(--ink);color:var(--paper);padding:10px 16px;border-radius:5px;box-shadow:0 3px 12px #0e13201a}.document-total-bar>span{font-size:12px}.document-total-bar>strong{font-size:19px;font-variant-numeric:tabular-nums;white-space:nowrap}.live-preview{min-width:0;border:1px solid var(--border);background:#edf0e9;border-radius:8px;overflow:hidden}.live-preview-heading{display:flex;align-items:baseline;justify-content:space-between;gap:15px;padding:18px 22px;border-bottom:1px solid var(--border);background:#f6f8f1}.live-preview-heading h2{font-size:19px}.live-preview-heading>span{font-size:12px}.live-preview-heading strong{margin-left:8px;white-space:nowrap;font-size:16px}.live-preview-scroll{padding:22px}.live-preview-sheet{max-width:820px;margin:auto;padding:35px;background:white;box-shadow:0 3px 14px #0e13200c;font-size:12px;line-height:1.65;color:#182b3a}.live-preview-brand{display:flex;justify-content:space-between;gap:24px;border-bottom:2px solid #182b3a;padding-bottom:20px}.live-preview-brand img{width:155px;height:42px;object-fit:contain;object-position:left}.live-preview-brand>div{text-align:right;font-size:10px}.live-preview-recipient{white-space:pre-line;margin:28px 0}.live-preview-sheet .live-preview-kind{font-size:27px;margin:26px 0 10px}.live-preview-sheet h3{font-size:16px}.live-preview-dates{font-size:11px;white-space:pre-line;margin:20px 0}.live-preview-sheet [data-preview-intro]{white-space:pre-line}.live-preview-items{overflow:auto;margin-top:25px}.live-preview-items table{table-layout:fixed;font-size:11px;min-width:400px}.live-preview-items th,.live-preview-items td{padding:11px 6px;vertical-align:top;overflow-wrap:anywhere;border-bottom:1px solid #dfe5e8}.live-preview-items th{background:#eff5f3}.live-preview-items th:first-child{width:46%}.live-preview-items th:not(:first-child),.live-preview-items td:not(:first-child){text-align:right}.live-preview-items .position-title{font-size:12px}.live-preview-items .position-details{font-size:11px;white-space:pre-line;line-height:1.6}.live-preview-totals{margin:20px 0 25px auto;max-width:340px}.live-preview-totals>div{display:flex;justify-content:space-between;gap:18px;padding:6px 0;font-size:11px}.live-preview-totals>div>:last-child{white-space:nowrap;font-variant-numeric:tabular-nums}.live-preview-totals .live-preview-grand-total{font-size:18px;border-top:1px solid #dce2d5;padding-top:13px;margin-top:7px}.live-preview-sheet footer{font-size:9px;color:#687281;border-top:1px solid #dfe5e8;padding-top:15px;margin-top:26px}.live-preview-terms{font-size:11px;margin-top:25px}
body:has(.document-editor-layout) main{max-width:none;margin:0}@media(min-width:1550px){body:has(.document-editor-layout) main{padding-inline:32px}.document-editor-layout{grid-template-columns:minmax(650px,1.05fr) minmax(500px,1fr)}.live-preview{position:sticky;top:20px}.live-preview-scroll{max-height:calc(100vh - 105px);overflow:auto}.document-editor-layout .item-row,.document-editor-layout .item-head{grid-template-columns:minmax(180px,3fr) 68px 65px 86px 30px;gap:8px}.document-editor-layout .item-row input{padding-inline:8px}}
@media(max-width:760px){.item-row{grid-template-columns:1fr 1fr 1fr 44px}.item-controls>button{width:40px;min-height:40px}.live-preview-heading{padding:15px;flex-wrap:wrap}.live-preview-scroll{padding:10px}.live-preview-sheet{padding:20px 15px}.live-preview-brand img{width:120px}.live-preview-brand>div{font-size:9px}.document-total-bar{top:8px}.document-editor-layout{gap:12px}.live-preview-items table{min-width:0;font-size:10px}.live-preview-items th:first-child{width:43%}.live-preview-items th,.live-preview-items td{padding-inline:3px}.live-preview-items .position-title{font-size:11px}.live-preview-items .position-details{font-size:10px}}

/* A4 paper preview with measured page breaks, continuing tables and full AGB text. */
.live-preview-scroll{position:relative;overflow:auto}.live-preview-source{position:absolute!important;left:-20000px;top:0;width:794px!important;max-width:none!important;visibility:hidden;pointer-events:none}.a4-preview-pages{display:flex;flex-direction:column;gap:24px;align-items:center;min-width:max-content}.a4-page-holder{position:relative;flex-shrink:0}.live-preview-sheet.a4-preview-page{position:absolute;top:0;left:0;width:794px;height:1123px;max-width:none;overflow:hidden;padding:72px;box-sizing:border-box;transform-origin:top left;font-size:12px}.a4-preview-page .live-preview-brand{height:84px;margin-bottom:22px}.a4-page-content{height:825px;overflow:hidden}.a4-page-footer{position:absolute;bottom:36px;left:72px;right:72px;display:flex;justify-content:space-between;gap:20px;font-size:9px!important;margin:0!important;padding-top:10px!important}.a4-page-number{white-space:nowrap}.a4-page-content .live-preview-items{overflow:visible}.a4-page-content .live-preview-items table{min-width:0}.a4-page-content .live-preview-recipient{margin-top:20px}.a4-page-content p{white-space:pre-line}.preview-zoom-label{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted)}.preview-zoom-label select{font-size:11px;min-height:30px;width:120px;padding:5px}.live-preview-heading{flex-wrap:wrap}.live-preview-heading h2 small{display:block;font:11px Arial,sans-serif;color:var(--muted);margin-top:5px}.a4-preview-page .position-details{white-space:pre-line}.a4-terms-section p{font-size:11px;line-height:1.7}
.a4-preview-page .live-preview-brand img{width:155px;height:42px}.a4-preview-page .live-preview-brand>div{font-size:10px}.a4-preview-page .live-preview-items table{font-size:11px}.a4-preview-page .live-preview-items th:first-child{width:46%}.a4-preview-page .live-preview-items th,.a4-preview-page .live-preview-items td{padding:11px 6px}.a4-preview-page .live-preview-items .position-title{font-size:12px}.a4-preview-page .live-preview-items .position-details{font-size:11px}.a4-terms-paragraph{font-size:11px;line-height:1.7}.a4-page-content{overflow-wrap:anywhere}
.a4-page-content{position:relative}

.contract-rules + .contract-rules{margin-top:2rem;padding-top:1.5rem;border-top:1px solid var(--line)}
.contract-rules h3{margin-bottom:1rem}.carddav-resolve{display:flex;flex-wrap:wrap;gap:1rem;justify-content:flex-end}.carddav-resolve form{margin:0}

.service-period,.invoice-repeat{border:1px solid var(--border);padding:18px;border-radius:5px;margin:4px 0 18px}.service-period legend,.invoice-repeat legend{font-weight:600;padding:0 6px}.item-period-check{font-size:12px;color:var(--muted);font-weight:400;line-height:1.5}.item-description .item-period-check input{width:auto} [hidden]{display:none!important}

/* Compact document stationery; screen widths do not alter the A4 sheet geometry. */
.document-letterhead{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;border-bottom:1px solid #dce2d5;padding-bottom:12px;width:100%}.document-letterhead.logo-left{flex-direction:row-reverse}.document-sender{font-size:11px;line-height:1.45;white-space:normal;overflow-wrap:break-word}.document-logo{object-fit:contain;max-width:55%;flex-shrink:0}.logo-left .document-sender{text-align:right}.compact-document{padding-top:28px}.document-address-row,.live-preview-address{display:flex;justify-content:space-between;gap:22px;align-items:flex-start;margin:18px 0 14px}.document-address-row>*,.live-preview-address>*{width:50%;margin:0}.document-address-row h2{font-size:28px;margin:0 0 4px}.document-address-row h3{font-size:17px;margin:8px 0 0}.document-address-row small{color:#687281}.document-facts{display:grid;grid-template-columns:1fr 1fr;gap:12px;background:#f3f6ef;border-left:3px solid var(--accent);padding:10px 12px;margin:12px 0 14px!important;white-space:normal!important}.document-facts small{display:block;font-size:10px;color:#687281}.document-facts strong{display:block;font-size:13px}.document-closing{white-space:pre-line;line-height:1.5;margin-top:18px;break-inside:avoid}.document-preview .document-closing br{display:none}.preview-service-period{grid-column:1/-1;font-size:11px}
.live-preview-source,.live-preview-sheet.a4-preview-page{padding:45px 72px 60px}.a4-preview-page .live-preview-brand{height:101px;margin-bottom:12px;padding:0;border:0}.live-preview-brand>.document-letterhead{text-align:left}.live-preview-brand .document-sender{font-size:11px;line-height:1.45}.live-preview-brand .document-logo{height:auto;width:auto;max-height:92px;object-position:right}.live-preview-brand .logo-left .document-logo{object-position:left}.live-preview-address .live-preview-recipient{margin:0;font-size:12px;line-height:1.5;white-space:pre-line}.live-preview-sheet .live-preview-kind{font-size:26px;margin:0 0 6px;line-height:1.2}.live-preview-address h3{font-size:16px;margin:8px 0 0}.live-preview-address{margin:10px 0 14px}.live-preview-dates{font-size:12px}.a4-page-content{height:884px;overflow-wrap:break-word}.live-preview-items{margin-top:14px}.a4-preview-page .live-preview-items th,.a4-preview-page .live-preview-items td{padding:8px 5px}.a4-preview-page .live-preview-items th:first-child{width:53%}.a4-preview-page .live-preview-items .position-details{font-size:10px;line-height:1.5}.live-preview-totals{margin-top:12px;margin-bottom:14px}.live-preview-closing{font-size:12px;white-space:normal!important}.document-closing br{display:block}.a4-page-footer{bottom:32px}.a4-page-content p{margin:8px 0}
@media(max-width:600px){.compact-document .document-address-row{gap:12px}.compact-document .document-letterhead{gap:12px}.compact-document .document-sender{font-size:10px}.compact-document .document-address-row h2{font-size:22px}.compact-document .document-facts{padding:8px;gap:8px}.compact-document .document-facts strong{font-size:12px}}

.a4-preview-page .live-preview-brand{height:auto;min-height:101px}.live-preview-brand .document-logo{max-height:none}.live-preview-brand .document-letterhead{font-size:11px}.a4-preview-page .live-preview-brand .document-logo{height:auto}
/* The same semantic AGB formatting is used in the editor and document views. */
.rich-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:end;padding:12px;background:#f3f6ef;border:1px solid #dce2d5;border-radius:6px 6px 0 0}.rich-toolbar label{display:grid;gap:4px;font-size:12px}.rich-toolbar select{min-height:36px}.rich-content{min-height:340px;max-height:65vh;overflow:auto;border:1px solid #dce2d5;border-top:0;padding:20px;border-radius:0 0 6px 6px;background:#fff}.rich-content:focus{outline:2px solid #8aa15d;outline-offset:1px}.rich-content[aria-invalid=true]{outline:2px solid #a33}.prose h2,.prose h3{margin:1.2em 0 .5em}.prose p{margin:.7em 0}.prose ul,.prose ol{padding-left:1.6em}.prose li{margin:.35em 0}.live-preview-terms h2{font-size:17px}.live-preview-terms h3{font-size:14px}.a4-page-content ul,.a4-page-content ol{padding-left:20px}.a4-page-content li{margin:4px 0}.a4-page-content h2.a4-terms-paragraph{font-size:17px}.a4-page-content h3.a4-terms-paragraph{font-size:14px}

.setup-layout{display:block;background:var(--paper,#fafbf7)}.setup-main{max-width:960px;padding:48px 24px;margin:0 auto}.setup-main h1{font-size:clamp(30px,5vw,48px)}.setup-main .panel{margin:24px 0}.setup-main details.panel>summary{font-weight:700;cursor:pointer}.setup-main details[open]>summary{margin-bottom:20px}.setup-main code{overflow-wrap:anywhere}

/* Use available workspace width, including sidebar/browser panels, for A4 layouts. */
body:has(.document-workspace) main{max-width:none;margin:0;padding-inline:clamp(16px,2vw,36px)}
.document-workspace{container-type:inline-size;min-width:0;width:100%}
.document-workspace .document-editor-layout,.document-detail-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;align-items:start}
.document-detail-content,.document-workspace .document-editor-layout>.panel{min-width:0}
.document-workspace .live-preview{position:static;min-width:0;margin-top:0}
.document-workspace .live-preview-scroll{max-height:none;overflow:auto}
.document-detail-content .heading-actions{flex-wrap:wrap;gap:12px}
.document-detail-content .document-preview{margin-bottom:24px}
.document-detail-content .document-preview .document-letterhead{gap:18px}
.document-detail-content .document-preview .document-logo{max-width:48%;height:auto}
.document-detail-content .document-preview table{min-width:480px}
@container(min-width:1180px){
 .document-workspace .document-editor-layout,.document-detail-layout{grid-template-columns:minmax(540px,1fr) minmax(560px,1.05fr)}
 .document-workspace .live-preview{position:sticky;top:20px}
 .document-workspace .live-preview-scroll{max-height:calc(100dvh - 120px)}
 .document-workspace .document-editor-layout .item-row,.document-workspace .document-editor-layout .item-head{grid-template-columns:minmax(160px,3fr) 68px 65px 86px 30px;gap:8px}
 .document-workspace .document-editor-layout .item-row input{padding-inline:8px}
}
@media(max-width:760px){.document-detail-content .document-preview{padding:20px}.document-detail-content .document-preview table{min-width:0}.document-workspace .live-preview-scroll{padding:10px}}

.preview-jump{display:flex;justify-content:flex-end;margin-bottom:16px}@container(min-width:1180px){.preview-jump{display:none}}
/* Physical letter geometry shared with the PDF: 210 × 297 mm. */
.live-preview-sheet.live-preview-source,.live-preview-sheet.a4-preview-page{padding:0!important}
.a4-preview-page .a4-page-content{margin:0 19mm;width:172mm;box-sizing:border-box}
.live-preview-brand.letter-page-header,.live-preview-brand.letter-follow-header{position:relative;width:210mm;min-height:0;margin:0!important;padding:0!important;border:0;box-sizing:border-box;display:block;text-align:left;flex:none}
.letter-band{position:absolute;top:0;left:0;width:210mm}
.letter-meta,.letter-sender,.letter-logo,.letter-recipient,.letter-title{position:absolute;margin:0!important;padding:0!important}
.letter-meta{font-size:10px;line-height:1.4}.letter-meta span+span{margin-left:5px}
.letter-sender{font-size:10px;line-height:1.4;max-width:85mm}
.live-preview-brand.letter-page-header .letter-logo{height:auto;max-height:none;max-width:none;object-fit:contain}
.letter-recipient{font-size:12px;line-height:1.5;white-space:pre-line}
.letter-title{font-family:inherit!important;font-size:27px!important;line-height:1.15!important;letter-spacing:0!important;font-weight:bold!important}
.letter-follow-header img{position:absolute;top:9mm;right:19mm;height:auto!important;max-height:none;max-width:none}
.letter-follow-title{position:absolute;top:12mm;left:19mm;width:105mm;font-size:10.66px;font-weight:normal;color:var(--doc-muted,#87919e);opacity:.75;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.compact-document .document-letterhead{padding:18px;box-sizing:border-box;border:0}.compact-recipient{margin-left:55%;white-space:normal}.compact-document>h2{font-size:28px;margin:22px 0 14px}
.live-preview-sheet .live-preview-brand.letter-page-header .letter-sender{font-size:10px;line-height:1.4;text-align:left}
.live-preview-sheet .live-preview-brand.letter-page-header .letter-recipient{font-size:12px;line-height:1.5;text-align:left}
.live-preview-sheet .live-preview-brand.letter-page-header .letter-meta{font-size:10px;text-align:left}
.a4-preview-page .live-preview-brand.letter-follow-header .letter-follow-title{text-align:left;font-size:10.66px}
.a4-preview-page{line-height:1.45}.a4-page-content .a4-terms-paragraph{font-size:11px;line-height:1.45;margin:7px 0}.a4-page-content h2.a4-terms-paragraph,.a4-page-content h3.a4-terms-paragraph{font-size:13px;line-height:1.45;margin:12px 0 5px}.a4-page-content>h3:not(.a4-terms-paragraph){font-size:16px;line-height:1.45;margin:22px 0 12px}.a4-page-content .position-details{color:var(--muted)}
.document-version{font-size:.64em!important;font-weight:300!important;font-family:inherit;letter-spacing:0;color:var(--muted);white-space:nowrap}
.letter-title .document-version{font-size:12px!important;font-weight:normal!important;color:var(--doc-muted,var(--muted))}
.document-money{display:inline-grid!important;grid-template-columns:10mm 23mm 7mm;width:40mm;white-space:nowrap;font-variant-numeric:tabular-nums;gap:0!important;text-align:left}
.document-money .money-currency{text-align:center;font-weight:normal}.document-money .money-whole{text-align:right}.document-money .money-fraction{text-align:left}
.a4-preview-page .live-preview-items th:first-child{width:auto}.a4-preview-page .live-preview-items th:not(:first-child),.a4-preview-page .live-preview-items td:nth-child(2){text-align:right}
.a4-preview-page .live-preview-items .money-currency{text-align:center;padding-left:0;padding-right:0;white-space:nowrap}.a4-preview-page .live-preview-items .money-whole{text-align:right;padding-left:0;padding-right:0;white-space:nowrap;font-variant-numeric:tabular-nums}.a4-preview-page .live-preview-items .money-fraction{text-align:left;padding-left:0;white-space:nowrap;font-variant-numeric:tabular-nums}
.a4-preview-page .live-preview-totals>div>span:last-child,.a4-preview-page .live-preview-totals>div>strong:last-child{min-width:40mm}

.document-money{grid-template-columns:8.6mm 20.64mm 8.6mm;width:37.84mm}.a4-preview-page .live-preview-totals>div>span:last-child,.a4-preview-page .live-preview-totals>div>strong:last-child{min-width:0;width:37.84mm}.a4-preview-page .live-preview-items th:nth-child(3),.a4-preview-page .live-preview-items th:nth-child(6){text-align:left;white-space:nowrap;overflow:visible}
/* PDF pages use their original coordinates, never the application's table/text CSS. */
.pdf-preview .pdf-page{position:absolute;inset:0;margin:0;padding:0!important;max-width:none;background:white;transform-origin:top left;box-shadow:0 3px 14px #0e132018;overflow:hidden;box-sizing:content-box}
.pdf-page canvas{display:block;max-width:none}.pdf-preview .pdf-preview-status{font-size:12px;color:var(--muted);margin:12px 18px 4px}.pdf-preview-status.error{color:#a33}.pdf-preview [data-preview-open]{display:block;text-align:right;font-size:12px;margin:0 18px 12px}.pdf-preview.pdf-updating .a4-preview-pages{opacity:.55}.pdf-preview .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Text selection overlay, adapted from Mozilla PDF.js web/pdf_viewer.css (Apache-2.0). */
.pdf-text-layer{position:absolute;inset:0;text-align:initial;overflow:clip;line-height:1;letter-spacing:normal;word-spacing:normal;text-size-adjust:none;forced-color-adjust:none;transform-origin:0 0;--min-font-size:1;--text-scale-factor:calc(var(--total-scale-factor) * var(--min-font-size));--min-font-size-inv:calc(1 / var(--min-font-size))}
.pdf-text-layer :is(span,br){color:transparent;position:absolute;white-space:pre;cursor:text;transform-origin:0% 0%;user-select:text;-webkit-user-select:text}
.pdf-text-layer>:not(.markedContent),.pdf-text-layer .markedContent span:not(.markedContent){z-index:1;--font-height:0;font-size:calc(var(--text-scale-factor) * var(--font-height));--scale-x:1;--rotate:0deg;transform:rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv))}.pdf-text-layer .markedContent{display:contents}.pdf-text-layer ::selection{background:#8bb9ff88}

/* Dedicated /time/compact surface for pinned desktop windows and mobile web apps. */
.time-compact{background:var(--paper);min-width:300px}.time-compact main{max-width:none;margin:0;padding:14px 18px 24px}.compact-time-header{display:flex;align-items:center;gap:16px;padding:12px max(18px,env(safe-area-inset-right)) 12px max(18px,env(safe-area-inset-left));background:var(--ink);color:var(--paper);position:sticky;top:0;z-index:20}.compact-time-header img{width:112px;height:28px;object-fit:contain;object-position:left}.compact-time-header h1{font-size:16px;letter-spacing:0;font-weight:500;margin:0}.compact-time-header a{margin-left:auto;color:var(--accent);font-size:12px;white-space:nowrap}.time-compact .time-summary{border-radius:6px;background:transparent;color:var(--ink);padding:0;margin:0 0 12px;gap:20px;flex-wrap:wrap}.time-compact .time-summary>div{flex-direction:row;align-items:baseline;gap:7px}.time-compact .time-summary>div>span{font-size:11px;color:var(--muted)}.time-compact .time-summary strong{font-size:14px;letter-spacing:0}.time-compact .time-sync{color:#526d37;margin-left:auto;font-size:11px;flex-basis:auto}.time-compact .time-sync[data-connected=false]{color:#955124}.time-compact .time-toolbar{gap:12px;margin-bottom:12px}.time-compact .time-toolbar>.field{min-width:140px}.time-compact .time-toolbar .field>span{font-size:11px}.time-compact .time-toolbar input,.time-compact .time-toolbar select{padding:9px 11px;min-height:40px}.time-compact .time-toolbar .check{font-size:11px;padding-bottom:9px}.time-compact .time-manage,.time-compact .time-help{display:none}.time-compact .time-table{min-width:0}.time-compact main{padding-bottom:max(24px,env(safe-area-inset-bottom))}
@media(min-width:760px){.time-compact .time-table-wrap{border:1px solid var(--border);border-radius:7px;background:white;overflow:hidden}.time-compact .time-table{display:table;table-layout:fixed;width:100%}.time-compact .time-table thead{display:table-header-group}.time-compact .time-table tbody{display:table-row-group}.time-compact .time-table tr{display:table-row;border:0;padding:0}.time-compact .time-table th,.time-compact .time-table td{display:table-cell;padding:11px 9px;border-bottom:1px solid var(--border);vertical-align:middle}.time-compact .time-table th:nth-child(1){width:18%}.time-compact .time-table th:nth-child(2){width:28%}.time-compact .time-table th:nth-child(3),.time-compact .time-table td:nth-child(3){display:none}.time-compact .time-table th:nth-child(4),.time-compact .time-table th:nth-child(5){width:12%}.time-compact .time-table th:nth-child(6){width:10%}.time-compact .time-table th:nth-child(7){width:150px}.time-compact .time-table td:before{display:none}.time-compact .time-table small{display:block;font-size:10px;margin-top:3px}.time-compact .time-job{font-size:13px;line-height:1.35}.time-compact .time-customer{font-size:12px}.time-compact .time-clock,.time-compact .time-total{font-size:14px}.time-compact .time-quoted{font-size:12px}.time-compact .time-table .time-controls{display:table-cell;padding:9px;white-space:nowrap;border-top:0}.time-compact .time-action{display:inline-flex;margin-right:3px}.time-compact .timer-button{width:40px;height:42px;min-height:42px;padding:0}.time-compact .timer-label{display:none}}
@media(max-width:759px){.time-compact main{padding:12px}.compact-time-header{gap:12px;padding-block:10px}.compact-time-header img{width:95px;height:25px}.compact-time-header h1{font-size:14px}.compact-time-header a{font-size:11px}.time-compact .time-summary{gap:8px 16px}.time-compact .time-summary>div:nth-child(2){order:0;flex-basis:auto}.time-compact .time-summary strong{font-size:13px}.time-compact .time-sync{flex-basis:100%;margin:0;order:1;max-width:none}.time-compact .time-toolbar{gap:10px}.time-compact .time-toolbar>.field:first-child{flex-basis:100%!important}.time-compact .time-toolbar>.field:nth-child(2){flex:1;flex-basis:0!important;min-width:145px}.time-compact .time-toolbar .check{flex:0 0 auto;white-space:nowrap;margin:0;padding-bottom:10px}.time-compact .time-table tbody{grid-template-columns:1fr;gap:12px}.time-compact .time-table tr{padding:15px;gap:10px}.time-compact .time-table td:nth-child(2){padding-bottom:10px}.time-compact .time-job{font-size:16px}.time-compact .time-description{max-height:32px}.time-compact .time-table td:nth-child(4),.time-compact .time-table td:nth-child(5){grid-column:auto}.time-compact .time-clock,.time-compact .time-total{font-size:22px}.time-compact .timer-button{height:54px;min-height:54px}.time-compact .timer-label{display:inline;font-size:11px}.time-compact .time-confirm .actions{flex-direction:row}.time-compact .time-confirm button{width:auto;flex:1}}
.time-compact .time-summary>div:nth-child(2){display:none}.time-compact .time-toolbar{align-items:flex-end}.time-compact .compact-time-filters{border:0;padding:0;position:relative;flex:0 0 auto}.time-compact .compact-time-filters summary{font-size:12px;min-height:40px;display:flex;align-items:center;gap:7px;padding:8px 12px;border:1px solid var(--border);border-radius:5px;background:white;list-style:none}.time-compact .compact-time-filters summary:after{content:'⌄'}.time-compact .compact-time-filters[open] summary{margin-bottom:10px}.time-compact .compact-filter-fields{display:flex;flex-wrap:wrap;align-items:end;gap:12px;min-width:270px}.time-compact .compact-filter-fields>.field{min-width:170px;flex:1}.time-compact .compact-filter-fields .check{display:flex;align-items:center;gap:8px;padding-bottom:10px;font-size:12px}.time-compact .compact-filter-fields input[type=checkbox]{width:18px;height:18px;min-height:18px;margin:0}.time-compact .compact-filter-fields .table-sort-controls{display:flex;flex-basis:100%;margin:0;gap:10px;align-items:end}.time-compact .table-sort-controls>.field{flex:1}.time-compact .timer-finish{color:#a63737;border-color:#dfbcbc}.time-compact .compact-time-filters[open]{flex-basis:100%}
@media(max-width:759px){.time-compact .time-toolbar>.field:first-child{flex:1;flex-basis:0!important;min-width:140px}.time-compact .compact-time-filters summary{font-size:11px;padding-inline:8px}.time-compact .time-table tr{gap:8px;padding:13px}.time-compact .time-customer{font-size:12px}.time-compact .time-job{font-size:14px}.time-compact .time-table td:nth-child(2){padding-bottom:7px}.time-compact .time-description{max-height:16px;white-space:nowrap;text-overflow:ellipsis}.time-compact .time-clock,.time-compact .time-total{font-size:20px}.time-compact .time-table .time-controls{padding-top:10px}.time-compact .timer-button{height:50px;min-height:50px}}
@media(max-width:359px){.time-compact .timer-button{padding-inline:4px;gap:4px}.time-compact .timer-label{font-size:10px}}
.passkey-login{margin:20px 0}.passkey-login [role=status]:empty,[data-passkey-ui] [role=status]:empty{display:none}[data-passkey-status]{font-size:13px;line-height:1.5;margin-top:14px;color:var(--muted)}[data-passkey-status].error{color:#9b3b2e}.passkey-add{display:flex;align-items:end;justify-content:flex-end;gap:15px;margin-top:22px}.passkey-add .field{flex:1;max-width:380px}.passkey-add button{white-space:nowrap}@media(max-width:620px){.passkey-add{flex-direction:column;align-items:stretch}.passkey-add .field{max-width:none}.passkey-add button{align-self:flex-end}}

.passkey-reauth{display:flex;justify-content:flex-end;margin:18px 0}

/* Keep manual precision while offering larger, touch-friendly spinner increments. */
.number-stepper{display:block;position:relative;width:100%;min-width:0}
.number-stepper>input{padding-inline-end:27px!important;width:100%;appearance:textfield;-moz-appearance:textfield}
.number-stepper>input::-webkit-inner-spin-button,.number-stepper>input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.number-stepper-controls{position:absolute;right:1px;top:1px;bottom:1px;display:grid;grid-template-rows:1fr 1fr;width:23px;border-left:1px solid var(--border);border-radius:0 4px 4px 0;overflow:hidden}
.number-stepper-controls>button{display:flex;align-items:center;justify-content:center;min-height:0;min-width:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--ink);font-size:16px;line-height:1;cursor:pointer}
.number-stepper-controls>button+button{border-top:1px solid var(--border)}
.number-stepper-controls>button:hover{background:var(--accent)}
.number-stepper-controls>button:focus-visible{outline:2px solid var(--ink);outline-offset:-2px}
.number-stepper-controls>button:disabled{opacity:.4;cursor:default}
.item-row .field>.number-stepper{display:block}
.billing-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-bottom:20px}.billing-summary>div{display:grid;gap:6px}.billing-summary span{font-size:12px;color:var(--muted)}.billing-summary strong{font-size:20px}.billing-summary>div:last-child strong{color:var(--ink)}.billing-planned-total{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;padding:20px;background:var(--paper);border:1px solid var(--border);border-radius:5px}.billing-planned-total strong{font-size:22px}.billing-planned-total small{flex-basis:100%;color:var(--muted)}[data-offer-billing] [hidden]{display:none!important}.badge.partially_invoiced{background:#edf4df;color:#425a23}@media(max-width:500px){.billing-summary{grid-template-columns:1fr}.billing-planned-total strong{font-size:20px}}
[data-offer-billing],[data-billing-part]{display:grid;gap:16px}

/* Letter metadata accompanies the title; document text shares the configured base size. */
.letter-meta{font-size:inherit;color:var(--doc-muted,var(--muted))}.letter-sender,.letter-recipient,.live-preview-sheet .live-preview-brand.letter-page-header .letter-sender,.live-preview-sheet .live-preview-brand.letter-page-header .letter-recipient,.live-preview-sheet .live-preview-brand.letter-page-header .letter-meta{font-size:inherit}
.compact-document .document-sender,.compact-document .position-title,.compact-document .position-details{font-size:inherit}

/* Appearance is independent of company branding and document/PDF colors. */
.theme-control{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);flex-shrink:0}.theme-control[hidden]{display:none}.theme-control select{width:auto;max-width:130px;min-height:35px;padding:6px 9px;font-size:12px;cursor:pointer}.theme-control>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
html[data-theme=dark] body{--ink:#e3e9f0!important;--paper:#10151e!important;--muted:#a7b3c3;--border:#344153;--surface:#263243;--card:#19222f;color:var(--ink);background:var(--paper)}
html[data-theme=dark] .sidebar,html[data-theme=dark] .compact-time-header{background:#0b1018;color:#e3e9f0}
html[data-theme=dark] .sidebar nav a[aria-current]{background:#b6e77e;color:#101b0a}
html[data-theme=dark] .topbar{background:#131b26}
html[data-theme=dark] :is(.panel,.metric,.time-table-wrap,.time-table tr,.record-list tr[data-row-href],.entity-options,.rich-content,.time-confirm){background:var(--card);border-color:var(--border);color:var(--ink)}
html[data-theme=dark] :is(input,textarea,select){background:#121b27;color:var(--ink);border-color:#465469}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#929fb0;opacity:1}
html[data-theme=dark] :is(input,textarea,select):focus-visible,html[data-theme=dark] :is(button,a,[tabindex]):focus-visible{outline:2px solid #b6e77e;outline-offset:3px}
html[data-theme=dark] :is(input[type=checkbox],input[type=radio]){accent-color:#b6e77e}
html[data-theme=dark] :is(button,.button){background:#b6e77e;border-color:#b6e77e;color:#101b0a}
html[data-theme=dark] :is(button,.button):hover{background:#c8ef9d;border-color:#c8ef9d}
html[data-theme=dark] :is(button,.button).secondary{background:transparent;border-color:#53627a;color:#e3e9f0}
html[data-theme=dark] :is(button,.button).secondary:hover{background:#29374a}
html[data-theme=dark] :is(button,.button).quiet{background:transparent;border-color:transparent;color:var(--muted)}
html[data-theme=dark] :is(button,.button).danger{background:#38252a;border-color:#85515b;color:#ffb6b1}
html[data-theme=dark] th{background:#202c3b;color:#b3c0d1}
html[data-theme=dark] :is(tr[data-row-href]:hover,.record-list tr[data-row-href]:hover,.entity-option:hover,.entity-option.active){background:#283a3d}
html[data-theme=dark] .entity-option{background:transparent;color:var(--ink)}
html[data-theme=dark] th .table-sort-button{background:transparent;border-color:transparent;color:inherit}
html[data-theme=dark] th .table-sort-button:hover{background:#334358;color:#f1f4f8}
html[data-theme=dark] :is(.hourly-rate-control,.editor-totals,.rich-toolbar,.live-preview-heading,.compact-time-filters summary){background:#202c3b;border-color:var(--border);color:var(--ink)}
html[data-theme=dark] .item-description textarea{color:#b7c2d1}
html[data-theme=dark] .live-preview{background:#0c1119}
html[data-theme=dark] .badge{background:#2a3545;color:#c2cddb}
html[data-theme=dark] :is(.badge.paid,.badge.accepted,.badge.active,.badge.partially_invoiced){background:#213e31;color:#b5e9b4}
html[data-theme=dark] :is(.badge.overdue,.badge.failed,.badge.disabled){background:#422c29;color:#ffc0a5}
html[data-theme=dark] :is(.badge.shared,.badge.queued,.badge.retry){background:#3a3423;color:#f3d795}
html[data-theme=dark] :is(.badge.sent,.badge.invoiced){background:#233b50;color:#b6d8fa}
html[data-theme=dark] .notice{background:#20392c;border-color:#41654a;color:#c2e6b7}
html[data-theme=dark] .notice.error{background:#412b29;border-color:#82534c;color:#ffc4ad}
html[data-theme=dark] .test-label{color:#d6bd83}
html[data-theme=dark] .heading-dot{color:#b6e77e}
html[data-theme=dark] .versions a[aria-current]{background:#2c402d;border-color:#91ba6f}
html[data-theme=dark] .metric.warning{background:#352c22;border-color:#69543a}
html[data-theme=dark] .metric.warning strong{color:#f5c190}
html[data-theme=dark] .document-total-bar,html[data-theme=dark] .time-summary{background:#202c3b;color:#e3e9f0}
html[data-theme=dark] .time-compact .time-summary{background:transparent}
html[data-theme=dark] .time-table tr[data-status=running]{background:#203b2f}
html[data-theme=dark] :is(.time-table tr[data-status=running] .time-state,.time-sync,.time-compact .time-sync){color:#b6e77e}
html[data-theme=dark] :is(.time-sync[data-connected=false],.time-compact .time-sync[data-connected=false],[data-over-budget=true] [data-time-budget],.editor-total-hint){color:#ffc099}
html[data-theme=dark] .timer-pause{background:#253b34;border-color:#5a8170;color:#c4ead8}
html[data-theme=dark] .timer-finish,html[data-theme=dark] .time-compact .timer-finish{background:#3c292d;border-color:#86525d;color:#ffb6b1}
html[data-theme=dark] [data-passkey-status].error,html[data-theme=dark] .pdf-preview-status.error{color:#ffb6b1}
/* The paper preview and authentication QR retain their actual colors. */
html[data-theme=dark] .compact-document{--ink:#0e1320;--paper:#fff;--muted:#687281;--border:#dce2d5;--surface:#edf0e9;background:#fff;color:#0e1320;color-scheme:light}
html[data-theme=dark] .compact-document th{background:#f3f6ef;color:#687281}
html[data-theme=dark] .compact-document .position-details{color:#687281}
html[data-theme=dark] .compact-document .document-total strong{color:#0e1320}
html[data-theme=dark] .auth-qr{background:white;color-scheme:light}
@media(max-width:500px){.theme-control select{max-width:110px}.topbar .account{gap:8px;flex-wrap:wrap;justify-content:flex-end}.compact-time-header{flex-wrap:wrap}.compact-time-header .theme-control select{max-width:105px}.compact-time-header .theme-control{margin-left:auto}}
html[data-theme=dark] .quick-actions .button:first-child{background:#b6e77e;border-color:#b6e77e;color:#101b0a}
html[data-theme=dark] .login-intro{background:#192638;color:#e3e9f0}
@media(max-width:500px){.theme-control select{min-height:44px}.time-compact .compact-time-header h1{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.time-compact .compact-time-header{flex-wrap:nowrap}}

/* Single appearance toggle: follow the system unless explicitly overridden. */
.theme-control{gap:0;padding:3px;border:1px solid var(--border);border-radius:6px;background:var(--surface)}
.theme-control button{min-width:36px;min-height:34px;padding:6px 9px;border:0;background:transparent;color:var(--muted);font-size:12px;font-weight:500;gap:0;border-radius:4px}
.theme-control button svg{width:18px;height:18px;display:block}
.theme-control button[aria-pressed=true]{background:var(--ink);color:var(--paper)}
.theme-control button:hover{background:var(--border);color:var(--ink)}
html[data-theme=dark] .theme-control{background:#172230}
html[data-theme=dark] .theme-control button{background:transparent;border:0;color:#b5c0cf}
html[data-theme=dark] .theme-control button[aria-pressed=true]{background:#35463b;color:#d4efb6}
html[data-theme=dark] .theme-control button:hover{background:#29384a;color:#e3e9f0}
@media(max-width:500px){.theme-control button{min-height:40px;min-width:40px}.topbar .account{gap:6px}.compact-time-header{gap:8px}.compact-time-header .theme-control{margin-left:auto}.compact-time-header a{margin-left:0;font-size:10px}}
/* The complete viewer ends 5px above the window bottom; only its pages scroll. */
.document-workspace .pdf-preview{height:var(--pdf-preview-height,calc(100dvh - 25px));min-height:240px;display:flex;flex-direction:column}
.pdf-preview .live-preview-heading{flex-shrink:0;align-items:center;gap:12px;padding:12px 18px}
.pdf-preview .live-preview-heading h2{font-size:18px;white-space:nowrap}
.pdf-preview .live-preview-heading h2 small{display:inline;margin:0 0 0 7px}
.pdf-preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 18px;flex-shrink:0;min-height:34px}
.pdf-preview .pdf-preview-toolbar .pdf-preview-status{margin:0;font-size:11px;min-width:0}
.pdf-preview .pdf-preview-toolbar [data-preview-open]{margin:0;font-size:11px;white-space:nowrap;flex-shrink:0}
.document-workspace .pdf-preview .live-preview-scroll{flex:1;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#718197 transparent;padding-bottom:12px}
.pdf-preview .live-preview-scroll::-webkit-scrollbar{width:9px;height:9px}.pdf-preview .live-preview-scroll::-webkit-scrollbar-thumb{background:#718197;border:2px solid transparent;background-clip:padding-box;border-radius:8px}
html[data-theme=dark] .pdf-preview .pdf-page::after,html[data-theme=dark] .compact-document::after{content:'';position:absolute;inset:0;z-index:2;pointer-events:none;background:rgba(12,20,33,.30)}
html[data-theme=dark] .compact-document{position:relative;isolation:isolate}
@media(max-width:760px){.pdf-preview .live-preview-heading{padding:10px 12px;gap:10px}.pdf-preview .live-preview-heading h2{font-size:16px}.pdf-preview .live-preview-heading h2 small{display:block;margin:3px 0 0}.pdf-preview-toolbar{padding:8px 12px}.pdf-preview .live-preview-heading>span{margin-left:auto}}

[data-theme-icon="sun"]{display:none!important}html[data-theme=dark] [data-theme-icon="sun"]{display:block!important}html[data-theme=dark] [data-theme-icon="moon"]{display:none!important}
.theme-control{padding:0;background:transparent}.theme-control button{min-width:40px;min-height:40px;padding:9px}html[data-theme=dark] .theme-control{background:transparent}

/* Align the filter trigger with the search input, excluding the field label. */
.time-compact .time-toolbar>.field>input,.time-compact .compact-time-filters>summary{height:44px;min-height:44px}

.email-settings-layout{display:grid;gap:24px;min-width:0}
.email-settings-preview{min-width:0}
@media(min-width:1300px){.email-settings-layout{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);align-items:start}.email-settings-preview{position:sticky;top:90px}.email-settings-preview iframe{height:calc(100vh - 330px)!important;min-height:400px}}
