:root {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #172721;
  background: #f4f6f1;
  font-size: 16px;
  --ink: #172721;
  --muted: #52635a;
  --forest: #183f31;
  --forest-dark: #112b23;
  --leaf: #a9c879;
  --border: #dce3d9;
  --panel: #fff;
  --shadow: 0 2px 3px #112b2308;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 290px; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.35rem); line-height: 1.02; letter-spacing: -.055em; margin: .32rem 0 .6rem; }
h2 { font-size: 1.25rem; line-height: 1.2; letter-spacing: -.025em; }
h3 { font-size: 1.03rem; }
svg { flex: none; vertical-align: middle; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #bd731e; outline-offset: 3px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip:focus { position: absolute; z-index: 5; padding: .7rem; background: white; }
.shell { display: grid; grid-template-columns: 226px minmax(0,1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 24px 15px 15px; color: #f1f6ea; background: var(--forest-dark); }
.brand { display: flex; align-items: center; gap: 11px; padding: 5px 7px 27px; font-size: 1.22rem; text-decoration: none; letter-spacing: -.045em; }
.brand small { display: block; margin-top: 4px; font-weight: 700; color: #a3b8a9; font-size: .59rem; letter-spacing: .085em; }
.brand-mark { display: inline-grid; place-items: center; width: 43px; height: 43px; flex: none; border-radius: 11px; background: var(--leaf); color: #142c23; }
nav { display: grid; gap: 5px; }
nav a, .logout { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 11px; text-decoration: none; color: #c9d9cb; border-radius: 8px; font-size: .91rem; font-weight: 600; white-space: nowrap; }
nav a:hover, .logout:hover { background: #ffffff12; }
nav a[aria-current] { color: #f5f8ec; background: #29493b; }
nav a[aria-current] svg { color: var(--leaf); }
.sidebar-footer { margin-top: auto; padding: 13px 4px 0; border-top: 1px solid #385247; }
.locale { display: flex; align-items: center; gap: 8px; font-size: .79rem; color: #bfcec2; padding: 0 8px 9px; }
.locale span { width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); }
.logout { background: transparent; border-color: transparent; width: 100%; justify-content: flex-start; }
.main { width: min(100%, 1440px); margin: 0 auto; padding: clamp(22px, 3.5vw, 52px); min-width: 0; }
.eyebrow { display: block; color: #496657; font-size: .68rem; font-weight: 800; letter-spacing: .13em; }
.page-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 25px; }
.page-head p, .muted { color: var(--muted); line-height: 1.45; }
.actions { display: flex; gap: 9px; flex-wrap: wrap; }
button, .button, select, input, textarea { font: inherit; }
button, .button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; min-height: 43px; padding: 8px 13px; font-weight: 700; font-size: .86rem; cursor: pointer; text-decoration: none; }
.primary { color: #fff; background: var(--forest); border-color: var(--forest); }
.primary:hover { background: #29563f; }
.secondary { background: #fff; border-color: #cdd9d0; color: #244535; }
.secondary:hover { background: #edf4ec; }
.period-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 13px 15px; background: #e9eee6; border: 1px solid #dce5da; border-radius: 11px; margin-bottom: 16px; }
.period-bar strong { display: block; margin-top: 4px; font-size: .93rem; }
.period-form { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.period-form input[type=date], .period-form select { width: auto; max-width: 100%; }
.arrows { display: flex; gap: 5px; }
.arrows a { font-size: 1.25rem; width: 39px; padding: 3px; }
.notice { border: 1px solid #d5e0d3; padding: 10px 13px; background: #edf3ea; border-radius: 9px; color: #31473b; font-size: .9rem; line-height: 1.5; margin: 0 0 16px; }
.notice.warning { background: #fff5dc; border-color: #ecd3a0; color: #684812; }
.notice.danger { background: #fbece7; border-color: #edd1c8; color: #8e3323; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.metric, .panel { background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 13px; }
.metric { padding: clamp(13px,1.9vw,22px); min-height: 118px; }
.metric span { display: block; color: #41594b; font-size: .82rem; font-weight: 700; }
.metric strong { display: block; font-size: clamp(1.2rem,2.05vw,2rem); line-height: 1.16; overflow-wrap: anywhere; letter-spacing: -.045em; margin: .62rem 0 .42rem; font-variant-numeric: tabular-nums; }
.metric small, .hint, label small { color: var(--muted); font-size: .79rem; line-height: 1.45; }
.metric.featured { background: var(--forest); border-color: var(--forest); color: #fff; }
.metric.featured span, .metric.featured small { color: #d7e4d6; }
.dashboard-grid, .detail-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: 15px; align-items: start; }
.dashboard-grid { align-items: stretch; }
.body-panel { padding: clamp(16px,2.3vw,24px); }
.section-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 17px; }
.section-head .eyebrow { margin-bottom: 5px; }
.section-head > svg { color: #54755f; }
.bar-row { margin: 14px 0; }
.bar-row div { display: flex; justify-content: space-between; gap: 10px; font-size: .85rem; margin-bottom: 5px; }
meter { width: 100%; display: block; height: 13px; border: 0; accent-color: #47785b; }
meter::-webkit-meter-bar { background: #e8eee7; border: 0; border-radius: 8px; }
meter::-webkit-meter-optimum-value { background: #47785b; border-radius: 8px; }
.cost meter::-webkit-meter-optimum-value { background: #b98242; }
meter::-moz-meter-bar { background: #47785b; border-radius: 8px; }
.cost meter::-moz-meter-bar { background: #b98242; }
.lines > div, .line-item { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid #e6ebe5; padding: 10px 0; font-size: .9rem; }
.lines strong, .projection strong { flex: none; font-variant-numeric: tabular-nums; }
.hint { margin-top: 12px; }
.spaced { margin-top: 15px; }
.text-link, .back { text-decoration: none; font-size: .86rem; font-weight: 750; color: #254d38; }
.text-link:hover, .back:hover { text-decoration: underline; }
.panel > .text-link { display: inline-block; margin-top: 15px; }
.callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; padding: 18px 22px; background: #e7efe0; border: 1px solid #d6e3ce; border-radius: 13px; }
.callout h2 { margin: .35rem 0; }
.callout p { color: var(--muted); font-size: .9rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid #e5ebe4; vertical-align: middle; }
th { color: #455f51; font-size: .77rem; font-weight: 700; }
td:first-child { min-width: 145px; }
td small { display: block; margin-top: 4px; color: var(--muted); }
.tag { display: inline-flex; border-radius: 20px; background: #e6efe5; color: #274b35; padding: 4px 9px; white-space: nowrap; font-size: .76rem; font-weight: 700; }
.tag.pending { background: #fff1d8; color: #70491c; }
.empty { padding: 28px 8px; text-align: center; }
.empty p { margin: 8px 0 15px; color: var(--muted); }
.empty-icon { display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 13px; background: #e7efe3; color: #31563f; margin-bottom: 12px; }
.back { display: inline-block; margin-bottom: 15px; }
.form-panel { max-width: 720px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 14px; }
.full { grid-column: 1 / -1; }
label { display: block; font-size: .86rem; font-weight: 650; }
label small { display: block; font-weight: 400; margin-top: 4px; }
input:not([type=checkbox]), textarea, select { display: block; width: 100%; min-height: 43px; border: 1px solid #bdcbbf; border-radius: 7px; background: #fff; padding: 8px 9px; font-size: .95rem; color: var(--ink); }
label > input:not([type=checkbox]), label > select, label > textarea { margin-top: 5px; }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 7px; min-height: 38px; }
.check input { accent-color: var(--forest); width: 17px; height: 17px; }
.total-strip { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 11px 13px; background: #ecf2e9; border-radius: 8px; color: #234633; font-size: .88rem; font-weight: 700; }
.total-strip output { font-size: 1rem; flex: none; font-variant-numeric: tabular-nums; }
.text-button { min-height: 34px; padding: 2px 5px; background: transparent; color: #883328; }
.text-button:hover { text-decoration: underline; }
.line-item { align-items: center; }
.delete-form { margin-top: 12px; }
.separated { border-top: 1px solid var(--border); padding-top: 12px; }
.wages-header, .wages-row { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,.65fr) minmax(0,1fr) minmax(0,.8fr) minmax(0,1fr) minmax(0,1fr); gap: 10px; align-items: center; }
.wages-header { padding-bottom: 4px; font-size: .8rem; font-weight: 750; color: var(--muted); }
.wages-row { padding: 4px 0; }
.wages-row + .total-strip { margin-top: 12px; }
.wages-row output { font-size: .84rem; font-weight: 700; }
.report-link { margin: 0 0 16px; }
.report-section { margin: 0 0 15px; }
.report-table td { overflow-wrap: anywhere; }
.mobile-label { display: none; }
.scenario-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.scenario-grid .muted { margin-top: 5px; font-size: .87rem; }
.break-even { display: grid; gap: 5px; padding: 13px; background: #e7efe1; border-radius: 9px; margin-bottom: 10px; }
.break-even span, .break-even small { font-size: .84rem; }
.break-even strong { color: #254d38; }
.projection { padding: 13px 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.projection span { display: block; }
.negative { color: #943924; }
.pending-list { font-size: .9rem; color: var(--muted); padding-left: 21px; line-height: 1.55; }
.public { min-height: 100dvh; display: grid; place-content: center; padding: 16px; }
.login-card { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); width: min(760px,calc(100vw - 32px)); overflow: hidden; }
.login-art { color: #f6faec; background: radial-gradient(ellipse at bottom right,#42654b,transparent 62%), var(--forest-dark); padding: clamp(25px,5vw,49px); }
.login-art .brand-mark { margin-bottom: 36px; }
.login-art .eyebrow, .login-art p { color: #ccddc4; }
.login-content { padding: clamp(25px,5vw,49px); align-self: center; }
.login-content .muted { margin: 8px 0 13px; }
.login-content .primary { margin-top: 5px; }
@media (max-width: 1140px) {
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0,1fr); }
  .sidebar { position: static; height: auto; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; padding: 10px 15px 7px; }
  .brand { padding: 0; }
  .brand-mark { width: 36px; height: 36px; }
  .sidebar nav { grid-row: 2; grid-column: 1/-1; display: flex; flex-wrap: wrap; gap: 3px; }
  .sidebar-footer { grid-row: 1; grid-column: 2; border: 0; padding: 0; margin: 0; }
  .locale { display: none; }
}
@media (max-width: 620px) {
  .main { padding: 16px 13px 25px; }
  .sidebar { padding-inline: 11px; }
  .sidebar nav { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); }
  .sidebar nav a { flex-direction: column; justify-content: center; gap: 4px; font-size: .68rem; padding: 5px 1px; min-height: 49px; }
  .sidebar nav svg { width: 17px; height: 17px; }
  .brand small { display: none; }
  .page-head { align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 17px; }
  .period-form { margin: 0; }
  .period-bar { gap: 8px; }
  .arrows { margin-left: auto; }
  .dashboard-grid, .detail-grid, .login-card { grid-template-columns: minmax(0,1fr); }
  .metric { min-height: 112px; }
  .metrics { gap: 7px; }
  .body-panel { padding: 14px; }
  .form-grid { gap: 10px; }
  input:not([type=checkbox]), select, textarea { font-size: 16px; }
  .wages-header { display: none; }
  .mobile-label { display: block; font-size: .76rem; color: var(--muted); }
  .wages-row { grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); padding: 7px 0; }
  .wages-row label:first-child { grid-column: 1 / -1; }
  .wages-row output { grid-column: 1 / -1; justify-self: end; }
  .report-table, .report-table tbody, .report-table tr, .report-table td { display: block; }
  .report-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .report-table tr { border-bottom: 1px solid var(--border); padding: 8px 0; }
  .report-table td { border: 0; padding: 4px 0; }
  .report-table td::before { content: attr(data-label); display: block; color: var(--muted); font-size: .74rem; font-weight: 700; }
  .login-art .brand-mark { margin-bottom: 14px; }
}
@media (max-width: 350px) {
  .sidebar nav { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .form-grid { grid-template-columns: minmax(0,1fr); }
  .metric strong { font-size: 1.06rem; }
}
@media print {
  :root { background: white; font-size: 11pt; }
  .sidebar, .skip, .period-bar, [data-print-report] { display: none; }
  .shell, .main { display: block; width: 100%; padding: 0; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric, .metric.featured { min-height: auto; background: white; color: black; border-color: #aaa; }
  .metric.featured span, .metric.featured small { color: inherit; }
  .report-section { box-shadow: none; padding: 12px; }
  .report-section .table-wrap { overflow: visible; }
  .report-table { display: table; }
  .report-table thead { display: table-header-group; position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .report-table tbody { display: table-row-group; }
  .report-table tr { display: table-row; break-inside: avoid; }
  .report-table td { display: table-cell; padding: 7px 5px; }
  .report-table td::before { content: none; }
  .report-section h2 { break-after: avoid; }
}
