:root {
  --bg: #f5f6f8; --card: #fff; --text: #222; --muted: #6b7280; --line: #e5e7eb;
  --accent: #1a5fbf; --accent-text: #fff; --danger: #b42318; --ok-bg: #e7f6ec; --err-bg: #fdecea;
  --warn-bg: #fff1dc; --warn-text: #9a4b00;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418; --card: #1b1f24; --text: #e6e6e6; --muted: #9aa3ad; --line: #2d333b;
    --accent: #4d8ff0; --accent-text: #fff; --danger: #f97066; --ok-bg: #12301d; --err-bg: #3a1714;
    --warn-bg: #3a2810; --warn-text: #ffb45c;
  }
}
* { box-sizing: border-box; }
:root { color-scheme: light dark; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
       background: var(--bg); color: var(--text); }
header { background: var(--card); border-bottom: 1px solid var(--line); }
header .inner, main { max-width: 960px; margin: 0 auto; padding: 0 16px; }
header .inner { display: flex; align-items: center; gap: 20px; height: 54px; overflow-x: auto; }
header .brand { font-weight: 700; white-space: nowrap; }
header nav { display: flex; gap: 4px; }
header nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
header nav a.active, header nav a:hover { color: var(--text); background: var(--bg); }
main { padding-top: 20px; padding-bottom: 40px; }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 0 0 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=number], input[type=date], input[type=time], input[type=password], select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--bg); color: var(--text); font: inherit;
}
.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 15px; }
button, .btn { display: inline-block; border: 0; border-radius: 7px; padding: 9px 16px; font: inherit;
  background: var(--accent); color: var(--accent-text); cursor: pointer; text-decoration: none; }
button.secondary, .btn.secondary { background: transparent; color: var(--accent); border: 1px solid var(--line); }
button.link { background: none; color: var(--danger); padding: 4px 6px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.notice { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.notice.ok { background: var(--ok-bg); } .notice.err { background: var(--err-bg); }
.muted { color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 700; }
tr.job td { font-weight: 600; background: var(--bg); }
form.inline { display: inline; }
td.over { background: var(--warn-bg); color: var(--warn-text); }
td.notes { white-space: normal; min-width: 160px; }
p.overtime { margin: 6px 0 0; text-align: right; font-weight: 600; color: var(--warn-text); }
.logo-preview { max-height: 50px; max-width: 220px; background: #fff; padding: 4px; border-radius: 4px; }
