/* SI-RAJA: lapisan tampilan & animasi.
   Dimuat setelah Tailwind. Selektor diberi awalan "html body" supaya menang atas kelas Tailwind.
   Animasi memakai fill-mode "backwards" agar keadaan akhirnya tetap milik gaya asli (hover tetap jalan). */

:root {
  --sr-brand: 99, 102, 241;
  --sr-ease: cubic-bezier(.22, 1, .36, 1);
  --sr-spring: cubic-bezier(.34, 1.56, .64, 1);
}

html { scroll-behavior: smooth; }
::selection { background: rgba(var(--sr-brand), .22); }

/* ---------- Scrollbar tipis ---------- */
* { scrollbar-width: thin; scrollbar-color: rgba(100, 116, 139, .35) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, .35); border-radius: 99px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(var(--sr-brand), .6); }

/* ---------- Fokus keyboard yang jelas ---------- */
html body :is(button, a, [tabindex]):focus-visible { outline: 2px solid rgb(var(--sr-brand)); outline-offset: 2px; }

/* ---------- Halaman login: momen utama ---------- */
html body #view-login {
  background:
    radial-gradient(38rem 28rem at 12% 8%, rgba(99, 102, 241, .38), transparent 62%),
    radial-gradient(34rem 26rem at 92% 92%, rgba(14, 165, 233, .30), transparent 62%),
    linear-gradient(135deg, #1e1b4b 0%, #0f172a 45%, #172554 100%);
  background-size: 150% 150%;
  animation: sr-bg-drift 22s ease-in-out infinite alternate;
}
html body #view-login .max-w-md { animation: sr-rise .75s var(--sr-ease) backwards; }
html body #view-login .max-w-md img { animation: sr-float 5s ease-in-out infinite; }
html body #login-form > * { animation: sr-rise .6s var(--sr-ease) backwards; }
html body #login-form > *:nth-child(1) { animation-delay: .25s; }
html body #login-form > *:nth-child(2) { animation-delay: .32s; }
html body #login-form > *:nth-child(3) { animation-delay: .39s; }
html body #login-form > *:nth-child(4) { animation-delay: .46s; }
html body #login-form > *:nth-child(5) { animation-delay: .53s; }
html body #login-form > *:nth-child(n+6) { animation-delay: .6s; }

/* ---------- Pindah menu: isi halaman masuk halus ---------- */
html body [id^="tab-"]:not(.hidden) { animation: sr-tab-in .38s var(--sr-ease) both; }

/* Kartu ringkasan Dashboard: masuk bergantian, naik sedikit saat disorot */
html body #tab-home > .grid > div {
  animation: sr-rise .55s var(--sr-ease) backwards;
  transition: transform .3s var(--sr-ease), box-shadow .3s ease, border-color .3s ease;
}
html body #tab-home > .grid > div:nth-child(1) { animation-delay: .04s; }
html body #tab-home > .grid > div:nth-child(2) { animation-delay: .12s; }
html body #tab-home > .grid > div:nth-child(3) { animation-delay: .20s; }
html body #tab-home > .grid > div:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--sr-brand), .45);
  box-shadow: 0 16px 32px -14px rgba(var(--sr-brand), .4);
}

/* ---------- Menu samping ---------- */
html body .nav-btn { transition: transform .25s var(--sr-ease), background-color .2s ease, color .2s ease; }
html body .nav-btn:hover { transform: translateX(3px); }
html body .nav-btn i { transition: transform .3s var(--sr-spring); }
html body .nav-btn:hover i { transform: scale(1.16) rotate(-6deg); }

/* ---------- Tombol ---------- */
html body button:not(:disabled) {
  transition: transform .18s var(--sr-ease), box-shadow .25s ease, background-color .2s ease,
              color .2s ease, border-color .2s ease, opacity .2s ease;
}
html body button:not(:disabled):active { transform: scale(.96); }
html body :is(button[class*="bg-indigo-6"], button[class*="bg-emerald-6"], button[class*="bg-rose-6"]):not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -10px rgba(var(--sr-brand), .55);
}
html body button:disabled { cursor: not-allowed; }

