:root {
  font: 100%/1.45 Inter, system-ui, sans-serif;
  color: #182d35;
  background: #f5f7f8;
  --border: #d9e1e3;
  --muted: #4c616a;
  --accent: #126b59;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, select, input, summary { font: inherit; }
button, select, summary, input[type="checkbox"] { cursor: pointer; }
:focus-visible { outline: 3px solid #18836f; outline-offset: 2px; }
.topbar {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 3vw, 56px);
  border-bottom: 1px solid var(--border);
  background: white;
}
.brand { display: flex; align-items: center; gap: 16px; }
.brand strong { color: var(--accent); font-size: 1.45rem; letter-spacing: -.06em; }
.brand h1 { padding-left: 16px; border-left: 1px solid var(--border); font-size: 1.125rem; overflow-wrap: anywhere; }
.client-name { color: var(--muted); }
main { max-width: 2000px; margin: auto; padding: 16px clamp(12px, 3vw, 56px); }
h1, h2 { margin: 0; line-height: 1.2; }
h2 { font-size: 1.2rem; }
.toolbar, .toolbar form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.toolbar { margin-bottom: 16px; justify-content: space-between; }
.toolbar form > label { display: grid; gap: 5px; font-size: .875rem; color: var(--muted); }
select, input[type="date"], button, summary {
  border: 1px solid #becbd0;
  background: white;
  color: #243e47;
  border-radius: 7px;
  padding: 8px 12px;
}
.toolbar select, .toolbar input[type="date"] { height: 40px; font-size: 1rem; }
.toolbar select {
  min-width: 10rem;
  padding-right: 32px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%234c616a' stroke-width='1.5'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
}
.rows-menu { position: relative; }
.rows-menu summary { height: 40px; line-height: 22px; }
.rows-menu fieldset {
  position: absolute;
  right: 0;
  z-index: 20;
  min-width: 230px;
  max-height: 50vh;
  overflow: auto;
  margin: 6px 0 0;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 25px #17343e1a;
}
.rows-menu legend { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.rows-menu label { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: .92rem; }
.rows-menu input { width: 16px; height: 16px; accent-color: var(--accent); }
.report-card { border: 1px solid var(--border); border-radius: 10px; background: white; overflow: hidden; }
.report-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 16px 18px; }
.report-heading span { color: var(--muted); font-size: .875rem; }
.period { margin-left: auto; font-variant-numeric: tabular-nums; }
.notice, .error { padding: 10px 18px; margin: 0; }
.notice { background: #f2f6f9; color: var(--muted); }
.error { background: #fff2ec; color: #853c20; border-radius: 8px; }
#report-grid { border: 0; background: white; font: inherit; font-size: .875rem; font-variant-numeric: tabular-nums; }
#report-grid .tabulator-header { border-block: 1px solid var(--border); color: #3d545c; }
#report-grid .tabulator-col { background: #f4f7f7; border-color: var(--border); }
#report-grid .tabulator-col-content { padding: 0; }
.column-title, .column-weather { padding: 5px 9px; overflow: hidden; text-overflow: ellipsis; }
.column-weather { min-height: calc(1.5em + 11px); line-height: 1.5; border-top: 1px solid var(--border); font-weight: 400; }
#report-grid .tabulator-row { background: white; color: #263d45; }
#report-grid .tabulator-cell { vertical-align: middle; padding: 7px 9px; border-color: #e6edee; border-bottom: 1px solid #e6edee; }
#report-grid .tabulator-cell.metric-label, #report-grid .tabulator-cell.metric-average { background: #fafcfc; }
#report-grid .tabulator-cell.metric-label { padding-block: 0; }
.metric-label span { display: inline-flex; align-items: center; font-weight: 550; }
#report-grid .tabulator-row.tabulator-group { background: #e6efec; color: #174d40; border: 0; padding-block: 8px; }
#report-grid .tabulator-cell.central-day { background: #f0f8f4; }
#report-grid .tabulator-col.central-day { background: #d4eae2; color: #114e40; }
#report-grid .tabulator-frozen-left { border-right: 1px solid #c6d4d6; }
.cell-text {
  display: block;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #605335;
  background: transparent;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
dialog { max-width: min(32rem, 90vw); max-height: 75vh; border: 1px solid var(--border); border-radius: 10px; padding: 24px; }
dialog::backdrop { background: #1c303c66; }
dialog p { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .toolbar { align-items: end; gap: 8px; }
  .toolbar form { width: 100%; }
  .rows-menu fieldset { right: auto; left: 0; }
  .period { width: 100%; margin: 0; }
}
