:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: #07111f;
  color: #e8eef8;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 30% 0%, #142b48, #07111f 45%); }
a { color: inherit; text-decoration: none; }
nav { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem max(1.5rem, calc((100vw - 1100px) / 2)); border-bottom: 1px solid #29405c; }
nav .links { display: flex; gap: 1rem; color: #b9c8dc; }
nav .brand { font-weight: 750; letter-spacing: .02em; }
main { width: min(1100px, calc(100% - 2rem)); margin: 3rem auto; }
h1 { margin: 0 0 .7rem; font-size: clamp(2rem, 5vw, 3.8rem); line-height: 1.05; }
.lede { color: #aabbd0; max-width: 680px; font-size: 1.1rem; line-height: 1.65; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.card, .panel { background: #0d1c2dcc; border: 1px solid #29405c; border-radius: 16px; padding: 1.4rem; box-shadow: 0 20px 50px #0005; }
.card:hover { border-color: #48b9ff; transform: translateY(-2px); }
.card { transition: .2s ease; }
.card p, .muted { color: #9eafc4; }
.grid { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 1.2rem; align-items: start; }
label { display: block; margin: 1rem 0 .4rem; color: #c7d4e5; }
input, button { font: inherit; }
input[type="text"], input[type="file"] { width: 100%; border: 1px solid #38516e; border-radius: 10px; padding: .8rem; background: #081522; color: #e8eef8; }
button, .button { display: inline-block; border: 0; border-radius: 10px; padding: .75rem 1rem; background: #2aa8f2; color: #04101b; font-weight: 750; cursor: pointer; }
button:hover, .button:hover { background: #69c8ff; }
button:disabled { opacity: .55; cursor: wait; }
.danger { background: #5f2833; color: #ffd7dd; padding: .45rem .7rem; }
.people-list { display: grid; gap: .7rem; }
.person { display: flex; align-items: center; justify-content: space-between; background: #0a1725; border-radius: 10px; padding: .8rem 1rem; }
.status { min-height: 1.5rem; margin-top: 1rem; color: #7ed0ff; }
.error { color: #ff9aa9; }
.camera-shell { position: relative; width: min(100%, 900px); overflow: hidden; border: 1px solid #29405c; border-radius: 16px; background: #02060b; aspect-ratio: 4 / 3; }
.camera-shell video, .camera-shell canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.camera-shell canvas { pointer-events: none; }
.controls { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin: 1rem 0; }
.controls label { margin: 0; }
input[type="range"] { vertical-align: middle; }
.badge { display: inline-block; background: #17304b; padding: .25rem .55rem; border-radius: 999px; color: #8fd6ff; }
.enroll-camera { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid #38516e; border-radius: 12px; background: #02060b; }
.enroll-camera video { width: 100%; height: 100%; object-fit: cover; }
.camera-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: #8294aa; background: #081522; }
.camera-placeholder[hidden] { display: none; }
.snapshot-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin: .75rem 0; }
.snapshots { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
.snapshot { position: relative; overflow: hidden; border: 1px solid #38516e; border-radius: 10px; aspect-ratio: 1; }
.snapshot img { width: 100%; height: 100%; object-fit: cover; }
.snapshot button { position: absolute; top: .3rem; right: .3rem; width: 1.8rem; height: 1.8rem; padding: 0; border-radius: 50%; background: #7b2939; color: white; }
.divider { display: flex; align-items: center; gap: .7rem; margin: 1.2rem 0 .3rem; color: #7f91a7; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: #29405c; }

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  nav { align-items: flex-start; gap: .8rem; }
  main { margin-top: 2rem; }
}