/* ---------- Isian form: cahaya lembut saat dipilih ---------- */
html body :is(input, select, textarea) { transition: box-shadow .25s ease, border-color .2s ease, background-color .2s ease; }
html body :is(input, select, textarea):focus {
  border-color: rgb(var(--sr-brand));
  box-shadow: 0 0 0 4px rgba(var(--sr-brand), .16);
}

/* ---------- Jendela dialog: latar memudar, panel muncul memantul ---------- */
html body [id$="-modal"]:not(.hidden) { animation: sr-fade .22s ease backwards; }
html body [id$="-modal"]:not(.hidden) > div { animation: sr-pop .38s var(--sr-spring) backwards; }

/* ---------- Notifikasi: sedikit memantul saat masuk ---------- */
html body #toast { transition-timing-function: var(--sr-spring); }

/* ---------- Tabel & kartu daftar ---------- */
html body tbody tr { transition: background-color .15s ease; }
html body tbody tr:hover { background-color: rgba(var(--sr-brand), .06); }
html body .sr-spinner { border-top-color: rgb(var(--sr-brand)); }

/* ---------- Keyframes ---------- */
@keyframes sr-bg-drift { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
@keyframes sr-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sr-tab-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sr-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sr-pop { from { opacity: 0; transform: translateY(12px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes sr-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* ---------- Hormati pengguna yang mematikan animasi ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* =====================================================================
   TAMPILAN HP (layar <= 767px)
   ===================================================================== */
html { -webkit-text-size-adjust: 100%; }
html body button, html body a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

@media (max-width: 767px) {
  /* Ruang & ukuran sentuh */
  html body main { padding: .85rem !important; }
  html body header { padding-left: 1rem !important; padding-right: 1rem !important; }
  html body :is(input, select, textarea) { font-size: 16px !important; } /* mencegah iOS memperbesar layar saat mengetik */
  html body #spj-page-buttons button { height: 2.5rem !important; min-width: 2.5rem !important; }

  /* Menu samping: latar redup saat terbuka (ketuk di luar menu untuk menutup) */
  html body #view-dashboard { position: relative; }
  html body #view-dashboard:has(#sidebar:not(.-translate-x-full))::after {
    content: ''; position: absolute; inset: 0; z-index: 10;
    background: rgba(2, 6, 23, .55); backdrop-filter: blur(2px);
    animation: sr-fade .2s ease backwards;
  }
  html body #sidebar { box-shadow: 0 0 40px rgba(2, 6, 23, .45); }

  /* Dialog jadi lembar dari bawah (kecuali pesan singkat) */
  html body [id$="-modal"]:not(#message-modal) { align-items: flex-end !important; padding: 0 !important; }
  html body [id$="-modal"]:not(#message-modal) > div {
    width: 100% !important; max-width: 100% !important; max-height: 94dvh; overflow-y: auto;
    border-radius: 1.5rem 1.5rem 0 0 !important;
    animation: sr-sheet .38s var(--sr-ease) backwards;
  }
  html body #preview-modal > div { height: 96dvh !important; max-height: 96dvh; }

  /* Toolbar SPJ: isian & tombol memenuhi lebar */
  html body #filter-bidang { width: 100% !important; }
  html body #tab-spj > div:first-child > div:last-child { flex: 1 1 100% !important; width: 100% !important; }
  html body #tab-spj > div:first-child > div:last-child > * { flex: 1 1 auto; justify-content: center; }

  /* Tabel SPJ -> kartu (judul kolom diganti label di tiap bagian) */
  html body #tab-spj table, html body #tab-spj tbody { display: block; width: 100%; min-width: 0 !important; }
  html body #tab-spj thead { display: none; }
  html body #tab-spj tbody tr {
    display: grid; grid-template-columns: 1fr auto; gap: .45rem .75rem; align-items: center;
    margin: .7rem; padding: .95rem 1rem; border: 1px solid rgba(100, 116, 139, .22); border-radius: 1rem;
    background: rgba(var(--sr-brand), .03);
  }
  html body #tab-spj tbody td {
    display: block; padding: 0 !important; border: 0 !important; max-width: none !important;
    text-align: left !important; white-space: normal !important; grid-column: 1 / -1; min-width: 0;
  }
  html body #tab-spj tbody td::before {
    content: attr(data-label); display: block; margin-bottom: .15rem;
    font-size: .68rem; font-weight: 600; color: #94a3b8; letter-spacing: .01em;
  }
  html body #tab-spj tbody td:is(:nth-child(1), :nth-child(2), :nth-child(6), :nth-child(7), :nth-child(10))::before { display: none; }
  html body #tab-spj tbody td:nth-child(1) { grid-column: 1; font-size: 1rem; }
  html body #tab-spj tbody td:nth-child(2) { grid-column: 2; text-align: right !important; }
  html body #tab-spj tbody td:nth-child(6) { grid-column: 1; }
  html body #tab-spj tbody td:nth-child(7) { grid-column: 2; text-align: right !important; font-size: 1.05rem; }
  html body #tab-spj tbody td:nth-child(10) { padding-top: .35rem !important; border-top: 1px dashed rgba(100, 116, 139, .25) !important; }
  html body #tab-spj tbody td:nth-child(10) > div { width: 100%; justify-content: flex-end; gap: .5rem; }
  html body #tab-spj tbody td :is(.max-w-\[180px\], .max-w-\[100px\]) { max-width: 100% !important; }
  html body #tab-spj tbody td:nth-child(10) :is(.w-8, button) { min-width: 2.5rem; min-height: 2.5rem; }
}

@keyframes sr-sheet { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: none; } }

