:root {
  --zte-blue: #123c8f;
  --zte-deep: #0b245a;
  --telkomsel-red: #e53935;
  --telkomsel-rose: #ff8fb1;
  --paper: #f8fbff;
  --ink: #14233f;
  --muted: #5f6d89;
  --border: rgba(18, 60, 143, 0.18);
  --panel-shadow: 0 18px 40px rgba(11, 36, 90, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(229, 57, 53, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(18, 60, 143, 0.22), transparent 24%),
    linear-gradient(160deg, #edf4ff 0%, #f6fbff 48%, #fff6f7 100%);
  min-height: 100vh;
}

.page-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 22px;
}

.hero-header {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.7fr;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(18, 60, 143, 0.98), rgba(31, 78, 169, 0.94) 52%, rgba(229, 57, 53, 0.9));
  box-shadow: var(--panel-shadow);
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.08) 35%, transparent 65%),
    repeating-linear-gradient(90deg, transparent 0 60px, rgba(255, 255, 255, 0.03) 60px 62px);
  pointer-events: none;
}

.brand-cluster,
.hero-event {
  position: relative;
  z-index: 1;
}

.brand-cluster {
  display: flex;
  gap: 16px;
  align-items: center;
}

.brand-cluster-right {
  justify-content: flex-end;
}

.brand-logo {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  padding: 12px;
  object-fit: contain;
}

.telkomsel-logo {
  width: 104px;
  height: 104px;
  padding: 14px;
}

.eyebrow {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-copy h1 {
  margin: 10px 0 6px;
  font-size: 1.8rem;
  line-height: 1.1;
}

.brand-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.hero-event {
  text-align: center;
}

.event-chip {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-title {
  margin-top: 10px;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.15;
}

.toolbar,
.status-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border);
  box-shadow: 0 14px 30px rgba(18, 60, 143, 0.08);
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
}

.toolbar label {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.toolbar span,
.metric-card span,
.scope-tag span,
.headline-label {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

select,
button {
  border-radius: 14px;
  border: 1px solid rgba(18, 60, 143, 0.18);
  padding: 12px 14px;
  font-size: 0.98rem;
  font-family: inherit;
}

select {
  background: #fff;
  color: var(--ink);
}

button {
  background: linear-gradient(135deg, var(--zte-blue), var(--telkomsel-red));
  color: white;
  font-weight: 700;
  cursor: pointer;
  min-width: 116px;
  box-shadow: 0 10px 18px rgba(18, 60, 143, 0.18);
}

.nav-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 116px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(18, 60, 143, 0.18);
  background: linear-gradient(135deg, var(--zte-blue), var(--telkomsel-red));
  color: white;
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 18px rgba(18, 60, 143, 0.18);
}

.nav-link-button-secondary {
  background: white;
  color: var(--zte-deep);
}

.inline-form {
  margin: 0;
}

.inline-form button {
  min-width: 116px;
}

.scope-tag {
  min-width: 96px;
  padding: 12px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(18, 60, 143, 0.06), rgba(229, 57, 53, 0.08));
  border: 1px solid rgba(18, 60, 143, 0.08);
}

.scope-tag strong {
  display: block;
  margin-top: 4px;
  font-size: 1.35rem;
}

.dashboard-error {
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(249, 65, 68, 0.10);
  border: 1px solid rgba(249, 65, 68, 0.20);
  color: #b42318;
  font-weight: 700;
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-shell {
  width: 100%;
  max-width: 460px;
}

.auth-card {
  padding: 30px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  box-shadow: var(--panel-shadow);
}

.auth-brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.auth-card h1 {
  margin: 14px 0 10px;
  font-size: 2rem;
  color: var(--zte-deep);
}

.auth-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-actions {
  margin-top: 20px;
}

.auth-form label {
  display: grid;
  gap: 6px;
}

.auth-form input {
  border-radius: 14px;
  border: 1px solid rgba(18, 60, 143, 0.18);
  padding: 12px 14px;
  font-size: 0.98rem;
  font-family: inherit;
  color: var(--ink);
  background: white;
}

.auth-error {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(229, 57, 53, 0.10);
  border: 1px solid rgba(229, 57, 53, 0.22);
  color: #b11f1b;
  font-weight: 700;
}

.headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  flex-wrap: wrap;
}

.headline-copy h2 {
  margin: 6px 0 0;
  font-size: 1.55rem;
}

.headline-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 0;
  justify-content: flex-end;
}

.headline-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 148px;
  padding: 10px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 60, 143, 0.05), rgba(229, 57, 53, 0.05));
  border: 1px solid rgba(18, 60, 143, 0.10);
}

.headline-pill span {
  white-space: nowrap;
}

.headline-pill strong {
  font-size: 0.98rem;
  color: var(--ink);
  white-space: nowrap;
}

.missing-sites {
  color: #a63636;
  font-weight: 700;
  text-align: right;
}

