:root {
  --green: #1f7a4d;
  --green-dark: #17603c;
  --ink: #1c2420;
  --muted: #64706a;
  --line: #dfe5e1;
  --bg: #f4f6f4;
  --card: #ffffff;
  --warn-bg: #fff7dd;
  --warn-line: #e8cf7a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 0; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; margin: 12px 0 0; }

.bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.brand .muted { font-weight: 400; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); display: inline-block; }

main { max-width: 1180px; margin: 24px auto; padding: 0 16px; display: grid; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; }

.drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin-top: 8px; padding: 30px 16px; text-align: center; cursor: pointer;
  border: 2px dashed #b9c6be; border-radius: 10px; background: #fafcfa; color: var(--muted);
  transition: border-color .15s, background .15s;
}
.drop strong { color: var(--ink); font-size: 16px; }
.drop:hover, .drop.over { border-color: var(--green); background: #eef7f1; }
.drop:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }

.chosen { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.error { color: #a4231c; background: #fdecea; border: 1px solid #f3c1bc; border-radius: 8px; padding: 8px 12px; margin: 12px 0 0; }

button { font: inherit; cursor: pointer; }
.link { background: none; border: 0; padding: 0; color: var(--green-dark); text-decoration: underline; }
.primary {
  background: var(--green); color: #fff; border: 0; border-radius: 8px;
  padding: 10px 18px; font-weight: 600; white-space: nowrap;
}
.primary:hover { background: var(--green-dark); }
.primary:disabled { opacity: .6; cursor: progress; }

.result-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; }
.result-head p { margin: 2px 0 0; }
.actions { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.week { display: grid; gap: 2px; font-size: 13px; color: var(--muted); }
select { font: inherit; padding: 8px 10px; border: 1px solid #b9c6be; border-radius: 8px; background: #fff; color: var(--ink); }

.note { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; }
.note summary { cursor: pointer; font-weight: 600; }
.note ul { margin: 8px 0 0; padding-left: 20px; }
.note li { margin-bottom: 2px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th { background: #eef2ef; font-weight: 600; font-size: 13px; }
th small { display: block; font-weight: 400; color: var(--muted); }
th:nth-child(-n+2), td:nth-child(-n+2) { text-align: left; }
td.empty { color: #b6beb9; }
td.total, tfoot td { font-weight: 600; }
td[title] { cursor: help; text-decoration: underline dotted #9aa8a0; text-underline-offset: 3px; }
tbody tr:hover { background: #f7faf8; }
tfoot td { background: #eef2ef; border-bottom: 0; }

.login-page { display: grid; place-items: center; min-height: 100vh; }
.login { width: min(360px, 92vw); display: grid; gap: 10px; }
.login input { font: inherit; padding: 9px 10px; border: 1px solid #b9c6be; border-radius: 8px; }
.login .error { margin: 0; }
