:root {
  color: #f7f8fb;
  background: #090b10;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 15% 0%, #1a2130 0, #090b10 40%); }
button, input, select { font: inherit; }

.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0 64px; }
.login-view { min-height: calc(100vh - 112px); display: grid; place-items: center; }
.login-card { width: min(430px, 100%); padding: 30px; border: 1px solid #2b3241; border-radius: 18px; background: rgba(19, 22, 30, .94); box-shadow: 0 24px 90px rgba(0, 0, 0, .42); }
.login-card h1 { font-size: 32px; }
.login-copy { margin: 10px 0 24px; color: #9ca5b6; line-height: 1.5; }
.login-card label { display: block; margin-bottom: 16px; }
.login-card .primary-button { width: 100%; margin-top: 4px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.eyebrow { margin: 0 0 10px; color: #7fa8ff; font-size: 12px; font-weight: 750; letter-spacing: .14em; }
h1 { margin: 0; font-size: clamp(32px, 5vw, 52px); letter-spacing: -.04em; }
.subtitle { max-width: 700px; margin: 12px 0 0; color: #aab1c0; line-height: 1.55; }
.status-pill { padding: 9px 13px; border: 1px solid #394258; border-radius: 999px; color: #c8d0e2; background: #151923; font-size: 13px; white-space: nowrap; }
.status-pill[data-ready="true"] { border-color: #205d4a; color: #8de1bc; background: #10231d; }

.panel { margin-bottom: 18px; padding: 22px; border: 1px solid #252a36; border-radius: 16px; background: rgba(19, 22, 30, .88); box-shadow: 0 18px 70px rgba(0, 0, 0, .22); }
.panel-heading h2 { margin: 0 0 5px; font-size: 18px; }
.panel-heading p { margin: 0 0 18px; color: #8f97a8; font-size: 14px; }
.camera-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.camera-form > label { min-width: 0; }
.camera-form > .primary-button { width: 100%; }
[hidden] { display: none !important; }
label span { display: block; margin: 0 0 7px; color: #bec5d2; font-size: 12px; font-weight: 650; }
input, select { width: 100%; height: 43px; border: 1px solid #333a4b; border-radius: 9px; outline: none; color: #f5f7fb; background: #0d1016; padding: 0 12px; }
input:focus, select:focus { border-color: #638ff0; box-shadow: 0 0 0 3px rgba(99, 143, 240, .14); }
.primary-button { height: 43px; border: 0; border-radius: 9px; padding: 0 18px; color: #07101f; background: #83aaff; font-weight: 750; cursor: pointer; white-space: nowrap; }
.primary-button:disabled { opacity: .6; cursor: wait; }
.secondary-button { height: 38px; border: 1px solid #394258; border-radius: 9px; padding: 0 13px; color: #d9dfeb; background: #151923; cursor: pointer; }
.secondary-button:hover { border-color: #65718a; }
.message { min-height: 20px; margin: 14px 0 0; color: #aab1c0; font-size: 13px; }
.message[data-kind="error"] { color: #ff9898; }
.message[data-kind="success"] { color: #83ddb4; }

.player-card { position: relative; min-height: 360px; overflow: hidden; border: 1px solid #252a36; border-radius: 16px; background: #000; }
.player-root { width: 100%; min-height: 360px; }
.player-placeholder { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; color: #737b8c; background: linear-gradient(135deg, #0b0e14, #111620); }
.player-placeholder[hidden] { display: none; }
.camera-icon { width: 56px; height: 38px; border: 2px solid #4b5364; border-radius: 9px; position: relative; }
.camera-icon::after { content: ""; position: absolute; right: -16px; top: 8px; width: 14px; height: 18px; border: 2px solid #4b5364; border-left: 0; border-radius: 0 6px 6px 0; }

@media (max-width: 950px) {
  .camera-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .shell { width: min(100% - 20px, 1180px); padding-top: 24px; }
  .page-header { display: block; }
  .header-actions { margin-top: 18px; }
  .camera-form { grid-template-columns: 1fr 1fr; }
  .camera-form > label, .primary-button { grid-column: 1 / -1; }
  .player-card, .player-root { min-height: 240px; }
}
