* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #f1f6f8;
  color: var(--ink);
  overflow-x: hidden;
}

:root {
  --deep: #06243a;
  --ocean: #0b4f6c;
  --aqua: #2dd4bf;
  --foam: #e8f6f8;
  --ink: #0c2233;
  --muted: #5b7384;
}

.topbar {
  background: rgba(6, 36, 58, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar .navbar-brand {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.topbar .nav-link {
  color: #a9c3d1;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  transition: 0.2s;
}

.topbar .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.topbar .nav-link.active {
  color: var(--deep);
  background: var(--aqua);
}

.hero {
  position: relative;
  background: linear-gradient(160deg, var(--deep) 0%, var(--ocean) 100%);
  color: #fff;
  padding: 2.6rem 1rem 5.5rem;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 220px at 85% -10%, rgba(45, 212, 191, 0.28), transparent 70%),
    radial-gradient(500px 200px at 10% 110%, rgba(45, 212, 191, 0.16), transparent 70%);
}

.hero > * {
  position: relative;
}

.company {
  font-weight: 500;
  color: #a9d9e3;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.hero h1 {
  font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  margin: 0;
}

.clock {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(45, 212, 191, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0);
  }
}

.wave {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 56px;
  display: block;
}

.period-wrap {
  max-width: 760px;
  margin: -3.1rem auto 1.5rem;
  padding: 0 1rem;
  position: sticky;
  top: calc(var(--nav-h, 56px) + 0.6rem);
  z-index: 1010;
}

.period {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem 0.8rem 1.3rem;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 14px 40px -12px rgba(6, 36, 58, 0.35);
}

.period-title {
  flex: 1 1 200px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.period-title small {
  display: block;
  font-weight: 400;
  color: var(--muted);
}

.period-title small b {
  color: var(--ocean);
  font-weight: 700;
}

.period-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.period select {
  padding: 0.55rem 0.9rem;
  border: 1.5px solid #d3e2e9;
  border-radius: 12px;
  background-color: var(--foam);
  color: var(--ink);
  font-weight: 500;
}

.period select:focus {
  outline: none;
  border-color: var(--ocean);
  box-shadow: 0 0 0 0.22rem rgba(11, 79, 108, 0.18);
}

.period #submitBtnClient {
  -webkit-appearance: none;
  appearance: none;
  padding: 0.6rem 1.3rem;
  border: 0;
  border-radius: 12px;
  background: var(--ocean);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.period #submitBtnClient:hover {
  background: var(--deep);
  transform: translateY(-1px);
}

.period #submitBtnClient:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 2px;
}

#statusClient {
  flex-basis: 100%;
  font-size: 0.85rem;
  color: var(--muted);
}

#statusClient:empty {
  display: none;
}

.container.px-5 {
  margin: 0;
  max-width: 100%;
}

.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  width: 100%;
  max-width: 100%;
}

.bg-dark-custom {
  background-color: transparent;
}

.chart {
  position: relative;
  height: fit-content;
  margin: 5px;
  padding: 2rem;
  border: 1px solid #31a3f4;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.8);
  scroll-margin-top: 160px;
}

#text1-container {
  color: #f00;
}

#toggle-btn {
  position: sticky;
  top: 0;
  z-index: 1100;
  padding: 1rem 1.5rem;
  border: 0;
  background-color: transparent;
  cursor: pointer;
}

#toggle-btn i {
  font-size: 1.5rem;
  color: #335f68;
}

.dashboard-wrap {
  border: 4px solid #e11d1d;
  padding: 0;
}

.top-bar,
.bottom-bar {
  height: 14px;
  background: linear-gradient(90deg, var(--yellow-strong), var(--yellow-mid));
}

