:root {
  font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: #203547; background: var(--page-background); font-size: 15px;
  --page-background:#f3f6f8;
  --blue:#005c80; --dark:#1b4561; --ink:#192e3e; --muted:#52697b;
  --line:#dce6ec; --white:#fff; --pale:#e8f3f8; --sky:#4296b8; --radius:14px; --control-height:44px;
  --quiet-control-height:32px; --quiet-padding-block:5px;
  --page-gutter:clamp(24px,2vw,48px); --login-width:828px;
}
*, *::before, *::after { box-sizing:border-box; }
body { margin:0; min-width:300px; }
button, input, select, textarea, code { font:inherit; }
button, select { cursor:pointer; }
button:disabled { opacity:.46; cursor:not-allowed; }
a { color:inherit; }
:focus-visible { outline:3px solid #39a0c1; outline-offset:3px; }
.header { background:#15384f; color:#fff; }
.header-inner, .nav, .shell { width:100%; padding-inline:var(--page-gutter); }
.header-inner { min-height:90px; display:flex; justify-content:space-between; align-items:center; gap:16px; }
.brand { display:flex; align-items:center; gap:15px; text-decoration:none; font-weight:650; letter-spacing:.01em; }
.brand img { width:156px; height:auto; object-fit:contain; }
.brand span { border-left:1px solid #648092; padding-left:15px; white-space:nowrap; }
.brand small { display:block; margin-top:3px; color:#d8eaf3; font-size:.72rem; font-weight:400; }
.session-actions { display:flex; align-items:center; gap:8px; min-width:0; }
.logout { color:white; background:transparent; }
.logout[hidden] { display:none; }
.nav { display:flex; flex-wrap:wrap; column-gap:23px; }
nav a { padding:15px 1px 13px; text-decoration:none; color:var(--muted); border-bottom:3px solid transparent; font-weight:600; white-space:nowrap; }
nav a[aria-current] { color:var(--blue); border-color:var(--blue); }
nav { border-bottom:1px solid var(--line); }
@media screen {
  :root { scroll-padding-block-start:var(--app-header-height,0px); }
  .app-header { position:sticky; inset-block-start:0; z-index:20; background:var(--page-background); }
}
.shell { padding-top:35px; padding-bottom:48px; }
.installation { color:var(--muted); font-size:.86rem; margin-top:22px; text-align:right; }
.login-page .installation { max-width:var(--login-width); margin-inline:auto; }
h1,h2,h3,p { margin:0; }
h1,h2,h3 { color:var(--ink); letter-spacing:-.022em; }
h1 { font-size:clamp(1.95rem,3.3vw,2.7rem); line-height:1.07; margin:5px 0 8px; }
h2 { font-size:1.24rem; line-height:1.2; }
h3 { font-size:1rem; }
.muted, .subtitle { color:var(--muted); }
.subtitle { font-size:.96rem; line-height:1.5; }
.context, .panel-head, .toolbar, .actions, .summary-line { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.context { margin-bottom:23px; align-items:flex-end; }
.eyebrow { font-weight:650; font-size:.85rem; color:var(--blue); }
.actions { flex-wrap:wrap; justify-content:flex-start; }
.context .actions { justify-content:flex-end; }
.context-controls { align-items:end; }
.context-client select { max-width:195px; }
.context-project select { min-width:135px; max-width:185px; }
.field { display:grid; font-size:.78rem; font-weight:650; color:var(--muted); gap:5px; min-width:0; }
input, textarea, select { min-width:0; max-width:100%; color:var(--ink); background-color:#fff; border:1px solid #bacdd8; border-radius:8px; min-height:var(--control-height); padding:7px 10px; }
select, .scope-picker summary, .scope-options label { font-size:1rem; font-weight:400; }
select option { font:inherit; }
textarea { min-height:82px; resize:vertical; }
.btn { border:1px solid transparent; border-radius:8px; padding:8px 13px; min-height:38px; display:inline-flex; align-items:center; justify-content:center; gap:7px; text-decoration:none; font-weight:650; white-space:nowrap; }
.primary { color:#fff; background:var(--blue); }
.primary:hover { background:#004765; }
.secondary { background:white; border-color:#bacdd8; color:var(--dark); }
.secondary:hover { background:var(--pale); }
.quiet { color:var(--blue); background:transparent; min-height:var(--quiet-control-height); padding:var(--quiet-padding-block) 7px; }
.quiet:hover { background:var(--pale); }
.danger { color:#943c35; }
.metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:13px; margin-bottom:16px; }
.metrics:has(>.metric:nth-child(5)) { grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr)); }
.metric, .panel { border:1px solid var(--line); border-radius:var(--radius); background:var(--white); }
.metric { display:grid; align-content:start; gap:8px; padding:17px 19px; min-width:0; }
.metric.focus { background:var(--dark); border-color:var(--dark); color:#fff; }
.metric.focus .metric-label,.metric.focus small { color:#d8eaf3; }
.metric-label { color:var(--muted); font-size:.86rem; font-weight:650; }
.metric strong { color:inherit; font-weight:680; font-size:clamp(1.34rem,2.4vw,2rem); letter-spacing:-.045em; font-variant-numeric:tabular-nums; }
.metric small { color:var(--muted); line-height:1.35; }
.metric-gross { text-align:right; font-variant-numeric:tabular-nums; }
.panel { padding:19px; min-width:0; }
.panel-head { margin-bottom:15px; flex-wrap:wrap; }
.panel-head p { margin-top:4px; }
.grid { display:grid; grid-template-columns:minmax(0,1.72fr) minmax(285px,1fr); gap:16px; margin-bottom:16px; }
.balance { display:flex; justify-content:space-between; align-items:baseline; border-bottom:1px solid var(--line); gap:8px; padding:11px 0; }
.balance strong { white-space:nowrap; font-variant-numeric:tabular-nums; }
.balance strong:has(small) { display:grid; text-align:right; gap:3px; }
.balance strong small { font-weight:400; }
.balance:last-child { border:0; padding-bottom:0; }
.balance.total { color:var(--blue); }
.tag { background:#e9f3ee; color:#245b47; border-radius:6px; display:inline-block; font-weight:650; padding:3px 7px; white-space:nowrap; font-size:.78rem; }
.tag.neutral { color:#435d70; background:#eef3f6; }
.tag.plan { background:#e8f3f9; color:#1b536e; }
.tag.duplicate-booking-label { color:#604600; background:#ffe6a0; }
.chart-legend { display:flex; gap:13px; font-size:.81rem; color:var(--muted); padding-bottom:8px; flex-wrap:wrap; }
.chart-legend span::before { content:""; display:inline-block; width:9px; height:9px; border-radius:2px; margin-right:5px; background:var(--blue); }
.chart-legend .plan::before { background:#77b6cc; }
.chart { display:grid; column-gap:3px; grid-auto-columns:minmax(0,1fr); grid-auto-flow:column; min-height:137px; }
.bar-day { height:137px; display:grid; grid-template-rows:113px 24px; align-items:end; min-width:0; text-align:center; }
.bar-space { height:113px; border-bottom:1px solid #b9ccd8; background:repeating-linear-gradient(to top,#edf3f7 0px,#edf3f7 1px,transparent 1px,transparent 28px); display:flex; flex-direction:column-reverse; align-items:center; }
.bar { background:var(--blue); height:var(--height); width:100%; max-width:56px; border-radius:3px 3px 0 0; }
.bar.planned { background:#77b6cc; }
.bar-day small { color:var(--muted); font-size:.71rem; }
.stack { display:grid; gap:16px; }
.table-scroll { min-width:0; overflow:auto; }
@media screen {
  .table-scroll-bounded { max-block-size:min(65dvh,36rem); }
  .table-scroll-bounded > table > thead {
    position:sticky; inset-block-start:0; z-index:2; box-shadow:0 1px 0 var(--line);
  }
  #workspace .pinned-table > thead {
    position:relative; z-index:2; transform:translateY(var(--table-header-offset,0px));
  }
  .table-scroll.fits-page { overflow:visible; }
  #workspace .fits-page > .pinned-table > thead {
    position:sticky; inset-block-start:var(--app-header-height,0px); transform:none;
  }
}
table { width:100%; border-collapse:collapse; text-align:left; }
th,td { padding:10px 9px; vertical-align:middle; border-bottom:1px solid #e5edf1; }
th { color:var(--muted); font-size:calc(.8rem + 2pt); font-weight:650; background:#f4f8fa; white-space:nowrap; }
td { font-size:calc(.89rem + 2pt); line-height:1.4; overflow-wrap:anywhere; }
@media screen {
  :where(#workspace, #modal) th { font-size:.91rem; }
  :where(#workspace, #modal) td { font-size:.99rem; }
}
th:first-child, td:first-child { padding-left:10px; }
td.num, th.num { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
td.tools { white-space:nowrap; text-align:right; }
td.nowrap { white-space:nowrap; }
.duplicate-booking > td { background:#fff6dc; }
tr:last-child td { border-bottom:0; }
.toolbar { flex-wrap:wrap; align-items:end; margin-bottom:13px; justify-content:flex-start; }
.toolbar .field { min-width:123px; }
.toolbar .filter-search { flex:1; max-width:370px; }
.empty { color:var(--muted); padding:15px 4px; }
.table-footer { display:flex; justify-content:space-between; gap:9px; align-items:center; margin-top:12px; flex-wrap:wrap; color:var(--muted); }
.source { font-size:.81rem; color:var(--muted); line-height:1.45; margin-top:11px; }
.data-note { padding:10px 12px; background:#ecf4f8; border-radius:9px; color:var(--dark); font-size:.89rem; line-height:1.4; }
.error { color:#8c352e; background:#f9eae7; }
form { margin:0; }
dialog { color:var(--ink); border:1px solid var(--line); border-radius:16px; padding:21px; max-width:min(calc(650px * 1.15),calc(100vw - 24px)); width:100%; max-height:calc(100dvh - 28px); }
dialog::backdrop { background:#10293c95; }
.dialog-head { display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:17px; }
.fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:12px; }
.fields > .field > :is(input,select) { width:100%; height:var(--control-height); }
select {
  height:var(--control-height);
  appearance:none;
  padding-inline-end:26px;
  background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);
  background-position:right 14px center,right 10px center;
  background-size:4px 4px;
  background-repeat:no-repeat;
}
@media (forced-colors:active) {
  select { appearance:auto; background-image:none; }
}
.wide { grid-column:1/-1; }
#team-setup-form .fields { margin-top:10px; }
.team-mail { display:flex; align-items:center; gap:9px; margin-top:8px; }
.team-mail input { min-height:0; }
.team-steps,.team-check-results { padding-inline-start:22px; }
.team-steps li,.team-check-results li { margin-bottom:8px; }
.checkbox { display:flex; align-items:center; gap:6px; }
.checkbox input { min-height:0; }
.dialog-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; margin-top:16px; }
.notice { z-index:10; position:fixed; bottom:16px; right:16px; width:min(390px,calc(100% - 32px)); background:#173d54; color:white; padding:12px 15px; border-radius:10px; }
.notice.error { background:#863b35; }
#admin-upload { display:flex; flex-wrap:wrap; align-items:end; gap:12px; margin-bottom:12px; }
#admin-upload > .field { flex:1 1 220px; }
#admin-upload > .wide { flex-basis:100%; }
#upload-file { width:100%; }
#admin-upload > button { margin-inline-start:auto; min-height:var(--control-height); }
#upload-preview { margin-top:11px; }
#upload-preview .actions, .import-mapping { margin-top:12px; }
.import-mapping td select { width:100%; min-width:14rem; }
#upload-preview ul { max-height:135px; overflow:auto; }
@media (max-width:900px) {
  :root { --page-gutter:20px; }
  .grid { grid-template-columns:1fr; }
}
@media (max-width:620px) {
  :root { --page-gutter:14px; }
  .header-inner { min-height:72px; gap:7px; }
  .brand img { width:116px; }
  .brand span { padding-left:8px; font-size:.82rem; }
  .brand { gap:8px; }
  .role { gap:5px; }
  .role select { max-width:min(181px,44vw); }
  .nav { column-gap:16px; }
  .nav a { padding-block:10px 8px; font-size:.89rem; }
  .shell { padding-top:23px; }
  .context { flex-direction:column; align-items:stretch; }
  .context .actions { justify-content:flex-start; }
  .context-client select, .context-project select { max-width:100%; }
  .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .metric,.panel { padding:13px; }
  .metric strong { font-size:1.41rem; }
  .metric-label { font-size:.8rem; }
  .desktop-table { min-width:630px; }
  .chart { column-gap:2px; }
  .bar-day small { font-size:.61rem; }
  .fields { gap:8px; }
}
.login-page > .app-header { display:none; }
.login-page .shell { padding-block:clamp(18px,7vh,75px) 26px; }
.login-card { overflow:hidden; max-width:var(--login-width); margin:auto; background:white; border:1px solid var(--line); border-radius:18px; }
.login-brand { display:flex; align-items:center; gap:16px; justify-content:space-between; background:#15384f; color:white; padding:18px clamp(20px,4vw,38px); font-size:1.15rem; font-weight:650; }
.login-brand img { width:clamp(112px,31vw,194px); height:clamp(44px,12vw,76px); object-fit:contain; }
.login-content { padding:clamp(24px,4vw,38px); }
.login-content h1 { font-size:clamp(2.15rem,4vw,2.75rem); }
.login-card .field, .login-card .subtitle { font-size:1.06rem; }
.login-card input, .login-card select { width:100%; }
.login-card input, .login-card select, .login-card .btn.primary { min-height:52px; font-size:1.12rem; }
.login-card select { font-size:1.2rem; }
.login-card .login-autofill-name { position:absolute; width:1px; height:1px; min-height:0; padding:0; border:0; clip-path:inset(50%); }
.login-card .stack { gap:16px; margin-top:22px; }
.report-heading { border-bottom:1px solid var(--line); margin-bottom:16px; padding-bottom:14px; }
.report-heading h2,.report-disclosure > summary > h2 { margin:.3rem 0; font-size:clamp(1.44rem,2.8vw,2rem); }
.report-period { margin-top:9px; color:var(--dark); font-size:.9rem; font-weight:650; }
.report-disclosure > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer; list-style:none; }
.report-disclosure > summary::-webkit-details-marker { display:none; }
.report-disclosure > summary::after { content:""; flex:none; width:8px; height:8px; margin-inline-end:4px; border:solid var(--blue); border-width:0 2px 2px 0; transform:rotate(-45deg); }
.report-disclosure[open] > summary::after { transform:rotate(45deg); }
.report-disclosure > summary:hover :is(h2,h3) { color:var(--blue); }
.control-report-meta { margin-bottom:24px; }
.control-report-sections { display:grid; grid-template-columns:minmax(0,1fr); gap:26px; }
.control-report-sections .report-metrics { margin-bottom:0; }
.report-document .metric, .billing-metrics .metric { text-align:right; }
@media screen {
  .report-document .report-metrics:has(> .metric-days) { display:flex; flex-wrap:wrap; }
  .report-document .report-metrics > .metric { flex:1 1 170px; }
  .report-document .report-metrics > .metric-days { flex:0.6 1 116px; max-inline-size:170px; }
  .report-document .report-metrics:has(> .metric-cap) > :is(.metric-days,.metric-cap) {
    flex:0 0 clamp(132px,17.5%,224px); max-inline-size:none;
  }
  .report-document .control-report-metrics > .metric-days { flex:.85 1 148px; max-inline-size:220px; }
  .report-document .control-report-metrics > .metric.focus { flex:.85 1 155px; }
}
.control-report-sections > .report-disclosure { border-top:1px solid var(--line); }
.control-report-sections > .report-disclosure > summary { min-height:44px; }
.control-report-sections > .report-disclosure > .table-scroll { margin-top:6px; }
.report-details { margin-top:12px; }
.report-details summary { padding:9px 0; cursor:pointer; color:var(--blue); }
.report-warning { margin-bottom:12px; }
.rate-issue-list { list-style:none; margin:9px 0 0; padding:0; }
.rate-issue-list li+li { margin-top:12px; padding-top:12px; border-top:1px solid #e9c5c0; }
.rate-issue-list p { margin:3px 0 0; }
.rate-issue-list .btn { margin-top:8px; }
@media print { .rate-issue-list .btn { display:none; } }
.matrix-value { background:var(--pale); color:var(--dark); border-color:transparent; justify-content:space-between; width:100%; }
.matrix-value:hover { background:#d5eaf3; }
.matrix-value small { color:var(--muted); }
.matrix-value .matrix-draft { display:table; margin:3px 0 0 auto; padding:2px 6px; border-radius:5px; background:#fff0ce; color:#694900; font-weight:600; }
.rate-draft-values { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 16px; margin:12px 0 16px; }
.rate-draft-values dd { margin:0; text-align:right; font-variant-numeric:tabular-nums; }
@media (max-width:440px) {
  .session-actions { flex-wrap:wrap; justify-content:flex-end; padding-block:6px; }
  .session-actions .logout { min-height:32px; padding-block:4px; }
  .report-controls .field { flex-grow:1; min-width:135px; }
  .balance strong { white-space:normal; text-align:right; }
  .login-brand,.login-content { padding-inline:17px; }
}
@media print {
  @page { margin:13mm; }
  body.reports-page { background:white; color:#172636; }
  body.reports-page .app-header, body.reports-page #context,
  body.reports-page .report-controls, body.reports-page .notice, body.reports-page .installation,
  body.reports-page dialog { display:none !important; }
  body.reports-page .shell { max-width:none; padding:0; }
  .report-document { padding:0; border:0; }
  .report-document .table-scroll { overflow:visible; }
  .report-document table { min-width:0; }
  .report-document td,.report-document th { padding:5px; font-size:11pt; }
  .report-document thead { display:table-header-group; }
  .report-document tr,.report-document .metrics { break-inside:avoid; }
  .report-document .metric { padding:8px; }
  .report-document .metric.focus,.report-document .metric.focus .metric-label,.report-document .metric.focus small {
    background:white; color:var(--ink);
  }
  .report-document .metrics { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .report-document .metric strong { font-size:13pt; }
  .report-disclosure > summary::after { display:none; }
  .control-report-sections { gap:14px; }
  .control-report-sections > .report-disclosure > summary { min-height:0; padding-block:6px; }
}

/* Use the same physical dimensions when measuring and when printing. */
#print-pages { position:absolute; top:0; left:-100000px; width:273mm; visibility:hidden; pointer-events:none; }
#print-pages:empty { display:none; }
.print-sheet {
  display:flex; flex-direction:column; width:273mm; height:185mm; margin:0; background:white;
  color:#172636; box-sizing:border-box; font:400 10pt/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
}
.print-sheet *, .print-sheet .metric strong { font-size:10pt; font-weight:400; line-height:1.2; letter-spacing:normal; }
.print-sheet h2 { font-size:16pt; font-weight:700; margin:24pt 0 1mm; }

.billing-options { display:grid; gap:8px; margin:16px 0; }
.billing-totals { margin-top:10px; }
@media screen and (min-width:850px) {
  .billing-metrics { grid-template-columns:repeat(3,minmax(0,1fr)) minmax(132px,.65fr); }
}
@media screen {
  #workspace .billing-table :is(th,td,td .tag,td .btn) { white-space:normal; overflow-wrap:anywhere; }
  .billing-table td.tools .actions { gap:4px 8px; }
  .billing-table td.tools .btn { min-width:0; max-width:100%; }
}

.invoice-print-page { margin:0; background:#eef2f4; color:#282828; font-size:11pt; }
.invoice-print-controls { max-width:210mm; margin:14px auto; padding:0 16px; text-align:right; }
.invoice-letter { page:billingLetter; max-width:210mm; min-height:280mm; padding:12mm 15mm 10mm 20mm; margin:0 auto 16px; background:#fff; }
.invoice-letterhead { display:grid; grid-template-columns:minmax(0, 1fr) 58mm; align-items:center; gap:8mm; }
.invoice-address { font-size:12pt; line-height:1.24; overflow-wrap:anywhere; }
.invoice-return { width:fit-content; border-bottom:1px solid #808080; margin-bottom:3mm; color:#525252; font-size:7pt; }
.invoice-company { font-size:7.5pt; line-height:1.1; overflow-wrap:anywhere; }
.invoice-company img { display:block; width:35mm; margin:0 0 2.5mm; }
.invoice-company strong, .invoice-heading, .invoice-letter p strong { color:#215b76; }
.invoice-contact { display:grid; grid-template-columns:3em minmax(0,1fr); text-align:left; }
.invoice-banks { margin-top:3mm; }
.invoice-banks strong { display:block; padding-top:.6mm; }
.invoice-heading { margin-top:5mm; font-size:12pt; overflow-wrap:anywhere; }
.invoice-heading h1 { margin:0; color:inherit; font-size:13pt; font-weight:700; letter-spacing:0; }
.invoice-issue-date { text-align:right; font-size:8pt; margin-top:2mm; }
.invoice-letter p { margin:3mm 0; line-height:1.24; overflow-wrap:anywhere; }
.invoice-letter .invoice-values { margin:4mm auto; width:90%; table-layout:fixed; color:inherit; font-size:10pt; break-inside:avoid; }
.invoice-values :is(th,td) { color:inherit; font-size:inherit; font-weight:400; line-height:1.2; text-align:left; background:transparent; border-bottom:1px solid #808080; padding:1.35mm 1mm; }
.invoice-values th { white-space:normal; overflow-wrap:anywhere; }
.invoice-values td:nth-child(2) { width:14mm; white-space:nowrap; }
.invoice-values td:last-child { text-align:right; width:25mm; white-space:nowrap; }
.invoice-values tr:is(:nth-child(4),:nth-child(6)) :is(th,td) { background:#e4e7e9; color:#215b76; font-weight:700; }
.invoice-annexes { font-size:9pt; }
.invoice-signature { break-inside:avoid; }
.invoice-letter .invoice-signer { margin-top:64pt; }

@page billingLetter { size:A4 portrait; margin:10mm 15mm 10mm 20mm; }
@media print {
  :root:has(> .invoice-print-page) { background:#fff; }
  .invoice-print-page { background:#fff; }
  .invoice-print-controls { display:none; }
  .invoice-letter { margin:0; padding:0; min-height:0; }
  .invoice-values tr:is(:nth-child(4),:nth-child(6)) :is(th,td) { print-color-adjust:exact; -webkit-print-color-adjust:exact; }
}
.print-sheet h3 { margin:3mm 0 1mm; }
.print-sheet p { margin:0 0 1mm; }
.print-heading { flex:none; border-bottom:.2mm solid #bacdd8; padding-bottom:1.4mm; margin-bottom:2mm; }
.print-company { display:flex; align-items:center; justify-content:space-between; gap:5mm; margin-bottom:1.5mm; }
.print-company p { text-align:right; }
/* Trim the transparent margin of the supplied logo to align the artwork with the report. */
.print-logo { position:relative; flex:none; width:56mm; height:22mm; overflow:hidden; }
.print-logo img { display:block; position:absolute; inset:-7.1mm auto auto -4.2mm; width:64mm; height:auto; }
.print-content { flex:1; min-height:0; }
.print-content > * { margin-bottom:2mm; }
.print-content .metrics { display:flex; gap:2mm; break-inside:avoid; }
.print-content .metric {
  flex:1; display:block; border-radius:1.5mm; padding:1.5mm 2mm; background:white; color:#172636;
  text-align:right;
}
.print-content .metric-days { flex-grow:0.63; }
.print-content .metrics:has(> .metric-cap) > :is(.metric-days,.metric-cap) { flex-grow:0.82; }
.print-content .control-report-metrics > :is(.metric-days,.metric.focus) { flex-grow:0.85; }
.print-content .metric :is(span,strong,small) {
  display:block; color:#172636; margin-bottom:.5mm;
}
.print-content .metric.focus {
  background:var(--dark); color:#fff;
  print-color-adjust:exact; -webkit-print-color-adjust:exact;
}
.print-content .metric.focus :is(span,strong,small) { color:#fff; }
.print-content .metric small:last-child { margin-bottom:0; }
.print-table { table-layout:fixed; width:100%; border-collapse:collapse; }
.print-table .print-date { width:32mm; }
.print-table .print-time { width:28mm; }
.print-table .print-delivery { width:24mm; }
.print-table .print-task { width:29%; }
.print-table .print-long { width:34%; }
.print-table th,.print-table td { padding:1mm 1.2mm; white-space:normal; vertical-align:top; overflow-wrap:anywhere; }
.print-table .print-nowrap { white-space:nowrap; overflow-wrap:normal; }
.print-table th { color:#172636; background:#edf3f6; }
.print-table th:first-child,.print-table td:first-child { padding-left:1.2mm; }
.print-table thead { display:table-header-group; }
.print-table tr { break-inside:avoid; }
.print-footer { display:flex; flex:none; justify-content:space-between; border-top:.2mm solid #bacdd8; padding-top:1.3mm; }
.print-warning { list-style:none; }
.print-sheet a { color:inherit; }
@media print {
  @page { size:A4 landscape; margin:12mm; }
  body.reports-page > :not(#print-pages) { display:none !important; }
  #print-pages { position:static; width:auto; visibility:visible; }
  .print-sheet { break-after:page; page-break-after:always; }
  .print-sheet:last-child { break-after:auto; page-break-after:auto; }
}

/* Scope selectors and report controls */
.scope-field { flex:0 1 170px; min-width:125px; }
.scope-field.scope-clients { flex-basis:205px; }
.scope-field:is(.scope-activeProjects,.scope-inactiveProjects) { min-width:137px; }
.scope-field.scope-months { flex-basis:155px; }
.scope-picker { position:relative; min-width:0; }
.scope-picker summary {
  display:flex; align-items:center; justify-content:space-between; gap:9px;
  height:var(--control-height); padding:7px 10px; border:1px solid #bacdd8; border-radius:8px;
  background:#fff; color:var(--ink); list-style:none; cursor:pointer;
}
.scope-picker summary::-webkit-details-marker { display:none; }
.scope-picker summary::after { content:""; border:4px solid transparent; border-top-color:currentColor; transform:translateY(2px); }
.scope-picker summary span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.scope-options {
  position:absolute; z-index:10; inset-inline-start:0; top:calc(100% + 4px);
  width:max(100%,min(270px,calc(100vw - 50px))); max-height:280px; overflow:auto;
  border:1px solid #bacdd8; border-radius:8px; background:#fff; box-shadow:0 8px 23px #1b456126; padding:4px;
}
.scope-field.scope-months .scope-options { inset-inline-start:auto; inset-inline-end:0; width:max(100%,min(200px,calc(100vw - 50px))); }
.scope-options label { display:flex; align-items:center; gap:8px; cursor:pointer; min-height:36px; padding:6px; color:var(--ink); }
.scope-options label:hover { background:var(--pale); border-radius:5px; }
.scope-options label:first-child { border-bottom:1px solid var(--line); }
.scope-options input { min-height:0; margin:0; width:16px; height:16px; accent-color:var(--blue); flex:none; }
.context-with-selection, .selection-toolbar { margin-bottom:17px; }
.report-actions { margin-inline-start:auto; justify-content:flex-end; }
.report-actions .btn, .absence-controls .btn { min-height:var(--control-height); }
.chart.extended { grid-auto-columns:minmax(13px,1fr); overflow-x:auto; }

/* Numeric alignment and management tabs */
td .tag, td button:not(.calendar-entry) { font-size:inherit; }
.metric-money strong, .balance strong, .matrix-value span,
input:is([name="net"],[name="cents"],[name="contract"]) {
  text-align:right; font-variant-numeric:tabular-nums;
}
.matrix-value span { flex:1; font-weight:400; }
.admin-tabs { display:flex; gap:5px; overflow:auto; margin-bottom:15px; border-bottom:1px solid var(--line); }
.admin-tab { border-radius:0; border:0; border-bottom:3px solid transparent; color:var(--muted); background:transparent; }
.admin-tab:hover { background:var(--pale); }
.admin-tab.selected { border-bottom-color:var(--blue); color:var(--blue); }
.rate-card-controls :is(input[type="date"], .btn) { height:var(--control-height); }

/* Calendar displays every active absence on every day it covers. */
.absence-calendar { min-width:730px; table-layout:fixed; }
.absence-calendar caption { text-align:left; padding:0 0 9px; font-weight:650; color:var(--dark); }
.absence-calendar th { white-space:normal; }
.absence-calendar td {
  vertical-align:top; height:83px; padding:6px 8px;
  border:1px solid var(--line); border-top:0;
}
.absence-calendar tr:last-child td { border-bottom:1px solid var(--line); }
.absence-calendar .calendar-weekend { background:#f4f8fa; }
.absence-calendar .calendar-outside { background:#f0f4f6; }
.absence-calendar th:first-child { width:87px; }
.absence-calendar .calendar-week { color:var(--muted); font-size:.85em; font-weight:650; background:#f4f8fa; }
.absence-calendar time { font-weight:650; }
.absence-calendar ul { list-style:none; padding:0; margin:5px 0 0; display:grid; gap:4px; }
.calendar-entry { display:grid; text-align:left; width:100%; padding:4px 6px; border:0; border-radius:5px; color:#673340; background:#fbe8ed; }
.calendar-entry:hover { background:#f7d7df; }
.calendar-entry span { color:#754856; }
.calendar-holiday { display:grid; gap:2px; padding:4px 6px; border-radius:5px; color:#174b63; background:#e2f0f7; overflow-wrap:anywhere; }
.calendar-holiday span { font-size:.86em; }
.calendar-holiday.school-break, .absence-mark.school-break { color:#554183; background:#eee8f8; }
.absence-matrix { min-width:max-content; }
.absence-matrix caption { text-align:left; padding-block:0 9px; font-weight:650; color:var(--dark); }
.absence-matrix th, .absence-matrix td { text-align:center; white-space:nowrap; padding-block:6px; }
.absence-matrix :is(thead tr:last-child th, tbody .absence-person) { padding-block:10px; }
.stack:has(.vacation-balance .tools) .absence-matrix tbody .absence-person {
  line-height:max(var(--quiet-control-height),calc(1.4em + 2 * var(--quiet-padding-block) + 2px));
}
.absence-matrix td:not(:first-child) { min-width:55px; }
.absence-matrix .column-groups th { background:#e8f1f5; border-inline-end:1px solid var(--line); }
.absence-matrix .absence-person, .absence-matrix th:first-child {
  text-align:left; position:sticky; inset-inline-start:0; z-index:1; border-inline-end:1px solid var(--line);
}
.absence-matrix .absence-person { background:#fff; }
.absence-matrix .calendar-weekend { background:#f2f5f6; }
.absence-mark { display:inline-block; border-radius:5px; min-width:1.9em; font-weight:650; padding:2px 4px; }
.mark-U, .mark-HU { background:#e1f2e4; color:#285b36; }
.mark-K, .mark-A { background:#f9e4e9; color:#823845; }
.mark-S { background:#fff0bf; color:#674b00; }
.absence-mark.public-holiday { background:#e2f0f7; color:#174b63; }
.absence-capacity { color:var(--muted); font-size:.82em; }
.absence-legend { display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:10px; color:var(--muted); font-size:.8rem; }

.resizable-table th { position:relative; min-width:48px; padding-inline-end:19px; }
.sort-heading {
  display:inline-flex; align-items:center; gap:5px; max-width:100%;
  padding:0; border:0; background:transparent; color:inherit; text-align:inherit;
  white-space:inherit; line-height:inherit;
}
.sort-heading:hover, th[aria-sort] .sort-heading { color:var(--blue); }
.sort-heading > span:first-child { min-width:0; overflow-wrap:anywhere; }
.sort-indicator { flex:none; color:#6f8797; font-size:.85em; }
.sort-indicator::after { content:"↕"; }
th[aria-sort="ascending"] .sort-indicator::after { content:"↑"; color:var(--blue); }
th[aria-sort="descending"] .sort-indicator::after { content:"↓"; color:var(--blue); }
.column-grip {
  position:absolute; inset-block:1px; inset-inline-end:0;
  display:grid; place-items:center; width:14px;
  cursor:col-resize; touch-action:none; user-select:none;
}
.column-grip::after { content:""; width:2px; height:44%; min-height:12px; border-radius:2px; background:#9db3c0; }
.column-grip:hover, .column-grip:focus-visible { background:#d5eaf3; }
.column-grip:focus-visible { outline-offset:-2px; }
.column-grip:hover::after, .column-grip:focus-visible::after { background:var(--blue); }
.resizable-table.columns-sized { table-layout:fixed; min-width:0; }
.columns-sized :is(th, td.nowrap, td.num, td.tools, td .tag, td .btn, .calendar-entry) {
  white-space:normal; overflow-wrap:anywhere;
}
.columns-sized td :is(.btn, .tag) { max-width:100%; }

.worktime-description { margin:0 0 12px; }
.tag.signal.green { background:#dcefe3; color:#20563d; }
.tag.signal.yellow { background:#fff0be; color:#654b00; }
.tag.signal.red { background:#fae1df; color:#8c2925; }
@media (max-width:620px) {
  .scope-picker .scope-options { inset-inline-start:0; inset-inline-end:auto; width:100%; }
  .report-actions { flex-basis:100%; }
}
@media print {
  .column-grip { display:none; }
  .sort-indicator { display:none; }
  .report-document table.columns-sized { width:100% !important; table-layout:auto; }
  .report-document col { width:auto !important; }
  .tag.signal { print-color-adjust:exact; -webkit-print-color-adjust:exact; }
}

.nav-count { border-radius:999px; background:var(--line); padding:.12em .45em; font-size:.78em; }
.week-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:8px; margin-bottom:18px; }
.week-day { display:grid; align-content:start; gap:3px; min-width:0; padding:10px 11px; border:1px solid var(--line); border-radius:8px; }
.week-day span,.week-day small { color:var(--muted); }
.week-day.missing { background:#fff3db; }
.week-day.missing small { color:#805300; }
.week-grid { min-width:1090px; }
.week-grid td { vertical-align:top; }
.week-grid th:first-child { width:300px; }
.week-controls,.week-navigation { gap:8px; }
.week-navigation { display:flex; align-items:end; flex-wrap:wrap; }
.week-number { display:flex; align-items:center; min-height:var(--control-height); margin-inline-end:4px; white-space:nowrap; }
.week-arrow { width:var(--control-height); padding-inline:0; }
:is(.week-controls,.week-form-toolbar,.week-grid) .field > :is(input,select) { width:100%; height:var(--control-height); }
:is(.week-controls,.week-form-toolbar,.week-attributes,.evidence-weeks,#week-form > .dialog-actions) .btn { min-height:var(--control-height); }
.week-slot-row td { border-bottom:0; padding-bottom:5px; }
.week-attribute-row td { padding-top:5px; padding-bottom:15px; }
.week-pair { display:grid; gap:8px; }
.week-grid .field { line-height:1.3; }
.week-grid input[type="time"] { padding-inline:7px; }
.week-attributes { display:grid; grid-template-columns:minmax(180px,3fr) minmax(110px,1fr) minmax(80px,.7fr) auto; align-items:end; gap:8px 12px; max-width:1040px; }
.evidence-filter { margin-inline-start:auto; }
.evidence-weeks { display:grid; gap:8px; margin-block:16px; }
.evidence-weeks .actions { gap:8px; }
.evidence-weeks .btn { font-size:.88rem; }
.evidence-counts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:14px 0; }
.evidence-counts > div { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:6px 12px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; }
.evidence-counts dd { margin:0; font-weight:650; font-variant-numeric:tabular-nums; }
.evidence-status.open { background:#fff3db; color:#805300; }
.evidence-status.submitted { background:#e8f3f9; color:#1b536e; }
.evidence-status.none { background:#eef3f6; color:#435d70; }
@media (max-width:800px) {
  .week-days { grid-template-columns:repeat(auto-fit,minmax(100px,1fr)); }
  .week-attributes { grid-template-columns:repeat(2,minmax(0,1fr)); max-width:calc(100vw - 2 * var(--page-gutter) - 60px); }
  .week-attributes :is(.week-task,.actions) { grid-column:1/-1; }
  .evidence-filter { margin-inline-start:0; }
}

/* NWBR */
.nwbr-form { margin-top:1rem; }
.nwbr-form .toolbar { align-items:end; }
.nwbr-revenue-table { min-width:1200px; }
.nwbr-print-sheet img { width:42mm; height:auto; margin-bottom:6mm; }
@media print {
  body.nwbr-page:has(.nwbr-print-sheet) > :not(#print-pages) { display:none !important; }
  .nwbr-print-sheet .panel { border:none; padding:0; }
  .nwbr-print-sheet .table-scroll { overflow:visible; }
  .nwbr-print-sheet .nwbr-revenue-table { min-width:0; width:100%; table-layout:auto; }
  .nwbr-print-sheet td, .nwbr-print-sheet th { font-size:8pt; padding:1.2mm; }
  .nwbr-print-sheet h2 { font-size:16pt; }
}
