:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #060b14;
  color: #f4f7fb;
  letter-spacing: 0;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #060b14; }
button, input, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.hidden { display: none !important; }
.shell { min-height: 100vh; }
.brandbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid #1d2a3d;
  background: #08111f;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 46px; height: 46px; object-fit: contain; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 15px; }
.brand span { color: #9fb0c8; font-size: 12px; margin-top: 2px; }
.auth-view { display: grid; place-items: center; min-height: calc(100vh - 68px); padding: 24px 16px; }
.auth-panel { width: min(100%, 420px); border: 1px solid #253652; background: #0d1728; padding: 24px; border-radius: 8px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(26px, 7vw, 38px); line-height: 1.08; margin-bottom: 10px; }
h2 { font-size: 22px; }
.eyebrow { color: #38eba0; font-size: 12px; font-weight: 900; margin-bottom: 8px; }
.muted { color: #a5b3c8; line-height: 1.5; }
label { display: block; color: #c7d2e3; font-size: 13px; font-weight: 800; margin: 16px 0; }
input, select {
  display: block;
  width: 100%;
  height: 48px;
  margin-top: 7px;
  padding: 0 13px;
  color: #f5f8fc;
  background: #07101d;
  border: 1px solid #31435f;
  border-radius: 6px;
  outline: none;
}
input:focus, select:focus { border-color: #35e69b; box-shadow: 0 0 0 3px #35e69b22; }
.primary, .quiet, .unlock-button {
  min-height: 46px;
  border: 1px solid #2f4260;
  border-radius: 6px;
  padding: 0 18px;
  font-weight: 900;
}
.primary { width: 100%; background: #31e492; color: #04130d; border-color: #31e492; }
.quiet { background: #111c2d; color: #f4f7fb; }
.message { min-height: 22px; color: #ffbd68; margin: 14px 0 0; font-size: 13px; line-height: 1.4; }
.control-view { width: min(100%, 760px); margin: 0 auto; padding: 20px 16px calc(32px + env(safe-area-inset-bottom)); }
.status-band { display: flex; align-items: center; gap: 12px; border: 1px solid; padding: 14px; border-radius: 8px; }
.status-band.safe { background: #0a241c; border-color: #237653; }
.status-band.danger { background: #2a0d14; border-color: #c7324d; }
.status-light { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto; background: #31e492; box-shadow: 0 0 0 6px #31e4921f; }
.danger .status-light { background: #ff4865; box-shadow: 0 0 0 6px #ff48651f; }
.status-band p { margin: 0 0 2px; color: #aebcd0; font-size: 12px; }
.status-band strong { font-size: 18px; }
.action-zone { padding: 34px 0 24px; }
.panic-button {
  width: 100%;
  min-height: 104px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  text-align: left;
  color: white;
  background: #c51f3b;
  border: 1px solid #ff4966;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 12px 36px #d71f3f2b;
}
.panic-button:disabled { background: #531622; border-color: #7b2735; color: #d4a5ad; cursor: not-allowed; box-shadow: none; }
.panic-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 2px solid white; border-radius: 50%; font-size: 30px; font-weight: 900; }
.panic-button strong, .panic-button small { display: block; }
.panic-button strong { font-size: 19px; }
.panic-button small { margin-top: 4px; font-size: 12px; opacity: .86; }
.incident, .unlock { border-top: 1px solid #27364e; padding: 24px 0; }
.incident h2 { overflow-wrap: anywhere; color: #ff6d84; }
dl { margin: 0; }
dl div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid #1d2a3d; }
dt { color: #8fa1ba; }
dd { margin: 0; overflow-wrap: anywhere; }
.unlock-button { width: 100%; background: #152238; color: #f4f7fb; }
.countdown { text-align: center; padding-top: 16px; }
.countdown strong { display: block; font-size: 54px; color: #ffbd68; }
.countdown span { display: block; color: #aab8cc; margin-bottom: 18px; }
dialog { width: min(calc(100% - 24px), 520px); color: #f4f7fb; background: #0d1728; border: 1px solid #384b68; border-radius: 8px; padding: 22px; }
dialog::backdrop { background: #02050bd9; }
.danger-text { color: #ff617b; }
.dialog-actions { display: grid; gap: 10px; grid-template-columns: 110px minmax(0, 1fr); margin-top: 20px; }
.hold-button { position: relative; min-height: 54px; overflow: hidden; color: white; background: #8d1d31; border: 1px solid #ff516d; border-radius: 6px; padding: 0 12px; touch-action: none; user-select: none; }
.hold-button span { position: absolute; inset: 0 auto 0 0; width: 0; background: #d32443; pointer-events: none; }
.hold-button strong { position: relative; z-index: 1; font-size: 13px; }
@media (min-width: 680px) {
  .control-view { padding-top: 36px; }
  .action-zone { padding-top: 46px; }
}
@media (max-width: 420px) {
  .brandbar { padding-left: 12px; padding-right: 12px; }
  .control-view { padding-left: 12px; padding-right: 12px; }
  .dialog-actions { grid-template-columns: 1fr; }
  dl div { grid-template-columns: 90px minmax(0, 1fr); }
}