.metric-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.metric-card {
  padding: 18px 20px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.96)),
    linear-gradient(135deg, rgba(18, 60, 143, 0.08), rgba(229, 57, 53, 0.08));
  border: 1px solid var(--border);
  box-shadow: 0 16px 28px rgba(18, 60, 143, 0.08);
  text-align: center;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.8rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(340px, 1.45fr);
  gap: 18px;
  margin-top: 18px;
}

.panel {
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  box-shadow: var(--panel-shadow);
}

.panel-map {
  display: flex;
  flex-direction: column;
}

.panel-title {
  padding: 12px 16px;
  background: linear-gradient(90deg, rgba(255, 143, 177, 0.96), rgba(255, 112, 132, 0.96));
  color: #222b45;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(18, 60, 143, 0.08);
}

.panel-title-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(17, 36, 82, 0.16);
  border: 1px solid rgba(17, 36, 82, 0.12);
  color: #222b45;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.plot-host {
  min-height: 320px;
  padding: 6px;
}

.panel-map .plot-host {
  padding: 0;
  flex: 1;
  min-height: 100%;
}

.panel-summary .plot-host {
  min-height: 350px;
}

.plot-frame {
  position: relative;
}

.panel-map .plot-frame {
  flex: 1;
  min-height: 0;
  display: flex;
}

.map-legend {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 8;
  min-width: 170px;
  max-width: 210px;
  padding: 9px 11px;
  border-radius: 14px;
  background: rgba(11, 11, 18, 0.86);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 24px rgba(8, 16, 38, 0.26);
  backdrop-filter: blur(8px);
}

.map-hoverbox {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 8;
  display: none;
  max-width: 230px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(69, 86, 116, 0.92);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 24px rgba(8, 16, 38, 0.22);
  backdrop-filter: blur(8px);
  font-size: 0.84rem;
  line-height: 1.35;
  pointer-events: none;
}

.map-hoverbox.is-visible {
  display: block;
}

.map-hoverbox b {
  display: block;
  margin-bottom: 2px;
}

.legend-title {
  margin-bottom: 7px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legend-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.legend-min,
.legend-max {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.legend-gradient {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1b998b 0%, #ffd166 56%, #f94144 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.empty-trend {
  min-height: 320px;
}

.panel-table-card {
  margin-top: 18px;
}

.panel-report-card {
  margin-top: 18px;
}

.table-shell {
  padding: 14px 16px 18px;
}

.report-shell {
  padding: 14px 16px 18px;
}

.tables-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.table-block {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 0 0 1px rgba(18, 60, 143, 0.08);
  overflow: hidden;
}

.table-block-title {
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(18, 60, 143, 0.94), rgba(229, 57, 53, 0.82));
  color: #fff;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.dl-prb-table-wrap {
  overflow-x: hidden;
}

.dl-prb-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 0;
  background: rgba(255, 255, 255, 0.96);
}

.dl-prb-table th,
.dl-prb-table td {
  padding: 7px 4px;
  border-right: 1px solid rgba(18, 60, 143, 0.10);
  border-bottom: 1px solid rgba(18, 60, 143, 0.10);
  text-align: center;
  font-size: 0.68rem;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
}

.dl-prb-table th:first-child,
.dl-prb-table td:first-child {
  text-align: left;
  width: 70px;
  min-width: 70px;
}

.dl-prb-table th {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, rgba(18, 60, 143, 0.10), rgba(18, 60, 143, 0.05));
  color: #17366f;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  letter-spacing: 0.03em;
  font-size: 0.56rem;
  word-break: break-word;
}

.dl-prb-table th:nth-child(2),
.dl-prb-table td:nth-child(2) {
  width: 44px;
  min-width: 44px;
}

.page-prb-high .dl-prb-table th:nth-child(2),
.page-prb-high .dl-prb-table td:nth-child(2) {
  width: 56px;
  min-width: 56px;
}

.page-prb-high .dl-prb-table th:nth-child(3),
.page-prb-high .dl-prb-table td:nth-child(3) {
  width: 30px;
  min-width: 30px;
}

.dl-prb-table tr:nth-child(even) td {
  background: rgba(18, 60, 143, 0.03);
}

.dl-prb-table th:last-child,
.dl-prb-table td:last-child {
  border-right: none;
}

.dl-prb-table tr td.kpi-cell {
  font-weight: 700;
  font-size: 0.7rem;
}

.dl-prb-table tr td.kpi-low {
  background: rgba(39, 174, 96, 0.16);
  color: #1e7a45;
}

.dl-prb-table tr td.kpi-medium {
  background: rgba(255, 209, 102, 0.30);
  color: #8a6200;
}

.dl-prb-table tr td.kpi-high {
  background: rgba(249, 65, 68, 0.18);
  color: #b42318;
}

