:root {
  color-scheme: light;
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #f3f5f1;
  color: #1c3025;
  --forest: #18372a;
  --green: #286246;
  --muted: #4c6255;
  --line: #d9e2d9;
  --paper: #fff;
}
* { box-sizing: border-box; }
body, p, h1, h2, ul, dl, dd { margin: 0; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid #a77120; outline-offset: 2px; }
button, input, select { font: inherit; }
button, input:not([type=checkbox]), select {
  min-height: 44px; padding: 8px 12px; border: 1px solid #bfcdc2; border-radius: 8px;
  color: inherit; background: var(--paper);
}
button { cursor: pointer; font-weight: 650; }
button:hover { background: #edf5ee; }
button:disabled { cursor: wait; opacity: .62; }
input:not([type=checkbox]) { width: 100%; min-width: 0; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green); }
.primary { color: #fff; border-color: var(--green); background: var(--green); }
.primary:hover { background: #194e35; }
.quiet { border-color: transparent; background: transparent; color: var(--muted); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.brand { display: flex; align-items: center; gap: 9px; font: 700 27px/1 Georgia, serif; }
.brand img { object-fit: contain; flex: none; }
.login-shell { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login { width: min(405px, 100%); padding: 30px; }
.login, form { display: grid; gap: 13px; }
.login h1 { margin: 7px 0; font-size: 28px; }
label { display: grid; gap: 5px; font-size: .92rem; font-weight: 650; }
.notice { margin: 12px 0; padding: 10px 14px; background: #fdece7; border-radius: 8px; color: #862a21; }
.office { min-height: 100dvh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { background: var(--forest); color: #fff4df; padding: 24px 18px; }
.point-label { margin: 14px 4px 19px; color: #d4e4d7; overflow-wrap: anywhere; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar button { text-align: left; border-color: transparent; background: transparent; color: #daebdf; }
.sidebar button:hover, .sidebar button[aria-current] { background: #2d5741; color: #fff; }
.workspace { padding: 0 34px 30px; min-width: 0; max-width: 1540px; width: 100%; margin-inline: auto; }
.toolbar, .section-head, .panel-head, .actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toolbar { min-height: 68px; border-bottom: 1px solid var(--line); margin-bottom: 23px; }
.toolbar > div { display: flex; align-items: center; gap: 6px; }
.connection { color: var(--muted); font-size: .9rem; }
.connection[data-online="true"] { color: #205f42; }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 9px; margin-bottom: 19px; }
h1 { font-size: clamp(27px, 3vw, 37px); line-height: 1.15; letter-spacing: -.036em; }
h2 { font-size: 1.22rem; letter-spacing: -.025em; }
.section-head { margin-bottom: 15px; flex-wrap: wrap; }
.actions { flex-wrap: wrap; justify-content: flex-start; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; margin-bottom: 18px; }
.metric { padding: 14px 16px; }
.metric dt { color: var(--muted); font-size: .9rem; }
.metric dd { font-size: 1.43rem; font-weight: 750; margin-top: 4px; }
.analytics { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.panel { padding: 16px; min-width: 0; }
.panel-head { margin-bottom: 10px; flex-wrap: wrap; }
.chart { max-height: 480px; overflow-y: auto; display: grid; gap: 12px; }
.chart-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; column-gap: 10px; font-size: .9rem; }
progress { appearance: none; width: 100%; height: 11px; border: 0; border-radius: 8px; overflow: hidden; background: #e6eee7; }
progress::-webkit-progress-bar { background: #e6eee7; }
progress::-webkit-progress-value { background: #408564; border-radius: 8px; }
progress::-moz-progress-bar { background: #408564; border-radius: 8px; }
.chart-row span:last-child, td:not(:first-child) { font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { font-size: .9rem; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
#ranking td:nth-child(n+2), #ranking th:nth-child(n+2), .shift-table td:nth-child(n+2) { text-align: right; white-space: nowrap; }
.empty { padding: 14px; color: var(--muted); }
.operations { margin-top: 20px; }
.operations ul { list-style: none; padding: 0; max-height: 460px; overflow: auto; }
.operations li { padding: 9px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; }
.operations small { grid-column: 1 / -1; color: #862a21; font-size: .9rem; }
.operations span:last-of-type, .secondary-text { color: var(--muted); }
.shift-list { display: grid; gap: 10px; }
.shift-list summary { padding: 4px; min-height: 44px; cursor: pointer; font-weight: 650; }
dialog { width: min(500px, calc(100% - 24px)); padding: 20px; color: inherit; }
dialog::backdrop { background: #102819a6; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.check { display: flex; align-items: center; gap: 8px; }
@media (max-width: 1050px) { .analytics { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .office { grid-template-columns: 1fr; }
  .workspace { padding: 0 14px 20px; }
  .sidebar { padding: 13px; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .point-label { margin: 5px 4px; }
}
