:root {
  --bg: #f6f7f5; --card: #ffffff; --text: #1d2420; --muted: #5f6b64; --line: #dde3df;
  --accent: #125b17; --accent-soft: #e0ffe2;
  --red: #f8c9cb; --red-text: #8a1c22; --amber: #fde9b8; --amber-text: #7a5300; --ok-text: #125b17;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121614; --card: #1b201d; --text: #e6ece8; --muted: #9aa69f; --line: #2c3430;
    --accent: #7fd486; --accent-soft: #1f3a22;
    --red: #4a2224; --red-text: #ffb3b8; --amber: #45391a; --amber-text: #ffd88a; --ok-text: #7fd486;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
.top h1 { font-size: 17px; margin: 0; }
.who { display: flex; gap: 10px; align-items: center; color: var(--muted); }
main { padding: 16px; max-width: 1400px; margin: 0 auto; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-bottom: 14px; }
.narrow { max-width: 380px; margin: 40px auto; }
form label { display: block; margin-bottom: 10px; }
input[type=email], input[type=password] { display: block; width: 100%; margin-top: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
button { font: inherit; padding: 7px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { button.primary { color: #0d1a0f; } }
button.link { border: 0; background: none; color: var(--accent); padding: 0; text-decoration: underline; }
.tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 8px 14px; font-weight: 600; color: var(--muted); }
.tabs button[aria-selected=true] { color: var(--text); border-bottom-color: var(--accent); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.step p { margin: 6px 0 0; }
.week-label { display: block; margin-bottom: 8px; color: var(--muted); }
.week-label input { margin-left: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--text); font: inherit; }
.or { margin: 0 6px; color: var(--muted); }
.file { display: inline-block; padding: 7px 12px; border: 1px dashed var(--line); border-radius: 6px; cursor: pointer; }
.file input { display: none; }
.muted { color: var(--muted); }
.error { color: var(--red-text); min-height: 1em; }
.message { min-height: 1.4em; margin: 0 0 12px; }
.message.error { font-weight: 600; }
.warnings { list-style: none; margin: 0 0 14px; padding: 10px 14px; border-radius: 8px; background: var(--red); color: var(--red-text); font-weight: 600; }
.warnings li + li { margin-top: 4px; }
.totals { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; min-width: 120px; }
.tile .k { color: var(--muted); font-size: 12px; }
.tile .v { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.red td { background: var(--red); }
tr.amber td { background: var(--amber); }
tr.edited td:nth-child(7) { outline: 2px solid var(--accent); outline-offset: -2px; }
.badge { font-weight: 700; font-size: 11px; letter-spacing: .03em; }
.badge.red { color: var(--red-text); } .badge.amber { color: var(--amber-text); } .badge.ok { color: var(--ok-text); }
td input.hours { width: 72px; padding: 3px 5px; text-align: right; border: 1px solid var(--line); border-radius: 4px; background: var(--card); color: var(--text); font: inherit; }
td.problem { min-width: 260px; }
td.nowrap { white-space: nowrap; }
@media (max-width: 640px) { main { padding: 12px 16px; } .tile { min-width: 46%; } }