.dashboard {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.col-wide {
  width: 340px;
}

.col-narrow {
  width: 260px;
}

.card {
  background: var(--yellow-soft, #fff);
  border: 1px solid var(--border, #dee2e6);
  border-radius: 2px;
}

.card-header {
  padding: 6px 8px;
  background: var(--yellow-mid, #f8f9fa);
  border-bottom: 1px solid var(--border, #dee2e6);
  color: var(--blue-text, #333);
  font-size: 13px;
  font-weight: bold;
  text-align: center;
}

.card-header.small-title {
  text-align: left;
}

.row-line {
  display: flex;
  justify-content: space-between;
  padding: 3px 10px;
  font-size: 13px;
  color: var(--dark-text, #333);
}

.row-line.strong {
  font-weight: bold;
}

.big-number-box,
.percent-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  background: var(--yellow-mid);
  color: var(--blue-text);
  font-weight: bold;
}

.big-number-box {
  padding: 10px;
  font-size: 30px;
  text-align: center;
}

.percent-box {
  font-size: 42px;
}

.total-footer {
  padding: 6px 10px;
  font-size: 13px;
  font-weight: bold;
  color: var(--blue-text);
}

.total-footer .row-line {
  padding: 2px 0;
  color: var(--blue-text);
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.mini-table th,
.mini-table td {
  padding: 3px 8px;
  color: var(--blue-text);
  font-weight: bold;
  text-align: right;
}

.mini-table th:first-child,
.mini-table td:first-child {
  text-align: left;
}

.segmen-wrapper {
  position: relative;
}

.nrw-wrapper {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 60px;
  height: 60px;
}

.kair-text {
  position: absolute;
  top: 10px;
  right: 10px;
}

.suplai-chart-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.suplai-section-wrapper {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
  margin: 0;
}

#sAirCard.suplai-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
  flex: 1 1 20px;
  min-width: 420px;
  max-width: 560px;
  height: auto;
  margin: 50px 0;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.suplai-col-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 24px;
  border-right: 1px solid #eee;
  background-color: #f8f9fa;
  text-align: center;
}

.suplai-title {
  margin-bottom: 10px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
  white-space: nowrap;
}

.suplai-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: #1a252f;
  white-space: nowrap;
}

.suplai-col-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding: 28px 24px;
}

.suplai-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 1.4rem;
  font-weight: bold;
  white-space: nowrap;
}

.suplai-label {
  color: #333;
}

.val-ipa {
  color: #34a853;
  font-weight: 800;
}

.val-ibp {
  color: #ea4335;
  font-weight: 800;
}

.suplai-canvas {
  max-width: 200px;
  max-height: 200px;
}

.penjualan-chart-container {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 16px;
  width: 100%;
}

.penjualan-section-wrapper {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch;
  gap: 16px;
  width: 100%;
  margin-bottom: 20px;
  font-family: inherit;
}

.penjualan-section-wrapper .card-left {
  flex: 1;
  min-width: 0;
}

.penjualan-section-wrapper .card-right {
  flex: 1.2;
  min-width: 0;
}

.penjualan-section-wrapper .card-body-custom {
  padding: 12px 16px;
}

.penjualan-section-wrapper .row-line {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.85rem;
}

.penjualan-section-wrapper .row-line.muted {
  color: #6c757d;
}

.penjualan-section-wrapper table.penjualan-table {
  width: 100%;
  border-collapse: collapse;
  font-family: inherit;
  font-size: 0.82rem;
}

.penjualan-section-wrapper table.penjualan-table th,
.penjualan-section-wrapper table.penjualan-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

.penjualan-section-wrapper table.penjualan-table .col-label {
  padding-right: 12px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.penjualan-section-wrapper table.penjualan-table .col-num,
.penjualan-section-wrapper table.penjualan-table th.text-end {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.chart.is-loading {
  min-height: 120px;
}

.chart.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 10;
  border-radius: 12px;
  background: linear-gradient(
    90deg,
    rgba(128, 128, 128, 0.18) 25%,
    rgba(128, 128, 128, 0.38) 50%,
    rgba(128, 128, 128, 0.18) 75%
  );
  background-size: 200% 100%;
  animation: chart-shimmer 1.3s ease-in-out infinite;
}

.chart.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 11;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 4px solid rgba(255, 255, 255, 0.35);
  border-top-color: #4285f4;
  border-radius: 50%;
  animation: chart-spin 0.8s linear infinite;
}

@keyframes chart-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes chart-spin {
  to {
    transform: rotate(360deg);
  }
}

.chart-highlight {
  animation: chartFlash 2s ease;
}

@keyframes chartFlash {
  0%,
  100% {
    box-shadow: none;
  }
  20%,
  60% {
    box-shadow: 0 0 0 4px #ffc107;
  }
}

@media (max-width: 800px) {
  .suplai-card {
    grid-template-columns: 1fr !important;
    min-width: 100% !important;
  }
  .penjualan-section-wrapper {
    flex-direction: column !important;
  }
}

@media (max-width: 576px) {
  .period {
    padding: 1rem;
  }
  .period-fields,
  .period select,
  .period #submitBtnClient {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot {
    animation: none;
  }
}

.topbar {
  background: rgba(14, 36, 84, .94);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.topbar .nav-link {
  color: rgba(255, 255, 255, .75);
}

.topbar .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, .12);
}

.topbar .nav-link.active {
  color: #14213d;
  background: #F3B521;
  font-weight: 600;
}

.btn-login:hover {
  background: #F3B521;
  border-color: #F3B521;
  color: #14213d;
}

.hero {
  background: linear-gradient(160deg, #0A1A3F 0%, #0E2454 60%, #123A8C 100%);
}

.hero::before {
  background:
    radial-gradient(600px 220px at 85% -10%, rgba(12, 95, 209, .55), transparent 70%),
    radial-gradient(500px 200px at 10% 110%, rgba(243, 181, 33, .18), transparent 70%);
}

.company {
  color: #F3B521;
}

.live-dot {
  background: #F3B521;
  box-shadow: 0 0 0 0 rgba(243, 181, 33, .7);
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(243, 181, 33, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(243, 181, 33, 0);
  }
}

:root {
  --th-nav: rgba(14, 36, 84, .94);
  --th-c1: #0E2454;
  --th-c2: #0C4BAE;
  --th-c3: #0C5FD1;
  --th-c4: #F3B521;
  --th-glow-a: rgba(243, 181, 33, .35);
  --th-glow-b: rgba(12, 95, 209, .45);
  --th-company: #F3B521;
  --th-dot: #F3B521;
  --th-dot-rgb: 243, 181, 33;
}

html[data-waktu="pagi"] {
  --th-nav: rgba(12, 95, 209, .95);
  --th-c1: #0C5FD1;
  --th-c2: #2A7DE8;
  --th-c3: #4A95F0;
  --th-c4: #FFE08A;
  --th-glow-a: rgba(243, 181, 33, .55);
  --th-glow-b: rgba(255, 255, 255, .22);
  --th-company: #FFE08A;
  --th-dot: #FFE08A;
  --th-dot-rgb: 255, 224, 138;
}

html[data-waktu="sore"] {
  --th-nav: rgba(30, 28, 70, .95);
  --th-c1: #0E2454;
  --th-c2: #3B3566;
  --th-c3: #B8651B;
  --th-c4: #F3B521;
  --th-glow-a: rgba(243, 181, 33, .5);
  --th-glow-b: rgba(184, 101, 27, .35);
  --th-company: #FFD27A;
  --th-dot: #FFD27A;
  --th-dot-rgb: 255, 210, 122;
}

html[data-waktu="malam"] {
  --th-nav: rgba(5, 13, 36, .96);
  --th-c1: #050D24;
  --th-c2: #0A1A3F;
  --th-c3: #0E2454;
  --th-c4: #F3B521;
  --th-glow-a: rgba(12, 95, 209, .35);
  --th-glow-b: rgba(243, 181, 33, .12);
  --th-company: #F3B521;
  --th-dot: #F3B521;
  --th-dot-rgb: 243, 181, 33;
}

.topbar {
  background: var(--th-nav);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  transition: background-color .6s ease;
}

.topbar .nav-link {
  color: rgba(255, 255, 255, .78);
}

.topbar .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, .12);
}

