/* ExcelKu — gaya aplikasi */
:root {
  --xl: #217346; --xl-d: #185c38; --xl-l: #e6f4ea; --xl-l2: #cfe9d8;
  --bg: #f5f7f6; --card: #ffffff; --text: #1f2937; --muted: #6b7280; --line: #e5e7eb; --line2: #d1d5db;
  --blue: #2563eb; --red: #dc2626; --amber: #d97706; --purple: #7c3aed;
  --sel: rgba(33, 115, 70, .12); --act: #217346; --head: #f3f4f6; --head-hl: #d9ead3;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
  --r: 12px; --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: Consolas, "Cascadia Mono", "Courier New", monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #0f1412; --card: #171f1b; --text: #e5e7eb; --muted: #9ca3af; --line: #2a3530; --line2: #3b4842; --xl-l: #163626; --xl-l2: #1f4a34; --sel: rgba(74, 222, 128, .16); --head: #1d2622; --head-hl: #244a35; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.35); } }
:root[data-theme="dark"] { --bg: #0f1412; --card: #171f1b; --text: #e5e7eb; --muted: #9ca3af; --line: #2a3530; --line2: #3b4842; --xl-l: #163626; --xl-l2: #1f4a34; --sel: rgba(74, 222, 128, .16); --head: #1d2622; --head-hl: #244a35; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.35); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; }
a { color: var(--xl); }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; color: var(--text); }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
kbd { font-family: var(--font); font-size: 12px; background: var(--head); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
code { font-family: var(--mono); font-size: 13.5px; background: var(--head); padding: 1px 5px; border-radius: 4px; }
code.f { color: var(--xl); background: var(--xl-l); }
pre.code { font-family: var(--mono); font-size: 13px; background: #1e293b; color: #e2e8f0; padding: 12px 14px; border-radius: 8px; overflow: auto; line-height: 1.5; }
.sr { position: absolute; left: -9999px; }

/* --- Bilah atas & navigasi --- */
.top { position: sticky; top: 0; z-index: 30; background: var(--xl); color: #fff; height: 54px; display: flex; align-items: center; gap: 10px; padding: 0 14px; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.top .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; letter-spacing: .2px; text-decoration: none; color: #fff; }
.top .brand .logo { width: 30px; height: 30px; border-radius: 8px; background: #fff; color: var(--xl); display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.top .brand .ver { font-weight: 400; font-size: 12px; opacity: .85; margin-left: 2px; }
.top .sp { flex: 1; }
.top .tbtn { background: rgba(255,255,255,.12); border: 0; color: #fff; border-radius: 9px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; }
.top .tbtn:hover { background: rgba(255,255,255,.22); }
.top .tbtn .ic { width: 20px; height: 20px; }
.top .chip { background: #fff; color: var(--xl); border-radius: 999px; height: 34px; padding: 0 12px 0 6px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; max-width: 180px; border: 0; }
.top .chip .av { width: 24px; height: 24px; border-radius: 50%; background: var(--xl); color: #fff; display: grid; place-items: center; font-size: 12px; }
.top .chip .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; flex: none; }
.top .chip .dot.ok { background: #16a34a; } .top .chip .dot.busy { background: #f59e0b; } .top .chip .dot.err { background: #dc2626; }
.layout { display: flex; min-height: calc(100vh - 54px); }
.side { width: 230px; flex: none; background: var(--card); border-right: 1px solid var(--line); padding: 12px 10px; position: sticky; top: 54px; height: calc(100vh - 54px); overflow: auto; }
.side a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--text); text-decoration: none; font-weight: 500; }
.side a:hover { background: var(--head); }
.side a.on { background: var(--xl-l); color: var(--xl); font-weight: 600; }
.side .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 12px 4px; }
.side .lv { width: 8px; height: 8px; border-radius: 50%; margin-left: auto; }
.main { flex: 1; min-width: 0; padding: 20px clamp(14px, 3vw, 36px) 90px; max-width: 1200px; }
.bnav { display: none; }
@media (max-width: 860px) {
  .side { display: none; }
  .main { padding: 14px 16px 90px; }
  .bnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line); height: 60px; padding-bottom: env(safe-area-inset-bottom); }
  .bnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--muted); text-decoration: none; }
  .bnav a.on { color: var(--xl); font-weight: 600; }
  .bnav .ic { width: 22px; height: 22px; }
  .top .brand .ver { display: none; }
}
.drawer-ov { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; }
.drawer { position: fixed; top: 0; left: 0; bottom: 0; width: min(300px, 85vw); background: var(--card); z-index: 41; padding: 14px 10px; overflow: auto; box-shadow: 4px 0 24px rgba(0,0,0,.25); }
.drawer a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 9px; color: var(--text); text-decoration: none; font-weight: 500; }
.drawer a.on { background: var(--xl-l); color: var(--xl); }
.drawer .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 12px 4px; }