body { font-family: 'Plus Jakarta Sans', sans-serif; }
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}
.typing-cursor {
display: inline-block;
width: 2px;
background-color: currentColor;
margin-left: 2px;
animation: blink 1s infinite;
}

#tab-spj > div:first-child { flex-wrap: wrap !important; }
#tab-spj > div:first-child > div:first-child { flex: 1 1 340px !important; min-width: 0 !important; width: auto !important; flex-wrap: wrap !important; }
#tab-spj > div:first-child > div:last-child { flex: 0 0 auto !important; width: auto !important; }
#filter-bidang { width: 16rem !important; max-width: 100% !important; min-width: 0 !important; text-overflow: ellipsis; }

.sr-spinner { width: 2.25rem; height: 2.25rem; border-radius: 9999px; border: 4px solid rgba(99,102,241,.25); border-top-color: #6366f1; animation: sr-spin .8s linear infinite; }
.sr-spinner-sm { display: inline-block; width: 1rem; height: 1rem; margin-right: .5rem; vertical-align: -.2em; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 9999px; animation: sr-spin .7s linear infinite; }
@keyframes sr-spin { to { transform: rotate(360deg); } }
@keyframes sr-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sr-card-in { animation: sr-fade-up .35s ease both; }

/* =====================================================================
   LAPISAN TAMPILAN v4  —  lebih halus, modern, profesional
   Ditaruh paling bawah supaya menimpa aturan di atasnya.
   ===================================================================== */

:root {
  --sr-brand: 99, 102, 241;
  --sr-violet: 124, 92, 246;
  --sr-sky: 14, 165, 233;
  --sr-ink: 15, 23, 42;
  --sr-line: 148, 163, 184;
  --sr-ease: cubic-bezier(.22, 1, .36, 1);
  --sr-spring: cubic-bezier(.34, 1.56, .64, 1);
  --sr-shadow-card: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 18px -10px rgba(15, 23, 42, .10), 0 22px 40px -26px rgba(15, 23, 42, .12);
  --sr-shadow-lift: 0 2px 4px rgba(15, 23, 42, .05), 0 16px 30px -12px rgba(var(--sr-brand), .30), 0 30px 50px -30px rgba(15, 23, 42, .25);
}

/* ---------- Dasar: huruf rapi, angka sejajar ---------- */
html body {
  font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
html body :is(h1, h2, h3, h4, h5) { letter-spacing: -.015em; }
/* Angka rupiah: tidak lagi huruf "mesin tik", tapi angka sejajar yang rapi */
html body .font-mono {
  font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.012em;
}
html body ::placeholder { color: #94a3b8; opacity: 1; }
html body :is(input[type="checkbox"], input[type="radio"]) { accent-color: rgb(var(--sr-brand)); }

/* ---------- Latar halaman: lembut berlapis ---------- */
html body main[class] {
  background:
    radial-gradient(58rem 26rem at 100% -8%, rgba(var(--sr-brand), .075), transparent 62%),
    radial-gradient(48rem 24rem at -8% 108%, rgba(var(--sr-sky), .06), transparent 62%),
    #f5f6fb;
}
html.dark body main[class] {
  background:
    radial-gradient(58rem 26rem at 100% -8%, rgba(var(--sr-brand), .14), transparent 62%),
    radial-gradient(48rem 24rem at -8% 108%, rgba(var(--sr-sky), .08), transparent 62%),
    #0a1020;
}

/* ---------- Header: kaca bening ---------- */
html body header[class] {
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: saturate(170%) blur(16px); backdrop-filter: saturate(170%) blur(16px);
  border-bottom-color: rgba(var(--sr-line), .22);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 10px 30px -22px rgba(15, 23, 42, .35);
}
html.dark body header[class] {
  background: rgba(10, 16, 32, .72);
  border-bottom-color: rgba(var(--sr-line), .12);
  box-shadow: 0 10px 30px -22px rgba(0, 0, 0, .8);
}

/* ---------- Menu samping: gelap berlapis, menu aktif bercahaya ---------- */
html body #sidebar {
  background:
    radial-gradient(18rem 14rem at 0% 0%, rgba(var(--sr-brand), .22), transparent 70%),
    linear-gradient(180deg, #0f172a 0%, #0a1020 100%);
  border-right: 1px solid rgba(var(--sr-line), .10);
}
html body #sidebar > div:first-child { border-bottom-color: rgba(var(--sr-line), .12); }
html body #sidebar > div:first-child > div:first-child { box-shadow: 0 8px 22px -8px rgba(var(--sr-brand), .65), 0 0 0 1px rgba(255, 255, 255, .5); }
html body :is(.nav-btn, .nav-sub-btn) { position: relative; border-radius: .9rem; }
html body :is(.nav-btn, .nav-sub-btn):not([class*="bg-indigo-600"]):hover { background: rgba(var(--sr-line), .10); }
html body :is(.nav-btn, .nav-sub-btn)[class*="bg-indigo-600"] {
  background: linear-gradient(135deg, #6d6ff5 0%, #5a50ee 55%, #4f46e5 100%);
  box-shadow: 0 12px 26px -12px rgba(var(--sr-brand), .85), inset 0 1px 0 rgba(255, 255, 255, .22);
}
html body :is(.nav-btn, .nav-sub-btn)[class*="bg-indigo-600"]::before {
  content: ''; position: absolute; left: -.55rem; top: 22%; bottom: 22%; width: 4px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #c7d2fe, #818cf8); box-shadow: 0 0 14px rgba(129, 140, 248, .9);
}
html body #sidebar > div:last-child { border-top-color: rgba(var(--sr-line), .12); }
html body #sidebar > div:last-child > div { background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); }

/* ---------- Kartu: bayangan berlapis, garis halus ---------- */
html body main :is(.rounded-2xl, .rounded-3xl)[class*="border-slate-200"] {
  border-color: rgba(var(--sr-line), .24);
  border-radius: 1.25rem;
  box-shadow: var(--sr-shadow-card);
}
html.dark body main :is(.rounded-2xl, .rounded-3xl)[class*="border-slate-200"] {
  background-color: #0f172a;
  border-color: rgba(255, 255, 255, .075);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 20px 40px -26px rgba(0, 0, 0, .85);
}
html body main :is(.rounded-2xl, .rounded-3xl)[class*="border-slate-200"][class*="overflow-hidden"] { overflow: hidden; }

/* Kartu ringkasan Dashboard: hiasan sudut + efek angkat */
html body #tab-home > .grid:first-child > div { position: relative; overflow: hidden; }
html body #tab-home > .grid:first-child > div::after {
  content: ''; position: absolute; right: -2.8rem; top: -2.8rem; width: 8.5rem; height: 8.5rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--sr-brand), .16), transparent 66%); pointer-events: none;
  transition: transform .6s var(--sr-ease);
}
html body #tab-home > .grid:first-child > div:hover::after { transform: scale(1.25); }
html body #tab-home > .grid > div:hover { box-shadow: var(--sr-shadow-lift); }
html.dark body #tab-home > .grid > div:hover { box-shadow: 0 20px 44px -20px rgba(var(--sr-brand), .55); }

