/*
 * Sawopos "Senja Ungu" (Rangkong), 18 Okt 2026.
 * Warna DevExtreme sendiri ada di aset/devextreme/css/gpos(.dark).css, dibuat dari
 * branding/tema/metadata.*.json. Berkas ini memegang token merek, bilah atas, layar masuk,
 * tombol utama kuning dan permukaan yang tidak digambar DevExtreme. Tanpa hitam: teks paling
 * gelap adalah ungu tua.
 */
:root {
  --brand-ink: #5b2a86;
  --brand-ink-deep: #3f1c60;
  --brand-body: #8250d6;
  --brand-crest: #fb461b;
  --brand-sun: #fcae25;
  --brand-sun-hover: #f0a012;
  --brand-sun-press: #de9206;
  --brand-sun-ink: #3a1a57;
  --brand-paper: #f7efe2;

  --ground: #faf6ef;
  --surface: #ffffff;
  --text: #2a1840;
  --text-muted: #6a5a7c;
  --line: #e6dacb;
  --bar: #5b2a86;
  --bar-ink: #fbf6ff;
  --bar-ink-muted: #d6c3ef;
  --bar-hover: rgba(255, 255, 255, 0.12);
  --danger-bg: #fde9e4;
  --danger-ink: #8a2310;
  --focus-ring: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand-ink);
  --font-ui: "Figtree", "Segoe UI", system-ui, sans-serif;
}

html.tema-gelap {
  --ground: #171020;
  --surface: #1e1629;
  --text: #eee6f7;
  --text-muted: #b3a5c6;
  --line: #3a2d4c;
  --bar: #3f1c60;
  --bar-ink: #f5eefc;
  --bar-ink-muted: #c3addf;
  --danger-bg: #3d1a14;
  --danger-ink: #ffb6a5;
  --focus-ring: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand-body);
}

html,
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-ui);
}

::selection {
  background: rgba(252, 174, 37, 0.45);
  color: inherit;
}

/* ---------- Bilah atas ---------- */
#toolbar_aplikasi.dx-toolbar,
#toolbar_aplikasi .dx-toolbar-items-container {
  background: var(--bar);
  color: var(--bar-ink);
}
#toolbar_aplikasi.dx-toolbar {
  padding: 0 12px;
}
#toolbar_aplikasi .dx-toolbar-items-container {
  height: 56px;
}
#toolbar_aplikasi .dx-button-mode-contained:not(.tombol-menu),
#toolbar_aplikasi .dx-menu-item {
  background: transparent;
  border-color: transparent;
  color: var(--bar-ink);
}
#toolbar_aplikasi .dx-button-mode-contained:not(.tombol-menu) .dx-icon,
#toolbar_aplikasi .dx-menu-item .dx-icon,
#toolbar_aplikasi .dx-menu-item .dx-menu-item-popout {
  color: var(--bar-ink);
}
#toolbar_aplikasi .dx-button-mode-contained:not(.tombol-menu).dx-state-hover,
#toolbar_aplikasi .dx-menu-item.dx-state-hover {
  background: var(--bar-hover);
}

#toolbar_aplikasi .merek {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--bar-ink);
  text-decoration: none;
}
#toolbar_aplikasi .merek:hover {
  color: var(--bar-ink);
  text-decoration: none;
}
.merek img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--brand-paper);
}
.merek-nama {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.merek-nama b {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.merek-nama span {
  font-size: 0.8rem;
  color: var(--bar-ink-muted);
  max-width: 40vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  #toolbar_aplikasi.dx-toolbar {
    padding: 0 6px;
  }
  #toolbar_aplikasi .merek-nama,
  #toolbar_aplikasi .tombol-bantuan .dx-button-text,
  #toolbar_aplikasi .tombol-menu .dx-button-text {
    display: none;
  }
}

/* Tombol utama kuning, teks ungu tua. */
.tombol-menu.dx-button-mode-contained,
.tombol-utama.dx-button-mode-contained {
  background: var(--brand-sun);
  border-color: var(--brand-sun);
  color: var(--brand-sun-ink);
  font-weight: 700;
}
.tombol-menu.dx-button-mode-contained .dx-icon,
.tombol-utama.dx-button-mode-contained .dx-icon {
  color: var(--brand-sun-ink);
}
.tombol-menu.dx-button-mode-contained.dx-state-hover,
.tombol-utama.dx-button-mode-contained.dx-state-hover {
  background: var(--brand-sun-hover);
}
.tombol-menu.dx-button-mode-contained.dx-state-active,
.tombol-utama.dx-button-mode-contained.dx-state-active {
  background: var(--brand-sun-press);
}

