/* ═══════════════════════════════════════════════════════════════════════════
   togel.css v2 — halaman pasang togel + Riwayat Angka (meniru kompetitor)
   TEMA AQUA-BLUE (sesuai logo). Ganti warna cukup lewat 5 variabel --tg-* di bawah.
   TANPA inline style (CSP).
   ═══════════════════════════════════════════════════════════════════════════ */

/* Saat halaman pasang aktif, sembunyikan judul + tab "Pasang/Hasil/Tiket" agar halaman bersih seperti kompetitor */
#viewLottery.tg-on > .nx-view-head,
#viewLottery.tg-on > .nx-lot-tabs { display: none !important; }

.tg-hide { display: none !important; }

.tg-root,
.tg-hist {
  --tg-prim: #0a5d75;      /* aqua tua    : pill Riwayat Angka, tombol refresh */
  --tg-sec:  #00b4d6;      /* aqua logo   : tombol kategori/sub-kategori */
  --tg-act:  #8ff3ff;      /* aqua terang : tombol aktif, Deposit */
  --tg-ink:  #00151b;      /* teks di atas tombol aqua */
  --tg-page: #050c14;      /* warna latar halaman (untuk label kotak) */
  --tg-s50: #f8fafc; --tg-s200: #e2e8f0; --tg-s300: #cbd5e1; --tg-s400: #94a3b8; --tg-s700: #334155;
  font-size: 12px;
  line-height: 1.25;
  color: #fff;
}
.tg-root *, .tg-root *::before, .tg-root *::after,
.tg-hist *, .tg-hist *::before, .tg-hist *::after { box-sizing: border-box; }
.tg-root button, .tg-root select, .tg-root input, .tg-root textarea,
.tg-hist button, .tg-hist select { font-family: inherit; }
.tg-root button, .tg-hist button { cursor: pointer; }

.tg-root {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 0 120px;          /* ruang untuk bottom-nav fixed */
}
@media (max-width: 520px) {
  .tg-root, .tg-hist { margin-left: -13px; margin-right: -13px; }
}

/* ── Header: judul, saldo, buka/tutup, marquee ─────────────────────────── */
.tg-bar { display: flex; flex-direction: column; gap: 8px; padding: 2px 2px 0; }
.tg-r1 { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tg-l   { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.tg-rgt { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.tg-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap;
}
.tg-back {
  width: 22px; height: 22px; padding: 0; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: #fff; border: 0; font-size: 20px; line-height: 1;
}
.tg-pill {
  padding: 4px 8px;
  background: var(--tg-prim); color: #fff;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 8px;
  font-size: 10px; font-weight: 600; letter-spacing: .02em;
}
.tg-user { font-size: 12px; font-weight: 800; text-transform: uppercase; white-space: nowrap; }
.tg-acts { display: flex; align-items: center; gap: 6px; }
.tg-icon-btn {
  width: 24px; height: 24px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tg-prim); color: #fff;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 6px;
}
.tg-icon-btn svg { width: 14px; height: 14px; }
.tg-deposit {
  height: 24px; padding: 0 12px;
  background: var(--tg-act); color: var(--tg-ink);
  border: 1px solid #d9fbff; border-radius: 8px;
  font-size: 10px; font-weight: 700;
}
.tg-oc { display: flex; justify-content: center; align-items: stretch; font-size: 10px; letter-spacing: .06em; }
.tg-oc > div { padding: 0 8px; }
.tg-oc .tg-o { text-align: right; border-right: 1px solid rgba(255, 255, 255, .7); }
.tg-oc .tg-c { text-align: left; }
.tg-oc b { display: block; font-size: 11px; font-weight: 500; letter-spacing: 0; white-space: nowrap; }

.tg-note {
  padding: 4px 8px;
  background: rgba(240, 80, 96, .18); border: 1px solid rgba(240, 80, 96, .5); border-radius: 6px;
  color: #fecaca; font-size: 11px; font-weight: 600; text-align: center;
}
.tg-marq { display: flex; align-items: center; gap: 8px; overflow: hidden; font-size: 10px; }
.tg-live {
  flex: none; padding: 2px 6px;
  background: #f00; color: #fff; border-radius: 4px;
  font-size: 10px; font-weight: 700;
  animation: tgPulse 2s ease-in-out infinite;
}
.tg-mwrap { flex: 1; overflow: hidden; white-space: nowrap; }
.tg-mtext { display: inline-block; padding-left: 100%; animation: tgMarq 16s linear infinite; }
.tg-link { color: #4da3ff; text-decoration: underline; }
@keyframes tgMarq  { to { transform: translateX(-100%); } }
@keyframes tgPulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
  .tg-mtext { animation: none; padding-left: 0; }
  .tg-live  { animation: none; }
}

/* ── KATEGORI & sub-kategori ────────────────────────────────────────────── */
.tg-box {
  position: relative;
  margin-top: 8px;
  padding: 7px 5px 5px;
  border: 1px solid #fff; border-radius: 8px;
}
.tg-box + .tg-box { margin-top: 10px; }
.tg-lab {
  position: absolute; top: -8px; left: 14px;
  padding: 0 4px;
  background: var(--tg-page); color: #fff;
  font-size: 10px; font-weight: 600; line-height: 14px; letter-spacing: .03em;
}
.tg-g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.tg-g4 + .tg-g4 { margin-top: 6px; }
.tg-b {
  height: 30px; padding: 0 2px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tg-sec); color: var(--tg-ink);
  border: 0; border-radius: 6px;
  font-size: 12px; font-weight: 600; line-height: 1.1; text-align: center;
  overflow-wrap: break-word; min-width: 0;
}
.tg-b.on { background: var(--tg-act); color: var(--tg-ink); font-weight: 700; box-shadow: 0 0 0 2px var(--tg-sec) inset; }
@media (max-width: 340px) { .tg-b { font-size: 11px; } }

