/* ============================================================
   STYLE.CSS — Conversion Syndicate Admin Panel (Light Theme)
   ============================================================ */
:root {
  --bg: #f1f5f9;
  --bg2: #ffffff;
  --bg3: #f8fafc;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --info: #0ea5e9;
  --success: #22c55e;
  --danger: #ef4444;
  --gold: #f59e0b;
  --gold-d: #d97706;
  --rs: #8b5cf6;
  --sidebar-w: 220px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; overflow-x: hidden; }
a { color: var(--info); text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
th { color: #fff; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; background: #4a7ebd; }
input, select, textarea { background: #fff; border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 7px 10px; font-size: 13px; width: 100%; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--info); box-shadow: 0 0 0 3px rgba(14,165,233,.1); }
label { font-size: 12px; color: #475569; display: block; margin-bottom: 4px; font-weight: 500; }
/* ── App Layout ── */
.app { display: flex; height: 100vh; overflow: hidden; }
/* ── Login Screen ── */
.login-wrap {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e0f2fe 0%, #f0fdf4 100%);
  z-index: 999;
}
.login-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 36px 32px; width: 340px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
}
.login-logo { text-align: center; margin-bottom: 20px; }
.login-logo img { height: 40px; }
.login-glow { height: 1px; background: linear-gradient(90deg, transparent, var(--info), transparent); margin: 16px 0; opacity: .3; }
.login-input-wrap { position: relative; margin-bottom: 12px; }
.login-icon-left { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 15px; pointer-events: none; }
.login-input { padding-left: 34px !important; }
.login-eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px; }
.login-btn { width: 100%; background: var(--info); color: #fff; border: none; border-radius: 8px; padding: 10px; font-weight: 600; font-size: 14px; cursor: pointer; transition: opacity .15s; margin-top: 4px; }
.login-btn:hover { opacity: .85; }
.login-err { color: var(--danger); font-size: 12px; margin-top: 8px; min-height: 18px; }
.login-copy { text-align: center; font-size: 11px; color: var(--muted); margin-top: 16px; }
.demo-box { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-top: 14px; font-size: 12px; color: var(--muted); }
/* ── Sidebar ── */
.sidebar { width: var(--sidebar-w); background: var(--bg2); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; overflow-y: auto; }
.sb-logo { display: flex; align-items: center; gap: 10px; padding: 16px 14px; border-bottom: 1px solid var(--border); }
.sb-logo img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; }
.sb-logo-name { font-weight: 700; font-size: 14px; line-height: 1.2; color: var(--text); }
.sb-logo-sub { font-size: 11px; color: var(--muted); }
.sb-sec { padding: 8px 0; border-bottom: 1px solid var(--border); }
.sb-sec:last-child { border-bottom: none; }
.sb-av { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 13px; }
.sb-av .av-circle { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-d)); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: #fff; flex-shrink: 0; }
.sb-foot { padding: 10px 14px; margin-top: auto; border-top: 1px solid var(--border); }
.sbi { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 14px; background: none; border: none; color: #475569; cursor: pointer; font-size: 13px; border-radius: 0; transition: background .15s, color .15s; text-align: left; }
.sbi:hover { background: var(--bg3); color: var(--text); }
.sbi.active { background: rgba(14,165,233,.08); color: var(--info); font-weight: 600; }
.sbi i { font-size: 15px; flex-shrink: 0; }
/* ── Main Content ── */
.main { flex: 1; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; min-width: 0; }
.content { flex: 1; padding: 20px; }
.sec { display: none; }
.sec.active { display: block; }
/* ── Cards ── */
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.card-hd { font-size: 12px; font-weight: 600; color: #475569; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .05em; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 12px; margin-bottom: 20px; }
.metric { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.metric .mv { font-size: 22px; font-weight: 700; color: var(--text); }
.metric .ml { font-size: 11px; color: var(--muted); margin-top: 2px; }
.metric .mva { color: var(--gold-d); }
.metric .mvb { color: var(--info); }
.metric .mvg { color: var(--success); }
/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 7px; border: 1px solid var(--border); background: var(--bg2); color: var(--text); cursor: pointer; font-size: 13px; transition: background .15s; font-weight: 500; }
.btn:hover { background: var(--bg3); }
.bb { background: var(--info); color: #fff; border-color: var(--info); font-weight: 600; }
.bb:hover { background: #0284c7; border-color: #0284c7; }
.bg { background: var(--success); color: #fff; border-color: var(--success); font-weight: 600; }
.br { background: var(--danger); color: #fff; border-color: var(--danger); font-weight: 600; }
.bsm { font-size: 12px; padding: 4px 10px; }
.bic { background: var(--bg3); border: 1px solid var(--border); color: var(--muted); border-radius: 6px; padding: 4px 8px; cursor: pointer; font-size: 13px; }
.bic:hover { color: var(--text); }
.anb, .apb { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 4px 8px; border-radius: 6px; }
.anb:hover, .apb:hover { color: var(--text); background: var(--bg3); }
.cbt { background: var(--bg3); border: 1px solid var(--border); color: var(--muted); cursor: pointer; font-size: 13px; padding: 6px 12px; border-radius: 6px; }
.cbt.active { color: var(--info); border-color: var(--info); background: rgba(14,165,233,.08); font-weight: 600; }
/* ── Badges ── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.b-gr { background: #dcfce7; color: #15803d; }
.b-rd { background: #fee2e2; color: #dc2626; }
.b-am { background: #fef3c7; color: #d97706; }
.b-bl { background: #e0f2fe; color: #0284c7; }
.b-gy { background: #f1f5f9; color: #64748b; }
.wap-badge { background: #fef3c7; color: #d97706; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.web-badge { background: #e0f2fe; color: #0284c7; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; }
/* ── Live dot ── */
.dot-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse 1.5s infinite; margin-right: 4px; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.4} }
.live-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.ip-txt { font-family: monospace; font-size: 12px; color: var(--muted); }
/* ── Country Leads Ticker (running marquee, gaya Parnexia) ── */
#rtCtryA, #urtCtry {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  padding: 4px 0;
  min-width: 0;      /* WAJIB: cegah flex item ikut selebar konten (penyebab halaman melebar) */
  max-width: 100%;
  flex: 1 1 0;       /* pastikan boleh menyusut, bukan cuma melar */
  /* CATATAN: sengaja TIDAK pakai mask-image di sini. Kombinasi mask-image +
     child yang di-animate transform sering bikin animasi "freeze"/nggak
     jalan di Safari/iOS (bug rendering WebKit yang cukup umum). Efek fade
     di pinggir dibuat manual pakai ::before/::after di bawah, lebih aman
     lintas browser & device. */
}
#rtCtryA::before, #rtCtryA::after,
#urtCtry::before, #urtCtry::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 20px;
  z-index: 2;
  pointer-events: none;
}
#rtCtryA::before, #urtCtry::before { left: 0;  background: linear-gradient(90deg, var(--bg2), transparent); }
#rtCtryA::after,  #urtCtry::after  { right: 0; background: linear-gradient(270deg, var(--bg2), transparent); }
.ctry-ticker-track {
  display: inline-flex;
  align-items: center;
  width: max-content;
  animation-name: ctryTickerScroll;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
  /* paksa dibuat layer GPU sendiri supaya animasi tetap jalan mulus
     (kadang browser HP "malas" animasi elemen yang dianggap statis) */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
#rtCtryA:hover .ctry-ticker-track,
#urtCtry:hover .ctry-ticker-track { animation-play-state: paused; }
.ctry-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  padding: 0 14px;
  white-space: nowrap;
}
.ctry-ticker-item .cti-n { color: var(--info); font-weight: 700; }
.ctry-ticker-sep { color: var(--border); font-size: 11px; }
@keyframes ctryTickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
/* Header card yang isinya search + ticker: wajib min-width:0 di semua level
   flex/grid supaya ticker menyusut, bukan mendorong halaman melebar */
.card-hd { min-width: 0; }
.card { min-width: 0; max-width: 100%; }
@media (max-width: 768px) {
  .rt-grid { grid-template-columns: 1fr !important; }
  #liveA, #liveU { max-height: 160px !important; }
  #rtCtryA::before, #rtCtryA::after, #urtCtry::before, #urtCtry::after { width: 12px; }
  .ctry-ticker-item { font-size: 11px; padding: 0 10px; gap: 4px; }
  .card-hd[style*="flex-wrap:nowrap"] { flex-wrap: wrap !important; }
  .card-hd[style*="flex-wrap:nowrap"] input { width: 100% !important; }
  .card-hd[style*="flex-wrap:nowrap"] #rtCtryA,
  .card-hd[style*="flex-wrap:nowrap"] #urtCtry { width: 100%; flex-basis: 100%; }
}
/* ── Grid & Layout ── */
.cgrid { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; }
.r2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.r3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.tbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.sep { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.slider { display: flex; gap: 4px; flex-wrap: wrap; }
/* ── Country ── */
.ctry-box { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.ctag { display: inline-flex; align-items: center; gap: 4px; background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; font-size: 12px; cursor: pointer; }
.ctag.sel { border-color: var(--info); background: rgba(14,165,233,.08); color: var(--info); font-weight: 600; }
.offer-block { background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 10px; }
/* ── NS Card ── */
.ns-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.ns-card-title { font-size: 12px; color: var(--muted); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.ns-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.ns-row:last-child { border-bottom: none; }
.ns-label { font-size: 12px; color: var(--muted); width: 100px; flex-shrink: 0; }
.ns-val { font-family: monospace; font-size: 13px; flex: 1; color: var(--text); }
.url-box { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-family: monospace; font-size: 12px; word-break: break-all; color: var(--text); }
.postback-url { font-family: monospace; font-size: 11px; color: var(--muted); word-break: break-all; background: var(--bg3); padding: 6px 10px; border-radius: 6px; border: 1px solid var(--border); }
/* ── Date dropdown ── */
.date-dropdown { position: relative; display: inline-block; }
.date-dropdown.open > .date-opt-list { display: block; }
.date-opt-list { display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--border); border-radius: 8px; z-index: 200; min-width: 160px; box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.date-dropdown-right .date-opt-list { left: auto; right: 0; }
.date-opt { padding: 7px 14px; cursor: pointer; font-size: 13px; color: var(--text); }
.date-opt:hover { background: var(--bg3); }
.date-custom-box { padding: 10px; border-top: 1px solid var(--border); }
.date-range-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* ── Perf Detail ── */
.perf-detail { display: none; }
.perf-detail.open { display: block; }
/* ── Misc ── */
.cpicker { display: none; position: absolute; z-index: 9999; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; width: 320px; max-height: 300px; overflow-y: auto; box-shadow: 0 6px 20px rgba(0,0,0,.15); top: 36px; left: 0; }
.cpicker.open { display: block; }
.img-toggle-btn { display: flex; align-items: center; gap: 8px; background: var(--bg3); border: 1px solid var(--border); border-radius: 20px; padding: 4px 12px; cursor: pointer; font-size: 12px; color: var(--muted); }
.img-toggle-btn.on { border-color: var(--success); color: var(--success); background: #f0fdf4; }
.img-toggle-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.img-toggle-btn.on .img-toggle-dot { background: var(--success); }
.img-field-wrap { margin-top: 8px; }
.img-input-inner { display: flex; gap: 8px; align-items: center; }
.info-banner { display: flex; gap: 8px; align-items: flex-start; background: #e0f2fe; border: 1px solid #bae6fd; border-radius: 8px; padding: 10px 12px; font-size: 12px; color: #0369a1; margin-bottom: 12px; }
.domain-status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.net-dd { position: relative; display: inline-block; }
.net-dd-trigger { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 7px; border: 1px solid var(--border); background: var(--bg2); font-size: 13px; color: var(--text); }
.net-dd-list { display: none; position: absolute; top: calc(100% + 4px); left: 0; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; z-index: 9999; min-width: 180px; box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.net-dd-list.open { display: block; }
.net-dd-opt { padding: 8px 14px; cursor: pointer; font-size: 13px; color: var(--text); }
.net-dd-opt:hover { background: var(--bg3); }
.net-dd-status { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.net-dd-current { font-weight: 600; }
.danger { color: var(--danger); }
/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { width: 180px; }
  .r2, .r3 { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
}
/* ── Fix date dropdown ── */
[id^="dd"] { position: relative; display: inline-block; }
[id^="dd"] > div {
  display: none;
  position: absolute;
  top: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 200;
  min-width: 180px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
[id^="dd"].open > div { display: block; }
/* ── Button style seperti contoh ── */
.btn-period, .btn-view, .btn-net {
  border: 1px solid transparent !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
  padding: 6px 14px !important;
  border-radius: 999px !important;
  cursor: pointer !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  transition: all .15s !important;
}
.btn-period:hover, .btn-view:hover, .btn-net:hover {
  background: #e2e8f0 !important;
}
.btn-period.active, .btn-view.active, .btn-net.active {
  background: #1e293b !important;
  color: #fff !important;
  border-color: #1e293b !important;
  font-weight: 600 !important;
}
/* By Country / By Offer / By User / By Total */
.btn-view {
  padding: 5px 12px !important;
  font-size: 12px !important;
}
.btn-view.active {
  background: #1e293b !important;
  color: #fff !important;
  border-color: #1e293b !important;
}
/* All Network / iMonetize / LosPollos / Trafee */
.btn-net { display: inline-flex !important; align-items: center !important; gap: 6px !important; }
.btn-net.active { background: #1e293b !important; color: #fff !important; border-color: #1e293b !important; }
.btn-net.active img { filter: brightness(10) !important; }
/* ── Mobile / Responsive Layout ── */
@media (max-width: 600px) {
  .sidebar {
    width: 56px !important;
    overflow: hidden;
  }
  .sb-logo-name, .sb-logo-sub { display: none; }
  .sb-logo { justify-content: center; padding: 12px 0; }
  .sb-logo img { width: 32px; height: 32px; }
  .sbi { justify-content: center; padding: 10px 0; }
  .sbi span, .sbi + span { display: none; }
  .sb-av { justify-content: center; padding: 8px 0; }
  .sb-av > div:last-child { display: none; }
  .sb-foot { padding: 8px 0; text-align: center; }
  .content { padding: 12px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .r2, .r3 { grid-template-columns: 1fr; }
  table { font-size: 12px; }
  th, td { padding: 6px 8px; }
}
/* ── Realtime mobile cards ── */
@media (max-width: 768px) {
  .card { padding: 12px; }
  .tbar { gap: 6px; }
  .btn-period, .btn-net { padding: 5px 10px !important; font-size: 12px !important; }
}
/* ── Live Click ID box style ── */
#liveBox {
  border: 1.5px solid var(--info);
  border-radius: 8px;
  padding: 10px 16px;
  text-align: center;
  color: var(--gold);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
  background: rgba(14,165,233,.04);
}
/* ── Country list style ── */
#countryBox {
  border: 1.5px solid var(--info);
  border-radius: 8px;
  padding: 10px 16px;
  text-align: center;
  color: var(--gold);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
  background: rgba(14,165,233,.04);
}
/* ── Earnings card ── */
.earn-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.earn-card .earn-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.earn-card .earn-val { font-size: 24px; font-weight: 700; color: var(--success); }
/* ── Mobile sidebar icon-only ── */
@media (max-width: 768px) {
  .sidebar {
    width: 52px !important;
    min-width: 52px !important;
  }
  .sb-logo-name, .sb-logo-sub { display: none !important; }
  .sb-logo { justify-content: center !important; padding: 10px 0 !important; }
  .sb-logo img { width: 28px; height: 28px; margin: 0 auto; }
  .sbi { justify-content: center !important; padding: 10px 0 !important; font-size: 0 !important; }
  .sbi i { font-size: 18px !important; }
  .sb-av { justify-content: center !important; padding: 8px 0 !important; }
  .sb-av > div:not(.av-circle) { display: none !important; }
  .sb-foot { padding: 8px 0 !important; display: flex; justify-content: center; }
  .sb-foot button { font-size: 0 !important; padding: 6px !important; }
  .sb-foot button i { font-size: 16px !important; }
  .sb-sec { padding: 4px 0 !important; }
  
  /* sidebar section labels hidden */
  .sb-sec > div:not(.sbi) { display: none !important; }
}
/* ── Mobile: stack realtime boxes vertically ── */
@media (max-width: 768px) {
  /* Stack semua flex/grid jadi vertical */
  .main { overflow-x: hidden !important; }
  .content { padding: 10px 8px !important; overflow-x: hidden !important; }
  
  /* Realtime boxes stack vertical */
  #pg-rt > div[style*="display:flex"],
  #pg-rt > div[style*="display: flex"] {
    flex-direction: column !important;
  }
  
  /* Semua card di realtime full width */
  #pg-rt .card,
  #pg-rt > div > div {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  
  /* Table scroll horizontal */
  .card table,
  #pg-rt table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  /* Fix app layout di mobile */
  .app { flex-direction: row; overflow-x: hidden; }
  .main { width: calc(100vw - 52px) !important; max-width: calc(100vw - 52px) !important; overflow-x: hidden !important; }
}
/* ── Realtime grid mobile stack ── */
@media (max-width: 768px) {
  #pg-rt > div[style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  #pg-rt > div[style*="grid-template-columns"] > .card {
    width: 100% !important;
    min-width: 0 !important;
  }
  /* User realtime juga */
  #pg-urt > div[style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  #pg-urt > div[style*="grid-template-columns"] > .card {
    width: 100% !important;
    min-width: 0 !important;
  }
  /* Table scroll */
  .tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
/* ── Sidebar toggle button ── */
.sidebar-toggle {
  position: fixed;
  top: 50%;
  left: 52px;
  transform: translateY(-50%);
  z-index: 999;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0 6px 6px 0;
  width: 16px;
  height: 48px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 2px 0 6px rgba(0,0,0,.08);
  transition: left .25s;
}
.sidebar-toggle i { font-size: 12px; color: var(--muted); }
@media (max-width: 768px) {
  .sidebar-toggle { display: flex; }
  .sidebar.collapsed { width: 0 !important; min-width: 0 !important; overflow: hidden; }
  .sidebar.collapsed ~ .sidebar-toggle { left: 0; }
  .sidebar.collapsed ~ .main { width: 100vw !important; max-width: 100vw !important; }
}
/* ── Login Dark Gold Theme ── */
.login-wrap {
  background: #0a0a0a !important;
  background-image: radial-gradient(ellipse at center, #1a1500 0%, #0a0a0a 70%) !important;
}
.login-card {
  background: linear-gradient(145deg, #1a1a1a, #111) !important;
  border: 1px solid #b8860b !important;
  border-radius: 20px !important;
  box-shadow: 0 0 40px rgba(184,134,11,.2), 0 0 80px rgba(184,134,11,.05), inset 0 1px 0 rgba(255,215,0,.1) !important;
  padding: 40px 36px !important;
  width: 360px !important;
}
.login-logo { margin-bottom: 24px !important; }
.login-logo img { height: 120px !important; width: auto !important; object-fit: contain !important; filter: drop-shadow(0 4px 16px rgba(184,134,11,.4)); }
.login-glow {
  height: 1px !important;
  background: linear-gradient(90deg, transparent, #b8860b, #ffd700, #b8860b, transparent) !important;
  opacity: 1 !important;
  margin: 20px 0 !important;
  box-shadow: 0 0 8px rgba(255,215,0,.4);
}
.login-input-wrap { margin-bottom: 14px !important; }
.login-input {
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(184,134,11,.4) !important;
  color: #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 12px 40px !important;
  font-size: 14px !important;
}
.login-input:focus {
  border-color: #ffd700 !important;
  box-shadow: 0 0 0 3px rgba(255,215,0,.1) !important;
  background: rgba(255,255,255,.08) !important;
}
.login-input::placeholder { color: #64748b !important; }
.login-icon-left { color: #b8860b !important; }
.login-eye { color: #b8860b !important; }
.login-btn {
  background: linear-gradient(135deg, #b8860b, #ffd700, #b8860b) !important;
  background-size: 200% !important;
  color: #000 !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  letter-spacing: .1em !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 13px !important;
  transition: all .3s !important;
  box-shadow: 0 4px 20px rgba(255,215,0,.3) !important;
}
.login-btn:hover {
  background-position: right !important;
  box-shadow: 0 6px 28px rgba(255,215,0,.5) !important;
  transform: translateY(-1px) !important;
  opacity: 1 !important;
}
.login-err { color: #f87171 !important; }
.login-copy { color: #64748b !important; }
.demo-box { background: rgba(255,255,255,.05) !important; border-color: rgba(184,134,11,.3) !important; color: #94a3b8 !important; }
/* ── FIX FINAL: dropdown date-opt tumpuk (versi lebih spesifik) ──
   Ditempatkan PALING BAWAH file CSS supaya menang urutan cascade.
   Target spesifik via ID #ddRT dan #ddURT langsung. */
#ddRT > div,
#ddURT > div {
  position: static !important;
  display: block !important;
  top: auto !important;
  left: auto !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  min-width: 0 !important;
  z-index: auto !important;
  width: 100% !important;
}
#ddRT:not(.open) > div,
#ddURT:not(.open) > div {
  display: none !important;
}
#ddRT.open > div,
#ddURT.open > div {
  display: block !important;
}
.date-range-box {
  position: relative !important;
}
#ddRT, #ddURT {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  margin-top: 4px !important;
  z-index: 1000 !important;
}
#ddRT.open, #ddURT.open {
  display: flex !important;
  flex-direction: column !important;
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.12) !important;
  min-width: 160px !important;
  padding: 4px !important;
}
#ddRT:not(.open), #ddURT:not(.open) {
  display: none !important;
}
#ddRT > div, #ddURT > div {
  border-radius: 5px !important;
}
#ddRT > div:hover, #ddURT > div:hover {
  background: var(--bg3) !important;
}
/* FIX: hilangkan kedutan transform saat hover di tabel auto-refresh,
   tapi tetap pakai efek geser halus + warna stripe biru-putih tulang. */
.tbl-wrap tbody tr {
  background: #ffffff;
  transition: background-color .2s ease, transform .2s ease;
}
.tbl-wrap tbody tr:nth-child(even) {
  background: #eaf3fb;
}
.tbl-wrap tbody tr:hover {
  background: #d6e9f8 !important;
  transform: translateX(3px);
}