/* ---------- Layar masuk ---------- */
.masuk {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}
.masuk-panel {
  background: var(--brand-ink);
  color: var(--bar-ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 32px;
  gap: 24px;
  position: relative;
  overflow: hidden;
}
.masuk-panel::after {
  /* Senja: lingkar hangat di belakang maskot. */
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(252, 174, 37, 0.28), rgba(252, 174, 37, 0) 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
  pointer-events: none;
}
.masuk-panel img {
  width: min(380px, 80%);
  height: auto;
  position: relative;
  z-index: 1;
}
.masuk-panel h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0;
  text-align: center;
  position: relative;
  z-index: 1;
}
.masuk-panel p {
  margin: 0;
  max-width: 34ch;
  text-align: center;
  color: var(--bar-ink-muted);
  position: relative;
  z-index: 1;
}
.masuk-isi {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px clamp(24px, 6vw, 88px);
  background: var(--ground);
}
.masuk-kartu {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}
.masuk-merek {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.masuk-merek img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}
.masuk-merek b {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--brand-ink);
}
.masuk-merek span {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.masuk-kartu h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 4px;
  color: var(--text);
}
.masuk-kartu .sub {
  margin: 0 0 20px;
  color: var(--text-muted);
}
.masuk-kartu .dx-field-item-label-text {
  font-weight: 600;
  color: var(--text);
}
.masuk-kartu .dx-texteditor.dx-editor-outlined {
  border-color: #a596b5;
}
.masuk-kartu .dx-texteditor.dx-editor-outlined.dx-state-focused {
  border-color: var(--brand-ink);
}
.masuk-kartu .tombol-utama.dx-button {
  height: 44px;
  border-radius: 10px;
  font-size: 15px;
}
.masuk-galat {
  display: none;
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--danger-bg);
  color: var(--danger-ink);
}
.masuk-galat.tampil {
  display: block;
}
.masuk-bantuan {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.92rem;
}
.masuk-bantuan a {
  color: var(--brand-ink);
  font-weight: 700;
  text-decoration: none;
}
.masuk-bantuan a:hover {
  text-decoration: underline;
}

@media (max-width: 820px) {
  .masuk {
    grid-template-columns: 1fr;
  }
  .masuk-panel {
    padding: 28px 16px 20px;
    gap: 10px;
  }
  .masuk-panel img {
    width: 150px;
  }
  .masuk-panel h2 {
    font-size: 1.2rem;
  }
  .masuk-panel p {
    display: none;
  }
  .masuk-isi {
    padding: 28px 16px 40px;
  }
  .masuk-merek {
    display: none;
  }
}

/* ---------- Beranda ---------- */
.beranda {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 0 48px;
  font-variant-numeric: tabular-nums;
}

/* Pita senja: bilah atas seolah turun menjadi langit sore. */
.sapa {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 210px;
  padding: 32px 36px 0;
  border-radius: 20px;
  background:
    radial-gradient(120% 140% at 88% 120%, rgba(252, 174, 37, 0.55) 0%, rgba(251, 70, 27, 0.18) 38%, rgba(251, 70, 27, 0) 62%),
    linear-gradient(180deg, #5b2a86 0%, #6b37a0 100%);
  color: var(--bar-ink);
  overflow: hidden;
  box-shadow: 0 18px 40px -24px rgba(63, 28, 96, 0.7);
}
.sapa-teks {
  padding-bottom: 32px;
  max-width: 60ch;
}
.sapa-tanggal {
  margin: 0 0 6px;
  color: var(--bar-ink-muted);
  font-size: 0.95rem;
}
.beranda .sapa h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}
.sapa-sub {
  margin: 10px 0 0;
  color: #e6d9f5;
  max-width: 46ch;
}
.sapa-maskot {
  width: 250px;
  height: auto;
  margin-bottom: -18px;
  flex: none;
  filter: drop-shadow(0 10px 18px rgba(42, 24, 64, 0.35));
}

