:root {
  --bg: #050505;
  --panel: #0d0f12;
  --panel2: #111318;
  --line: rgba(255, 255, 255, .12);
  --text: #f4f4f5;
  --muted: #9ca3af;
  --red: #e82127;
  --red2: #8b0000
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(232, 33, 39, .12), transparent 25%), linear-gradient(180deg, #030303, #08090b);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif
}

.topbar {
  min-height: 78px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(5, 5, 5, .9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 1000
}

.brand {
  letter-spacing: 6px;
  font-size: 21px;
  font-weight: 700
}

.brand span {
  color: var(--red)
}

.brand .dot {
  color: #ccc;
  letter-spacing: 2px;
  font-size: 14px
}

.tagline {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 2px;
  margin-top: 6px;
  text-transform: uppercase
}

.glow-btn {
  border: none;
  box-shadow: 0 0 24px rgba(232, 33, 39, .25)
}

.page-shell {
  width: min(1680px, 100%);
  margin: 0 auto;
  padding: 18px 20px 0
}

.panel,
.stat-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35)
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px
}

.stat-card {
  padding: 16px;
  min-height: 104px
}

.stat-card small {
  display: block;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .8px
}

.stat-card strong {
  display: block;
  font-size: 30px;
  margin: 8px 0 2px
}

.stat-card span {
  color: var(--red);
  font-size: 13px
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 420px;
  gap: 14px
}

.map-panel {
  position: relative;
  overflow: hidden;
  padding: 14px
}

.section-title,
.chart-card h6,
.mini-chart-card h6,
.recent-panel h5,
.report-modal h6 {
  text-transform: uppercase;
  letter-spacing: .9px;
  font-size: 13px;
  margin: 0 0 12px;
  color: #fff
}

#map {
  height: 520px;
  width: 100%;
  background: #080808;
  border-radius: 8px
}

.leaflet-container {
  background: #050505;
  filter: saturate(.85) contrast(1.05)
}

.leaflet-control-zoom a {
  background: #111 !important;
  color: #fff !important;
  border-color: var(--line) !important
}

.map-legend {
  position: absolute;
  left: 32px;
  bottom: 28px;
  width: 160px;
  z-index: 500;
  background: rgba(10, 10, 10, .82);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  font-size: 11px
}

.heatbar {
  height: 9px;
  margin: 10px 0 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, #381111, #e82127, #ffd449)
}

.side-stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 14px
}

.mini-chart-card {
  padding: 16px;
  height: 273px;
  overflow: hidden
}

.mini-chart-card canvas {
  height: 215px !important;
  max-height: 215px !important
}

.filters {
  margin-top: 14px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr)) 160px;
  gap: 12px
}

.form-control,
.form-select {
  background-color: #090b0f;
  border: 1px solid var(--line);
  color: var(--text)
}

.form-control:focus,
.form-select:focus {
  background-color: #090b0f;
  color: var(--text);
  border-color: var(--red);
  box-shadow: 0 0 0 .2rem rgba(232, 33, 39, .2)
}

.chart-card {
  padding: 18px;
  margin-top: 14px;
  height: 320px;
  overflow: hidden
}

.full-line-chart canvas {
  height: 260px !important;
  max-height: 260px !important
}

.recent-panel {
  padding: 18px;
  margin-top: 14px
}

.table {
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--line)
}

.report-table tbody tr {
  cursor: pointer
}

.report-table tbody tr:hover {
  --bs-table-hover-bg: rgba(232, 33, 39, .12)
}

.report-modal {
  background: #090a0d;
  border: 1px solid var(--line);
  color: var(--text)
}

.modal-header {
  border-bottom: 1px solid var(--line)
}

.report-modal small,
.report-modal label,
.auth-box p,
footer,
.hint {
  color: var(--muted)
}

.auth-box {
  padding: 12px 0 20px
}

hr {
  border-color: var(--line);
  opacity: 1;
  margin: 26px 0
}

footer {
  width: min(1680px, 100%);
  margin: 0 auto;
  padding: 18px 28px 28px;
  font-size: 12px
}

.location-results {
  position: absolute;
  z-index: 2000;
  width: calc(100% - 24px);
  max-height: 260px;
  overflow-y: auto;
  background: #090b0f;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  margin-top: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45)
}

.location-result {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, .08)
}

.location-result:hover {
  background: rgba(232, 33, 39, .18)
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px
}

.detail-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, .03)
}

.detail-item small {
  display: block;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 3px
}

.detail-item span {
  font-size: 14px
}

.detail-notes {
  white-space: pre-wrap
}

.btn-danger {
  background: linear-gradient(180deg, #f43f46, #c51219);
  border-color: #e82127
}

@media (max-width:1200px) {
  .dashboard-grid {
    grid-template-columns: 1fr
  }

  .side-stack {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto
  }

  .filters {
    grid-template-columns: repeat(3, 1fr)
  }
}

@media (max-width:768px) {
  .topbar {
    padding: 16px;
    gap: 12px
  }

  .brand {
    font-size: 15px;
    letter-spacing: 3px
  }

  .tagline {
    font-size: 10px
  }

  .glow-btn {
    padding: 8px 10px;
    font-size: 12px;
    white-space: nowrap
  }

  .stats-grid,
  .side-stack,
  .filters,
  .details-grid {
    grid-template-columns: 1fr
  }

  .stat-card strong {
    font-size: 26px
  }

  #map {
    height: 360px
  }

  .map-legend {
    width: 135px
  }

  .modal-dialog {
    margin: 0;
    height: 100%
  }

  .modal-content {
    min-height: 100%;
    border-radius: 0
  }
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  margin: 18px 0;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(255, 255, 255, .12);
}

