:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #182e2a;
  background: #f3f5f1;
  --green: #174b41;
  --line: #d7dfd9;
  --muted: #51665f;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; }
button, .button-link { min-height: 46px; border: 0; border-radius: 9px; cursor: pointer; font-weight: 650; line-height: 1.2; }
button:disabled { opacity: .56; cursor: default; }
:focus-visible { outline: 3px solid #06896f; outline-offset: 3px; }
button:hover:enabled { filter: brightness(.96); }
a { color: var(--green); }
.shell { width: min(calc(100% - 32px), 56rem); margin-inline: auto; }
body > .topbar { border-bottom: 1px solid var(--line); background: #fbfcf9; }
.topbar .masthead, .admin-shell .topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 1.2rem; font-weight: 750; letter-spacing: -.04em; color: #123c33; text-decoration: none; }
.brand-mark { width: 29px; height: 29px; display: inline-block; border: 2.5px solid var(--green); border-radius: 50%; position: relative; }
.brand-mark:before, .brand-mark:after { position: absolute; content: ''; width: 2.7px; border-radius: 3px; background: var(--green); left: 11px; top: 4px; height: 9px; }
.brand-mark:after { transform-origin: 50% 100%; transform: rotate(114deg); top: 5px; height: 8px; }
.area-tag, .status { display: inline-flex; align-items: center; font-size: .83rem; padding: .4rem .72rem; border: 1px solid var(--line); border-radius: 100px; background: #fff; color: var(--muted); font-weight: 600; }
main.shell { padding-bottom: 3rem; }
.worker-shell { max-width: 42rem; }
.page-heading, .admin-shell .masthead { margin: 2.8rem 0 1.35rem; }
.eyebrow { margin: 0 0 .4rem; text-transform: uppercase; letter-spacing: .105em; font-size: .72rem; font-weight: 740; color: var(--muted); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.25rem, 7vw, 3.4rem); line-height: 1.05; letter-spacing: -.055em; font-weight: 690; }
h2 { font-size: 1.35rem; line-height: 1.25; letter-spacing: -.03em; }
p { line-height: 1.5; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 17px; margin-bottom: 1rem; padding: clamp(1.2rem, 3vw, 1.65rem); }
.stack { display: grid; gap: .85rem; }
.stack > button { justify-self: start; }
.primary, .secondary, .connect-button, .button-link { padding: .75rem 1.05rem; }
.primary, .button-link { color: #fff; background: var(--green); }
.secondary { border: 1px solid #b4c4bb; background: #fff; color: var(--green); }
.muted, .last-record { color: var(--muted); }
.connection { display: grid; grid-template-columns: 48px 1fr; gap: .9rem 1rem; align-items: center; background: var(--green); border-color: var(--green); color: #f5fcf7; }
.terminal-symbol { display: grid; place-items: center; height: 46px; width: 46px; border: 1px solid #6f988d; border-radius: 13px; background: #285b50; }
.terminal-symbol b { display: block; width: 21px; height: 25px; border: 1.8px solid #d8efcc; border-radius: 4px; position: relative; }
.terminal-symbol b::before { content: ''; position: absolute; width: 9px; height: 2px; background: #d8efcc; top: 6px; left: 4px; }
.terminal-symbol b::after { content: ''; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #d8efcc; bottom: 4px; right: 3px; }
.status-line { display: flex; align-items: center; gap: 6px; color: #d8e8de; font-size: .78rem; font-weight: 650; letter-spacing: .02em; margin-bottom: .28rem; }
.status-dot { background: #c3cdc1; border-radius: 100%; width: 7px; height: 7px; }
.online .status-dot { background: #b6ec8e; }
.terminal-info p { margin-top: .35rem; color: #d5e6de; font-size: .92rem; }
.connect-button { grid-column: 2; justify-self: start; background: #d8efc2; color: #174438; }
.notice { padding: .85rem 1rem; margin-bottom: 1rem; background: #e2eae6; color: #204638; border-radius: 9px; overflow-wrap: anywhere; }
.notice.success { background: #daf0d9; }
.notice.error, .notice.warning { background: #fae8d5; color: #64391e; }
.code { display: block; width: fit-content; border-radius: 8px; background: #edf3ed; padding: .5rem .7rem; font: 650 1.5rem ui-monospace, monospace; letter-spacing: .12em; }
.action-heading { margin-bottom: .55rem; }
.last-record { font-size: .88rem; }
.punch-grid { margin: 1.15rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.punch { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 70px; font-weight: 760; letter-spacing: .04em; }
.punch span { font-size: 1.6rem; line-height: 1; }
.punch-in { background: #1e6253; color: #fff; }
.punch-out { background: #f6ede1; color: #694723; border: 1px solid #dcc9af; }
#recover { margin-top: .8rem; }
.history-card { padding-block: .5rem; }
.history-toggle { display: flex; width: 100%; min-height: 50px; justify-content: space-between; align-items: center; background: none; color: #203e32; font-size: 1.05rem; padding: 0; }
.history-toggle[aria-expanded=true] .chevron { transform: rotate(180deg); }
.chevron { font-size: 1.3rem; }
#history-details { padding: .8rem 0; border-top: 1px solid var(--line); }
.filter-row { display: flex; flex-wrap: wrap; align-items: end; gap: .55rem; }
.filter-row label { flex: 1 1 130px; display: grid; gap: .35rem; font-weight: 620; font-size: .85rem; }
.filter-row input { width: 100%; min-height: 44px; color: inherit; background: #fff; border: 1px solid #b4c4bb; border-radius: 8px; padding: .52rem; }
.records-list { list-style: none; margin: 0; padding: 0; }
.records-list li { display: flex; justify-content: space-between; gap: .65rem; padding: .7rem 0; border-top: 1px solid var(--line); font-size: .9rem; }
.records-list time { color: var(--muted); font-variant-numeric: tabular-nums; }
.admin-shell .masthead { display: block; }
.admin-shell .topbar { border-bottom: 1px solid var(--line); }
.admin-shell .brand { letter-spacing: -.04em; }
.admin-shell .masthead { margin-top: .15rem; }
.download-card p { color: var(--muted); margin: .5rem 0 1rem; }
.button-link { display: inline-flex; align-items: center; text-decoration: none; }
.install-note { margin-top: 1.4rem; color: var(--muted); font-size: .93rem; }
.install-app { color: var(--green); background: transparent; padding: .6rem .1rem; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 540px) {
  .page-heading { margin-top: 2rem; }
  .admin-shell { padding-inline: 1rem; }
  .topbar .masthead { min-height: 62px; }
}
@media (min-width: 580px) {
  .connection { grid-template-columns: 48px 1fr auto; }
  .connect-button { grid-column: auto; }
}