.beranda-isi {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

/* Akun toko */
.akun {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 26px;
  box-shadow: 0 1px 2px rgba(42, 24, 64, 0.05), 0 8px 24px -16px rgba(42, 24, 64, 0.25);
}
.akun-kepala {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 18px;
}
.beranda .akun h2,
.beranda .bantuan h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
}
.akun-paket {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.simpan-bar {
  position: relative;
  display: flex;
  height: 14px;
  border-radius: 999px;
  background: #efe6f6;
  overflow: hidden;
  clip-path: inset(0 100% 0 0 round 999px);
}
.simpan-bar.siap {
  clip-path: inset(0 0 0 0 round 999px);
  transition: clip-path 900ms var(--ease-out);
}
.simpan-db {
  background: var(--brand-body);
}
.simpan-file {
  background: var(--brand-sun);
}
.simpan-bar.simpan-penuh .simpan-file {
  background: var(--brand-crest);
}
.simpan-rinci {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 0;
}
.simpan-rinci dt {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
}
.simpan-rinci dd {
  margin: 2px 0 0 18px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}
.titik {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: none;
}
.titik-db { background: var(--brand-body); }
.titik-file { background: var(--brand-sun); }
.titik-sisa { background: #efe6f6; box-shadow: inset 0 0 0 1px #cbb9de; }

.tempo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f6f0fb;
  color: var(--text);
}
.tempo > i {
  font-size: 1.3rem;
  color: var(--brand-ink);
}
.tempo-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.tempo-tanggal {
  font-weight: 700;
  font-size: 1.05rem;
}
.tempo-sisa {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand-ink);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}
.tempo-dekat {
  background: #fff3d6;
}
.tempo-dekat .tempo-sisa {
  color: #7a4b00;
}
.tempo-habis {
  background: var(--danger-bg);
}
.tempo-habis > i,
.tempo-habis .tempo-sisa {
  color: var(--danger-ink);
}

/* Bantuan: potongan struk, tepi bawah bergerigi seperti kertas kasir yang disobek. */
.bantuan {
  --gerigi: 10px;
  position: relative;
  padding: 24px 26px calc(26px + var(--gerigi));
  background: var(--brand-paper);
  color: var(--brand-sun-ink);
  border-radius: 16px 16px 0 0;
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--gerigi) * 2) var(--gerigi) repeat-x,
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--gerigi)) no-repeat;
  mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--gerigi) * 2) var(--gerigi) repeat-x,
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--gerigi)) no-repeat;
  filter: drop-shadow(0 8px 14px rgba(42, 24, 64, 0.12));
}
.bantuan::before {
  /* garis putus-putus khas struk */
  content: "";
  display: block;
  height: 0;
  border-top: 2px dashed #d9c7ad;
  margin: -6px 0 18px;
}
.beranda .bantuan h2 {
  color: var(--brand-sun-ink);
}
.bantuan p {
  margin: 8px 0 0;
  max-width: 40ch;
}
.beranda a.bantuan-tombol {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--brand-ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 160ms ease;
}
.beranda a.bantuan-tombol:hover {
  color: #fff;
  text-decoration: none;
  background: var(--brand-ink-deep);
}
.bantuan-tombol:active {
  transform: scale(0.97);
}
.bantuan-tombol:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--brand-paper), 0 0 0 4px var(--brand-ink);
}
.bantuan-tombol i {
  font-size: 0.85em;
}
.bantuan .bantuan-catatan {
  font-size: 0.85rem;
  color: #6b5a4a;
}

