@import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Montserrat:wght@600;700;800&family=Poppins:wght@400;500;600;700&display=swap");
:root {
  --brand: #0f2747;
  --red: #d92d20;
  --red-dark: #b42318;
  --white: #fff;
  --soft: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --border: #e2e8f0;
  --green: #15803d;
  --amber: #b45309;
  --blue: #2563eb;
  --grey: #6b7280;
  --purple: #7c3aed;
  --shadow: 0 12px 35px rgba(15, 39, 71, 0.09);
}
* {
  box-sizing: border-box;
}
html {
  background: var(--soft);
}
body {
  margin: 0;
  background: var(--soft);
  color: var(--text);
  font-family: Lato, system-ui, sans-serif;
  line-height: 1.5;
}
.hidden {
  display: none !important;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}
h1,
h2,
h3,
h4 {
  font-family: Montserrat, sans-serif;
  margin: 0;
  color: var(--text);
}
.eyebrow {
  font-family: Poppins, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.875rem;
}
.danger-text {
  color: var(--red);
}
.success-text {
  color: var(--green);
}
.btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-family: Poppins, sans-serif;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.15s ease;
}
.btn:focus-visible,
.icon-btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-outline {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn-danger:hover {
  background: var(--red-dark);
}
.btn-success {
  background: var(--green);
  color: #fff;
}
.btn-wide {
  width: 100%;
}
.btn-sm {
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 0.875rem;
}
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.form-grid {
  display: grid;
  gap: 16px;
}
.field {
  display: grid;
  gap: 7px;
}
.field label {
  font-family: Poppins, sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 13px;
  background: #fff;
  color: var(--text);
}
.field textarea {
  min-height: 100px;
  resize: vertical;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.notice {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}
.notice.error {
  border-color: #fecaca;
  background: #fff7f7;
  color: #991b1b;
}
.notice.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}
.notice.warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}
.auth-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}
.auth-card {
  width: min(500px, 100%);
  padding: 28px;
}
.auth-logo {
  max-width: 190px;
  max-height: 54px;
  display: block;
  margin-bottom: 24px;
}
.auth-card h1 {
  font-size: 1.8rem;
}
.auth-card .intro {
  margin: 8px 0 22px;
  color: var(--muted);
}
.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  font-family: Poppins, sans-serif;
  font-size: 0.9rem;
}
.auth-links a {
  color: var(--brand);
  font-weight: 600;
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 70px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}
.brand-logo {
  max-width: 170px;
  max-height: 42px;
  display: block;
}
.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: 1.35rem;
  cursor: pointer;
}
.mobile-drawer {
  position: fixed;
  z-index: 60;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(330px, 88vw);
  background: #fff;
  transform: translateX(102%);
  transition: 0.2s ease;
  padding: 18px;
  display: flex;
  flex-direction: column;
}
.mobile-drawer.open {
  transform: none;
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 50;
  display: none;
}
.drawer-backdrop.show {
  display: block;
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.drawer-logo {
  max-width: 170px;
  max-height: 42px;
}
.mobile-drawer nav {
  display: grid;
  gap: 6px;
  padding: 18px 0;
}
.mobile-drawer nav a {
  padding: 12px;
  border-radius: 10px;
  font-family: Poppins, sans-serif;
}
.mobile-drawer nav a.active {
  background: #f1f5f9;
  color: var(--brand);
  font-weight: 700;
}
.drawer-user {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}
.household-main {
  padding: 24px 0 104px;
}
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
.protection-card {
  padding: 18px;
}
.protection-title {
  font-family: Poppins, sans-serif;
  font-weight: 600;
}
.address {
  font-size: 1.05rem;
  margin-top: 5px;
}
.protection-status {
  display: inline-flex;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #166534;
  font-family: Poppins, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
}
.panic-panel {
  min-height: 430px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.panic-panel h1 {
  font-size: 1.8rem;
  margin-bottom: 6px;
}
.panic-helper {
  color: var(--muted);
  margin: 0 0 24px;
}
.panic-button-wrap {
  position: relative;
  width: 250px;
  height: 250px;
}
.panic-button {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 0;
  background: var(--red);
  color: #fff;
  font-family: Poppins, sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 16px 35px rgba(217, 45, 32, 0.25);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.panic-button.pressing {
  background: var(--red-dark);
  transform: scale(0.985);
}
.hold-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    var(--red-dark) calc(var(--progress, 0) * 1%),
    #fee2e2 0
  );
  mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 0);
  -webkit-mask: radial-gradient(
    farthest-side,
    transparent calc(100% - 9px),
    #000 0
  );
}
.panic-state {
  min-height: 26px;
  margin-top: 18px;
  font-family: Poppins, sans-serif;
  font-weight: 600;
}
.secondary-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 24px;
  width: 100%;
}
.secondary-actions .btn {
  min-height: 52px;
}
.test-btn {
  border: 1px solid #c4b5fd;
  color: #5b21b6;
  background: #faf5ff;
}
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 35;
  background: #fff;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 7px max(8px, env(safe-area-inset-right))
    calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
}
.bottom-nav a {
  display: grid;
  place-items: center;
  gap: 2px;
  color: var(--muted);
  font-family: Poppins, sans-serif;
}
.bottom-nav a span {
  font-size: 1.3rem;
}
.bottom-nav a.active {
  color: var(--brand);
  font-weight: 700;
}
.page-card {
  padding: 20px;
}
.page-title {
  margin-bottom: 18px;
}
.list {
  display: grid;
  gap: 10px;
}
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 6px 9px;
  font-family: Poppins, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
}
.status-danger {
  background: #fee2e2;
  color: #991b1b;
}
.status-warn {
  background: #fef3c7;
  color: #92400e;
}
.status-info {
  background: #dbeafe;
  color: #1d4ed8;
}
.status-success {
  background: #dcfce7;
  color: #166534;
}
.status-neutral {
  background: #f3f4f6;
  color: #4b5563;
}
.status-test {
  background: #ede9fe;
  color: #5b21b6;
}
.timeline {
  display: grid;
  gap: 0;
}
.timeline-item {
  position: relative;
  padding: 0 0 18px 28px;
}
.timeline-item:before {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 9px;
  height: 9px;
  background: var(--brand);
  border-radius: 50%;
}
.timeline-item:not(:last-child):after {
  content: "";
  position: absolute;
  left: 11px;
  top: 18px;
  bottom: -2px;
  width: 1px;
  background: var(--border);
}
.staff-body {
  background: #eef2f6;
}
.staff-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 250px;
  background: #0c1e36;
  color: #fff;
  padding: 18px;
  z-index: 60;
  display: flex;
  flex-direction: column;
}
.staff-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.staff-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 3px;
}
.staff-brand strong {
  font-family: Montserrat, sans-serif;
}
.staff-sidebar nav {
  display: grid;
  gap: 6px;
  padding: 20px 0;
}
.staff-sidebar nav a,
.staff-logout {
  padding: 11px 12px;
  border-radius: 10px;
  font-family: Poppins, sans-serif;
  color: #dbeafe;
}
.staff-sidebar nav a.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 700;
}
.staff-logout {
  margin-top: auto;
}
.staff-shell {
  margin-left: 250px;
  min-height: 100vh;
}
.staff-topbar {
  height: 70px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 25;
}
.staff-topbar > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.staff-topbar h1 {
  font-size: 1.25rem;
}
.staff-menu-btn {
  display: none;
}
.staff-top-actions {
  font-family: Poppins, sans-serif;
  font-size: 0.88rem;
}
.connection-pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-weight: 700;
}
.staff-content {
  padding: 20px;
}
.live-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(520px, 1.5fr);
  gap: 16px;
  min-height: calc(100vh - 110px);
}
.queue-panel,
.map-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.panel-head {
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.queue-list {
  display: grid;
  max-height: calc(100vh - 190px);
  overflow: auto;
}
.incident-row {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 7px;
  cursor: pointer;
}
.incident-row:hover {
  background: #f8fafc;
}
.incident-row.new {
  border-left: 5px solid var(--red);
  background: #fff7f7;
}
.incident-row.test {
  border-left: 5px solid var(--purple);
  background: #faf5ff;
}
.incident-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.incident-ref {
  font-family: Montserrat, sans-serif;
  font-weight: 800;
}
.incident-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.86rem;
}
.alert-count {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-family: Poppins, sans-serif;
  font-weight: 700;
}
.start-shift {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: Poppins, sans-serif;
  font-weight: 700;
  cursor: pointer;
}
.map-canvas {
  height: calc(100vh - 155px);
  min-height: 500px;
  background: #e2e8f0;
}
.map-legend {
  position: absolute;
  z-index: 500;
  background: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin: 10px;
  font-size: 0.8rem;
}
.map-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
}
.map-dot.normal {
  background: var(--brand);
}
.map-dot.panic {
  background: var(--red);
}
.map-dot.test {
  background: var(--purple);
}
.staff-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
.stat-card strong {
  display: block;
  font-family: Montserrat, sans-serif;
  font-size: 1.65rem;
  margin-top: 4px;
}
.table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
th {
  font-family: Poppins, sans-serif;
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: #f8fafc;
}
.incident-detail-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
}
.detail-stack {
  display: grid;
  gap: 16px;
}
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.mini-map {
  height: 320px;
  border-radius: 12px;
  overflow: hidden;
  background: #e2e8f0;
}
.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
}
.kv span:first-child {
  color: var(--muted);
}
.install-sheet {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 80;
  max-width: 520px;
  margin: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
  padding: 18px;
}
.install-sheet h3 {
  margin-bottom: 6px;
}
.install-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 94px;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-family: Poppins, sans-serif;
  font-size: 0.85rem;
  box-shadow: var(--shadow);
}
@media (max-width: 960px) {
  .staff-sidebar {
    transform: translateX(-102%);
    transition: 0.2s;
  }
  .staff-sidebar.open {
    transform: none;
  }
  .staff-shell {
    margin-left: 0;
  }
  .staff-menu-btn {
    display: inline-flex;
    border: 0;
    background: transparent;
    font-size: 1.3rem;
  }
  .live-grid {
    grid-template-columns: 1fr;
  }
  .map-canvas {
    height: 520px;
  }
  .incident-detail-grid {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .container {
    width: min(100% - 22px, 1120px);
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .panic-panel {
    padding: 20px;
    min-height: 430px;
  }
  .panic-button-wrap {
    width: 228px;
    height: 228px;
  }
  .secondary-actions {
    grid-template-columns: 1fr;
  }
  .app-header {
    height: 64px;
  }
  .brand-logo {
    max-width: 150px;
  }
  .staff-content {
    padding: 12px;
  }
  .staff-topbar {
    padding: 0 12px;
  }
  .staff-name {
    display: none;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .action-grid {
    grid-template-columns: 1fr;
  }
  .kv {
    grid-template-columns: 1fr;
  }
  .map-canvas {
    min-height: 420px;
  }
  .auth-card {
    padding: 22px;
  }
  .list-item {
    align-items: flex-start;
    flex-direction: column;
  }
}
.location-results {
  display: grid;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.location-results:empty {
  border: 0;
}
.location-option {
  border: 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}
.location-option:last-child {
  border-bottom: 0;
}
.location-option:hover {
  background: #f8fafc;
}

.map-status {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 550;
  max-width: min(420px, calc(100% - 32px));
  padding: 11px 14px;
  border-radius: 10px;
  font-family: Poppins, sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow);
  background: #fff;
  color: var(--charcoal);
  border: 1px solid var(--border);
}
.map-status.loading {
  background: #fff;
  color: #475569;
}
.map-status.info {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.map-status.error {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}
.map-status[hidden] {
  display: none !important;
}

/* TCP Protectors — shared product design system */
:root {
  --brand: #00022e;
  --navy: #00022e;
  --gold: #8a681f;
  --gold-light: #c7a45b;
  --soft: #f4f5f9;
  --border: #e5e7ef;
  --shadow: 0 16px 48px rgba(0, 2, 46, 0.08);
}
[data-lucide],
.lucide {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
  stroke-width: 1.8;
}
.btn {
  gap: 9px;
  transition:
    background 0.18s,
    box-shadow 0.18s,
    transform 0.18s;
}
.btn:hover {
  box-shadow: 0 6px 18px rgba(0, 2, 46, 0.12);
}
.btn:active {
  transform: translateY(1px);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
}
.card,
.staff-card,
.stat-card,
.table-wrap {
  box-shadow: 0 5px 24px rgba(0, 2, 46, 0.035);
  border-color: var(--border);
  border-radius: 20px;
}
.eyebrow {
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
}
.btn-primary {
  background: var(--brand);
}
.field input,
.field select,
.field textarea {
  min-height: 48px;
  background: #fbfbfd;
  transition: border-color 0.18s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
}
.page-title {
  letter-spacing: -0.04em;
}
.status {
  letter-spacing: 0.02em;
}
.notice {
  line-height: 1.6;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
}
.app-header {
  padding-inline: max(20px, calc((100% - 1080px) / 2));
  height: 80px;
  background: var(--navy);
  border-bottom: 1px solid #242543;
}
.app-header .icon-btn {
  background: #151738;
  color: #e9d6ad;
  border-color: #363752;
}
.brand-logo {
  max-width: 220px;
  max-height: 48px;
}
.household-main {
  padding-top: 32px;
}
.home-grid {
  max-width: 920px;
  gap: 22px;
}
.welcome-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.welcome-heading h1 {
  font-size: clamp(1.6rem, 4vw, 2rem);
  letter-spacing: -0.05em;
  margin-top: 6px;
}
.welcome-heading p {
  margin: 7px 0 0;
}
.welcome-heading .btn {
  font-size: 0.8rem;
}
.protection-card {
  position: relative;
  padding: 24px 24px 24px 84px;
  background: linear-gradient(120deg, #00022e, #151743);
  color: white;
  border: 0;
}
.protection-card .eyebrow {
  color: #d2b777;
}
.property-symbol {
  position: absolute;
  top: 27px;
  left: 23px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #71603a;
  border-radius: 14px;
  color: #e0c68e;
}
.property-symbol .lucide {
  width: 24px;
  height: 24px;
}
.protection-title {
  font-size: 1.2rem;
  margin-top: 4px;
}
.protection-card .address {
  color: #c5c7dc;
  font-size: 0.95rem;
}
.protection-status {
  position: absolute;
  right: 24px;
  top: 20px;
  background: #242c3d;
  color: #d7ebdd;
  font-size: 0.7rem;
}
.panic-panel {
  padding: 32px;
  min-height: 460px;
  background: radial-gradient(ellipse at center, #fff 45%, #fcf9f3 100%);
}
.panic-panel h1 {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  letter-spacing: -0.04em;
  margin-top: 8px;
}
.panic-helper {
  max-width: 420px;
  font-size: 0.96rem;
}
.panic-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: radial-gradient(circle at 35% 20%, #e94b40, #d92d20 65%);
  box-shadow:
    0 0 0 12px #fff1ef,
    0 18px 40px #d92d2028;
  font-size: 1.12rem;
}
.panic-button .lucide {
  width: 32px;
  height: 32px;
  stroke-width: 1.7;
}
.hold-ring {
  z-index: 1;
  pointer-events: none;
}
.panic-state {
  font-size: 0.86rem;
}
.secondary-actions {
  max-width: 700px;
}
.secondary-actions .btn {
  font-size: 0.8rem;
  gap: 7px;
}
.home-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.shortcut {
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.shortcut > .lucide:first-child {
  color: var(--gold);
  width: 25px;
  height: 25px;
}
.shortcut > .lucide:last-child {
  margin-left: auto;
  color: var(--muted);
}
.shortcut strong {
  font-family: Poppins, sans-serif;
  font-size: 0.88rem;
}
.shortcut p {
  margin: 5px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.bottom-nav {
  max-width: 640px;
  margin: auto;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 30px #00022e08;
  padding-top: 12px;
}
.bottom-nav a {
  min-height: 46px;
  gap: 5px;
}
.bottom-nav a.active {
  color: var(--gold);
}
.mobile-drawer nav a,
.staff-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
}
.staff-sidebar {
  background: var(--navy);
  width: 250px;
  padding: 26px 16px;
}
.staff-brand {
  display: block;
  padding: 0 10px 26px;
}
.staff-logo {
  width: 210px;
  height: auto;
  max-height: 60px;
  background: transparent;
  padding: 0;
  border-radius: 0;
}
.staff-brand strong {
  display: block;
  margin: 14px 0 0;
  color: #bfc0d4;
  font-family: Poppins, sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.staff-sidebar nav {
  gap: 7px;
}
.staff-sidebar nav a {
  color: #b8b9d0;
  font-size: 0.79rem;
  padding: 13px 15px;
}
.staff-sidebar nav a:hover {
  background: #151738;
  color: #fff;
}
.staff-sidebar nav a.active {
  background: #2a2632;
  color: #e9d2a0;
  border-left: 3px solid var(--gold-light);
  padding-left: 12px;
}
.staff-logout {
  font-size: 0.8rem;
  color: #b8b9d0;
  border-top: 1px solid #252646;
  border-radius: 0;
  padding-top: 20px;
}
.staff-topbar {
  height: 82px;
}
.staff-topbar h1 {
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}
.connection-pill {
  font-size: 0.7rem;
}
.connection-pill:before {
  content: "";
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  margin-right: 7px;
  align-self: center;
}
.workspace-clock {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.75rem;
}
.staff-name {
  font-size: 0.78rem;
  padding-left: 15px;
  border-left: 1px solid var(--border);
}
.staff-content {
  padding: 26px;
}
.workspace-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.workspace-intro h2 {
  font-size: 1.55rem;
  letter-spacing: -0.04em;
  margin-top: 7px;
}
.workspace-intro p {
  margin: 6px 0 0;
  font-size: 0.9rem;
}
.workspace-summary {
  display: flex;
  gap: 28px;
}
.workspace-summary span {
  display: flex;
  flex-direction: column;
  font-size: 0.7rem;
  color: var(--muted);
  gap: 5px;
}
.workspace-summary strong {
  font-family: Montserrat, sans-serif;
  font-size: 1.2rem;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.workspace-summary span:last-child strong {
  font-size: 0.85rem;
  padding-top: 5px;
}
.live-grid {
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.4fr);
  min-height: 580px;
  gap: 22px;
}
.panel-head {
  padding: 20px;
  min-height: 86px;
}
.panel-head strong {
  font-family: Poppins, sans-serif;
  font-size: 0.85rem;
}
.panel-head strong .lucide {
  color: var(--gold);
  margin-right: 5px;
}
.panel-head .small {
  font-size: 0.74rem;
  margin-top: 4px;
}
.start-shift {
  background: #fbf7ed;
  color: #72531b;
  border-color: #e5d8ba;
  font-size: 0.67rem;
  padding: 8px;
  max-width: 145px;
}
.alert-count {
  font-size: 0.8rem;
  min-width: 28px;
  height: 28px;
}
.queue-list {
  max-height: calc(100vh - 320px);
}
.incident-row {
  padding: 20px;
  gap: 11px;
  transition: background 0.15s;
}
.incident-row strong {
  font-size: 0.9rem;
}
.incident-ref {
  font-size: 0.82rem;
}
.incident-meta {
  font-size: 0.79rem;
}
.queue-empty {
  padding: 70px 24px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 16px;
}
.queue-empty > .lucide {
  width: 44px;
  height: 44px;
  padding: 8px;
  color: var(--gold);
  background: #f8f3e8;
  border-radius: 14px;
}
.queue-empty strong {
  font-family: Montserrat, sans-serif;
  font-size: 1rem;
}
.queue-empty p {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0;
}
.map-canvas {
  height: calc(100vh - 290px);
  min-height: 490px;
  background: #e8eae6;
}
.map-legend {
  display: flex;
  gap: 14px;
  right: 10px;
  bottom: 26px;
  font-family: Poppins, sans-serif;
  font-size: 0.65rem;
  padding: 12px 16px;
  border: 1px solid var(--border);
}
.map-status {
  font-size: 0.8rem;
  max-width: calc(100% - 40px);
}
.map-status[hidden] {
  display: none !important;
}
.leaflet-container {
  background: #e8eae6 !important;
}
.leaflet-tile-container {
  will-change: transform;
}
.leaflet-control-zoom a {
  color: var(--navy) !important;
}
.table-wrap th {
  background: #f7f7fb;
  padding: 16px;
}
.table-wrap td {
  padding: 16px 14px;
}
.stat-card {
  border-top: 3px solid var(--gold-light);
}
.auth-shell {
  background: radial-gradient(ellipse at 10% 80%, #222448 0%, #00022e 70%);
  display: flex;
  justify-content: center;
  gap: 90px;
  padding: 60px 32px;
}
.auth-story {
  max-width: 430px;
  color: #cbccdd;
}
.auth-story .eyebrow {
  color: #d2b777;
}
.auth-story h2 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.14;
  letter-spacing: -0.06em;
  margin: 22px 0;
}
.auth-story p {
  font-size: 1.1rem;
  line-height: 1.8;
}
.auth-story-features {
  display: grid;
  gap: 18px;
  margin-top: 40px;
  font-family: Poppins, sans-serif;
  font-size: 0.83rem;
}
.auth-story-features span {
  display: flex;
  gap: 14px;
  align-items: center;
}
.auth-story-features .lucide {
  color: #d2b777;
}
.auth-card {
  padding: 38px;
  box-shadow: 0 30px 100px #00000030;
  border: 0;
}
.auth-logo {
  max-width: 240px;
  max-height: 64px;
}
.auth-card h1 {
  letter-spacing: -0.04em;
}
.auth-card .intro {
  font-size: 0.92rem;
}
.auth-links {
  font-size: 0.75rem;
}
.auth-shell .auth-card:only-child {
  margin: auto;
}
.staff-body .staff-menu-btn {
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--navy);
}
@media (min-width: 961px) and (max-width: 1200px) {
  .workspace-summary {
    gap: 15px;
  }
  .staff-content {
    padding: 18px;
  }
  .live-grid {
    grid-template-columns: minmax(290px, 0.85fr) minmax(0, 1.1fr);
  }
  .panel-head {
    padding: 14px;
    flex-wrap: wrap;
  }
}
@media (max-width: 960px) {
  .auth-shell {
    gap: 35px;
  }
  .auth-story {
    max-width: 330px;
  }
  .staff-sidebar {
    width: 250px;
  }
  .live-grid {
    grid-template-columns: 1fr;
  }
  .queue-list {
    max-height: 420px;
  }
  .workspace-intro {
    align-items: flex-start;
  }
  .workspace-summary {
    gap: 16px;
  }
  .map-canvas {
    height: 500px;
  }
  .staff-topbar {
    height: 72px;
  }
}
@media (max-width: 700px) {
  .auth-story {
    display: none;
  }
  .auth-shell {
    padding: 24px 16px;
  }
  .auth-card {
    padding: 28px;
  }
  .workspace-intro {
    display: block;
  }
  .workspace-summary {
    margin-top: 20px;
    justify-content: space-between;
  }
  .workspace-intro h2 {
    font-size: 1.35rem;
  }
  .welcome-heading .btn {
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 0;
  }
  .welcome-heading .btn .lucide {
    width: 20px;
  }
  .protection-card {
    padding: 22px 20px 22px 75px;
  }
  .protection-status {
    position: static;
    margin-top: 12px;
  }
  .property-symbol {
    left: 18px;
  }
  .home-shortcuts {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .shortcut {
    padding: 18px;
  }
  .panic-panel {
    padding: 26px 16px;
    min-height: 430px;
  }
  .secondary-actions {
    grid-template-columns: 1fr 1fr;
  }
  .secondary-actions .btn:last-child {
    grid-column: 1/-1;
  }
  .household-main {
    padding-top: 22px;
  }
  .home-grid {
    gap: 17px;
  }
  .staff-content {
    padding: 16px 12px;
  }
  .panel-head {
    padding: 16px;
  }
  .workspace-clock {
    display: none;
  }
  .map-legend {
    gap: 10px;
    font-size: 0.6rem;
  }
  .brand-logo {
    max-width: 190px;
  }
  .app-header {
    height: 70px;
  }
  .panic-button-wrap {
    width: 220px;
    height: 220px;
  }
  .panic-helper {
    font-size: 0.88rem;
    margin-bottom: 20px;
  }
  .panel-head .btn {
    padding: 8px;
  }
  .queue-empty {
    padding: 48px 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Administration refinement: scoped to staff, shared tables remain open-sided. */
.admin-dashboard {
  max-width: 1560px;
  margin: auto;
}
.admin-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin: 8px 0 32px;
}
.admin-heading h2 {
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  letter-spacing: -0.055em;
  margin-top: 8px;
}
.admin-heading p {
  margin: 8px 0 0;
  font-size: 0.95rem;
}
.staff-body .btn {
  border-radius: 7px;
  min-height: 42px;
  padding: 11px 16px;
  font-family: Poppins, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.staff-body .btn-primary {
  background: linear-gradient(120deg, var(--brand), #202344);
  border: 1px solid var(--brand);
  box-shadow: 0 4px 9px #00022e15;
}
.staff-body .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px #00022e10;
}
.staff-body .btn:active {
  transform: none;
}
.staff-body .btn-outline {
  background: transparent;
  border-color: #ced1df;
  color: var(--navy);
}
.admin-return {
  background: #fff;
  border: 1px solid #d7d0bf;
  color: #69501e;
  white-space: nowrap;
}
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: #e0e2eb;
  border: 1px solid #e0e2eb;
  margin-bottom: 42px;
}
.admin-metric {
  background: #fff;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  transition: background 0.15s;
}
.admin-metric:hover {
  background: #fbf9f5;
}
.metric-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #9c9fb1;
  margin-bottom: 20px;
}
.metric-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: #f6f1e6;
  color: #876522;
  border-radius: 9px;
}
.metric-icon .lucide {
  width: 22px;
  height: 22px;
}
.admin-metric > strong {
  font-family: Montserrat, sans-serif;
  font-size: 2.35rem;
  line-height: 1.1;
  letter-spacing: -0.07em;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.metric-label {
  margin-top: 10px;
  font-family: Poppins, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
}
.metric-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.76rem;
}
.admin-section {
  margin-bottom: 38px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 30px;
}
.admin-section-heading {
  padding-top: 24px;
  border-top: 2px solid #aa8845;
}
.admin-section-heading h3 {
  font-size: 1rem;
  letter-spacing: -0.03em;
}
.admin-section-heading p {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.65;
  margin-top: 12px;
  max-width: 210px;
}
.admin-directory {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 28px;
}
.admin-destination {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 4px;
  border-bottom: 1px solid #dde0ea;
  transition: background 0.15s;
}
.admin-destination:hover {
  background: #ffffff85;
}
.destination-icon {
  background: #eceef5;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  color: var(--navy);
  border-radius: 9px;
  flex-shrink: 0;
}
.admin-destination:hover .destination-icon {
  background: var(--navy);
  color: #dac18c;
}
.admin-destination h4 {
  font-family: Poppins, sans-serif;
  font-size: 0.83rem;
  font-weight: 600;
}
.admin-destination p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}
.destination-arrow {
  margin-left: auto;
  color: #9c9faf;
  flex-shrink: 0;
}
.destination-arrow .lucide {
  width: 17px;
  height: 17px;
}
.admin-destination:hover .destination-arrow {
  color: var(--gold);
}
.staff-body .table-wrap {
  border-radius: 0 !important;
  border: 0 !important;
  border-top: 1px solid #d4d8e3 !important;
  border-bottom: 1px solid #d4d8e3 !important;
  box-shadow: none;
  background: transparent;
}
.staff-body table {
  background: transparent;
}
.staff-body th {
  background: #eceef4;
  text-transform: uppercase;
  font-size: 0.67rem;
  letter-spacing: 0.1em;
  color: #61677c;
  border-bottom: 1px solid #d4d8e3;
  padding: 16px 18px;
  font-weight: 600;
}
.staff-body td {
  padding: 19px 18px;
  background: transparent;
  border-bottom: 1px solid #e0e3ec;
  font-size: 0.88rem;
}
.staff-body tbody tr:last-child td {
  border-bottom: 0;
}
.staff-body tbody tr:hover td {
  background: #ffffff90;
}
.staff-body td .small {
  font-size: 0.75rem;
  line-height: 1.65;
  margin-top: 3px;
}
.staff-body th:last-child,
.staff-body td:last-child {
  padding-right: 8px;
}
.staff-body th:first-child,
.staff-body td:first-child {
  padding-left: 8px;
}
.record-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
.staff-body .record-actions .btn {
  padding: 7px 9px;
  min-height: 36px;
  font-size: 0.7rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
}
.record-actions .lucide {
  width: 15px;
  height: 15px;
}
.staff-body .action-edit {
  color: var(--navy);
}
.staff-body .action-edit:hover {
  background: #e9ebf3;
  border-color: #d2d6e4;
}
.staff-body .action-more {
  color: #6f561f;
}
.staff-body .action-more:hover {
  background: #f4eedf;
  border-color: #ded2b7;
}
.staff-body .action-delete {
  color: #983d37;
  background: transparent;
  border: 1px solid #dfc9c7;
}
.staff-body .action-delete:hover {
  background: #f8edeb;
}
.account-edit {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 8px;
}
.account-edit .lucide {
  width: 13px;
  height: 13px;
}
.account-edit:hover {
  color: var(--navy);
}
.table-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 24px 0 14px;
}
.table-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #b7bdce;
  width: 300px;
  color: var(--muted);
}
.table-search input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 0.86rem;
  color: var(--text);
  padding: 4px;
}
.table-search:focus-within {
  border-color: var(--gold);
}
.table-search .lucide {
  width: 17px;
  height: 17px;
}
.table-record-count {
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
}
.staff-body tbody tr[hidden] {
  display: none;
}
.management-page {
  max-width: 1120px;
  margin: auto;
  display: grid;
  gap: 22px;
}
.management-page > .btn {
  justify-self: start;
}
.editor-card {
  padding: 28px;
}
.editor-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 26px;
}
.editor-heading > .lucide {
  width: 42px;
  height: 42px;
  padding: 10px;
  color: var(--gold);
  background: #f7f2e8;
  border-radius: 8px;
}
.editor-heading h2 {
  font-size: 1.4rem;
  letter-spacing: -0.04em;
  margin-top: 5px;
}
.editor-card .form-grid {
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.editor-card .form-grid > .btn {
  justify-self: start;
  grid-column: 1/-1;
}
.record-danger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  padding: 24px 0;
  border-top: 1px solid #d6d9e4;
}
.record-danger strong {
  margin-left: 9px;
  font-family: Poppins, sans-serif;
  font-size: 0.83rem;
}
.record-danger p {
  max-width: 630px;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0;
}
.record-danger .lucide {
  width: 18px;
  height: 18px;
  color: #983d37;
}
.record-danger .btn {
  white-space: nowrap;
}
.management-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.management-list-head h2 {
  font-size: 1.3rem;
  letter-spacing: -0.04em;
}
@media (max-width: 1200px) {
  .admin-section {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 24px;
  }
  .admin-directory {
    column-gap: 20px;
  }
  .admin-destination {
    gap: 12px;
  }
  .admin-metric {
    padding: 22px;
  }
  .destination-arrow {
    display: none;
  }
}
@media (max-width: 700px) {
  .admin-heading {
    display: block;
    margin-bottom: 24px;
  }
  .admin-return {
    margin-top: 20px;
  }
  .admin-metrics {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 30px;
  }
  .admin-metric {
    padding: 20px;
  }
  .admin-metric > strong {
    font-size: 2rem;
  }
  .admin-section {
    display: block;
  }
  .admin-section-heading {
    padding-top: 18px;
  }
  .admin-section-heading p {
    max-width: none;
    margin-bottom: 6px;
  }
  .admin-directory {
    grid-template-columns: 1fr;
  }
  .admin-destination {
    padding: 20px 0;
  }
  .destination-arrow {
    display: block;
  }
  .editor-card {
    padding: 22px;
  }
  .editor-card .form-grid {
    grid-template-columns: 1fr;
  }
  .record-danger {
    display: block;
  }
  .record-danger form {
    margin-top: 18px;
  }
  .table-tools {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .table-search {
    width: 100%;
  }
  .management-list-head {
    gap: 15px;
    flex-wrap: wrap;
  }
  .staff-body .record-actions {
    gap: 2px;
  }
}
.staff-logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: left;
  margin: 0;
}
