/* Gaya tambahan di luar utilitas Tailwind */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

.navlink { padding: .375rem .625rem; border-radius: .5rem; color: rgb(71 85 105); white-space: nowrap; }
.dark .navlink { color: rgb(148 163 184); }
.navlink:hover { background: rgb(241 245 249); color: rgb(15 23 42); }
.dark .navlink:hover { background: rgb(30 41 59); color: white; }
.navlink.active { background: rgb(238 246 255); color: rgb(29 94 241); font-weight: 600; }
.dark .navlink.active { background: rgb(30 58 138 / .35); color: rgb(142 195 255); }

.iconbtn { display: inline-flex; align-items: center; justify-content: center; height: 2.25rem; min-width: 2.25rem; padding: 0 .5rem; border-radius: .5rem; color: inherit; }
.iconbtn:hover { background: rgb(241 245 249); }
.dark .iconbtn:hover { background: rgb(30 41 59); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: .375rem; padding: .5rem 1rem; font-weight: 600; font-size: .875rem; transition: background .15s, box-shadow .15s, opacity .15s; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: #1d5ef1; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #1649dd; }
.btn-ghost { background: transparent; border: 1px solid rgb(226 232 240); }
.dark .btn-ghost { border-color: rgb(51 65 85); }
.btn-ghost:hover:not(:disabled) { background: rgb(241 245 249); }
.dark .btn-ghost:hover:not(:disabled) { background: rgb(30 41 59); }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: #059669; color: #fff; }

.card { background: #fff; border: 1px solid rgb(226 232 240); border-radius: .5rem; }
.dark .card { background: rgb(15 23 42); border-color: rgb(30 41 59); }

.chip { display: inline-flex; align-items: center; gap: .25rem; border-radius: 999px; padding: .125rem .6rem; font-size: .75rem; font-weight: 500; background: rgb(241 245 249); color: rgb(71 85 105); }
.dark .chip { background: rgb(30 41 59); color: rgb(203 213 225); }
.chip-warn { background: rgb(254 243 199); color: rgb(146 64 14); }
.dark .chip-warn { background: rgb(120 53 15 / .4); color: rgb(253 230 138); }
.chip-ok { background: rgb(209 250 229); color: rgb(6 95 70); }
.dark .chip-ok { background: rgb(6 78 59 / .5); color: rgb(167 243 208); }

.field { width: 100%; border-radius: .375rem; border: 1px solid rgb(203 213 225); background: #fff; padding: .5rem .75rem; font-size: .875rem; }
.dark .field { background: rgb(15 23 42); border-color: rgb(51 65 85); color: inherit; }
.field:focus { outline: 2px solid #59a1ff; outline-offset: 0; }

/* Konten soal dari PDF */
.qtext { line-height: 1.7; font-size: 1rem; }
.qtext p { margin: 0 0 .6rem; }
.qtext p.ind { padding-left: 1.25rem; }
.qtext h4 { font-weight: 700; margin: 1rem 0 .4rem; text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; color: rgb(161 98 7); }
.dark .qtext h4 { color: rgb(251 191 36); }
.qtext table { border-collapse: collapse; margin: .75rem 0; font-size: .9rem; width: auto; max-width: 100%; display: block; overflow-x: auto; }
.qtext th, .qtext td { border: 1px solid rgb(203 213 225); padding: .35rem .7rem; text-align: left; vertical-align: top; }
.dark .qtext th, .dark .qtext td { border-color: rgb(51 65 85); }
.qtext th { background: rgb(241 245 249); font-weight: 600; }
.dark .qtext th { background: rgb(30 41 59); }

.qfig { margin: .9rem 0; display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.qfig button { display: block; border-radius: .375rem; overflow: hidden; border: 1px solid rgb(226 232 240); background: repeating-conic-gradient(#f8fafc 0 25%, #fff 0 50%) 50% / 16px 16px; cursor: zoom-in; max-width: 100%; }
.dark .qfig button { border-color: rgb(51 65 85); background: repeating-conic-gradient(#1e293b 0 25%, #0f172a 0 50%) 50% / 16px 16px; }
.qfig img { display: block; max-width: 100%; max-height: 420px; width: auto; height: auto; object-fit: contain; }
.qfig figcaption { font-size: .72rem; color: rgb(100 116 139); }

/* Pilihan jawaban */
.opt { width: 100%; text-align: left; display: flex; gap: .75rem; align-items: flex-start; border: 1.5px solid rgb(226 232 240); border-radius: .5rem; padding: .7rem .85rem; background: #fff; transition: border-color .12s, background .12s; }
.dark .opt { background: rgb(15 23 42); border-color: rgb(51 65 85); }
.opt:hover:not(:disabled) { border-color: #8ec3ff; background: rgb(248 250 252); }
.dark .opt:hover:not(:disabled) { border-color: #337dfc; background: rgb(30 41 59); }
.opt .lbl { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; border-radius: .375rem; font-weight: 700; font-size: .85rem; background: rgb(241 245 249); color: rgb(51 65 85); }
.dark .opt .lbl { background: rgb(30 41 59); color: rgb(203 213 225); }
.opt .otext { padding-top: .2rem; line-height: 1.5; }
.opt.sel { border-color: #1d5ef1; background: rgb(238 246 255); }
.dark .opt.sel { background: rgb(30 58 138 / .35); }
.opt.sel .lbl { background: #1d5ef1; color: #fff; }
.opt.ok { border-color: #059669; background: rgb(236 253 245); }
.dark .opt.ok { background: rgb(6 78 59 / .35); }
.opt.ok .lbl { background: #059669; color: #fff; }
.opt.bad { border-color: #dc2626; background: rgb(254 242 242); }
.dark .opt.bad { background: rgb(127 29 29 / .35); }
.opt.bad .lbl { background: #dc2626; color: #fff; }
.opt.alt { border-style: dashed; border-color: #d97706; }
.opt:disabled { cursor: default; }

/* Grid navigasi soal */
.navgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.4rem, 1fr)); gap: .35rem; }
.navcell { position: relative; height: 2.4rem; border-radius: .5rem; font-size: .8rem; font-weight: 600; border: 1px solid rgb(226 232 240); background: #fff; }
.dark .navcell { background: rgb(15 23 42); border-color: rgb(51 65 85); }
.navcell.answered { background: #1d5ef1; color: #fff; border-color: #1d5ef1; }
.navcell.correct { background: #059669; color: #fff; border-color: #059669; }
.navcell.wrong { background: #dc2626; color: #fff; border-color: #dc2626; }
.navcell.current { outline: 2px solid #f59e0b; outline-offset: 1px; }
.navcell.review::after { content: ''; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 99px; background: #f59e0b; box-shadow: 0 0 0 1.5px #fff; }

.lbbtn { min-width: 2.25rem; height: 2.25rem; border-radius: .5rem; background: rgb(255 255 255 / .12); font-size: 1.1rem; }
.lbbtn:hover { background: rgb(255 255 255 / .24); }


.pdfpage canvas { max-width: 100%; height: auto; border-radius: .5rem; box-shadow: 0 1px 3px rgb(0 0 0 / .15); background: #fff; }

@media print {
  #topbar, .noprint { display: none !important; }
}