/* Batang progres: tumbuh halus dari kiri */
html body [class*="rounded-full"][style*="width"] { transform-origin: left center; transition: width 1s var(--sr-ease); animation: sr-bar .95s var(--sr-ease) backwards; }
@keyframes sr-bar { from { transform: scaleX(0); opacity: .4; } to { transform: scaleX(1); opacity: 1; } }

/* ---------- Tombol: gradasi lembut + cahaya ---------- */
html body :is(button, a)[class*="bg-indigo-600"]:not(.nav-btn):not(.nav-sub-btn) {
  background: linear-gradient(135deg, #6d6ff5 0%, #5a50ee 55%, #4f46e5 100%);
  box-shadow: 0 10px 22px -10px rgba(var(--sr-brand), .75), inset 0 1px 0 rgba(255, 255, 255, .22);
}
html body :is(button, a)[class*="bg-indigo-600"]:not(.nav-btn):not(.nav-sub-btn):not(:disabled):hover {
  filter: brightness(1.07) saturate(1.05);
  box-shadow: 0 14px 28px -10px rgba(var(--sr-brand), .85), inset 0 1px 0 rgba(255, 255, 255, .28);
}
html body :is(button, a)[class*="bg-emerald-6"] {
  background: linear-gradient(135deg, #14c28a 0%, #059669 100%);
  box-shadow: 0 10px 22px -10px rgba(5, 150, 105, .7), inset 0 1px 0 rgba(255, 255, 255, .22);
}
html body :is(button, a)[class*="bg-rose-6"] {
  background: linear-gradient(135deg, #fb4f6f 0%, #e11d48 100%);
  box-shadow: 0 10px 22px -10px rgba(225, 29, 72, .7), inset 0 1px 0 rgba(255, 255, 255, .2);
}
html body :is(button, a)[class*="bg-emerald-6"]:not(:disabled):hover { filter: brightness(1.06); box-shadow: 0 14px 26px -10px rgba(5, 150, 105, .8), inset 0 1px 0 rgba(255, 255, 255, .28); }
html body :is(button, a)[class*="bg-rose-6"]:not(:disabled):hover { filter: brightness(1.06); }
html body button[class*="border-slate-200"]:not([class*="bg-indigo"]):not(:disabled):hover { border-color: rgba(var(--sr-brand), .45); }

/* ---------- Isian: lebih bersih, tanda panah sendiri ---------- */
html body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]), select, textarea)[class*="rounded"] {
  border-color: rgba(var(--sr-line), .38);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03) inset;
}
html body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]), select, textarea)[class*="rounded"]:hover:not(:focus) { border-color: rgba(var(--sr-brand), .45); }
html body select[class] {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 7.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 1rem;
  padding-right: 2.3rem; cursor: pointer;
}
html.dark body select[class] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2394a3b8' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 7.5l5 5 5-5'/%3E%3C/svg%3E");
}