.table-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.text-report-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.copy-report-button {
  min-width: 104px;
  padding: 9px 14px;
  border: 1px solid rgba(18, 60, 143, 0.12);
  border-radius: 12px;
  background: linear-gradient(135deg, #ef6f6c, #f08a6b);
  box-shadow: 0 8px 16px rgba(240, 111, 108, 0.22);
}

.copy-report-button:disabled {
  cursor: default;
  opacity: 0.88;
}

.text-report-body {
  margin: 0;
  padding: 16px 18px 18px;
  background: rgba(248, 251, 255, 0.92);
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(18, 60, 143, 0.08);
  color: #17366f;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.panel-hotspot-table {
  margin-top: 18px;
}

.panel-matrix-card {
  margin-top: 18px;
}

.hotspot-note {
  display: grid;
  gap: 6px;
}

.hotspot-note strong {
  color: var(--ink);
}

.hotspot-table-wrap {
  overflow: auto;
  padding: 0;
}

.hotspot-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1180px;
  background: rgba(255, 255, 255, 0.96);
}

.hotspot-table th,
.hotspot-table td {
  padding: 10px 12px;
  border-right: 1px solid rgba(18, 60, 143, 0.10);
  border-bottom: 1px solid rgba(18, 60, 143, 0.10);
  text-align: left;
  font-size: 0.78rem;
  line-height: 1.3;
  vertical-align: top;
}

.hotspot-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(18, 60, 143, 0.10), rgba(18, 60, 143, 0.05));
  color: #17366f;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  letter-spacing: 0.03em;
  font-size: 0.68rem;
}

.hotspot-table tr:nth-child(even) td {
  background: rgba(18, 60, 143, 0.03);
}

.hotspot-table th:last-child,
.hotspot-table td:last-child {
  border-right: none;
}

.hotspot-table td.hotspot-metric {
  text-align: right;
  font-weight: 700;
  color: #b42318;
}

.hotspot-table td.hotspot-peak {
  background: rgba(249, 65, 68, 0.14);
}

.breach-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(249, 65, 68, 0.14);
  color: #b42318;
  font-weight: 700;
}

.matrix-table-wrap {
  overflow: auto;
  padding-bottom: 4px;
}

.hotspot-matrix-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255, 255, 255, 0.96);
}

.hotspot-matrix-table th,
.hotspot-matrix-table td {
  padding: 7px 6px;
  border-right: 1px solid rgba(18, 60, 143, 0.10);
  border-bottom: 1px solid rgba(18, 60, 143, 0.10);
  text-align: center;
  font-size: 0.74rem;
  line-height: 1.15;
  white-space: nowrap;
  vertical-align: middle;
}

.hotspot-matrix-table thead th {
  color: #f4f7fb;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  background: #38587c;
}

.hotspot-matrix-table thead tr.matrix-group-row th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-top: 11px;
  padding-bottom: 11px;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.hotspot-matrix-table thead tr.matrix-band-row th {
  position: sticky;
  top: 41px;
  z-index: 2;
  font-size: 0.66rem;
  letter-spacing: 0.03em;
}

.hotspot-matrix-table tbody td {
  background: rgba(255, 255, 255, 0.98);
}

.hotspot-matrix-table tbody td:first-child,
.hotspot-matrix-table tbody td:nth-child(2) {
  text-align: left;
}

.hotspot-matrix-table .matrix-col-poi {
  width: 210px;
}

.hotspot-matrix-table .matrix-col-site {
  width: 76px;
}

.hotspot-matrix-table .matrix-col-sector {
  width: 46px;
}

.hotspot-matrix-table .matrix-col-metric {
  width: 64px;
}

.hotspot-matrix-table th:last-child,
.hotspot-matrix-table td:last-child {
  border-right: none;
}

.hotspot-matrix-table td.matrix-value {
  font-weight: 700;
  font-size: 0.72rem;
}

.hotspot-matrix-table td.kpi-low {
  background: rgba(39, 174, 96, 0.20);
  color: #1e7a45;
}

.hotspot-matrix-table td.kpi-medium {
  background: rgba(255, 209, 102, 0.34);
  color: #8a6200;
}

.hotspot-matrix-table td.kpi-high {
  background: rgba(249, 65, 68, 0.22);
  color: #b42318;
}

@media (max-width: 1180px) {
  .hero-header {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .brand-cluster-right {
    justify-content: flex-start;
  }

  .metric-cards,
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tables-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 12px;
  }

  .toolbar,
  .status-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-left,
  .toolbar-right {
    width: 100%;
  }

  .nav-link-button {
    width: 100%;
  }

  .hotspot-table {
    min-width: 920px;
  }

  .hotspot-matrix-table {
    min-width: 1180px;
  }

  .metric-cards,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .headline h2 {
    font-size: 1.3rem;
  }

  .headline {
    align-items: flex-start;
  }

  .headline-copy h2 {
    font-size: 1.3rem;
  }

  .headline-meta {
    flex-direction: column;
  }

  .metric-card strong {
    font-size: 1.55rem;
  }

  .text-report-toolbar {
    justify-content: stretch;
  }

  .copy-report-button {
    width: 100%;
  }
}
