:root {
  color-scheme: light;
  --ink: #17231b;
  --muted: #526157;
  --line: #dce4dc;
  --surface: #fff;
  --accent: #d8f476;
  font: 16px/1.55 system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: #f3f6f1; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -.055em; line-height: 1.1; }
h2 { font-size: 1.18rem; letter-spacing: -.02em; }
p, small { color: var(--muted); }
button, input, textarea, select { font: inherit; }
button, input, textarea, select { border-radius: .55rem; }
button { cursor: pointer; color: var(--ink); background: #fff; border: 1px solid var(--line); padding: .65rem .95rem; font-weight: 650; }
button:hover { background: #edf4e8; }
button:disabled { cursor: wait; opacity: .58; }
:focus-visible { outline: 3px solid #58764b; outline-offset: 3px; }
.primary { background: var(--accent); border-color: #cbeb58; color: #18230f; }
.primary:hover { background: #cce963; }
a { color: #38552b; font-weight: 650; }
main { min-width: 0; }
.shell { display: grid; grid-template-columns: 15rem minmax(0, 1fr); min-height: 100vh; }
aside { background: #151f1a; color: #edf4ed; padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 2.5rem; }
.brand { display: flex; align-items: center; gap: .75rem; padding-left: .45rem; font-weight: 750; line-height: 1.15; }
.brand small { color: #becbbf; font-size: .78rem; font-weight: 500; }
.mark { width: 2.5rem; height: 2.5rem; border-radius: .7rem; background: var(--accent); color: #1c2a14; display: grid; place-items: center; font-weight: 900; }
nav { display: grid; gap: .3rem; }
.nav { text-align: left; width: 100%; color: #dce6dc; background: transparent; border-color: transparent; }
.nav.active, .nav:hover { color: var(--accent); background: #2a382d; }
.logout { margin-top: auto; }
header { display: flex; justify-content: space-between; gap: .7rem; align-items: center; background: #fbfdfa; border-bottom: 1px solid var(--line); padding: 1rem clamp(1rem,4vw,3rem); color: var(--muted); font-weight: 650; }
.connection { font-size: .81rem; border: 1px solid var(--line); border-radius: 2rem; padding: .25rem .65rem; }
.page { max-width: 84rem; margin: auto; padding: clamp(1.2rem,4vw,3rem); }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-title p { margin-top: .45rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1rem,3vw,1.6rem); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(9rem,1fr)); gap: .9rem; margin-bottom: 1rem; }
.metric strong { display: block; font-size: 2rem; letter-spacing: -.05em; }
.metric span { color: var(--muted); font-size: .88rem; }
.queue h2 { margin-bottom: .8rem; }
.job { display: grid; grid-template-columns: minmax(10rem,2fr) minmax(8rem,1fr) minmax(7rem,1fr); gap: .8rem; align-items: center; padding: .8rem 0; border-top: 1px solid var(--line); }
.job p { font-size: .85rem; }
.job-actions { display: flex; gap: .35rem; flex-wrap: wrap; }
.job-actions button { font-size: .85rem; }
.form-card { display: grid; gap: 1rem; margin-bottom: 1rem; }
.fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,14rem),1fr)); gap: 1rem; align-items: end; }
label { display: grid; gap: .3rem; align-content: start; font-weight: 630; }
input, textarea, select { width: 100%; border: 1px solid #c8d5c9; background: #fcfefc; padding: .6rem; color: var(--ink); min-width: 0; }
input[type=checkbox] { width: auto; }
.check { display: flex; align-items: center; gap: .45rem; padding-bottom: .6rem; }
.time-field, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.time-field input { flex: 1; }
.drop { border: 1px dashed #7c997d; padding: 1rem; border-radius: .65rem; background: #f5f9f0; }
.drop.over { background: #e6f4cb; }
progress { width: 100%; accent-color: #507637; }
#notice { margin: 1rem clamp(1rem,4vw,3rem) 0; padding: .65rem 1rem; border-radius: .55rem; background: #e5efde; }
#notice.error, #login-error { color: #7f3224; }
#notice.error { background: #fae9e2; }
.segment { display: grid; grid-template-columns: minmax(8rem,11rem) 1fr; align-items: start; gap: 1rem; border-top: 1px solid var(--line); padding: .9rem 0; }
.segment label { font-size: .88rem; }
.segment textarea { min-height: 5rem; resize: vertical; }
.uncertainty { color: #785317; }
.sticky { position: sticky; bottom: 0; background: #f3f6f1; padding: .8rem 0; }
.stamp-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(12rem,1fr)); gap: 1rem; }
.stamp-grid img { width: 100%; height: 6rem; object-fit: contain; background: #eff4ec; border-radius: .5rem; margin-bottom: .5rem; }
.login { display: grid; min-height: 100vh; place-items: center; padding: 1rem; }
.login .card { width: min(100%,25rem); display: grid; gap: 1.15rem; }
.login h1 { font-size: 2rem; }
@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; }
  aside { padding: .75rem; gap: .65rem; }
  nav { display: flex; flex-wrap: wrap; }
  .nav { width: auto; }
  .job { grid-template-columns: 1fr; gap: .25rem; }
  .segment { grid-template-columns: 1fr; gap: .4rem; }
}
