:root {
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #eff8f2;
  background: #0b1512;
  --muted: #a4b8ae;
  --mint: #9ce9bb;
  --line: #31493d;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 48% 18%, #14241d 0%, #0b1512 68%); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #9ce9bb; outline-offset: 4px; }
svg { width: 1.3em; height: 1.3em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.site-header { border-bottom: 1px solid #23362e; background: #0c1713; }
.bar { width: min(1120px, calc(100% - 64px)); margin: 0 auto; }
.bar { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.brand-logo { display: block; width: 106px; height: auto; }
.connection { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #365241; border-radius: 40px; padding: 7px 12px; color: #bde7cd; background: #15291f; font-size: .84rem; white-space: nowrap; }
.connection i { width: 7px; height: 7px; background: #85e6a9; border-radius: 50%; }
.connection[data-offline] { color: #f0cca3; border-color: #5c4631; background: #2c2319; }
.connection[data-offline] i { background: #eeba83; }
.layout {
  flex: 1;
  display: grid;
  grid-template-rows: minmax(min-content, 1fr) auto minmax(min-content, 1fr);
  width: min(620px, calc(100% - 36px));
  margin-inline: auto;
  padding: 10px 0;
}
.page-heading { align-self: end; text-align: center; margin-bottom: clamp(14px, 2.6svh, 26px); }
.page-heading h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); letter-spacing: -.055em; margin: 10px 0 8px; line-height: 1; }
.page-heading p { margin: 0; color: var(--muted); }
.page-heading .branch { color: var(--mint); display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: .9rem; }
.terminal { border: 1px solid #30463b; border-radius: 16px; min-width: 0; padding: clamp(21px, 3vw, 32px); min-height: clamp(300px, 47svh, 365px); display: grid; align-items: stretch; }
#home { display: flex; flex-direction: column; }
.terminal-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: #c5dbce; font-size: .86rem; }
.mode { background: #183025; color: #c0efd2; border: 1px solid #466a56; border-radius: 40px; padding: 6px 10px; font-size: .8rem; }
.mode:disabled { opacity: 1; cursor: default; }
.clock { display: flex; justify-content: center; align-items: baseline; gap: .15em; margin: auto 0 0; padding-top: 26px; font-size: clamp(3.7rem, 13vw, 7.5rem); line-height: 1; letter-spacing: -.085em; font-weight: 650; font-variant-numeric: tabular-nums; color: #f1fff5; white-space: nowrap; }
#seconds { color: #a3d6b7; font-size: .33em; letter-spacing: -.045em; }
.date { text-align: center; color: #bed4c6; margin: 13px 0 auto; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 28px; }
.punch { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 15px 10px; min-height: 56px; border: 1px solid transparent; border-radius: 12px; font-weight: 670; }
.primary { color: #10291d; background: var(--mint); }
.primary:hover { background: #bcf5d2; }
.secondary { color: #eefcf4; background: #284336; border-color: #537362; }
.secondary:hover { background: #375746; }
.footer { align-self: end; justify-self: center; margin-top: 16px; font-size: .86rem; color: var(--muted); }
.footer div { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.text-button { border: 0; background: none; color: #b9dbca; padding: 6px 3px; font-size: .86rem; }
.text-button:hover { text-decoration: underline; color: #f5fff8; }
dialog { border: 1px solid #496857; border-radius: 22px; width: min(440px, calc(100% - 28px)); padding: 22px; background: #182c23; color: #edf8f0; }
dialog::backdrop { background: #07110ddc; backdrop-filter: blur(4px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dialog-heading h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.025em; }
.dialog-kicker { margin: 0 0 6px; color: var(--mint); font-size: .85rem; }
.icon-button { display: grid; place-items: center; background: #263f33; color: #d8eddf; border: 1px solid #486254; border-radius: 9px; padding: 8px; }
.viewfinder { margin: 16px 0 0; position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; background: #08140e; overflow: hidden; border-radius: 14px; }
.viewfinder video { width: 100%; height: 100%; position: absolute; object-fit: cover; transform: scaleX(-1); }
.face-frame { position: absolute; width: 54%; height: 76%; border: 2px dashed #b2f4ce; border-radius: 18%; box-shadow: 0 0 0 180px #06140e40; }
.demo-face { display: none; width: 34%; height: 55%; color: var(--mint); stroke-width: 1; }
.viewfinder[data-demo] .demo-face { display: block; }
.status-message { color: #c5dbce; line-height: 1.4; margin: 13px 0; min-height: 1.4em; }
.status-message[data-error] { color: #ffd0b4; }
form, fieldset { display: grid; gap: 13px; }
fieldset { padding: 12px; margin: 0; border: 1px solid #456252; border-radius: 9px; min-width: 0; }
legend { padding: 0 5px; color: var(--mint); }
label { display: grid; gap: 5px; }
input, select { color: #f2f9f4; background: #0f2118; padding: 10px; border: 1px solid #547462; border-radius: 8px; width: 100%; }
.dialog-action { width: 100%; }
.success { text-align: center; display: grid; justify-items: center; align-content: center; gap: 8px; }
.confirmation-icon { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; background: var(--mint); color: #122f21; }
.confirmation-icon svg { width: 37px; height: 37px; stroke-width: 2.4; }
.success h2 { font-size: clamp(1.5rem, 4vw, 2.4rem); margin: 0; letter-spacing: -.035em; overflow-wrap: anywhere; }
.success p { margin: 0; }
.success-action { color: var(--mint); }
.success-time { font-variant-numeric: tabular-nums; font-size: 1.55rem; color: #d0e8d9; }
#employee-access {
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #0d1914;
}
.access-shell { min-height: 100%; }
.access-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  align-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 16px max(18px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: #101e17;
}
.access-header-actions { display: flex; align-items: center; flex: none; gap: 8px; }
.access-countdown { min-width: 3ch; color: var(--mint); font-size: .86rem; font-variant-numeric: tabular-nums; text-align: right; }
.access-content { width: min(100% - 36px, 850px); margin-inline: auto; padding: 22px 0 max(22px, env(safe-area-inset-bottom)); }
.access-content h3 { margin: 0 0 12px; font-size: 1.15rem; }
.access-pin { max-width: 340px; }
.access-roster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: 28px; }
.access-roster section { min-width: 0; }
.access-feedback {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid #62977a;
  border-radius: 10px;
  color: #d0f9df;
  background: #173e29;
}
.access-feedback svg { color: var(--mint); margin-top: 2px; }
.access-feedback span, .access-list span { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.access-list span, .access-muted { color: var(--muted); }
.access-muted { margin: 0 0 12px; line-height: 1.45; }
.access-search-label { margin-bottom: 5px; }
.access-list { list-style: none; margin: 12px 0; padding: 0; }
.access-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.access-list strong { overflow-wrap: anywhere; }
.access-list .mode { flex: none; }
.access-detail { width: min(100%, 500px); display: grid; justify-items: stretch; gap: 14px; }
.access-detail > .text-button { justify-self: start; }
.access-edit { align-items: end; grid-template-columns: minmax(0, 1fr) auto; }
.access-remove-confirm { border: 1px solid #78504a; border-radius: 10px; padding: 12px; }
.access-remove-confirm p { margin: 0 0 12px; line-height: 1.45; }
.access-confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.danger { color: #ffddd7; border-color: #8b5149; background: #442522; }
.danger:hover { background: #63352e; }
@media (max-width: 700px), (max-height: 600px) and (pointer: coarse) {
  #capture {
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: max(14px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  #capture[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 12px; }
  #capture .viewfinder { width: 100%; height: 100%; margin: 0; aspect-ratio: auto; }
  #capture .face-frame { width: min(68%, 32vh); height: min(70%, 46vh); }
  #capture .status-message { margin: 0; }
}
@media (max-width: 700px) {
  .access-roster { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .access-edit { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 780px) {
  .bar { width: calc(100% - 36px); }
  .terminal { min-height: 305px; }
}
@media (max-width: 420px) {
  .bar { min-height: 61px; }
  .brand-logo { width: 91px; }
  .actions { grid-template-columns: 1fr; }
}