/* ---------- Tabel: kepala jelas, baris lega ---------- */
html body table { border-collapse: separate; border-spacing: 0; }
html body thead th { font-weight: 700; letter-spacing: .07em; color: #64748b; white-space: nowrap; }
html.dark body thead th { color: #94a3b8; }
html body thead tr[class] { background: linear-gradient(180deg, #f8fafc, #f1f5f9); }
html.dark body thead tr[class] { background: rgba(255, 255, 255, .035); }
html body tbody tr { transition: background-color .18s ease, box-shadow .18s ease; }
html body tbody td { vertical-align: middle; }
@media (min-width: 768px) {
  html body #tab-spj :is(thead th, tbody td):nth-child(3) { min-width: 11rem; }
  html body #tab-spj tbody td:nth-child(3) { line-height: 1.45; }
}
/* Layar laptop: lencana bidang & sub kegiatan sedikit lebih ramping supaya kolom Nominal & Aksi tetap terlihat */
@media (min-width: 768px) and (max-width: 1535px) {
  html body #tab-spj tbody td :is(.max-w-\[180px\]) { max-width: 10rem; }
  html body #tab-spj :is(thead th, tbody td) { padding-left: .7rem; padding-right: .7rem; }
}

/* ---------- Pil / lencana ---------- */
html body span[class*="rounded-full"][class*="bg-"]:not([style]) { box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .05); }

/* ---------- Jendela dialog ---------- */
html body [id$="-modal"]:not(.hidden) { -webkit-backdrop-filter: blur(7px) saturate(120%); backdrop-filter: blur(7px) saturate(120%); background-color: rgba(8, 12, 28, .62); }
@media (min-width: 768px) {
  html body [id$="-modal"]:not(.hidden) > div {
    border-radius: 1.6rem;
    box-shadow: 0 40px 90px -30px rgba(2, 6, 23, .7), 0 0 0 1px rgba(var(--sr-line), .20);
  }
}
html body [id$="-modal"] > div > div:first-child[class*="border-b"] { background: linear-gradient(180deg, rgba(var(--sr-brand), .07), transparent); }

/* ---------- Notifikasi ---------- */
html body #toast {
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 1rem;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 22px 44px -16px rgba(2, 6, 23, .55), inset 0 1px 0 rgba(255, 255, 255, .22);
}

/* ---------- Halaman login: aurora + kisi halus ---------- */
html body #view-login { position: relative; isolation: isolate; }
html body #view-login::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%); mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%);
}
html body #view-login::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none; width: 34rem; height: 34rem; right: -10rem; bottom: -12rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--sr-violet), .34), transparent 66%); filter: blur(30px);
  animation: sr-blob 14s ease-in-out infinite alternate;
}
@keyframes sr-blob { from { transform: translate(0, 0) scale(1); } to { transform: translate(-6rem, -4rem) scale(1.18); } }
html body #view-login .max-w-md {
  box-shadow: 0 50px 100px -35px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .14), 0 0 80px -20px rgba(var(--sr-brand), .45);
  border-radius: 1.75rem;
}
html body #view-login .bg-gradient-to-r { background-image: linear-gradient(135deg, #4338ca 0%, #5b5ff1 48%, #2563eb 100%); }
html body #login-form button[type="submit"] { position: relative; overflow: hidden; }
html body #login-form button[type="submit"]::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-18deg);
  transition: left .7s var(--sr-ease);
}
html body #login-form button[type="submit"]:not(:disabled):hover::after { left: 130%; }