/* --- Komponen umum --- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card h2, .card h3 { margin-top: 0; }
h1 { font-size: 24px; margin: 0 0 6px; } h2 { font-size: 19px; } h3 { font-size: 16px; margin: 18px 0 8px; }
.sub { color: var(--muted); margin: 0 0 18px; }
.btn { display: inline-flex; align-items: center; gap: 7px; background: var(--xl); color: #fff; border: 1px solid var(--xl); border-radius: 9px; padding: 9px 16px; font-weight: 600; text-decoration: none; line-height: 1.2; }
.btn:hover { background: var(--xl-d); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--xl); border-color: var(--xl); }
.btn.ghost:hover { background: var(--xl-l); }
.btn.soft { background: var(--xl-l); color: var(--xl); border-color: transparent; }
.btn.danger { background: var(--red); border-color: var(--red); }
.btn.sm { padding: 6px 11px; font-size: 13.5px; }
.btn.lg { padding: 12px 22px; font-size: 16px; }
.btn.wide { width: 100%; justify-content: center; }
.lnk { background: none; border: 0; color: var(--xl); text-decoration: underline; padding: 0; font-size: 13px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
label.f { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
label.f input, label.f select, label.f textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 11px; border: 1px solid var(--line2); border-radius: 8px; background: var(--card); font-size: 15px; font-weight: 400; color: var(--text); }
label.f input:focus, label.f select:focus, label.f textarea:focus { outline: 2px solid var(--xl); outline-offset: 0; border-color: var(--xl); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--head); color: var(--muted); }
.badge.ok { background: #dcfce7; color: #166534; } .badge.warn { background: #fef3c7; color: #92400e; } .badge.info { background: #dbeafe; color: #1e40af; }
:root[data-theme="dark"] .badge.ok, :root:not([data-theme="light"]) .dark-badges .badge.ok { background: #14532d; color: #bbf7d0; }
.prog { height: 8px; background: var(--head); border-radius: 999px; overflow: hidden; }
.prog > i { display: block; height: 100%; background: var(--xl); border-radius: 999px; transition: width .4s; }
.tbl { border-collapse: collapse; width: 100%; margin: 10px 0 14px; font-size: 14px; }
.tbl th, .tbl td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.tbl th { background: var(--head); }
.tip, .warn { border-left: 4px solid var(--blue); background: #eff6ff; padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 12px 0; }
.warn { border-color: var(--amber); background: #fffbeb; }
:root[data-theme="dark"] .tip { background: #172554; } :root[data-theme="dark"] .warn { background: #422006; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tip { background: #172554; } :root:not([data-theme="light"]) .warn { background: #422006; } }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tabs button.on { color: var(--xl); border-color: var(--xl); }
.tabs button .n { background: var(--head); border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.sk { background: linear-gradient(90deg, var(--head) 25%, var(--line) 50%, var(--head) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; min-height: 16px; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* toast */
#toasts { position: fixed; bottom: 76px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 460px); }
.toast { background: rgba(17, 24, 39, .88); color: #fff; padding: 9px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); animation: tin .25s ease; max-width: 100%; backdrop-filter: blur(6px); }
.toast.ok { background: rgba(22, 101, 52, .9); } .toast.err { background: rgba(153, 27, 27, .9); } .toast.warn { background: rgba(146, 64, 14, .92); }
.toast.out { animation: tout .35s ease forwards; }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } } @keyframes tout { to { opacity: 0; transform: translateY(6px); } }
@media (min-width: 861px) { #toasts { bottom: 24px; } }

/* --- Beranda --- */
.hero { background: linear-gradient(135deg, var(--xl) 0%, #2d8f5a 60%, #3aa36a 100%); color: #fff; border-radius: 16px; padding: 26px 24px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.hero h1 { color: #fff; font-size: 26px; }
.hero p { margin: 4px 0 14px; opacity: .95; max-width: 560px; }
.hero .btn { background: #fff; color: var(--xl); border-color: #fff; }
.hero .stat { background: rgba(255,255,255,.15); border-radius: 12px; padding: 12px 16px; min-width: 120px; }
.hero .stat b { display: block; font-size: 24px; }
.lvl { border-top: 5px solid var(--lc, var(--xl)); position: relative; display: flex; flex-direction: column; gap: 8px; }
.lvl .h { display: flex; align-items: center; gap: 10px; }
.lvl .num { width: 38px; height: 38px; border-radius: 10px; background: var(--lc); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.lvl h3 { margin: 0; font-size: 17px; }
.lvl p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.lvl .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 13px; }
.lvl.lock { opacity: .7; }
.lesson-list { display: flex; flex-direction: column; gap: 10px; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); transition: border-color .15s; }
.lrow:hover { border-color: var(--xl); }
.lrow .st { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--head); color: var(--muted); flex: none; font-weight: 700; font-size: 13px; }
.lrow .st.done { background: #16a34a; color: #fff; } .lrow .st.part { background: #fef3c7; color: #92400e; }
.lrow .t { flex: 1; min-width: 0; }
.lrow .t b { display: block; } .lrow .t span { font-size: 13px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex: none; }

/* --- Materi --- */
.lesson-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.lesson-head .back { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.theory { max-width: 820px; font-size: 15.5px; }
.theory h3 { color: var(--xl); font-size: 17px; margin-top: 22px; }
.theory table { font-size: 14px; }
.theory li { margin: 4px 0; }
.theory img { max-width: 100%; }
.vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.vid { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.vid .thumb { position: relative; aspect-ratio: 16/9; background: #111 center/cover no-repeat; cursor: pointer; display: grid; place-items: center; }
.vid .thumb .play { width: 58px; height: 58px; border-radius: 50%; background: rgba(220, 38, 38, .92); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.vid .thumb .play .ic { width: 26px; height: 26px; margin-left: 3px; }
.vid iframe { width: 100%; aspect-ratio: 16/9; border: 0; display: block; }
.vid .info { padding: 10px 12px; }
.vid .info b { display: block; font-size: 14px; line-height: 1.35; }
.vid .info span { font-size: 12.5px; color: var(--muted); }
.vid .info a { font-size: 12.5px; }
.ex-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .ex-wrap { grid-template-columns: 1fr; } }
.ex-panel { position: sticky; top: 64px; }
@media (max-width: 1100px) { .ex-panel { position: static; } }
.tasks { padding-left: 20px; margin: 8px 0; }
.tasks li { margin: 6px 0; }
.checks { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.checks li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; padding: 8px 10px; border-radius: 8px; background: var(--head); }
.checks li.ok { background: #dcfce7; color: #14532d; } .checks li.bad { background: #fee2e2; color: #7f1d1d; }
.checks li .ic { margin-top: 2px; }
.checks li small { display: block; opacity: .85; }
.hint-box { background: #fffbeb; border: 1px solid #fcd34d; color: #78350f; border-radius: 8px; padding: 8px 12px; font-size: 14px; margin: 8px 0; }
:root[data-theme="dark"] .hint-box, :root[data-theme="dark"] .checks li.ok, :root[data-theme="dark"] .checks li.bad { color: var(--text); background: var(--head); }
.demo-cap { background: var(--xl); color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 14px; display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.demo-cap .n { background: #fff; color: var(--xl); border-radius: 999px; width: 24px; height: 24px; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.demo-ctl { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.result-box { text-align: center; padding: 18px; border-radius: 12px; background: var(--xl-l); }
.result-box b { font-size: 28px; display: block; }

/* --- Kuis --- */
.q { margin-bottom: 18px; }
.q .qt { font-weight: 600; margin-bottom: 8px; }
.q .opt { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--line2); border-radius: 9px; margin: 6px 0; cursor: pointer; }
.q .opt:hover { border-color: var(--xl); }
.q .opt input { margin-top: 3px; }
.q .opt.ok { border-color: #16a34a; background: #dcfce7; } .q .opt.bad { border-color: #dc2626; background: #fee2e2; }
:root[data-theme="dark"] .q .opt.ok { background: #14532d; } :root[data-theme="dark"] .q .opt.bad { background: #7f1d1d; }
.q .why { font-size: 13.5px; color: var(--muted); margin-top: 4px; padding-left: 4px; }

/* --- Lembar kerja (SheetView) --- */
.xs { border: 1px solid var(--line2); border-radius: 10px; background: var(--card); overflow: hidden; font-size: 13.5px; }
.xs-tb { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px; background: var(--head); border-bottom: 1px solid var(--line); }
.xs-tbb { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; background: none; border: 1px solid transparent; border-radius: 7px; padding: 4px 7px; font-size: 10.5px; color: var(--text); min-width: 50px; }
.xs-tbb:hover { background: var(--card); border-color: var(--line2); }
.xs-tbb .ic { width: 18px; height: 18px; }
.xs-tbsel { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; }
.xs-tbsel select { border: 1px solid var(--line2); border-radius: 6px; padding: 4px; background: var(--card); font-size: 12.5px; max-width: 150px; }
.xs-fb { display: flex; align-items: center; border-bottom: 1px solid var(--line); background: var(--card); }
.xs-name { width: 86px; border: 0; border-right: 1px solid var(--line); padding: 7px 8px; font-family: var(--mono); font-size: 13px; text-align: center; background: var(--card); }
.xs-fx { padding: 0 6px; color: var(--muted); display: flex; }
.xs-in { flex: 1; border: 0; padding: 7px 8px; font-family: var(--mono); font-size: 13.5px; background: var(--card); min-width: 0; }
.xs-in:focus, .xs-name:focus { outline: none; background: var(--xl-l); }
.xs-hint { display: none; padding: 6px 10px; font-size: 12.5px; background: #fffbeb; border-bottom: 1px solid #fcd34d; color: #78350f; }
:root[data-theme="dark"] .xs-hint { background: #3b2a06; color: #fde68a; border-color: #92400e; }
.xs-hint.show { display: block; }
.xs-hint.err { background: #fee2e2; color: #7f1d1d; border-color: #fca5a5; }
.xs-hint .xs-syn { font-family: var(--mono); display: block; }
.xs-hint .xs-syn mark { background: #fde68a; color: inherit; padding: 0 2px; border-radius: 3px; }
.xs-hint .xs-desc { display: block; margin-top: 2px; }
.xs-hint .xs-tipf4 { display: block; font-size: 11.5px; opacity: .8; margin-top: 2px; }
.xs-hint.ac { padding: 4px; }
.xs-ac { padding: 5px 8px; border-radius: 6px; cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
.xs-ac b { font-family: var(--mono); } .xs-ac span { font-size: 12px; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xs-ac.on { background: rgba(0,0,0,.08); }
.xs-ac-tip { font-size: 11px; opacity: .7; padding: 2px 8px; }
.xs-gw { overflow: auto; max-height: 440px; position: relative; outline: none; }
.xs-gw:focus-visible { box-shadow: inset 0 0 0 2px var(--xl); }
.xs-g { border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.xs-g th { background: var(--head); color: var(--muted); font-weight: 500; font-size: 12px; border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); text-align: center; position: sticky; z-index: 2; user-select: none; }
.xs-g thead th { top: 0; height: 24px; }
.xs-g th.xs-rh { left: 0; width: 40px; min-width: 40px; z-index: 1; }
.xs-g th.xs-cn { left: 0; top: 0; z-index: 3; width: 40px; }
.xs-g th.hl { background: var(--head-hl); color: var(--xl); font-weight: 700; }
.xs-g th.flt { color: var(--blue); }
.xs-g td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); height: 26px; padding: 0; position: relative; white-space: nowrap; overflow: visible; cursor: cell; }
.xs-g td .xs-v { padding: 2px 5px; overflow: hidden; text-overflow: clip; height: 25px; line-height: 21px; }
.xs-g td.n .xs-v { text-align: right; font-variant-numeric: tabular-nums; }
.xs-g td.m .xs-v { text-align: center; }
.xs-g td.e .xs-v { color: var(--red); font-weight: 600; }
.xs-g td.b .xs-v { font-weight: 700; }
.xs-g td.s { background: var(--sel); }
.xs-g td.a { outline: 2px solid var(--act); outline-offset: -2px; z-index: 1; background: var(--card); }
.xs-g td.t { box-shadow: inset 0 0 0 1px #f59e0b; }
.xs-g td.t::after { content: ""; position: absolute; top: 2px; right: 2px; width: 5px; height: 5px; border-radius: 50%; background: #f59e0b; }
.xs-g td.sp .xs-v { color: var(--muted); }
.xs-g td.f .xs-v::before { content: ""; }
.xs-g td.dash { outline: 2px dashed var(--xl); outline-offset: -2px; animation: dash 1s linear infinite; }
@keyframes dash { to { outline-color: #86efac; } }
.xs-fh { position: absolute; right: -4px; bottom: -4px; width: 8px; height: 8px; background: var(--act); border: 1px solid #fff; cursor: crosshair; z-index: 3; }
.xs-fbtn, .xs-ddbtn { position: absolute; right: 1px; top: 2px; height: 20px; width: 20px; border: 1px solid var(--line2); border-radius: 4px; background: var(--card); font-size: 11px; line-height: 1; display: grid; place-items: center; color: var(--muted); padding: 0; }
.xs-fbtn.on { color: var(--blue); border-color: var(--blue); } .xs-fbtn .ic { width: 12px; height: 12px; }
.xs-ddbtn { right: -22px; top: 1px; height: 24px; width: 22px; z-index: 4; }
.xs-st { padding: 5px 10px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); background: var(--head); min-height: 28px; }
.xs-st .err { color: var(--red); }
.xs-ex { display: flex; flex-wrap: wrap; gap: 12px; padding: 0 10px; }
.xs-ex:not(:empty) { padding: 10px; border-top: 1px solid var(--line); }
.xs-card { margin: 0; background: var(--card); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 10px; max-width: 560px; flex: 1 1 320px; }
.xs-card figcaption { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.xs-card figcaption .xs-x { margin-left: auto; }
.xs-chart { width: 100%; height: auto; display: block; }
.xs-chart .ct { font-size: 15px; font-weight: 600; fill: var(--text); } .xs-chart .cl { font-size: 11px; fill: var(--muted); } .xs-chart .gl { stroke: var(--line); }
.xs-pvw { overflow: auto; }
.xs-pv { border-collapse: collapse; font-size: 13px; }
.xs-pv th, .xs-pv td { border: 1px solid var(--line); padding: 4px 10px; }
.xs-pv th { background: var(--xl-l); color: var(--xl); text-align: left; }
.xs-pv td.n { text-align: right; font-variant-numeric: tabular-nums; }
.xs-pv tfoot td { font-weight: 700; background: var(--head); }
.xs-x { background: none; border: 0; color: var(--muted); padding: 2px; display: inline-flex; border-radius: 6px; }
.xs-x:hover { background: var(--head); color: var(--red); }
.xs-ro .xs-g td { cursor: default; }
.xs-pop { position: absolute; z-index: 60; background: var(--card); border: 1px solid var(--line2); border-radius: 10px; box-shadow: var(--shadow); padding: 8px; min-width: 180px; max-width: 280px; font-size: 13.5px; }
.xs-sw { display: flex; gap: 6px; }
.xs-sw button { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--line2); }
.xs-fp-s { display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 6px; }
.xs-fp-s button { background: none; border: 0; text-align: left; padding: 5px 6px; border-radius: 6px; display: flex; gap: 6px; align-items: center; color: var(--text); }
.xs-fp-s button:hover { background: var(--head); }
.xs-fp-all { display: block; padding: 4px 6px; font-weight: 600; }
.xs-fp-l { max-height: 180px; overflow: auto; display: flex; flex-direction: column; padding: 0 6px; }
.xs-fp-l label { padding: 3px 0; }
.xs-fp-b { display: flex; gap: 6px; margin-top: 8px; }
.xs-lp { display: flex; flex-direction: column; }
.xs-lp button { background: none; border: 0; text-align: left; padding: 7px 8px; border-radius: 6px; color: var(--text); }
.xs-lp button:hover { background: var(--xl-l); }
.xs-dlg-ov { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 80; display: grid; place-items: center; padding: 14px; }
.xs-dlg { background: var(--card); border-radius: 14px; width: min(480px, 100%); max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.xs-dlg-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 700; }
.xs-dlg-b { padding: 14px 18px; }
.xs-dlg-b label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.xs-dlg-b input, .xs-dlg-b select { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--line2); border-radius: 8px; background: var(--card); font-size: 14px; font-weight: 400; }
.xs-dlg-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.xs-rules { font-size: 13px; margin-top: 8px; } .xs-rules ul { padding-left: 18px; margin: 4px 0; }
.xs-rules .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; border: 1px solid var(--line2); }

/* --- Kamus, pintasan, dsb --- */
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line2); border-radius: 10px; padding: 8px 12px; background: var(--card); margin-bottom: 14px; }
.search input { border: 0; flex: 1; font-size: 15px; background: transparent; outline: none; }
.fn { padding: 12px 14px; }
.fn .nm { font-family: var(--mono); font-weight: 700; color: var(--xl); font-size: 15px; }
.fn .sx { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin: 2px 0 6px; word-break: break-word; }
.fn .ex { font-family: var(--mono); font-size: 12.5px; background: var(--head); padding: 6px 8px; border-radius: 6px; margin-top: 8px; word-break: break-all; }
.fn .ex b { color: var(--xl); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chips button { border: 1px solid var(--line2); background: var(--card); border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--text); }
.chips button.on { background: var(--xl); color: #fff; border-color: var(--xl); }
.sc-tbl td:first-child, .sc-tbl td:nth-child(2) { white-space: nowrap; }
.sc-tbl .ok { color: #16a34a; font-weight: 700; }

/* --- Akun / masuk --- */
.gate { max-width: 460px; margin: 30px auto; }
.gate .logo-big { width: 64px; height: 64px; border-radius: 16px; background: var(--xl); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 28px; margin: 0 auto 12px; }
.kode { font-family: var(--mono); font-size: 28px; letter-spacing: 3px; text-align: center; background: var(--xl-l); color: var(--xl); border-radius: 12px; padding: 12px; font-weight: 700; user-select: all; }
.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.qris { max-width: 260px; width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; margin: 8px auto; }
.cert { border: 6px double var(--xl); padding: 24px; text-align: center; background: #fff; color: #1f2937; border-radius: 6px; }
.cert h2 { color: var(--xl); margin: 6px 0; font-size: 22px; }
.admin-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-tbl th, .admin-tbl td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: left; white-space: nowrap; }
.admin-tbl th { background: var(--head); position: sticky; top: 0; }
.tbl-wrap { overflow: auto; max-height: 70vh; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stats .card { padding: 12px 14px; }
.stats b { font-size: 22px; display: block; color: var(--xl); }
.stats span { font-size: 12.5px; color: var(--muted); }
.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 30px 0 10px; }
@media print { .top, .side, .bnav, .noprint { display: none !important; } .main { padding: 0; } .cert { border-color: #217346; } }