.email-signin-box {
  text-align: left;
  display: grid;
  gap: 8px;
}

.email-signin-box label {
  font-size: .85rem;
  color: #fff;
  font-weight: 600;
}

.email-signin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.email-signin-row .btn {
  white-space: nowrap;
}

.auth-status {
  min-height: 18px;
  color: var(--red);
  font-size: .85rem;
}

.email-signin-box small {
  color: var(--muted);
  line-height: 1.45;
}

@media(max-width:576px) {
  .email-signin-row {
    grid-template-columns: 1fr;
  }
}

.auth-box {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

.auth-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

.auth-subtext {
  color: #9aa4af;
  font-size: .9rem;
  margin-bottom: 24px;
}

.provider-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.provider-btn {

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 14px;

  width: 100%;
  height: 46px;

  border: none;
  border-radius: 8px;

  font-size: .95rem;
  font-weight: 500;

  transition: .18s;

  cursor: pointer;
}

.provider-btn:hover {

  transform: translateY(-1px);

  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

.provider-icon {

  width: 22px;
  height: 22px;

  flex-shrink: 0;
}

.google-btn {

  background: #fff;
  color: #3c4043;
}

.google-btn:hover {

  background: #f7f8f8;
}

.otp-bubbles {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 0.75rem;
}

.otp-input {
  width: 44px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  outline: none;
}

.otp-input:focus {
  border-color: #e82127;
  box-shadow: 0 0 0 0.2rem rgba(232, 33, 39, .2);
}

.email-code-box .is-disabled {
  opacity: .55;
  pointer-events: none;
}

/* Premium report modal polish */
.modal-xl {
  --bs-modal-width: min(1180px, calc(100vw - 42px));
}

.report-modal {
  background:
    radial-gradient(circle at 18% 0%, rgba(232, 33, 39, .14), transparent 32%),
    linear-gradient(180deg, rgba(18, 20, 26, .98), rgba(7, 8, 11, .98));
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .68);
  overflow: hidden;
}

.report-modal .modal-header {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 74px;
  padding: 20px 24px;
  background: rgba(8, 9, 12, .92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, .11);
}

.report-modal .modal-title {
  letter-spacing: -.02em;
  font-weight: 700;
}

.report-modal .modal-body {
  padding: 24px;
}

.report-modal label {
  display: block;
  margin-bottom: 7px;
  font-size: .82rem;
  color: #b9c0ca;
  font-weight: 600;
}

.report-modal .form-control,
.report-modal .form-select {
  min-height: 44px;
  border-radius: 10px;
  background-color: rgba(5, 7, 10, .78);
  border-color: rgba(255, 255, 255, .13);
}

.report-modal textarea.form-control {
  min-height: 112px;
}

.report-modal .decoded-field {
  background: rgba(255, 255, 255, .035);
  color: #cfd5df;
}

.premium-report-form {
  display: grid;
  gap: 16px;
}

.form-hero {
  display: grid;
  grid-template-columns: 1fr minmax(190px, 260px);
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(232, 33, 39, .16), transparent 42%),
    rgba(255, 255, 255, .035);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--red);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .18em;
}

.form-hero h6 {
  margin-bottom: 6px;
  font-size: 1.15rem;
  letter-spacing: .04em;
}

.form-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.form-hero-badge {
  justify-self: end;
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(232, 33, 39, .25);
  background: rgba(232, 33, 39, .08);
}

.form-hero-badge strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
}

.form-hero-badge span {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.35;
}

.form-section {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .105);
  border-radius: 16px;
  background: rgba(255, 255, 255, .028);
}

.form-section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.form-section-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-section-head h6 {
  margin: 0;
  font-size: .88rem;
}

.form-section-head p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.45;
  text-align: right;
}

.step-pill {
  display: inline-flex;
  width: 34px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(232, 33, 39, .2);
  border: 1px solid rgba(232, 33, 39, .34);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
}

.submit-panel {
  position: sticky;
  bottom: -24px;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin: 4px -24px -24px;
  padding: 18px 24px;
  background: rgba(7, 8, 11, .94);
  border-top: 1px solid rgba(255, 255, 255, .11);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.submit-panel strong,
.submit-panel span {
  display: block;
}

.submit-panel span {
  color: var(--muted);
  font-size: .84rem;
  margin-top: 3px;
}

.submit-panel .btn {
  min-width: 190px;
  min-height: 46px;
  border-radius: 10px;
  font-weight: 700;
}

.auth-box {
  padding: 28px 0 34px;
}

.email-code-box .form-control {
  min-height: 46px;
}

.otp-bubbles {
  gap: .72rem;
}

.otp-input {
  width: 48px;
  height: 56px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025));
  border-color: rgba(255, 255, 255, .22);
}

@media (max-width: 768px) {
  .report-modal .modal-body {
    padding: 18px;
  }

  .form-hero,
  .form-section-head,
  .submit-panel {
    grid-template-columns: 1fr;
  }

  .form-section-head {
    display: grid;
  }

  .form-section-head p {
    text-align: left;
  }

  .form-hero-badge {
    justify-self: stretch;
  }

  .submit-panel {
    position: static;
    margin: 4px -18px -18px;
  }

  .submit-panel .btn {
    width: 100%;
  }

  .otp-input {
    width: 42px;
    height: 52px;
  }
}

@media (max-width: 420px) {
  .otp-bubbles {
    gap: .42rem;
  }

  .otp-input {
    width: 38px;
    height: 48px;
    border-radius: 13px;
  }
}
