/* Mode tampilan: Otomatis / Gelap (default desain) / Terang (krem-emas).
   Terang = inversi terkontrol dari desain gelap: kontras relatif tetap, tidak ada teks gelap-di-gelap atau terang-di-terang.
   Media (gambar/video/canvas/logo) dikembalikan agar warna aslinya tetap. */
html[data-theme="light"]{filter:invert(1) hue-rotate(180deg) sepia(.06);background:#fff}
html[data-theme="light"] img,html[data-theme="light"] .brand-badge,html[data-theme="light"] .split-sidebar::before,html[data-theme="light"] body:not(.public-home) .split-main::before,html[data-theme="light"] video,html[data-theme="light"] canvas,html[data-theme="light"] picture,html[data-theme="light"] iframe,html[data-theme="light"] .kt-keep{filter:invert(1) hue-rotate(180deg) !important}
html[data-theme="light"],html[data-theme="dark"]{color-scheme:dark}
html[data-theme="light"] ::selection{background:#1a1405;color:#f3d98d}
/* tombol mode */
.kt-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:38px;width:38px;height:38px;padding:0;border-radius:999px;border:1px solid rgba(232,199,119,.35);background:rgba(232,199,119,.1);color:#f3d98d;font:800 12px/1 inherit;letter-spacing:.06em;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background .2s,transform .15s}
.kt-btn:hover{background:rgba(232,199,119,.2)}.kt-btn:active{transform:scale(.96)}
.kt-btn svg{width:18px;height:18px;flex:0 0 auto;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.kt-btn .kt-l{display:none}
.kt-menu{position:fixed;z-index:2147483000;min-width:170px;padding:6px;border-radius:14px;background:#0d1017;border:1px solid rgba(232,199,119,.35);box-shadow:0 18px 50px rgba(0,0,0,.6)}
.kt-menu button{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:0 12px;border:0;border-radius:10px;background:transparent;color:#f4f6fb;font:700 14px/1 inherit;cursor:pointer;text-align:left}
.kt-menu button:hover,.kt-menu button:focus-visible{background:rgba(232,199,119,.14);outline:0}
.kt-menu button[aria-checked="true"]{color:#f3d98d}
.kt-menu button[aria-checked="true"]::after{content:"\2713";margin-left:auto}
.kt-menu svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.kt-float{position:fixed;right:14px;bottom:84px;z-index:2147482000;box-shadow:0 8px 24px rgba(0,0,0,.5)}
@media(min-width:1000px){.kt-float{bottom:18px}}
.kt-btn.kt-drawer{display:flex;width:calc(100% - 28px);min-width:0;margin:12px 14px 14px;justify-content:flex-start;padding:0 14px;height:44px}
.kt-btn.kt-drawer .kt-l{display:inline;font-size:13px}

/* Mode ringkas (member): padding/jarak kecil, teks sedikit lebih kecil; isi dan fungsi tidak berubah */
html[data-density="compact"] body.kamar-member-desktop-v2 .split-main{zoom:.94}
html[data-density="compact"] body.kamar-member-desktop-v2 :is(.split-card,.kc-card,.kd-fac,.method-card,.facility-content-card,.kx-card,.kamar-sigfree-card,.kd-remind){padding:12px 14px !important;margin-top:0 !important;margin-bottom:0 !important}
html[data-density="compact"] body.kamar-member-desktop-v2 :is(.split-main,.kd-facs,.kc-grp,.kc-grid,.stats-grid,.grid-3-signal,.facility-grid){gap:10px !important}
html[data-density="compact"] body.kamar-member-desktop-v2 :is(h1){font-size:clamp(22px,4.2vw,30px) !important;line-height:1.15 !important}
html[data-density="compact"] body.kamar-member-desktop-v2 :is(h2,h3){line-height:1.2 !important}
html[data-density="compact"] body.kamar-member-desktop-v2 :is(.btn,.header-cta){min-height:38px}

html[data-theme="light"] img,html[data-theme="light"] video,html[data-theme="light"] canvas{filter:invert(1) hue-rotate(180deg) !important}
/* hero login: foto diganti gradasi gelap di mode terang (menghindari foto negatif) */
html[data-theme="light"] .auth-hero{background:linear-gradient(135deg,#1c1608,#0a0a09) !important}

/* admin: ikon bel terlihat di mode Terang (warna pra-inversi dibuat terang agar jadi gelap) */
html[data-theme="light"] #kamarNotifBtn29F,html[data-theme="light"] #kamarNotifBtn29F svg{color:#f3ead2!important}
html[data-theme="light"] #kamarNotifBtn29F{border-color:rgba(232,199,119,.55)!important}

/* ===== Anti-kedip (2026-10-28) =====
   Penyebab: beberapa animasi masuk (kv4in/kFuturRise/kadIn) menimpa elemen yang sama, mulai dari opacity 0 + blur,
   dan fill "both" menahan transform/filter sehingga hover dan transisi terlihat berkedip gelap.
   Sekarang satu animasi lembut saja (tanpa blur, mulai opacity .4) dan tidak menahan keadaan akhir. */
@keyframes kSoftIn{from{opacity:.4;transform:translateY(10px)}to{opacity:1;transform:none}}
html body.kamar-member-desktop-v2 :is(.split-main > *,.kc-grp,.kc-card:not(.hot),.kc-warn,.kd-pagehero,.stat-card,.kamar-rc,.kamar-sec-title),
html body.kamar-admin-desktop-v1 :is(.split-main > *,.ka-kpi,.split-card,.stat-card,.admin-click-card,.member-mini-card),
html body .facility-panel-v2.active:not([hidden]){animation:kSoftIn .38s ease-out backwards !important;animation-timeline:auto !important;animation-range:normal !important}
html body.kamar-member-desktop-v2 .kc-card.hot{animation:kv4spin 7s linear infinite,kSoftIn .38s ease-out backwards !important;animation-timeline:auto,auto !important;animation-range:normal,normal !important}
html body.kamar-member-desktop-v2 .fkx-card{animation:kv4spin 10s linear infinite,kSoftIn .38s ease-out backwards !important;animation-timeline:auto,auto !important;animation-range:normal,normal !important}
html:not([data-theme="light"]){background-color:#070707}
@media (prefers-reduced-motion:reduce){html body *{animation-duration:.01ms !important}}
/* Safari: kartu ber-backdrop-filter + hover/animasi memicu kedip hitam saat kursor pindah. Latar kartu sudah hampir solid, blur dibuang. */
html body :is(.split-card,.member-card,.action-card,.member-payment-card,.setting-card,.kc-card,.fkx-card,.stat-card,.kd-fac,.kamar-rc,.method-card,.ka-kpi,.admin-click-card,.member-mini-card){-webkit-backdrop-filter:none !important;backdrop-filter:none !important;-webkit-backface-visibility:hidden;backface-visibility:hidden}
html body :is(.split-sidebar,.split-sidebar a,.split-sidebar summary){-webkit-backdrop-filter:none !important;backdrop-filter:none !important;-webkit-backface-visibility:hidden;backface-visibility:hidden}
/* Drawer HP: .split-shell (z-index:1 dari kamar-dashboard-motion.css) membuat stacking context sehingga drawer (z 10001)
   berada di bawah backdrop blur (z 10000, anak body): layar blur dan tak bisa diklik. Berlaku di SEMUA halaman ber-sidebar
   (member, admin, affiliate). Jangan beri z-index/transform/filter/isolation pada .split-shell/.split-app/main induk sidebar. */
html body .split-shell,html body .split-app{z-index:auto !important;isolation:auto !important;transform:none !important;filter:none !important}

/* Kontras WCAG AA (audit 2026-10-28): teks redup di panel gelap */
html body .kmr-sup-opt-desc{color:rgba(236,228,208,.78)!important}
html body .kmr-sup-note{color:rgba(236,228,208,.72)!important}
html body .kamar-bottom-nav a:not(.active){color:rgba(236,228,208,.74)!important}
html body.kamar-admin-desktop-v1{--km-ink:#f3efe6;--km-muted:#b9b2a1}
html body .admin-sidebar .admin-menu-section{color:#e6c46a!important}
html body .admin-sidebar .brand-small small{display:block;margin-top:3px}
html body .kmr-sup-opt-desc{color:rgba(236,228,208,.88)!important}
html body .kmr-sup-head p{color:rgba(236,228,208,.86)!important}
html body .kmr-sup-opt-arrow{color:#e8c872!important}
html body .admin-sidebar .admin-menu-section{color:#f0d078!important}