/* ---------- Pratinjau PDF & pagination ---------- */
html body #pdf-preview-modal { background-color: rgba(8, 12, 28, .72); }
html body #spj-pagination button { border-radius: .7rem; }

/* ---------- Kalkulator pajak: angka hasil lebih tegas ---------- */
html body #pajak-hasil .font-mono { font-weight: 800; }

/* ---------- Layar kecil: kurangi hiasan berat ---------- */
@media (max-width: 767px) {
  html body header[class] { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  html body #sidebar.-translate-x-full { box-shadow: none; } /* menu tertutup tidak boleh "mengintip" di tepi layar */
  html body #view-login::after { display: none; }
}

/* Hormati pengguna yang mematikan animasi */
@media (prefers-reduced-motion: reduce) {
  html body #view-login::after { animation: none; }
  html body [class*="rounded-full"][style*="width"] { animation: none; }
}


/* Generator Dokumen: mode malam */
.dark #generator-modal { color-scheme: dark; }
.dark #generator-modal .bg-white { background-color: #0f172a; }
.dark #generator-modal .bg-slate-50,
.dark #generator-modal .bg-slate-100 { background-color: #1e293b; }
.dark #generator-modal .border-slate-200,
.dark #generator-modal .border-slate-300 { border-color: #334155; }
.dark #generator-modal .text-slate-800,
.dark #generator-modal .text-slate-700 { color: #f1f5f9; }
.dark #generator-modal .text-slate-600,
.dark #generator-modal .text-slate-500,
.dark #generator-modal .text-slate-400 { color: #94a3b8; }
.dark #generator-modal .hover\:bg-slate-200:hover { background-color: #334155; }

/* kolom isian */
.dark #generator-modal input,
.dark #generator-modal select,
.dark #generator-modal textarea {
  background-color: #1e293b;
  color: #f1f5f9;
  border-color: #475569;
}
.dark #generator-modal input::placeholder,
.dark #generator-modal textarea::placeholder { color: #64748b; }
.dark #generator-modal select option { background-color: #1e293b; color: #f1f5f9; }

/* kertas preview tetap putih seperti kertas asli */
.dark #generator-modal .kertas-a4 { background-color: #ffffff; color: #000000; }