html.tema-gelap .sapa {
  background:
    radial-gradient(120% 140% at 88% 120%, rgba(252, 174, 37, 0.35) 0%, rgba(251, 70, 27, 0.14) 38%, rgba(251, 70, 27, 0) 62%),
    linear-gradient(180deg, #3f1c60 0%, #4a2470 100%);
}
html.tema-gelap .simpan-bar,
html.tema-gelap .titik-sisa {
  background: #33264a;
  box-shadow: none;
}
html.tema-gelap .tempo {
  background: #2a1f3a;
}
html.tema-gelap .tempo > i {
  color: #c9aef5;
}
html.tema-gelap .tempo-sisa {
  background: #1e1629;
  color: #d6c3ef;
}
html.tema-gelap .tempo-dekat {
  background: #3a2d0c;
}
html.tema-gelap .tempo-dekat .tempo-sisa {
  color: #f6d58a;
}
html.tema-gelap .bantuan {
  background: #2a1f3a;
  color: var(--text);
}
html.tema-gelap .beranda .bantuan h2 {
  color: var(--text);
}
html.tema-gelap .bantuan::before {
  border-top-color: #4a3a60;
}
html.tema-gelap .bantuan .bantuan-catatan {
  color: var(--text-muted);
}
html.tema-gelap .beranda a.bantuan-tombol {
  background: var(--brand-sun);
  color: var(--brand-sun-ink);
}

@media (max-width: 900px) {
  .beranda-isi {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .beranda {
    padding: 0 0 32px;
  }
  .sapa {
    min-height: 0;
    padding: 22px 18px 0;
    border-radius: 0 0 20px 20px;
  }
  .sapa-teks {
    padding-bottom: 22px;
  }
  .sapa-sub {
    display: none;
  }
  .sapa-maskot {
    width: 110px;
    margin-bottom: -8px;
  }
  .beranda-isi {
    padding: 0 12px;
  }
  .akun,
  .bantuan {
    padding-left: 18px;
    padding-right: 18px;
  }
  .simpan-rinci {
    grid-template-columns: 1fr 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .simpan-bar,
  .simpan-bar.siap {
    clip-path: none;
    transition: none;
  }
}

/* ---------- Menu Aplikasi (seperti AccuTrax Web) ---------- */
.menu-aplikasi .dx-popup-content {
  padding: 0;
}
.menu-aplikasi .dx-popup-title {
  font-family: var(--font-ui);
  font-weight: 800;
}
.menu {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  font-family: var(--font-ui);
  color: var(--text);
}
.menu-cari {
  position: relative;
  display: flex;
  align-items: center;
  margin: 14px 20px 10px;
}
.menu-cari-ikon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}
.menu-cari-input {
  width: 100%;
  height: 44px;
  padding: 0 128px 0 40px;
  border-radius: 10px;
  border: 1px solid #a596b5;
  background: var(--surface);
  color: var(--text);
  font: 400 15px/1 var(--font-ui);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.menu-cari-input::placeholder {
  color: var(--text-muted);
}
.menu-cari-input:focus {
  border-color: var(--brand-ink);
  box-shadow: 0 0 0 3px rgba(91, 42, 134, 0.18);
}
.menu-cari-jumlah {
  position: absolute;
  right: 48px;
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.menu-cari-hapus {
  position: absolute;
  right: 6px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.menu-pintas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 20px 6px;
}
.menu-aplikasi .menu-pintas-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--brand-paper);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.menu-pintas-item i {
  color: var(--brand-ink);
}
/* Gulir di luar, kolom di dalam: kolom CSS dengan tinggi tetap meluber ke samping. */
.menu-gulir {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 20px 20px;
}
.menu-grid {
  columns: 3 250px;
  column-gap: 16px;
}
.menu-grup {
  break-inside: avoid;
  margin: 0 0 14px;
  padding: 10px 8px 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.menu-grup.grup-cocok {
  border-color: #f2c66e;
  background: #fdf6e7;
}
.menu-aplikasi .menu-grup .menu-grup-judul {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  padding: 0 4px;
  font: 700 14px/1.3 var(--font-ui);
  color: var(--text);
}
.menu-grup-ikon {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 14px;
  background: #efe6f6;
  color: var(--brand-ink);
}
.menu-grup-nama {
  flex: 1;
}
.menu-grup-jumlah {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.menu-daftar {
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu-aplikasi .menu-item {
  display: block;
  padding: 7px 10px 7px 44px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  line-height: 1.3;
}
.menu-aplikasi .menu-item.aktif {
  font-weight: 700;
  color: var(--brand-ink);
}
.menu-tautan:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
@media (hover: hover) and (pointer: fine) {
  .menu-aplikasi .menu-item:hover,
  .menu-aplikasi .menu-pintas-item:hover {
    background: #fdecc8;
    text-decoration: none;
  }
  .menu-cari-hapus:hover {
    background: rgba(42, 24, 64, 0.08);
  }
}
.menu-aplikasi .menu-item:focus-visible {
  background: #fdecc8;
}
.menu-hit {
  background: rgba(252, 174, 37, 0.55);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}
.menu-kosong {
  padding: 24px 20px;
  color: var(--text-muted);
}
.menu-kosong-judul {
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--text);
}
.menu-saran {
  border: 0;
  padding: 0;
  background: none;
  color: var(--brand-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
html.tema-gelap .menu-cari-input {
  border-color: #6a5a7c;
}
html.tema-gelap .menu-aplikasi .menu-pintas-item {
  background: #2a1f3a;
}
html.tema-gelap .menu-grup-ikon {
  background: #33264a;
  color: #c9aef5;
}
html.tema-gelap .menu-pintas-item i,
html.tema-gelap .menu-aplikasi .menu-item.aktif,
html.tema-gelap .menu-saran {
  color: #c9aef5;
}
html.tema-gelap .menu-grup.grup-cocok {
  border-color: #6b5320;
  background: #2b2416;
}
html.tema-gelap .menu-aplikasi .menu-item:hover,
html.tema-gelap .menu-aplikasi .menu-pintas-item:hover,
html.tema-gelap .menu-aplikasi .menu-item:focus-visible {
  background: #3a2d4c;
}
@media (max-width: 600px) {
  .menu-cari {
    margin: 10px 12px 8px;
  }
  .menu-pintas {
    margin: 0 12px 6px;
  }
  .menu-gulir {
    padding: 4px 12px 16px;
  }
}