/* ── Kartu terang: Tipe Bet + panel ─────────────────────────────────────── */
.tg-light {
  display: flex; flex-direction: column; gap: 8px;
  padding: 8px;
  background: var(--tg-s50); color: #000;
  border-radius: 8px;
}
.tg-tipbox { position: relative; padding: 9px 8px 6px; border: 1px solid #9ca3af; border-radius: 8px; }
.tg-tiplab {
  position: absolute; top: -8px; left: 14px; padding: 0 3px;
  background: var(--tg-s50); color: #9ca3af;
  font-size: 10px; line-height: 14px;
}
.tg-tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tg-tip {
  height: 28px; padding: 0 2px;
  color: #000; border: 1px solid #000; border-radius: 6px;
  font-size: 12px; font-weight: 500;
}
.tg-tip[data-tip="full"]     { background: #e2e8f0; font-size: 9px; }
.tg-tip[data-tip="diskon"]   { background: #bfdbfe; }
.tg-tip[data-tip="bb"]       { background: #a5f3fc; }
.tg-tip[data-tip="full"].on     { background: #94a3b8; }
.tg-tip[data-tip="diskon"].on   { background: #60a5fa; }
.tg-tip[data-tip="bb"].on       { background: #22d3ee; }

.tg-panel { display: flex; flex-direction: column; gap: 8px; }
.tg-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 8px;
  background: var(--tg-s300); color: #000;
  border-radius: 8px;
  font-size: 13px; font-weight: 700;
}
.tg-head small { font-size: 11px; font-weight: 700; }
.tg-form {
  display: flex; flex-direction: column; gap: 8px;
  padding: 4px;
  background: var(--tg-s300); color: #000;
  border-radius: 8px;
}
.tg-info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; padding: 4px 4px 2px; }
.tg-select {
  flex: 0 0 92px; width: 92px; height: 24px; padding: 0 22px 0 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 6px center;
  color: #000; border: 1px solid #cbd5e1; border-radius: 6px;
  font-size: 12px;
  appearance: none; -webkit-appearance: none;
}
.tg-ibtn {
  /* jangan menyusut lebih kecil dari tulisannya (dulu min-width:0 -> tombol tergencet teks satuan) */
  flex: 1 1 0; min-width: max-content; height: 22px; padding: 0 6px;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  background: var(--tg-s50); color: #000;
  border: 1px solid #000; border-radius: 6px;
  font-size: 11px; font-weight: 500; white-space: nowrap;
}
.tg-ibtn svg { width: 13px; height: 13px; flex: none; }
.tg-unit { flex: 0 0 100%; margin: 0; padding: 0 2px; font-size: 11px; font-weight: 600; text-align: left; }
/* keterangan satuan selalu di baris sendiri (di bawah tombol), boleh turun baris di layar sempit */
.tg-unit.inl { flex: 1 1 100%; text-align: right; white-space: normal; }
.tg-unit.pill { flex: 0 0 auto; padding: 1px 8px; background: #fff; border-radius: 999px; font-size: 10px; font-weight: 700; }

/* ── Tabel input ────────────────────────────────────────────────────────── */
.tg-tw { overflow-x: auto; }
.tg-table { width: 100%; border-collapse: collapse; color: #000; }
.tg-table th { padding: 4px 2px; border: 0; background: transparent; color: #000; font-size: 12px; font-weight: 700; text-align: center; }
.tg-table td { padding: 4px 2px; border: 0; background: transparent; color: #000; text-align: center; font-size: 12px; }
.tg-table tr:hover td { background: transparent; }
.tg-c-no { width: 22px; }
.tg-c-bb { width: 22px; }
.tg-sub td { padding: 1px 2px 3px; font-size: 11px; font-weight: 500; }
.tg-in {
  width: 100%; min-width: 40px; height: 22px; padding: 0 2px;
  background: #fff; color: #000;
  border: 0; border-radius: 8px;
  font-size: 12px; text-align: center;
}
.tg-in::placeholder { color: #9ca3af; }
.tg-in:disabled { background: #d5dce5; color: #94a3b8; }
.tg-in:disabled::placeholder { color: #a5aebb; }
.tg-in.bad { outline: 2px solid #dc2626; }
.tg-in:focus, .tg-sel:focus, .tg-select:focus, .tg-ta:focus, .tg-qbox:focus { outline: 2px solid #000; outline-offset: 0; }
.tg-in.tg-lg { height: 28px; padding: 0 8px; border: 1px solid #475569; border-radius: 6px; font-size: 12px; }
.tg-in.tg-lg:disabled { border-color: #94a3b8; }
.tg-gi, .tg-di { height: 26px; border: 1px solid #475569; border-radius: 6px; }
.tg-gi:disabled, .tg-di:disabled { border-color: #94a3b8; }
.tg-chk {
  appearance: none; -webkit-appearance: none;
  width: 14px; height: 14px; margin: 0; vertical-align: middle;
  background: #fff; border: 1px solid #9ca3af; border-radius: 3px;
}
.tg-chk:checked {
  background: #334155 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
  border-color: #334155;
}
.tg-chk:disabled { background-color: #eef2f6; border-color: #cbd5e1; }
.tg-chk:checked:disabled { background-color: #64748b; border-color: #64748b; }
.tg-sel {
  width: 100%; min-width: 80px; height: 24px; padding: 0 2px;
  background: #fff; color: #000;
  border: 0; border-radius: 8px;
  font-size: 10px; text-align: center; text-align-last: center;
}
.tg-sel.bad { outline: 2px solid #dc2626; }
.tg-kei { min-width: 34px; font-size: 12px; white-space: nowrap; }
.tg-single .tg-num, .tg-single .tg-amt { height: 24px; }

/* ── Panel sederhana: grid (Colok Bebas / Shio), Tengah Tepi ─────────────── */
.tg-grid { display: grid; gap: 8px 8px; padding: 6px 4px 2px; }
.tg-grid.tg-c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tg-grid.tg-c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tg-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tg-cl {
  height: 20px; padding: 0 2px;
  display: flex; align-items: center; justify-content: center; gap: 3px;
  background: var(--tg-s50); color: #000;
  border-radius: 4px; font-size: 11px; white-space: nowrap; overflow: hidden;
}
.tg-ic { font-size: 12px; line-height: 1; }
.tg-cell .tg-in { min-width: 0; }
.tg-kt { display: flex; justify-content: space-between; padding: 4px 14px 0; font-size: 11px; font-weight: 600; color: #000; }
.tg-kt.r { justify-content: flex-end; }

.tg-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 6px 4px 2px; }
.tg-duo-c { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tg-duo-l {
  height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tg-s200); border: 1px solid var(--tg-s400); border-radius: 4px;
  font-size: 13px; color: #000;
}
.tg-duo-k { text-align: center; font-size: 11px; }
.tg-duo .tg-di { height: 32px; text-align: left; padding: 0 8px; font-size: 12px; }

/* ── Diagram AS/KOP/KEPALA/EKOR (Angka Tarung & Colok Jitu) ─────────────── */
.tg-diag { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 6px; background: var(--tg-s200); border-radius: 8px; }
.tg-dgb { display: flex; justify-content: space-between; align-items: center; padding: 3px 6px; background: var(--tg-s50); border-radius: 6px; font-size: 10px; color: #000; }
.tg-dgl { font-weight: 500; }
.tg-dgd { display: inline-flex; align-items: center; }
.tg-dgd i {
  width: 16px; height: 16px; margin-left: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; font-style: normal;
}
.tg-dgd i.on { background: var(--tg-s300); font-weight: 700; }

/* ── Quick 2D / Quick 4D ────────────────────────────────────────────────── */
.tg-qr {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; align-items: center;
  padding: 7px 4px; border-top: 1px solid rgba(255, 255, 255, .75);
}
.tg-qr.nom { align-items: start; }
.tg-ql { font-size: 11px; font-weight: 500; color: #000; }
.tg-tgs { display: grid; gap: 6px; }
.tg-tgs.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tg-tgs.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tg-tg {
  min-height: 28px; padding: 2px 4px;
  background: var(--tg-s50); color: #000;
  border: 1px solid #000; border-radius: 6px;
  font-size: 12px; font-weight: 500; line-height: 1.1;
}
.tg-tg.on { background: var(--tg-s400); }
.tg-tg:disabled { background: var(--tg-s200); color: var(--tg-s400); border-color: var(--tg-s400); cursor: not-allowed; }
.tg-qhint { padding: 0 6px; font-size: 10px; color: #475569; }
.tg-ta {
  width: 100%; min-height: 150px; padding: 8px;
  background: #fff; color: #000;
  border: 1px solid #64748b; border-radius: 6px;
  font-size: 14px; letter-spacing: .04em; resize: vertical;
}
.tg-qbtns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tg-btn2 { height: 24px; background: #fff; color: #000; border: 1px solid #000; border-radius: 6px; font-size: 11px; font-weight: 500; }
.tg-qc { padding: 6px 2px 4px; border-top: 1px solid rgba(255, 255, 255, .75); }
.tg-qch { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.tg-qcl { min-width: 24px; font-size: 12px; font-weight: 500; color: #000; }
.tg-qb { display: flex; flex-wrap: wrap; gap: 6px; }
.tg-qbox { width: 52px; height: 22px; padding: 0 2px; background: #fff; color: #000; border: 0; border-radius: 4px; font-size: 12px; text-align: center; }
.tg-qctl { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 11px; color: #000; }
.tg-qctl span { display: inline-flex; align-items: center; gap: 6px; }
.tg-rnd {
  width: 18px; height: 18px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: #000;
  border: 1px solid #000; border-radius: 50%;
  font-size: 14px; font-weight: 700; line-height: 1;
}
.tg-qnn { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.tg-qn { height: 26px; border: 1px solid #475569; border-radius: 6px; }
.tg-qn:disabled { border-color: #94a3b8; }
.tg-qdisk { display: flex; align-items: center; gap: 6px; padding: 2px 4px; font-size: 11px; color: #000; }
.tg-qdisk .tg-ql { flex: 0 0 76px; }
.tg-qdisk > span:not(.tg-ql) { flex: 1 1 0; text-align: center; }
.tg-qtot { padding: 2px 6px; font-size: 11px; color: #000; }

/* ── Angka Tarung ───────────────────────────────────────────────────────── */
.tg-tth { display: grid; grid-template-columns: 1fr 1.4fr; padding: 4px 8px 0; font-size: 12px; font-weight: 700; text-align: center; color: #000; }
.tg-tr { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; align-items: center; padding: 3px 8px; }
.tg-tr > span { text-align: center; font-size: 12px; color: #000; }
.tg-bar2 { margin: 4px 0; padding: 2px 8px; background: #fff; color: #000; border-radius: 999px; font-size: 10px; font-weight: 700; text-align: center; }
.tg-tng { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px 8px; padding: 0 4px 4px; }
.tg-tnc { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tg-tnc.w3 { grid-column: span 3; }
.tg-tnc.w2 { grid-column: span 2; }
.tg-tnc label { text-align: center; font-size: 11px; font-weight: 600; color: #000; }
.tg-tn { text-align: left; }

/* ── BB Full Set ────────────────────────────────────────────────────────── */
.tg-bbw { display: grid; grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); gap: 8px; padding: 4px 2px; }
.tg-bbl { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.tg-bbh { font-size: 12px; font-weight: 700; color: #000; }
.tg-bbl p { margin: 0; font-size: 11px; line-height: 1.35; color: #000; }
.tg-bbt th, .tg-bbt td { font-size: 11px; }
.tg-bbt th:first-child, .tg-bbt td.tg-bbn { text-align: left; }
.tg-bbt .tg-in { min-width: 0; height: 24px; }
.tg-bbt th .tg-in { font-weight: 700; }

/* ── Ringkasan (JLH / ANGKA / NOMINAL) ──────────────────────────────────── */
.tg-foot { display: flex; flex-direction: column; gap: 6px; padding: 2px 2px 4px; }
.tg-sum { padding: 6px 8px; background: rgba(255, 255, 255, .38); color: #000; border-radius: 6px; }
.tg-sum-h { padding: 2px 0; font-size: 14px; font-weight: 500; }
.tg-sumt { width: 100%; border-collapse: collapse; font-size: 11px; }
.tg-sumt th { padding: 3px 2px; background: transparent; color: #334155; font-size: 10px; font-weight: 400; text-align: left; }
.tg-sumt td { padding: 3px 2px; background: transparent; color: #000; text-align: left; vertical-align: top; border: 0; }
.tg-sumt th:last-child, .tg-sumt td:last-child { text-align: right; }
.tg-sumt .tg-sumtot td { padding: 6px 4px; background: var(--tg-s200); font-size: 11px; }
.tg-tsum td, .tg-tsum th { padding-top: 5px; padding-bottom: 5px; }
/* ── Ringkasan std (4D/3D/2D) — persis kompetitor ──────────────────────── */
/* ── Ringkasan 4D/3D/2D: struktur persis kompetitor ─────────────────────── */
/* Tabel ringkasan 4D/3D/2D.
   CATATAN: app.css punya aturan global `td { white-space: nowrap }` dan CSP server melarang
   atribut style="" — jadi lebar kolom & pembungkusan teks WAJIB diatur di sini lewat class. */
.tg-sum-std { width: 100%; max-width: 100%; border-collapse: collapse; table-layout: fixed; }
.tg-sum-std th, .tg-sum-std td { white-space: normal; box-sizing: border-box; }
/* lebar kolom: baris header menentukan lebar (table-layout: fixed) */
.tg-sum-std th.tg-sc-h-jlh   { width: 32px; }
.tg-sum-std th.tg-sc-h-nom   { width: 92px; }
.tg-sum-std th { padding: 2px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: #334155; }
.tg-sum-std th.tg-sc-h-jlh, .tg-sum-std th.tg-sc-h-angka { text-align: left; }
.tg-sum-std th.tg-sc-h-nom { text-align: right; }
.tg-sum-std .tg-sc-row > td { padding: 4px; border-bottom: 1px solid rgba(0,0,0,.10); vertical-align: top; }
/* JLH */
.tg-sum-std td.tg-sc-jlh { font-size: 12px; font-weight: 600; color: #0f172a; text-align: left; }
/* ANGKA: tiap nomor satu <span>, turun baris dengan wajar */
.tg-sum-std td.tg-sc-angka { font-size: 11px; line-height: 1.6; color: #334155; text-align: left;
  white-space: normal; overflow-wrap: anywhere; word-break: normal; }
/* flex-wrap: tiap nomor = 1 kotak, pindah baris otomatis. Tidak terpengaruh white-space global. */
.tg-sum-std td.tg-sc-angka { overflow: hidden; }
.tg-angka-list { display: flex; flex-wrap: wrap; column-gap: 4px; row-gap: 0; width: 100%; min-width: 0; }
.tg-angka-list span { display: block; flex: 0 0 auto; white-space: nowrap; }
/* NOMINAL: 3 baris vertikal rata kanan */
.tg-sum-std td.tg-sc-nom-td { text-align: right; vertical-align: top; }
.tg-nom-col { display: flex; flex-direction: column; align-items: flex-end; }
.tg-nom-col span             { font-size: 11px; line-height: 1.55; color: #0f172a; white-space: nowrap; }
.tg-nom-col span:first-child { font-weight: 600; }
.tg-nom-col span:last-child  { font-weight: 700; }
/* Total X 1000 */
.tg-sum-std .tg-sumtot > td { padding: 6px 4px; font-size: 12px; font-weight: 700;
  background: rgba(0,0,0,.06); border-top: 1px solid rgba(0,0,0,.18); }
.tg-sum-std td.tg-sc-nom-total { text-align: right; font-size: 13px; white-space: nowrap; }

.tg-tsum tbody tr { border-top: 1px solid rgba(255, 255, 255, .8); }
.tg-tsum td:nth-child(3), .tg-tsum th:nth-child(3) { text-align: center; }
.tg-err {
  padding: 8px 10px;
  background: #ef4444; color: #fff;
  border-radius: 6px;
  font-size: 12px; font-weight: 600; text-align: center;
}
.tg-submit {
  width: 100%; height: 40px;
  background: var(--tg-s700); color: #fff;
  border: 1px solid #000; border-radius: 6px;
  font-size: 14px; font-weight: 500;
}
.tg-submit:disabled { opacity: .25; color: #d1d5db; cursor: not-allowed; }

.tg-soon {
  padding: 22px 12px;
  background: #fff; color: #334155;
  border-radius: 8px;
  font-size: 13px; font-weight: 600; text-align: center;
}
.tg-soon small { display: block; margin-top: 4px; font-weight: 400; color: #64748b; }

/* ── Dialog (Reward / Minimal Bet / Table Shio / Berhasil) ──────────────── */
.tg-modal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .62);
}
.tg-dlg {
  width: 100%; max-width: 340px; max-height: 84vh; overflow-y: auto;
  padding: 16px;
  background: #fff; color: #111827;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}
.tg-dlg h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.tg-dlg p { margin: 6px 0; font-size: 13px; line-height: 1.45; }
.tg-dlg table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tg-dlg th, .tg-dlg td { padding: 6px 4px; text-align: left; border-bottom: 1px solid #e5e7eb; }
.tg-dlg td:last-child, .tg-dlg th:last-child { text-align: right; font-weight: 700; }
.tg-dlg .tg-shiot td:last-child, .tg-dlg .tg-shiot th:last-child { text-align: left; font-weight: 400; font-size: 12px; }
.tg-dlg .tg-shiot td:first-child { white-space: nowrap; font-weight: 600; }
.tg-dbtns { display: flex; gap: 8px; margin-top: 14px; }
.tg-dbtn {
  flex: 1; height: 38px;
  background: var(--tg-s200); color: #000;
  border: 1px solid #000; border-radius: 8px;
  font-size: 13px; font-weight: 600;
}
.tg-dbtn.pri { background: var(--tg-sec); color: var(--tg-ink); }
.tg-ok { text-align: center; }
.tg-tick { font-size: 38px; line-height: 1.1; }

/* ── Riwayat Angka ──────────────────────────────────────────────────────── */
.tg-hist { display: flex; flex-direction: column; gap: 8px; padding-bottom: 110px; }
.tg-htitle { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.tg-hsel {
  width: 100%; height: 36px; padding: 0 10px;
  background: #fff; color: #000;
  border: 0; border-radius: 8px;
  font-size: 13px;
}
.tg-hfilter {
  height: 40px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: #fff; color: #111;
  border: 1px solid #e5e7eb; border-radius: 8px;
  font-size: 12px; font-weight: 600;
}
.tg-hfilter svg { width: 14px; height: 14px; }
.tg-htable { width: 100%; border-collapse: collapse; background: #fff; color: #111; font-size: 12px; }
.tg-htable th {
  padding: 7px 4px;
  background: #e5e7eb; color: #6b7280;
  font-size: 11px; font-weight: 700; text-align: center; text-transform: uppercase;
}
.tg-htable td { padding: 8px 4px; border-top: 1px solid #e5e7eb; text-align: center; vertical-align: middle; }
.tg-hp { font-weight: 700; }
.tg-hp small { display: block; font-weight: 400; color: #6b7280; font-size: 10px; }
.tg-hd { font-size: 11px; line-height: 1.3; color: #374151; }
.tg-hn { color: #0891b2; font-size: 15px; font-weight: 800; letter-spacing: .04em; }
.tg-hpager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tg-hpager button {
  min-width: 32px; height: 30px; padding: 0 8px;
  background: #fff; color: #111;
  border: 1px solid #cbd5e1; border-radius: 6px;
  font-size: 12px;
}
.tg-hpager button.on { background: var(--tg-sec); border-color: var(--tg-sec); color: var(--tg-ink); font-weight: 700; }
.tg-hpager button:disabled { opacity: .4; cursor: not-allowed; }
.tg-hempty { padding: 20px; text-align: center; color: #cbd5e1; }

/* home.php: pengganti style="cursor:pointer" pada logo login (diblokir CSP style-src 'self') */
.nx-auth-logo { cursor: pointer; }

/* ── Popover Minimal Bet (seperti kompetitor). app.css punya aturan global table/th/td → ditimpa di sini ── */
.tg-info { position: relative; }
.tg-mbpop { position: absolute; top: calc(100% + 4px); right: 4px; z-index: 40; min-width: 250px; max-width: calc(100% - 8px);
  padding: 10px 10px 8px; background: #fff; color: #0f172a; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.06); }
.tg-mbpop .tg-mbt { width: 100%; border-collapse: collapse; font-size: 12px; border: 1px solid #e2e8f0; }
.tg-mbpop .tg-mbt th { padding: 6px 8px; background: #f1f5f9; color: #64748b; font-size: 11px; font-weight: 500;
  text-transform: uppercase; text-align: left; border-bottom: 1px solid #e2e8f0; }
.tg-mbpop .tg-mbt th:last-child, .tg-mbpop .tg-mbt td:last-child { text-align: right; }
.tg-mbpop .tg-mbt td { padding: 7px 8px; color: #0f172a; background: #fff; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.tg-mbpop .tg-mbt tr:last-child td { border-bottom: 0; }
.tg-mbcap { padding-top: 8px; text-align: center; font-size: 11px; color: #64748b; }

/* ── Mode DISKON: baris diskon di ringkasan + total bayar ── */
.tg-nom-col .tg-sc-disc { font-size: 10.5px; font-weight: 700; color: #0369a1; white-space: nowrap; }
.tg-sum-std .tg-sumdisc > td { background: rgba(2,132,199,.08); color: #0369a1; border-top: 0; }
.tg-sum-std .tg-sumpay > td  { background: rgba(2,132,199,.16); color: #0c4a6e; border-top: 0; }
.tg-sum-std .tg-sumdisc .tg-sc-nom-total, .tg-sum-std .tg-sumpay .tg-sc-nom-total { color: inherit; }

/* ── Dialog: angka melewati limit ── */
.tg-blk-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; max-height: 220px; overflow: auto;
  padding: 8px; margin: 6px 0 10px; background: #fff; border: 2px solid #fecaca; border-radius: 8px; }
.tg-blk-chip { padding: 3px 6px; border-radius: 8px; background: #fee2e2; color: #dc2626; font-size: 12px; font-weight: 600; text-align: center; }

/* Rincian bersama: jarak antarblok jenis & total semua */
.tg-sum .tg-sumt + .tg-sum-h { margin-top: 12px; }
.tg-sum .tg-sum-grand { margin-top: 10px; }
.tg-sum .tg-sum-grand .tg-sumtot > td { border-top: 2px solid #334155; }

/* ── Warna panel ikut mode (sama dengan tombol Tipe Bet) ── */
#tgPanel[data-tip="diskon"] { --tg-s300: #bfdbfe; --tg-s200: #93c5fd; }
#tgPanel[data-tip="bb"]     { --tg-s300: #a5f3fc; --tg-s200: #67e8f9; }
#tgPanel[data-tip="diskon"] .tg-sum { background: rgba(239, 246, 255, .55); }
#tgPanel[data-tip="bb"] .tg-sum     { background: rgba(236, 254, 255, .55); }

/* ── Tab BB: susunan yang dicakup satu tiket ── */
.tg-sc-cover { margin-top: 3px; font-size: 10.5px; font-weight: 700; color: #0e7490; }
.tg-cover-list { font-size: 10.5px; color: #155e75; }

/* Kei = biaya tambahan (oranye), beda dari diskon (biru) */
.tg-nom-col .tg-sc-disc.tg-sc-kei { color: #c2410c; }
.tg-sum-std .tg-sumkei > td { background: rgba(234, 88, 12, .10); color: #c2410c; border-top: 0; }
.tg-sum-std .tg-sumkei .tg-sc-nom-total { color: inherit; }