:root {
    color-scheme: dark;
    --bg: #0b0c0f;
    --panel: #12141a;
    --text: #f2f2f2;
    --muted: #b6b5b2;
    --gold: #d4af37;
    --light-gold: #f1d17a;
    --line: rgba(212,175,55,.35);
    --stroke: rgba(255,255,255,.13);
    --green: #8dd7ac;
    --warn: #f1c47a;
}
* { box-sizing: border-box; }
body {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(800px 400px at 20% 5%, rgba(212,175,55,.055), transparent 70%), var(--bg);
    color: var(--text);
    font: 1rem/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
header { background: #0c0d0f; border-bottom: 1px solid var(--stroke); }
.topbar, main, footer { width: min(1100px, 92%); margin: 0 auto; }
.topbar, .row, .brand { display: flex; align-items: center; gap: .75rem; }
.topbar, .row { justify-content: space-between; flex-wrap: wrap; }
.topbar { min-height: 5rem; padding: .5rem 0; }
.brand { color: var(--text); text-decoration: none; }
.brand-mark { display: grid; place-content: center; width: 4.5rem; height: 3.25rem; overflow: hidden; }
.brand-mark img { width: 8.5rem; height: auto; display: block; }
.brand-word { border-left: 1px solid var(--line); padding-left: .85rem; font-size: .88rem; font-weight: 720; letter-spacing: .16em; }
main { padding: clamp(1.5rem,4vw,3rem) 0 1.5rem; }
main.worker { max-width: 760px; }
footer { padding: 1rem 0 2rem; border-top: 1px solid var(--stroke); }
h1, h2, h3, p { margin: 0 0 .75rem; }
h1 { margin: .7rem 0 1rem; font-size: clamp(2rem,4.4vw,2.85rem); line-height: 1.06; letter-spacing: -.045em; }
h2 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -.025em; }
h3 { font-size: 1.05rem; }
.small, small, footer, label { font-size: .875rem; color: var(--muted); }
a { color: var(--light-gold); }
.pill { display: inline-flex; align-items: center; gap: .5rem; color: var(--light-gold); font-size: .78rem; font-weight: 650; letter-spacing: .055em; }
main > .pill::before { content: ""; height: 1px; width: 1.45rem; background: var(--gold); }
.card { min-width: 0; margin: 1rem 0; padding: clamp(1rem,2.4vw,1.55rem); background: linear-gradient(160deg,#171717,#101011 78%); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 14px 35px rgba(0,0,0,.24); }
.site-card { position: relative; overflow: hidden; }
.site-card::before { content:""; position:absolute; pointer-events:none; top:0; right:0; width:43%; height:9rem; background:repeating-linear-gradient(128deg,transparent 0 14px,rgba(212,175,55,.1) 14px 15px,transparent 15px 26px); mask-image:linear-gradient(210deg,#000,transparent 70%); }
.site-card > * { position: relative; }
.site-card h2 { font-size: clamp(1.65rem,4vw,2.15rem); margin: 1rem 0 .3rem; }
.good { color: var(--green); }
.warn { color: var(--warn); }
.muted, .site-address { color: var(--muted); }
.status { font-size:.875rem; }
.action-area { border-top: 1px solid var(--stroke); padding-top: 1rem; margin-top: 1rem; }
label { display: block; margin: .6rem 0 .3rem; }
input, select, textarea, button { font: inherit; }
input, select, textarea { width:100%; min-width:0; padding:.7rem; border-radius:10px; background:#0c0d10; border:1px solid #444444; color:var(--text); }
textarea { min-height:4rem; resize:vertical; }
button, .btn { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:.6rem 1rem; border:1px solid var(--line); border-radius:12px; color:#1e180a; background:linear-gradient(120deg,var(--light-gold),var(--gold)); font-weight:700; cursor:pointer; text-decoration:none; }
button:hover,.btn:hover { filter:brightness(1.08); }
button.secondary,.btn.secondary { background:#1b1b1d; color:var(--text); border-color:var(--stroke); }
button.stop { background:#3a3120; color:var(--light-gold); border-color:var(--line); }
.big { width:100%; margin-top:.5rem; font-size:1rem; min-height:3.1rem; }
button:disabled { opacity:.55; cursor:wait; }
:focus-visible { outline:2px solid var(--light-gold); outline-offset:3px; }
details { margin:.75rem 0 0; }
summary { color:var(--muted); font-size:.9rem; cursor:pointer; }
#gps-status { margin:.75rem 0 0; }
.reading { border-left:2px solid var(--gold); padding-left:.75rem; }
.clock { font-weight:700; font-size:1.25rem; }
.grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr)); gap:.8rem; }
.form-grid > .card { margin:0; }
.metrics { grid-template-columns:repeat(4,minmax(0,1fr)); }
.tile { display:grid; align-content:start; gap:.3rem; text-decoration:none; color:var(--text); margin:0; }
.tile:hover { border-color:var(--gold); }
.metric { color:var(--light-gold); font-size:clamp(1.65rem,3vw,2.25rem); font-variant-numeric:tabular-nums; line-height:1.2; }
.tile small { font-size:.875rem; }
.alert { border-left:3px solid var(--warn); padding:.75rem; background:#362b19; margin:1rem 0; }
.scroll { overflow:auto; max-width:100%; }
table { width:100%; min-width:650px; border-collapse:collapse; }
th, td { padding:.65rem .5rem; text-align:left; vertical-align:top; border-bottom:1px solid var(--stroke); }
th { color:var(--muted); font-size:.875rem; }
.inline { display:inline; }
.login { max-width:450px; margin:2rem auto; }
.review-form { min-width:180px; }
.review-form button { margin-top:.4rem; }
#pracownicy h3 { margin:1rem 0 0; }
@media (max-width:780px) {
    .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:560px) {
    .topbar { gap:.4rem; min-height:4.2rem; }
    .topbar .row { gap:.5rem; }
    .brand { gap:.25rem; }
    .brand-word { font-size:.75rem; padding-left:.5rem; }
    .brand-mark { width:3.4rem; height:2.7rem; }
    .brand-mark img { width:6.4rem; }
    .topbar .secondary { padding:.4rem .65rem; font-size:.875rem; }
    .form-grid { grid-template-columns:1fr; }
}
@media (max-width:420px) {
    .topbar .account-role { display:none; }
}
.board-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin:1.35rem 0; border-block:1px solid var(--line); }
.board-stats div { padding:1rem .7rem; color:var(--muted); font-size:.84rem; }
.board-stats div:first-child { padding-left:0; }
.board-stats strong { display:block; font-size:clamp(1.5rem,5vw,2.1rem); color:var(--light-gold); line-height:1.3; }
.day-select, .actions, .board-nav { display:flex; align-items:end; flex-wrap:wrap; gap:.6rem; }
.day-select { margin:.6rem 0 1.2rem; }
.day-select label { margin:0; }
.board-nav { gap:.15rem; flex-wrap:nowrap; border-bottom:1px solid var(--stroke); }
.board-nav a { flex:1; padding:.75rem .2rem; font-weight:650; text-align:center; text-decoration:none; color:var(--muted); border-bottom:2px solid transparent; }
.board-nav a[aria-current] { color:var(--light-gold); border-color:var(--gold); }
.job { padding:1.15rem 0; border-top:1px solid var(--stroke); }
.job:last-child { padding-bottom:0; }
.job h3, .photo-form { margin-top:.8rem; }
.job-place { color:var(--light-gold); font-weight:650; }
.job-state { display:inline-block; padding:.1rem .55rem; background:#262626; border-radius:20px; font-size:.82rem; }
.job-state.done { color:var(--green); }.job-state.blocked { color:var(--warn); }.job-state.active { color:var(--light-gold); }
.instructions { white-space:pre-line; overflow-wrap:anywhere; }
details.card > summary { font-size:1.05rem; font-weight:650; color:var(--light-gold); }
.photo-form { border-top:1px solid var(--line); padding-top:.6rem; }
.photo-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr)); gap:1rem; }
.photo-grid figure { margin:0; }.photo-grid img { width:100%; height:9.5rem; border-radius:10px; object-fit:cover; }
.photo-grid figcaption { overflow-wrap:anywhere; }.actions { margin-top:.8rem; }