.topbar .nav-link.active {
  color: #14213d;
  background: #F3B521;
  font-weight: 600;
}

.btn-login:hover {
  background: #F3B521;
  border-color: #F3B521;
  color: #14213d;
}

.hero {
  background: linear-gradient(170deg,
    var(--th-c1) 0%,
    var(--th-c2) 45%,
    var(--th-c3) 85%,
    var(--th-c4) 100%);
}

.hero::before {
  background:
    radial-gradient(600px 220px at 85% -10%, var(--th-glow-a), transparent 70%),
    radial-gradient(500px 200px at 10% 110%, var(--th-glow-b), transparent 70%);
}

.company {
  color: var(--th-company);
}

.live-dot {
  background: var(--th-dot);
  box-shadow: 0 0 0 0 rgba(var(--th-dot-rgb), .7);
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(var(--th-dot-rgb), 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(var(--th-dot-rgb), 0);
  }
}

.search-wrap {
  position: relative;
}

.search-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1100;
  min-width: 100%;
  width: max-content;
  max-width: min(420px, 90vw);
  max-height: 320px;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  list-style: none;
  background: #fff;
  color: var(--ink);
  border: 1px solid #d3e2e9;
  border-radius: 0;
  box-shadow: 0 12px 28px -10px rgba(6, 36, 58, .4);
}

.search-list[hidden] {
  display: none;
}

.search-list li {
  padding: .5rem .9rem;
  border-left: 3px solid transparent;
  font-size: .9rem;
  cursor: pointer;
}

.search-list li:hover,
.search-list li.aktif {
  background: #EEF3FC;
  border-left-color: #F3B521;
}

.search-list li.kosong {
  color: var(--muted);
  cursor: default;
}

.search-list li.kosong:hover {
  background: transparent;
  border-left-color: transparent;
}

@media (max-width: 991.98px) {
  .search-list {
    width: 100%;
    max-width: 100%;
  }
}

#dashboard-root .row-line {
  gap: 12px;
  align-items: baseline;
}

#dashboard-root .row-line > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
}

#dashboard-root .row-line > .nilai {
  flex: 0 0 auto;
  white-space: nowrap;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

#dashboard-root .col-wide {
  width: 380px;
}

.neg {
  color: #dc3545;
}

.drd-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}