:root {
  color-scheme: light;
  --ink: #10231e;
  --muted: #61736d;
  --cream: #f5f2e9;
  --paper: #fffdf7;
  --green: #0b493b;
  --green-2: #176b54;
  --mint: #bcf2d5;
  --line: #d9dfd9;
  --danger: #b72f36;
  --warning: #a55b0a;
  --shadow: 0 24px 60px rgba(18, 53, 43, .12);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--cream); }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--cream); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button, .button { border: 0; border-radius: 999px; background: var(--green); color: white; padding: .82rem 1.25rem; font-weight: 720; cursor: pointer; transition: transform .15s ease, background .15s ease, opacity .15s ease; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button:hover, .button:hover { transform: translateY(-1px); background: var(--green-2); }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #e8a73c; outline-offset: 3px; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
button.secondary, .button.secondary { color: var(--green); background: transparent; box-shadow: inset 0 0 0 1px var(--green); }
button.danger { background: var(--danger); }
[hidden] { display: none !important; }
.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 clamp(1rem, 4vw, 4rem); border-bottom: 1px solid rgba(11,73,59,.15); }
.brand { color: var(--ink); display: inline-flex; align-items: center; gap: .65rem; font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px 9px 9px 2px; display: grid; place-items: center; background: var(--green); color: white; }
.top-actions { display: flex; align-items: center; gap: 1rem; }
.device-label { color: var(--muted); font-size: .9rem; }
.text-button { background: transparent; color: var(--green); padding: .4rem; }
.text-link { color: var(--green); font-size: .9rem; font-weight: 750; text-decoration: none; }
.monitor-shell { width: min(1500px, 100%); margin: 0 auto; padding: clamp(2rem, 6vw, 6rem) clamp(1rem, 5vw, 5rem); display: grid; grid-template-columns: minmax(280px, .78fr) minmax(480px, 1.22fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.monitor-copy { position: sticky; top: 2rem; }
.eyebrow { margin: 0 0 .85rem; color: var(--green-2); font-size: .75rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
h1 { margin: 0; max-width: 780px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3rem, 7vw, 6.8rem); font-weight: 500; line-height: .93; letter-spacing: -.055em; }
h1 span { color: var(--green-2); font-style: italic; }
.monitor-copy > p:not(.eyebrow, .privacy-note) { max-width: 510px; color: var(--muted); font-size: 1.08rem; line-height: 1.65; }
.access-panel { margin: 2rem 0 1rem; padding: 1.1rem; background: rgba(255,255,255,.58); border: 1px solid var(--line); border-radius: 16px; }
.access-panel label { display: block; margin-bottom: .55rem; font-weight: 750; }
.access-panel p { margin: .75rem 0 0; color: var(--muted); font-size: .88rem; }
.input-row, .button-row { display: flex; align-items: center; gap: .7rem; }
.access-panel input, .auth-card input { min-width: 0; flex: 1; border: 1px solid #b9c5be; border-radius: 12px; background: white; padding: .78rem .9rem; color: var(--ink); }
.consent-row { display: grid; grid-template-columns: 22px 1fr; gap: .75rem; align-items: start; margin: 1.5rem 0; color: #40564f; font-size: .9rem; line-height: 1.48; cursor: pointer; }
.consent-row input { width: 19px; height: 19px; accent-color: var(--green); }
.privacy-note { color: var(--muted); font-size: .82rem; }
.monitor-workspace { min-width: 0; }
.camera-stage { position: relative; width: 100%; overflow: hidden; border-radius: 24px; background: #08130f; box-shadow: var(--shadow); }
.camera-stage video, .camera-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.camera-stage canvas { z-index: 2; }
.live-pill { position: absolute; z-index: 3; top: 16px; left: 16px; display: flex; align-items: center; gap: .45rem; padding: .45rem .72rem; border-radius: 99px; background: rgba(4,18,13,.76); color: white; font-size: .75rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; backdrop-filter: blur(8px); }
.live-pill span { width: 8px; height: 8px; border-radius: 50%; background: #5ce19b; box-shadow: 0 0 0 5px rgba(92,225,155,.18); }
.alert-banner { margin-bottom: .75rem; border-radius: 14px; padding: .9rem 1rem; background: #fee5e4; color: #861b26; font-weight: 800; }
.status-card { display: flex; justify-content: space-between; gap: 1.5rem; margin-top: 1rem; padding: 1.3rem 1.4rem; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 10px 30px rgba(18,53,43,.05); }
.status-card[data-kind="error"] { border-color: #eab8ba; }
.status-card[data-kind="warning"] { border-color: #e7c18e; }
.status-title { margin: 0; font-size: 1.15rem; font-weight: 820; }
.status-card[data-kind="error"] .status-title { color: var(--danger); }
.status-card[data-kind="warning"] .status-title { color: var(--warning); }
.status-detail { margin: .35rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.metrics { display: flex; gap: 1.4rem; margin: 0; flex-shrink: 0; }
.metrics div { min-width: 62px; }
.metrics dt { color: var(--muted); font-size: .7rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.metrics dd { margin: .28rem 0 0; font-variant-numeric: tabular-nums; font-weight: 800; }
.safety-note { margin-top: 1rem; padding: 1rem 1.1rem; border-left: 3px solid #d99532; background: rgba(255,255,255,.42); color: #5f5545; font-size: .84rem; line-height: 1.55; }
.landing-shell { min-height: 100vh; width: min(1500px, 100%); margin: auto; padding: 2rem clamp(1rem, 5vw, 5rem) 4rem; }
.hero { padding: clamp(5rem, 11vw, 10rem) 0; }
.hero-copy { max-width: 680px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.35rem); line-height: 1.65; }
.hero-actions { display: flex; gap: .8rem; margin-top: 2rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.feature-grid article { padding: 2rem 2rem 1rem 0; }
.feature-number { color: var(--green-2); font-size: .72rem; font-weight: 850; }
.feature-grid h2 { font-family: Georgia, serif; font-weight: 500; font-size: 1.6rem; }
.feature-grid p { color: var(--muted); line-height: 1.55; }
.operator-link { margin-top: 2rem; font-size: .82rem; }
.operator-link a { color: var(--muted); }
.account-shell { width: min(1280px, 100%); margin: auto; padding: clamp(2.5rem, 7vw, 6rem) clamp(1rem, 5vw, 5rem); display: grid; grid-template-columns: minmax(280px, .8fr) minmax(520px, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.account-intro > p:not(.eyebrow) { max-width: 520px; color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.auth-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 1rem; }
.auth-card { display: flex; flex-direction: column; gap: .7rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 12px 35px rgba(18,53,43,.06); }
.auth-card h2 { margin: 0; font-family: Georgia, serif; font-size: 1.8rem; font-weight: 500; }
.auth-card > p { margin: 0 0 .5rem; min-height: 2.8rem; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.auth-card label { margin-top: .25rem; font-size: .82rem; font-weight: 750; }
.auth-card input { width: 100%; }
.credential-fields { display: flex; flex-direction: column; gap: .7rem; }
.credential-fields label { margin-top: .25rem; }
.auth-card button { width: 100%; margin-top: .5rem; }
.auth-card .form-status { min-height: 2.5rem; margin: .25rem 0 0; color: var(--danger); }
.face-enrollment { margin-top: .45rem; padding: .75rem; border: 1px solid var(--line); border-radius: 14px; background: #f1f4ef; }
.face-enrollment video, .face-enrollment canvas { display: block; width: 100%; max-height: 320px; border-radius: 10px; background: #07130d; object-fit: contain; transform: scaleX(-1); }
.face-actions { display: flex; gap: .55rem; margin-top: .7rem; }
.face-actions button { flex: 1; margin-top: 0; }
.face-status { min-height: 0 !important; margin: .65rem 0 0 !important; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.biometric-consent { margin: .6rem 0 0; }
.admin-shell { width: min(1500px, 100%); margin: auto; padding: 3rem clamp(1rem, 4vw, 4rem); }
.admin-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 2rem; }
.admin-heading h1 { font-size: clamp(2.6rem, 5vw, 4.6rem); }
.admin-status { color: var(--muted); font-size: .82rem; text-align: right; }
.admin-access { max-width: 600px; }
.table-panel { margin: 1rem 0 1.5rem; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; font-family: Georgia, serif; font-weight: 500; }
.panel-heading p { margin: 0; color: var(--muted); font-size: .82rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th { color: var(--muted); text-align: left; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
th, td { padding: .85rem 1rem; border-bottom: 1px solid #e7ebe6; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; border-radius: 99px; padding: .26rem .55rem; background: #e6ebe7; font-size: .7rem; font-weight: 850; text-transform: uppercase; }
.badge.fall { color: #8c1721; background: #fee5e4; }
.badge.online { color: #075838; background: #d8f5e6; }
.empty { padding: 2rem; color: var(--muted); text-align: center; }
@media (max-width: 900px) {
  .monitor-shell { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .account-shell { grid-template-columns: 1fr; }
  .monitor-copy { position: static; }
  .monitor-copy h1 { font-size: clamp(3.2rem, 14vw, 5.5rem); }
  .feature-grid { grid-template-columns: 1fr; }
  .status-card { flex-direction: column; }
  .admin-heading { align-items: start; flex-direction: column; }
  .admin-status { text-align: left; }
}
@media (max-width: 520px) {
  .topbar { min-height: 62px; }
  .device-label { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .input-row, .button-row, .hero-actions { align-items: stretch; flex-direction: column; }
  .metrics { justify-content: space-between; }
  .panel-heading { align-items: start; flex-direction: column; }
  .auth-grid { grid-template-columns: 1fr; }
  .top-actions { gap: .55rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
