:root {
  color-scheme: dark;
  --bg: #05070b;
  --panel: rgba(10, 16, 24, 0.82);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #eff4fb;
  --muted: #9caec8;
  --accent: #41c3ff;
  --success: #39d98a;
  --danger: #ff6b81;
  --warning: #ffcc66;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: Tahoma, Arial, sans-serif; min-height: 100%; }
a { color: inherit; }
.login-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at top, #112033, #05070b 55%);
  padding: 24px;
}
.login-card {
  width: min(100%, 520px); background: var(--panel); border: 1px solid var(--panel-border); backdrop-filter: blur(12px);
  border-radius: 24px; padding: 28px; box-shadow: 0 20px 70px rgba(0,0,0,.45);
}
.login-brand { color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.login-subtitle { color: var(--muted); line-height: 1.8; margin-bottom: 18px; }
.login-form { display: grid; gap: 10px; }
.login-form label { font-size: 14px; color: #dbe7ff; }
.login-form input {
  width: 100%; min-height: 46px; border-radius: 14px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04);
  color: #fff; padding: 10px 14px; outline: none;
}
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.primary-btn {
  margin-top: 8px; min-height: 48px; border: 0; border-radius: 16px; cursor: pointer; color: #04131c;
  background: linear-gradient(135deg, #7fe7ff, #41c3ff); font-weight: 700;
}
.alert.error, .field-error { color: #ffb4be; font-size: 13px; }
.login-help { margin-top: 14px; display: flex; gap: 8px; align-items: center; color: var(--muted); }
.login-help code { direction: ltr; background: rgba(255,255,255,.07); padding: 3px 8px; border-radius: 999px; }

.kiosk-shell {
  position: relative; display: grid; grid-template-columns: minmax(0, 2fr) minmax(360px, .9fr); grid-template-rows: 1fr auto;
  min-height: 100vh; overflow: hidden;
}
.screen-layer { position: absolute; inset: 0; z-index: 0; }
.screen-black, .screen-clock, .screen-slides {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
}
.screen-clock { flex-direction: column; gap: 12px; background: linear-gradient(180deg, rgba(0,0,0,.85), rgba(10,16,24,.55)); }
.clock-time { font-size: clamp(48px, 8vw, 120px); font-weight: 700; letter-spacing: 2px; }
.clock-date { font-size: clamp(18px, 2vw, 30px); color: var(--muted); }
.screen-slides { background-size: cover; background-position: center; }
.camera-stage { position: relative; z-index: 1; min-height: 70vh; padding: 18px; }
#cameraFeed {
  width: 100%; height: calc(100vh - 150px); object-fit: cover; border-radius: 28px;
  border: 1px solid rgba(255,255,255,.08); background: #000; transform: scaleX(-1);
}
.camera-mask { position: absolute; inset: 18px; pointer-events: none; display: flex; align-items: center; justify-content: center; }
.face-guide {
  width: min(56vw, 420px); height: min(72vh, 520px); border-radius: 50% / 45%; border: 4px solid rgba(255,255,255,.92);
  box-shadow: 0 0 0 9999px rgba(0,0,0,.54), 0 0 40px rgba(65,195,255,.24);
}
.face-center-dot { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,.8); }
.processing-chip {
  position: absolute; top: 36px; right: 36px; background: rgba(2, 8, 14, 0.8); border: 1px solid rgba(255,255,255,.08); padding: 10px 14px;
  border-radius: 999px; font-size: 14px; backdrop-filter: blur(8px);
}
.result-panel { z-index: 1; padding: 18px 18px 0 0; display: flex; flex-direction: column; gap: 16px; }
.panel-card {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: 24px; padding: 18px; backdrop-filter: blur(14px);
}
.status-card { display: grid; gap: 16px; }
.status-visual { min-height: 190px; border-radius: 20px; background: rgba(255,255,255,.04); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.status-visual img { width: 100%; height: 190px; object-fit: contain; }
.status-texts h2 { margin: 0 0 8px; }
.status-texts p { margin: 0; color: var(--muted); line-height: 1.8; }
.compare-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.compare-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.compare-grid figure { margin: 0; }
.compare-grid figcaption { margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.compare-grid img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 18px; background: rgba(255,255,255,.05); }
.compare-meta { margin-top: 12px; color: var(--muted); line-height: 1.8; }
.badge { border-radius: 999px; padding: 6px 10px; font-size: 12px; }
.badge.neutral { background: rgba(255,255,255,.08); }
.badge.success { background: rgba(57,217,138,.15); color: #96f3bf; }
.badge.danger { background: rgba(255,107,129,.15); color: #ffb6c1; }
.footer-strip {
  z-index: 1; grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 12px 18px 18px; border-top: 1px solid rgba(255,255,255,.06); background: linear-gradient(180deg, rgba(5,7,11,0), rgba(5,7,11,.84));
}
.device-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; color: var(--muted); }
.recent-users-panel { min-width: min(100%, 620px); }
.recent-title { margin-bottom: 10px; color: #d9e9ff; }
.recent-users { display: flex; gap: 10px; overflow: auto; }
.recent-user {
  min-width: 120px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); border-radius: 18px; padding: 10px; text-align: center;
}
.recent-user img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 8px; background: rgba(255,255,255,.05); }
.recent-user .name { font-size: 13px; }
.recent-user .time { font-size: 12px; color: var(--muted); margin-top: 4px; }

@media (max-width: 1080px) {
  .kiosk-shell { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
  .result-panel { padding: 0 18px; }
  #cameraFeed { height: 58vh; }
  .footer-strip { flex-direction: column; align-items: stretch; }
  .recent-users-panel { min-width: 0; }
}
@media (max-width: 640px) {
  .grid-2, .compare-grid { grid-template-columns: 1fr; }
  .camera-stage { padding: 12px; }
  .camera-mask { inset: 12px; }
  .face-guide { width: 70vw; height: 52vh; }
  .processing-chip { top: 26px; right: 24px; }
}
