:root {
  color-scheme: light;
  font: 15px/1.45 "Segoe UI", Arial, sans-serif;
  --blue: #12342e;
  --ink: #172b27;
  --muted: #52645f;
  --green: #17624e;
  --line: #dbe5e0;
  --paper: #f2f5f2;
  --red: #982f2a;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: #155c49; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #c17d0a; outline-offset: 3px; }
button, input, textarea, select { font: inherit; }
button, summary { cursor: pointer; }
.skip { position: fixed; top: -4rem; left: 1rem; z-index: 4; padding: 10px; background: white; }
.skip:focus { top: 1rem; }
.sidebar { width: 224px; position: fixed; inset: 0 auto 0 0; overflow-y: auto; background: var(--blue); color: white; }
.brand { display: flex; align-items: center; gap: 12px; padding: 21px 15px; color: white; font-size: 14px; font-weight: 700; text-decoration: none; }
.brand img { display: block; flex: 0 0 auto; object-fit: contain; }
.nav-group { margin: 7px 11px 16px; }
.nav-group span { display: block; padding: 0 10px 4px; color: #bfd6cd; font-size: 12px; }
.nav-group a { display: block; padding: 6px 10px; color: #f0f7f3; text-decoration: none; border-radius: 6px; }
.nav-group a:hover, .nav-group a[aria-current] { background: #285343; }
.nav-group a[aria-current] { font-weight: 700; }
.workspace { margin-left: 224px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 57px; padding: 8px 31px; background: #fafcfb; border-bottom: 1px solid var(--line); font-size: .86rem; color: var(--muted); }
.account { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.plain { border: 0; background: transparent; color: #155c49; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
main:not(.standalone) { max-width: 1530px; padding: 29px 31px 46px; margin: 0 auto; }
.standalone { min-height: 100vh; display: grid; align-content: center; justify-items: center; gap: 16px; padding: 22px; }
.public-brand { display: block; width: min(100%, 400px); background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 9px 14px; }
.public-brand img { display: block; width: 100%; height: auto; }
.heading { display: flex; gap: 18px; justify-content: space-between; align-items: flex-start; margin-bottom: 21px; }
h1 { font-size: clamp(1.65rem, 3vw, 2.27rem); line-height: 1.12; letter-spacing: -.028em; margin: 0; }
h2 { font-size: 1.16rem; letter-spacing: -.01em; margin: 0; }
.heading p, .explain { color: var(--muted); margin: 8px 0 0; max-width: 76ch; }
.button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border: 1px solid var(--green); border-radius: 7px; min-height: 37px; padding: 6px 14px; color: white; background: var(--green); font-weight: 650; white-space: nowrap; }
.button:hover { background: #114b3b; }
.secondary { background: #fff; color: var(--green); border-color: #9eb8ab; }
.secondary:hover { background: #eff6f1; }
.danger { color: var(--red); background: #fff; border-color: #ddaaa7; }
.danger:hover { background: #fff1ef; }
.panel, .metric { background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.panel h2 { padding: 15px 16px 12px; }
.login { width: min(100%, 400px); padding: 28px; }
.login h1 { font-size: 1.75rem; }
.feedback { width: min(100%, 560px); }
.review-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.legal { width: min(100%, 820px); padding: clamp(17px, 4vw, 35px); }
.legal h2 { padding: 0; margin: 1.45em 0 .45em; }
.legal dt { font-weight: 700; margin-top: .85em; }
.legal dd { margin: .25em 0 .8em; }
.privacy-links { display: flex; flex-wrap: wrap; gap: .6em 1.25em; padding-top: 1em; margin-top: 1.35em; border-top: 1px solid var(--line); font-size: .85rem; }
.receipt { display: block; overflow-wrap: anywhere; background: #eff5f1; border-radius: 6px; padding: 10px; }
.request-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.consent input { flex: 0 0 auto; }
.employee-chat { max-width: 730px; }
.dialog { min-height: 110px; max-height: 350px; overflow: auto; display: grid; gap: 8px; padding: 8px 3px; }
.bubble { white-space: pre-wrap; overflow-wrap: anywhere; max-width: min(95%, 55ch); width: fit-content;
  padding: 8px 13px; margin: 0; background: #edf5ef; border-radius: 10px; }
.worker-bubble { justify-self: end; background: #17624e; color: #fff; }
.suggestions, .form-actions, .connection-state { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.suggestions { margin: 10px 0; }
.connection-state p { margin: 0 0 12px; padding: 5px 10px; background: #e7f1e9; border-radius: 6px; }
.employee-calls { margin-top: 14px; }
.daily-quick { margin: 0 0 15px; }
.calendar-nav { display: flex; align-items: center; gap: 15px; justify-content: space-between; flex-wrap: wrap; }
.planning-week td { min-width: 112px; }
.planning-week td strong, .planning-week td small { display: block; }
.contact-entry { margin-top: 15px; }
.coverage-actions { padding: 0 15px 12px; }
.stack { display: grid; gap: 13px; }
form.stack { grid-template-columns: minmax(0, 1fr); }
form.stack > label { min-width: 0; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 11px; margin: 0 0 15px; }
.filters a { padding: 7px 1px; }
label, .read-field { display: flex; flex-direction: column; gap: 5px; font-size: .88rem; font-weight: 650; color: #2c403a; }
input, select, textarea { border: 1px solid #aebeb6; border-radius: 6px; background: #fff; min-height: 37px; padding: 6px 8px; color: var(--ink); max-width: 100%; min-width: 0; }
textarea { resize: vertical; }
input[type="checkbox"] { min-height: auto; }
.filters input[type="date"] { width: 135px; }
small, .read-field span { color: var(--muted); font-weight: 400; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid #e8eeeb; overflow-wrap: anywhere; }
th { background: #eff5f1; color: #334d43; font-size: .79rem; font-weight: 700; }
td { font-size: .86rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: #fafcfb; }
.record { font-weight: 650; }
.empty { color: var(--muted); padding: 24px 14px; }
.status { display: inline-block; padding: 2px 7px; border-radius: 5px; color: #3d574a; background: #edf2ef; white-space: nowrap; }
.positive { color: #165844; background: #e4f2eb; }
.negative { color: #812822; background: #f9e8e5; }
.editor { max-width: 900px; padding: 18px; margin-top: 12px; }
.editor h2 { padding: 0 0 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 18px; }
.document-fields { min-width: 0; margin: 3px 0; border: 1px solid var(--line); border-radius: 7px; padding: 12px; }
.document-fields legend { padding: 0 6px; font-weight: 650; }
.document-actions { margin: 0 0 12px; }
#deal-documents .document-actions .button { margin-top: 0; }
#deal-estimate .document-actions .button { margin-top: 0; }
.estimate-total { margin: 10px 0; }
.estimate-apply { margin: 0 0 14px; }
.estimate-line-detail { display: block; margin-top: 3px; }
.estimate-note { margin: 0 0 10px; }
.estimate-quantity { width: 95px; }
.wide { grid-column: 1 / -1; }
.read-field strong { white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 500; }
.editor .button { margin-top: 12px; }
.actions { display: flex; gap: 14px; align-items: baseline; }
.notice { border: 1px solid #ebc3bc; color: #802f29; background: #fff5f2; border-radius: 6px; padding: 9px 12px; }
.notice.good { border-color: #bad7c8; background: #edf7ef; color: #205742; }
.checkbox { flex-direction: row; align-items: flex-start; }
.pager { display: flex; gap: 17px; flex-wrap: wrap; padding: 11px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 17px 0; }
.metric { padding: 14px; border-top: 3px solid #398768; display: grid; gap: 5px; }
.metric strong { font-size: clamp(1.2rem,2.1vw,1.74rem); letter-spacing: -.026em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric span { font-size: .89rem; font-weight: 650; }
.metric.low { border-top-color: var(--red); }
.hire-secondary { display:block; margin-top:4px; }
.hire-queue-title { margin:14px 16px 8px; }
.hire-overview, .hire-entry { margin:14px 0; }
.hire-overview { border-top:4px solid #399373; }
.hire-position { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px; }
.hire-position > strong { font-size:1.15rem; }
.hire-overview progress { width:100%; margin:10px 0 8px; accent-color:#297a60; }
.hire-action { display:flex; flex-wrap:wrap; align-items:end; gap:10px; margin:9px 0; }
.hire-action label { flex:1 1 200px; }
.hire-action input[type="number"] { max-width:105px; }
.hire-entry p { margin:9px 0; }
.hire-entries > h2 { margin:22px 0 10px; }
.worker-board { width:min(100%, 700px); min-width:0; }
.worker-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 24px; }
.worker-tabs a { display:inline-flex; align-items:center; min-height:44px; padding:6px 12px; border:1px solid var(--line); border-radius:9px; background:#f7faf9; }
.worker-section { margin:26px 0; scroll-margin-top:16px; }
.worker-board h3 { margin:0; }
.worker-meta { display:flex; align-items:center; gap:8px; }
.worker-meta .ui-icon, .copy-invitation .ui-icon { flex:none; fill:none; stroke:currentColor; stroke-width:1.7; }
.worker-invite { margin-top:12px; padding-top:8px; border-top:1px solid var(--line); }
.worker-invite .button { margin:8px 8px 4px 0; gap:6px; }
.copy-invitation[hidden] { display:none; }
.worker-consent { display:flex; align-items:flex-start; gap:10px; }
.worker-consent input { flex:none; width:20px; margin:4px 0 0; }
@media (max-width: 520px) {
  .worker-board .hire-action, .worker-board .hire-action .button { width:100%; }
  .worker-board .hire-action { margin:3px 0; }
  .worker-board .form-actions { width:100%; }
}
@media (max-width:600px) {
  .hire-action label { flex-basis:100%; }
  .hire-entry .button, .hire-action .button { min-height:44px; }
}
.metric.low strong, .flag { color: var(--red); font-weight: 700; }
.dashboard-grid { display: grid; grid-template-columns: minmax(220px,1fr) minmax(0,1.65fr); gap: 14px; margin-bottom: 14px; align-items: start; }
.alerts a { display: flex; justify-content: space-between; gap: 8px; padding: 9px 15px; border-top: 1px solid #e8eeeb; }
.alerts strong { flex: 0 0 auto; }
.calendar .explain { margin: 0 16px 12px; }
.inline { display: inline; }
details { margin-top: 6px; }
details .stack { margin: 6px 0; }
@media (max-width: 1060px) {
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 690px) {
  .sidebar { position: static; width: auto; }
  .brand { padding: 10px 12px; }
  .sidebar nav { display: flex; overflow-x: auto; }
  .nav-group { display: flex; flex: 0 0 auto; margin: 0 3px 6px; }
  .nav-group span { display: none; }
  .nav-group a { padding: 5px 8px; }
  .workspace { margin-left: 0; }
  .topbar, main:not(.standalone) { padding-left: 13px; padding-right: 13px; }
  .topbar { align-items: flex-start; flex-direction: column; gap: 4px; }
  .account { gap: 10px; }
  .form-grid { grid-template-columns: minmax(0,1fr); }
  .request-grid { grid-template-columns: minmax(0,1fr); }
}
@media print {
  @page { size: A4 landscape; margin: 9mm; }
  body { background: white; color: black; }
  .sidebar, .topbar, .skip, .filters, .pager, .heading .button, .actions, .erase { display: none !important; }
  .workspace { margin: 0; }
  main:not(.standalone) { padding: 0; max-width: none; }
  .panel, .metric { border-color: #d0d0d0; }
  .scroll { overflow: visible; }
  .metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr 2fr; }
  th, td { padding: 4px 6px; }
  thead { display: table-header-group; }
  tr, .metric, .heading { break-inside: avoid; }
  a { color: black; text-decoration: none; }
}
