:root {
  --page: #f4f5ef;
  --paper: #fffefa;
  --ink: #192e28;
  --muted: #4f635a;
  --line: #dce3d7;
  --accent: #175844;
  --accent-bright: #8cdbad;
  --soft: #dcefe2;
  --off: #faedce;
  --travel: #daf0f2;
  --error: #9a362a;
  font: 14px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 700; letter-spacing: -.035em; }
h2 { font-size: 18px; letter-spacing: -.025em; }
h3 { font-size: 14px; }
button, select, input {
  font: inherit; color: inherit; border: 1px solid var(--line);
  border-radius: 7px; padding: 6px 10px; background: var(--paper); min-width: 0;
}
button { cursor: pointer; }
button:disabled { opacity: .48; cursor: default; }
button:hover:not(:disabled) { border-color: var(--accent); }
:focus-visible { outline: 2px solid #256e57; outline-offset: 2px; }
.top { background: #17362e; color: #fcfdf8; }
.top-inner, main { max-width: 1370px; margin: auto; padding-inline: clamp(12px, 3%, 38px); }
.top-inner {
  display: flex; justify-content: space-between; align-items: end;
  flex-wrap: wrap; gap: 12px; padding-block: 23px 25px;
}
.context { color: #c4e4d2; margin-bottom: 3px; }
.files, .actions, .heading, #quarters, #trip-fields, .legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.files button { color: #f3faf4; background: transparent; border-color: #6a8a7f; }
.files button:hover { border-color: #f3faf4; }
.storage { color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px; padding: 11px 0; font-size: 12px; }
#feedback:not(:empty) { color: var(--ink); }
.workspace { display: grid; grid-template-columns: minmax(310px, .92fr) minmax(0, 2.25fr); gap: 14px; align-items: start; }
.panel { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.heading { justify-content: space-between; margin-bottom: 8px; gap: 6px 10px; }
.person #employee { width: 100%; }
.identity { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 10px 0; }
.identity label, #trip-fields label { display: grid; gap: 3px; color: var(--muted); font-size: 12px; min-width: 0; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 6px 4px; }
thead { color: var(--muted); }
.balances th { font-size: 11px; }
.balances td { text-align: center; }
.balances td:last-child { font-weight: 700; }
.balances td[data-negative="true"] { color: var(--error); }
.balances input { width: 52px; padding: 4px; text-align: center; }
.category { text-align: left; padding: 4px 5px; font-size: 12px; }
[aria-pressed="true"] { background: var(--soft); border-color: #77a58d; color: #144d3a; }
.period-heading { margin-top: 12px; }
.quiet { font-size: 11px; color: var(--muted); }
#periods, .warnings { padding: 0; margin: 0; list-style: none; }
#periods { display: grid; gap: 4px; }
#periods button { width: 100%; text-align: left; font-size: 12px; }
.hint { color: var(--muted); font-size: 12px; }
#months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 9px 0; }
.month { border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.month h3 { text-align: center; margin: 1px 0 4px; }
.day-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.weekday { color: var(--muted); font-size: 12px; }
.day { padding: 3px 0; border-radius: 4px; border: 1px solid transparent; line-height: 1.35; user-select: none; }
.day[data-off] { background: var(--off); color: #70521b; }
.day[data-booked] { background: var(--soft); color: var(--ink); }
.day[data-travel], .swatch.travel { background: var(--travel); border-color: #54868a; border-style: dashed; }
.day[data-range] { border-color: #73a58b; background: #a8deba; color: #16382a; }
.day[data-free], .swatch.free { background: repeating-linear-gradient(135deg, #dcefe2 0 4px, #a8cfb5 4px 5px); color: #193c2e; }
.day[data-boundary] { border-color: #175844; font-weight: 700; }
.legend { gap: 5px 12px; color: var(--muted); font-size: 11px; }
.legend span { display: flex; align-items: center; gap: 4px; }
.swatch { display: inline-block; width: 13px; height: 12px; border: 1px solid transparent; border-radius: 3px; }
.swatch.leave { background: var(--soft); }
.swatch.off { background: var(--off); }
.selection { margin-top: 9px; border-top: 1px solid var(--line); padding-top: 8px; }
#range, #limit { margin-top: 3px; }
#range { min-height: 20px; }
.trip-toggle { display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; }
#trip-fields { margin-top: 5px; }
#trip-fields input { width: 85px; }
.warnings { color: var(--error); padding-block: 4px; font-size: 12px; }
.actions { margin-top: 5px; }
.primary { color: white; background: var(--accent); border-color: var(--accent); }
.overview, .hr { margin-top: 13px; }
.hr { margin-bottom: 24px; }
#overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quarter { border: 1px solid var(--line); border-radius: 8px; padding: 7px; min-width: 0; }
.quarter h3 { margin-bottom: 3px; }
.timeline-row { display: grid; grid-template-columns: minmax(72px, 22%) 1fr; gap: 5px; align-items: center; min-height: 23px; }
.timeline-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.track { position: relative; height: 16px; background: #f0f2ed; border-radius: 3px; }
.tick { position: absolute; inset-block: 0; border-left: 1px solid #cbd6cc; padding-left: 3px; font-size: 10px; color: var(--muted); }
.bar { position: absolute; z-index: 1; inset-block: 2px; border-radius: 3px; background: #418872; min-width: 1px; }
.bar.extra { background: #8b73a4; }
.bar.road { background: #b7dbdf; border: 1px dashed #54868a; }
.hr td:first-child, .hr td:last-child { white-space: nowrap; }
#copy-status:empty { display: none; }
#copy-status { margin-top: 5px; font-size: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 900px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .identity label { max-width: 360px; }
}
@media (max-width: 580px) {
  #months, #overview { grid-template-columns: 1fr; }
  .panel { padding: 10px; }
  .top-inner { padding-block: 14px; }
  .day { padding: 6px 0; }
}
