/* =====================================================================
   KartuLapak — GLASS THEME (gradasi, kaca, animasi, responsif, print)
   Dimuat SETELAH ui.css / theme-compat.css di semua halaman.
   ===================================================================== */

/* ---------- Variabel (mengganti warna solid menjadi kaca) ---------- */
:root {
  --g-blur: 18px;
  --g-sat: 1.6;
  --bg: #eef2ff;
  --surface: rgba(255, 255, 255, .62);
  --surface-2: rgba(255, 255, 255, .5);
  --surface-3: rgba(99, 102, 241, .08);
  --border: rgba(255, 255, 255, .75);
  --border-strong: rgba(100, 116, 139, .28);
  --text: #0b1220;
  --text-2: #26324a;
  --muted: #5b6985;
  --primary: #2f6bff;
  --primary-600: #1f55e0;
  --primary-soft: rgba(47, 107, 255, .12);
  --primary-text: #1b44c4;
  --g-grad: linear-gradient(135deg, #2f6bff 0%, #6a5cff 52%, #b04dff 100%);
  --g-grad-soft: linear-gradient(135deg, rgba(47,107,255,.14), rgba(176,77,255,.12));
  --g-ring: rgba(255, 255, 255, .9);
  --shadow-sm: 0 1px 2px rgba(31, 41, 90, .06);
  --shadow: 0 10px 34px rgba(46, 60, 140, .12), inset 0 1px 0 rgba(255, 255, 255, .8);
  --shadow-lg: 0 30px 80px rgba(30, 40, 110, .28);
  --radius: 18px;
  --radius-sm: 12px;
  --c-s: rgba(255, 255, 255, .62);
  --c-s2: rgba(255, 255, 255, .5);
  --c-b: rgba(255, 255, 255, .7);
}
html.dark {
  --bg: #060b1a;
  --surface: rgba(36, 50, 100, .38);
  --surface-2: rgba(44, 60, 120, .3);
  --surface-3: rgba(120, 140, 255, .1);
  --border: rgba(255, 255, 255, .13);
  --border-strong: rgba(148, 163, 220, .3);
  --text: #eef2ff;
  --text-2: #cdd6f0;
  --muted: #94a3c8;
  --primary: #5b95ff;
  --primary-600: #4a82ee;
  --primary-soft: rgba(91, 149, 255, .16);
  --primary-text: #a9c8ff;
  --g-grad: linear-gradient(135deg, #3b82ff 0%, #7c5cff 52%, #c04dff 100%);
  --g-grad-soft: linear-gradient(135deg, rgba(59,130,255,.2), rgba(192,77,255,.16));
  --g-ring: rgba(255, 255, 255, .12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 14px 44px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
  --shadow-lg: 0 34px 90px rgba(0, 0, 0, .7);
  --c-s: rgba(36, 50, 100, .38);
  --c-s2: rgba(44, 60, 120, .3);
  --c-b: rgba(255, 255, 255, .11);
}

/* ---------- Latar gradasi mesh + blob bergerak ---------- */
html {
  min-height: 100%;
  background:
    radial-gradient(900px 600px at 8% -8%, rgba(79, 139, 255, .35), transparent 60%),
    radial-gradient(800px 560px at 100% 4%, rgba(176, 77, 255, .26), transparent 60%),
    radial-gradient(900px 700px at 70% 108%, rgba(20, 200, 220, .22), transparent 60%),
    radial-gradient(700px 500px at -6% 90%, rgba(255, 120, 180, .16), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
html.dark {
  background:
    radial-gradient(900px 620px at 6% -8%, rgba(59, 110, 255, .5), transparent 62%),
    radial-gradient(820px 580px at 100% 2%, rgba(150, 70, 255, .42), transparent 62%),
    radial-gradient(900px 700px at 70% 108%, rgba(0, 170, 210, .32), transparent 62%),
    radial-gradient(700px 500px at -6% 92%, rgba(255, 90, 160, .2), transparent 62%),
    var(--bg);
  background-attachment: fixed;
}
html body, html.dark body, html body.kl { min-height: 100vh; background: transparent !important; position: relative; }
body::before, body::after {
  content: ''; position: fixed; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(70px); opacity: .55;
  width: 46vmax; height: 46vmax;
}
body::before { top: -14vmax; left: -10vmax; background: radial-gradient(circle, rgba(70, 120, 255, .45), transparent 65%); animation: klblob1 22s ease-in-out infinite alternate; }
body::after { bottom: -16vmax; right: -12vmax; background: radial-gradient(circle, rgba(190, 80, 255, .4), transparent 65%); animation: klblob2 26s ease-in-out infinite alternate; }
html.dark body::before { opacity: .55; }
html.dark body::after { opacity: .5; }
@keyframes klblob1 { to { transform: translate(14vmax, 10vmax) scale(1.15); } }
@keyframes klblob2 { to { transform: translate(-12vmax, -9vmax) scale(1.2); } }

html, body { max-width: 100%; overflow-x: clip; }
.flex-1, main { min-width: 0; }
.kl-sheet a { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; font-weight: 600; color: var(--text); text-decoration: none; }
.kl-sheet a:active, .kl-sheet a:hover { background: var(--g-grad-soft); }
.kl-sheet a svg { width: 20px; height: 20px; flex-shrink: 0; }
/* ---------- Permukaan kaca ---------- */
.kl-sidebar, .kl-topbar, .card, .kl-userbox, .kl-iconbtn, .modal, .kl-toast, .pager, .tabs, .dropzone, .kl-tabbar,
.alert, .kl-fab, .kl-install {
  -webkit-backdrop-filter: blur(var(--g-blur)) saturate(var(--g-sat));
  backdrop-filter: blur(var(--g-blur)) saturate(var(--g-sat));
}
.card {
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: var(--radius);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s, border-color .35s;
  position: relative;
}
.card::before { /* kilau tepi atas */
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px;
  background: linear-gradient(140deg, rgba(255,255,255,.9), rgba(255,255,255,0) 38%, rgba(255,255,255,0) 70%, rgba(150,170,255,.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .55;
}
html.dark .card::before { opacity: .22; }
.kl-sidebar {
  background: linear-gradient(180deg, rgba(255,255,255,.66), rgba(255,255,255,.46)); border-right: 1px solid var(--border);
  box-shadow: 8px 0 40px rgba(46, 60, 140, .08);
}
html.dark .kl-sidebar { background: linear-gradient(180deg, rgba(24,34,72,.6), rgba(12,18,42,.5)); box-shadow: 8px 0 40px rgba(0,0,0,.35); }
.kl-topbar { background: color-mix(in srgb, var(--bg) 55%, transparent); border-bottom: 1px solid var(--border); }
.kl-userbox { background: var(--g-grad-soft); border: 1px solid var(--border); }
.kl-iconbtn { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.kl-iconbtn:hover { transform: translateY(-1px) rotate(-6deg); box-shadow: 0 8px 20px rgba(47,107,255,.25); }
.modal { background: color-mix(in srgb, var(--bg) 70%, var(--surface)); border: 1px solid var(--g-ring); }
.modal-back { background: rgba(8, 12, 32, .5); }
.kl-toast { background: var(--surface); }
.pager { background: var(--surface-2); }
.tabs { background: var(--surface-3); border: 1px solid var(--border); }
.tabs button.on { background: var(--g-grad); color: #fff; box-shadow: 0 6px 18px rgba(80, 90, 255, .35); }

/* ---------- Gradasi: logo, judul, tombol, menu aktif ---------- */
.kl-logo { background: var(--g-grad); box-shadow: 0 8px 22px rgba(106, 92, 255, .45); position: relative; overflow: hidden; }
.kl-logo::after { content: ''; position: absolute; inset: -40% auto -40% -60%; width: 50%; background: rgba(255,255,255,.35); transform: skewX(-20deg); animation: klshine 4.5s ease-in-out infinite; }
@keyframes klshine { 0%, 60% { left: -60%; } 100% { left: 140%; } }
.kl-brand b span { background: var(--g-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kl-avatar { background: var(--g-grad); box-shadow: 0 6px 16px rgba(106, 92, 255, .4); }
.kl-head h1 { background: linear-gradient(120deg, var(--text) 30%, var(--primary) 70%, #b04dff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kl-nav a { position: relative; overflow: hidden; }
.kl-nav a:hover { background: var(--g-grad-soft); transform: translateX(3px); }
.kl-nav a.active { background: var(--g-grad); color: #fff; box-shadow: 0 10px 24px rgba(90, 90, 255, .38); }
.kl-nav a.active svg { color: #fff; }
.kl-nav a { transition: background .2s, color .2s, transform .2s, box-shadow .2s; }

.btn { position: relative; overflow: hidden; transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, filter .2s, background .2s; }
.btn:active { transform: scale(.96); }
.btn-primary, .btn-success, .btn-danger { border: 0; }
.btn-primary { background: var(--g-grad); background-size: 140% 140%; box-shadow: 0 8px 22px rgba(90, 90, 255, .38); }
.btn-primary:hover { background: var(--g-grad); background-position: 100% 0; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(90, 90, 255, .5); }
.btn-success { background: linear-gradient(135deg, #10b981, #06b6d4); color: #fff; box-shadow: 0 8px 22px rgba(16, 185, 129, .32); }
html.dark .btn-success { color: #fff; }
.btn-danger { background: linear-gradient(135deg, #ef4444, #f97316); color: #fff; box-shadow: 0 8px 22px rgba(239, 68, 68, .3); }
html.dark .btn-danger { color: #fff; }
.btn-ghost { background: var(--surface); border: 1px solid var(--border-strong); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn-ghost:hover { background: var(--g-grad-soft); border-color: var(--primary); }
.btn-primary::after, .btn-success::after { /* kilau saat hover */
  content: ''; position: absolute; top: 0; bottom: 0; left: -80%; width: 50%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); transition: left .6s ease; pointer-events: none;
}
.btn-primary:hover::after, .btn-success:hover::after { left: 140%; }
.btn.is-loading::after { left: auto; position: static; width: 14px; height: 14px; background: none; transform: none; }

/* Form */
.input, .select, textarea.input { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.input:focus, .select:focus, textarea.input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 22%, transparent), 0 8px 24px rgba(47, 107, 255, .12); background: var(--surface); }
html.dark .input, html.dark .select, html.dark textarea.input { background: rgba(10, 16, 38, .55); }

/* Stat */
.stat { transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; }
.stat:hover { transform: translateY(-5px); box-shadow: 0 22px 50px rgba(70, 90, 220, .22); }
.stat .ico { background: var(--g-grad); color: #fff; box-shadow: 0 8px 20px rgba(106, 92, 255, .38); }
.stat .ico.green { background: linear-gradient(135deg, #10b981, #06b6d4); box-shadow: 0 8px 20px rgba(16, 185, 129, .35); color: #fff; }
.stat .ico.amber { background: linear-gradient(135deg, #f59e0b, #f97316); box-shadow: 0 8px 20px rgba(245, 158, 11, .35); color: #fff; }
.stat .ico.red { background: linear-gradient(135deg, #ef4444, #ec4899); box-shadow: 0 8px 20px rgba(239, 68, 68, .35); color: #fff; }

/* Tabel */
.tbl th { background: var(--surface-2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tbl td { border-bottom-color: color-mix(in srgb, var(--border-strong) 45%, transparent); }
.tbl tbody tr:hover { background: var(--g-grad-soft); }
.badge { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.badge.blue { background: var(--g-grad-soft); }
.progress > i { background: var(--g-grad); background-size: 200% 100%; animation: klbar 2.4s linear infinite; }
@keyframes klbar { to { background-position: -200% 0; } }
.pager span.cur { background: var(--g-grad); border: 0; box-shadow: 0 6px 16px rgba(90, 90, 255, .35); }
.dropzone { background: var(--surface-2); border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.dropzone:hover, .dropzone.drag { background: var(--g-grad-soft); transform: scale(1.01); }
.dropzone svg { animation: klfloat 3.2s ease-in-out infinite; }
@keyframes klfloat { 50% { transform: translateY(-6px); } }

/* ---------- Animasi masuk halaman ---------- */
@keyframes klrise { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes klfade { from { opacity: 0; } to { opacity: 1; } }
.kl-page > * { animation: klrise .6s cubic-bezier(.2, .8, .2, 1) both; }
.kl-page > *:nth-child(1) { animation-delay: .02s; }
.kl-page > *:nth-child(2) { animation-delay: .09s; }
.kl-page > *:nth-child(3) { animation-delay: .16s; }
.kl-page > *:nth-child(4) { animation-delay: .23s; }
.kl-page > *:nth-child(5) { animation-delay: .3s; }
.kl-page > *:nth-child(n+6) { animation-delay: .36s; }
.kl-sidebar .kl-nav a { animation: klfade .5s both; }
.kl-sidebar .kl-nav a:nth-child(2) { animation-delay: .05s; } .kl-sidebar .kl-nav a:nth-child(3) { animation-delay: .1s; }
.kl-sidebar .kl-nav a:nth-child(4) { animation-delay: .15s; } .kl-sidebar .kl-nav a:nth-child(5) { animation-delay: .2s; }
.tbl tbody tr { animation: klfade .45s both; }
.tbl tbody tr:nth-child(1) { animation-delay: .05s; } .tbl tbody tr:nth-child(2) { animation-delay: .08s; }
.tbl tbody tr:nth-child(3) { animation-delay: .11s; } .tbl tbody tr:nth-child(4) { animation-delay: .14s; }
.tbl tbody tr:nth-child(5) { animation-delay: .17s; } .tbl tbody tr:nth-child(n+6) { animation-delay: .2s; }
body.kl-leaving .kl-main { opacity: 0; transform: translateY(6px); transition: opacity .18s, transform .18s; }
.kl-reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.kl-reveal.in { opacity: 1; transform: none; }

/* ---------- Kartu pengembang (halaman Pengaturan) ---------- */
.dev-card { position: relative; overflow: hidden; padding: 0; }
.dev-cover { height: 120px; background: var(--g-grad); position: relative; overflow: hidden; }
.dev-cover::before, .dev-cover::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.22); filter: blur(2px); }
.dev-cover::before { width: 220px; height: 220px; right: -40px; top: -90px; animation: klfloat 7s ease-in-out infinite; }
.dev-cover::after { width: 120px; height: 120px; left: 12%; bottom: -60px; animation: klfloat 5s ease-in-out infinite reverse; }
.dev-body { padding: 0 24px 24px; margin-top: -44px; position: relative; }
.dev-ava { width: 88px; height: 88px; border-radius: 26px; display: grid; place-items: center; font-weight: 800; font-size: 30px; color: #fff; background: linear-gradient(135deg, #0ea5e9, #6a5cff 55%, #d946ef); border: 4px solid var(--bg); box-shadow: 0 14px 34px rgba(90, 90, 255, .45); }
.dev-name { font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin-top: 12px; }
.dev-role { color: var(--muted); font-weight: 600; }
.dev-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.dev-tags span { padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--g-grad-soft); border: 1px solid var(--border); color: var(--text-2); }
.dev-wa { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 13px 18px; border-radius: 14px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #22c55e, #059669); box-shadow: 0 12px 28px rgba(34, 197, 94, .4); transition: transform .25s, box-shadow .25s; text-decoration: none; position: relative; overflow: hidden; }
.dev-wa:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(34, 197, 94, .55); }
.dev-wa svg { width: 22px; height: 22px; }
.dev-wa::before { content: ''; position: absolute; inset: 0; border-radius: inherit; animation: klpulse 2.2s ease-out infinite; }
@keyframes klpulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); } 100% { box-shadow: 0 0 0 18px rgba(34, 197, 94, 0); } }
.dev-sub { text-align: center; color: var(--muted); font-size: 12px; margin-top: 10px; }

.dev-install { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px 16px; border: 0; border-radius: 14px; font: inherit; font-weight: 700; color: #fff; cursor: pointer; background: var(--g-grad); box-shadow: 0 10px 26px rgba(90, 90, 255, .4); transition: transform .2s, box-shadow .2s; }
.dev-install:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(90, 90, 255, .5); }
.dev-install svg { width: 18px; height: 18px; }
.kl-install svg { width: 17px; height: 17px; }
/* ---------- Install (PWA) ---------- */
.kl-install { display: none; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; color: #fff; border: 0; background: var(--g-grad); box-shadow: 0 8px 22px rgba(90, 90, 255, .4); transition: transform .2s; }
.kl-install svg { width: 17px; height: 17px; }
.kl-install:hover { transform: translateY(-2px); }
.kl-install.show { display: inline-flex; animation: klrise .5s both; }
.kl-install.float { position: fixed; right: 16px; bottom: 72px; z-index: 95; padding: 12px 18px; border-radius: 16px; }
.kl-install.float.left { left: 16px; right: auto; bottom: 16px; }
body.has-tabbar .kl-install.float, body.has-tabbar .kl-install.float.left { bottom: 92px; left: auto; right: 16px; }
@media (max-width: 520px) { .kl-install .t { display: none; } .kl-install { padding: 9px 11px; } .kl-install.float .t { display: inline; } }

/* ---------- Tab bar bawah untuk HP ---------- */
.kl-tabbar { display: none; }
@media (max-width: 820px) {
  .kl-tabbar {
    display: flex; position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 6px; border-radius: 24px; gap: 2px; background: var(--surface); border: 1px solid var(--g-ring); box-shadow: 0 18px 50px rgba(30, 40, 110, .3);
    animation: klrise .6s .2s both;
  }
  html.dark .kl-tabbar { background: rgba(14, 22, 46, .72); }
  .kl-tabbar a, .kl-tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 7px; border-radius: 18px; border: 0; background: transparent;
    color: var(--muted); font: inherit; font-size: 10.5px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all .25s cubic-bezier(.2, .8, .2, 1); -webkit-tap-highlight-color: transparent;
  }
  .kl-tabbar svg { width: 22px; height: 22px; transition: transform .25s; }
  .kl-tabbar a.on { background: var(--g-grad); color: #fff; box-shadow: 0 8px 20px rgba(90, 90, 255, .45); }
  .kl-tabbar a.on svg { transform: translateY(-1px) scale(1.1); }
  .kl-tabbar a:active, .kl-tabbar button:active { transform: scale(.92); }
  body.has-tabbar { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  body.has-tabbar .kl-fab { bottom: 92px; }
  .kl-page { padding: 14px; gap: 14px; }
  .kl-head h1 { font-size: 21px; }
  .kl-actions .btn { flex: 1 1 auto; }
  .kl-toasts { bottom: 92px; right: 12px; left: 12px; }
  .kl-toast { max-width: none; }
  .card-pad { padding: 16px; }
  .modal { max-width: 100%; border-radius: 22px; }
  .modal-back { align-items: flex-end; padding: 0; }
  .modal-back .modal { border-bottom-left-radius: 0; border-bottom-right-radius: 0; animation: klsheet .3s cubic-bezier(.2, .8, .2, 1); }
  @keyframes klsheet { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
  /* tabel: semua tabel jadi kartu bertumpuk di HP */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 400px) { .kl-tabbar a span, .kl-tabbar button span { font-size: 9.5px; } .kl-stats { grid-template-columns: 1fr 1fr; } .stat { padding: 12px; gap: 10px; } .stat b { font-size: 18px; } }
.kl-fab { background: var(--surface) !important; border: 1px solid var(--border) !important; box-shadow: var(--shadow) !important; }

/* ================= Halaman lama (Tailwind) → kaca ================= */
body .bg-white:not(.kl-keep), body .card-glass, body .stat-card, body .testimonial-card {
  background-color: var(--surface) !important;
  background-image: none;
  -webkit-backdrop-filter: blur(var(--g-blur)) saturate(var(--g-sat)); backdrop-filter: blur(var(--g-blur)) saturate(var(--g-sat));
  border-color: var(--border) !important;
}
body [class*="bg-white/"] { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
body .bg-gray-50, body .bg-slate-50, body .bg-gray-100, body .bg-slate-50\/50 { background-color: var(--surface-2) !important; }
body .bg-gray-50\/50 { background-color: transparent !important; }
body .rounded-xl.shadow, body .rounded-2xl.shadow, body .rounded-xl.shadow-sm, body .rounded-2xl.shadow-sm, body .rounded-lg.shadow {
  box-shadow: var(--shadow) !important;
}
body .bg-blue-600, body a.bg-blue-600, body button.bg-blue-600 { background-image: var(--g-grad); background-color: #4f5cff !important; border-color: transparent; }
body .bg-blue-600:hover { filter: brightness(1.08); }
body .bg-gradient-to-br.from-blue-600, body .bg-gradient-to-r.from-blue-600 { background-image: var(--g-grad) !important; }
body .bg-slate-900 { background-image: linear-gradient(135deg, #0f172a, #1e1b4b 60%, #312e81); }
body footer.bg-slate-900, body footer { background-image: linear-gradient(160deg, #0b1020, #1a1446 70%, #2b1459); }
body table tbody tr:hover { background-color: color-mix(in srgb, var(--primary) 7%, transparent); }
body .border-gray-100, body .border-gray-200, body .border-slate-100, body .border-slate-200 { border-color: var(--border) !important; }
body input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=file]):not([type=range]), body select, body textarea {
  background-color: var(--surface) !important; border-color: var(--border-strong) !important; border-radius: 12px;
}
body input:focus, body select:focus, body textarea:focus { outline: none; border-color: var(--primary) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 20%, transparent) !important; }
body a, body button { -webkit-tap-highlight-color: transparent; }
html.dark body .sidebar-link-active, body .sidebar-link-active { background: var(--g-grad) !important; color: #fff !important; border-left-color: transparent !important; }
html.dark body .bg-white:not(.kl-keep), html.dark body .card-glass { background-color: var(--surface) !important; }
html.dark body .text-gray-800, html.dark body .text-gray-700, html.dark body .text-slate-800, html.dark body .text-slate-700 { color: var(--text-2) !important; }
/* halaman lama: sidebar */
body aside { -webkit-backdrop-filter: blur(var(--g-blur)) saturate(var(--g-sat)); backdrop-filter: blur(var(--g-blur)) saturate(var(--g-sat)); }
body aside.bg-white, body aside[class*="bg-"] { background-color: var(--surface) !important; }
.sidebar-link-active { background-image: var(--g-grad) !important; color: #fff !important; border-radius: 12px; box-shadow: 0 10px 24px rgba(90, 90, 255, .38); }
/* landing */
.hero-gradient { background: transparent !important; }
body section.bg-white, body section.bg-slate-50, body section.bg-slate-50\/50 { background-color: transparent !important; }
body nav.sticky { background-color: color-mix(in srgb, var(--bg) 60%, transparent) !important; -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); border-color: var(--border) !important; }
.text-slate-900, .text-gray-900 { color: var(--text) !important; }
html.dark .text-slate-900, html.dark .text-gray-900 { color: var(--text) !important; }
.animate-float, .animate-bounce { will-change: transform; }
.hero-blob { filter: blur(70px) !important; animation: klblob1 18s ease-in-out infinite alternate; }
.stat-card:hover, .testimonial-card:hover { box-shadow: 0 30px 70px rgba(70, 90, 220, .25) !important; }
::selection { background: rgba(106, 92, 255, .3); }
html { scroll-behavior: smooth; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(120, 130, 200, .35); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(120, 130, 200, .6); background-clip: padding-box; border: 2px solid transparent; }

/* ---------- Kurangi animasi bila diminta ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
/* Perangkat lemah: blur lebih ringan */
@media (max-width: 820px) { :root { --g-blur: 12px; } body::before, body::after { filter: blur(50px); } }

/* ================= PRINT (aman untuk A4) ================= */
@page { size: A4; margin: 12mm; }
@media print {
  html, body, body.kl { background: #fff !important; color: #000 !important; padding: 0 !important; }
  body::before, body::after { display: none !important; }
  .kl-sidebar, .kl-topbar, .kl-tabbar, .kl-toasts, .kl-fab, .kl-install, .kl-overlay, .kl-actions, aside, nav.sticky,
  .no-print, .pager .pages, .row-actions, form.filter, .kl-head .btn, footer { display: none !important; }
  .kl-main { margin: 0 !important; }
  .kl-page { padding: 0 !important; max-width: none !important; gap: 10px !important; display: block !important; }
  .kl-page > * { animation: none !important; opacity: 1 !important; transform: none !important; margin-bottom: 10px; }
  *, *::before, *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: none !important; text-shadow: none !important; animation: none !important; transition: none !important; }
  .card, body .bg-white, body .card-glass { background: #fff !important; border: 1px solid #cbd5e1 !important; border-radius: 6px !important; }
  .card::before { display: none; }
  .kl-head h1 { background: none !important; color: #000 !important; -webkit-text-fill-color: #000; font-size: 18pt; }
  .table-wrap { overflow: visible !important; }
  table.tbl, table { width: 100% !important; font-size: 9.5pt; border-collapse: collapse; }
  .tbl th, .tbl td { padding: 5px 7px !important; border: 1px solid #cbd5e1 !important; color: #000 !important; background: #fff !important; }
  .tbl th { background: #e2e8f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; position: static; }
  thead { display: table-header-group; }
  tr, img, .card { break-inside: avoid; page-break-inside: avoid; }
  .thumb { width: 28px; height: 28px; }
  .kl-page .card:has(form), .kl-page .card:has(input[type=search]) { display: none !important; }
  .pager, .tabs, .input, .select, input, select, textarea { background: #fff !important; color: #000 !important; border-color: #cbd5e1 !important; }
  .pager { border: 0 !important; padding: 8px 0 !important; }
  .pager .info { color: #000 !important; }
  .kl-head p, .kl-crumb { color: #334155 !important; }
  .badge { border: 1px solid #94a3b8; background: #fff !important; color: #000 !important; }
  a[href]::after { content: none !important; }
  .stack, .tbl.stack td { display: revert; }
  table.tbl.stack thead { display: table-header-group; }
  table.tbl.stack tbody { display: table-row-group; }
  table.tbl.stack tr { display: table-row; }
  table.tbl.stack td { display: table-cell; text-align: left; }
  table.tbl.stack td::before { display: none; }
}
