/* ==========================================================================
   SIM WISUDA — Design system (diturunkan dari Stitch "SIM Wisuda Academic Portal")
   Bingkai charcoal · kanvas krem · kartu pastel bergaris 1.5px · aksen koral · Outfit
   ========================================================================== */
:root {
  --ink: #1F1F1F; --ink-2: #6B6B6B; --ink-3: #A3A199;
  --frame: #1F1F1F; --canvas: #F7F5EF; --surface: #FFFFFF; --line: #E5E1D8; --line-2: #EFEBE2;
  --coral: #FF5A36; --coral-d: #E8502E; --coral-dd: #B52603;
  --yellow: #FFD35C; --lilac: #C9B3F5; --sky: #BFE3FA; --mint: #BDEBD0; --cream-2: #EFEADF;
  --ok-bg: #DCFCE7; --ok: #166534; --warn-bg: #FEF9C3; --warn: #854D0E; --bad-bg: #FEE2E2; --bad: #991B1B;
  --mute-bg: #F1F5F9; --mute: #475569; --info-bg: #DBEAFE; --info: #1D4ED8;
  --c1: #E8502E; --c2: #2F86C2; --c3: #B58300; --c4: #7B5BD3; --c5: #2E9466;
  --r-xl: 20px; --r-lg: 12px; --r-md: 10px; --r-sm: 6px;
  --bd: 1.5px solid var(--ink);
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --arab: 'Noto Naskh Arabic', 'Amiri', 'Noto Serif', serif;
  --side: 248px; --gap: 20px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--frame); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--coral-dd); }
img { max-width: 100%; }
.ar, [lang="ar"] { font-family: var(--arab); direction: rtl; line-height: 1.8; }
.num { font-variant-numeric: tabular-nums; }
.ms { font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; font-size: 20px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; direction: ltr; -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga'; font-variation-settings: 'FILL' 0, 'wght' 400; vertical-align: middle; flex-shrink: 0; }
.ms.fill { font-variation-settings: 'FILL' 1, 'wght' 500; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------------ SHELL */
.shell { display: flex; min-height: 100vh; padding: 16px 16px 16px 0; gap: 0; }
.side { width: var(--side); flex-shrink: 0; display: flex; flex-direction: column; padding: 6px 14px 10px; color: #fff; position: sticky; top: 16px; height: calc(100vh - 32px); }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 8px 6px 18px; }
.logo { width: 44px; height: 44px; border-radius: 12px; background: var(--coral); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 20px; border: 1.5px solid #000; flex-shrink: 0; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.brand b { font-size: 15px; display: block; line-height: 1.2; }
.brand small { color: #bdb9b0; font-size: 11px; }
.nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-right: 2px; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav .grp { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #8d897f; margin: 12px 8px 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; color: #d9d5cc; text-decoration: none; font-weight: 500; font-size: 13.5px; position: relative; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.on { background: var(--yellow); color: var(--ink); }
.nav a .badge-n { margin-left: auto; background: var(--coral); color: #fff; border-radius: 999px; font-size: 10px; padding: 1px 6px; font-weight: 700; }
.nav a.lock { opacity: .35; pointer-events: none; }
.side .foot { flex: 0 0 auto; overflow: visible; border-top: 1px solid #383838; padding-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.nav { mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent); }
.side .foot { mask-image: none; }
.main { flex: 1; min-width: 0; background: var(--canvas); border-radius: var(--r-xl); display: flex; flex-direction: column; overflow: hidden; }
.top { display: flex; align-items: center; gap: 14px; padding: 18px 26px 12px; flex-wrap: wrap; }
.top h1 { margin: 0; font-size: 19px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.top h1 .ar { font-size: 17px; color: var(--coral-dd); font-weight: 500; }
.top .grow { flex: 1; }
.search { position: relative; width: min(360px, 100%); }
.search input { width: 100%; height: 44px; border: var(--bd); border-radius: var(--r-md); padding: 0 52px 0 14px; background: #fff; }
.search button { position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; border-radius: 8px; border: 0; background: var(--coral); color: #fff; cursor: pointer; display: grid; place-items: center; }
.iconbtn { width: 44px; height: 44px; border: var(--bd); border-radius: var(--r-md); background: #fff; display: grid; place-items: center; cursor: pointer; position: relative; }
.iconbtn .dot { position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); border: 2px solid #fff; }
.who { display: flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 1px solid var(--line); cursor: pointer; }
.av { width: 38px; height: 38px; border-radius: 50%; background: var(--coral); color: #fff; display: grid; place-items: center; font-weight: 600; border: 1.5px solid var(--ink); overflow: hidden; flex-shrink: 0; font-size: 14px; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.sm { width: 28px; height: 28px; font-size: 11px; }
.who b { display: block; font-size: 13.5px; line-height: 1.2; }
.who small { background: var(--yellow); border-radius: 6px; padding: 1px 6px; font-size: 10.5px; font-weight: 600; }
.subbar { display: flex; align-items: center; gap: 10px; padding: 0 26px 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.modes { display: flex; align-items: center; gap: 6px; background: var(--cream-2); border-radius: 999px; padding: 4px 4px 4px 14px; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--ink-2); }
.modes button { border: 0; border-radius: 999px; padding: 6px 12px; font-size: 13px; background: transparent; cursor: pointer; display: flex; align-items: center; gap: 6px; color: var(--ink-2); letter-spacing: 0; font-weight: 500; }
.modes button i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.modes button.on.normal { background: #fff; color: var(--ok); border: 1px solid var(--line); }
.modes button.on.gladih { background: var(--yellow); color: var(--ink); }
.modes button.on.acara { background: var(--coral); color: #fff; }
.modes button:disabled { cursor: default; }
.kegsel { margin-left: auto; font-size: 12px; background: var(--cream-2); border-radius: 8px; padding: 6px 10px; border: 1px solid var(--line); cursor: pointer; max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.view { flex: 1; overflow-y: auto; padding: 22px 26px 40px; }
.view:focus { outline: none; }

/* ------------------------------------------------------------------ LAYOUT HELPERS */
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.sb { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grid { display: grid; gap: var(--gap); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.mt { margin-top: var(--gap); } .mb { margin-bottom: var(--gap); }
.sp { flex: 1; }
.muted { color: var(--ink-2); } .small { font-size: 12px; } .tiny { font-size: 11px; }
.b { font-weight: 600; }
h2.sec { font-size: 18px; margin: 0; font-weight: 600; }
h3 { font-size: 15px; margin: 0; font-weight: 600; }
.pagehead { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.pagehead h2 { display: none; } /* judul halaman sudah tampil di bilah atas */
.pagehead p { margin: 0; color: var(--ink-2); max-width: 760px; }
.pagehead { align-items: center; }

/* ------------------------------------------------------------------ CARDS */
.card { background: var(--surface); border: var(--bd); border-radius: var(--r-lg); padding: 20px; min-width: 0; }
.card.flat { border-color: var(--line); }
.card.pad0 { padding: 0; overflow: hidden; }
.card.dark { background: var(--frame); color: #fff; border-color: var(--frame); }
.card.dark .muted { color: #b8b4aa; }
.card.yellow { background: var(--yellow); } .card.lilac { background: var(--lilac); } .card.sky { background: var(--sky); } .card.mint { background: var(--mint); } .card.cream { background: var(--canvas); }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-h h3 { flex: 1; }
.stat { display: flex; flex-direction: column; min-height: 196px; }
.stat .lbl { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.stat .lbl .ico { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.stat .ico .ms { font-size: 18px; }
.stat .big { font-size: 40px; font-weight: 700; line-height: 1.05; margin: 16px 0 6px; letter-spacing: -.02em; }
.stat .big small { font-size: 18px; font-weight: 500; }
.stat .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; }
.bar { height: 8px; background: rgba(31,31,31,.12); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--ink); border-radius: 99px; transition: width .4s; }
.bar.light > i { background: var(--coral); }
.chipset { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(31,31,31,.25); border-radius: 999px; padding: 3px 10px; font-size: 12px; background: rgba(255,255,255,.55); white-space: nowrap; }

/* ------------------------------------------------------------------ BADGES / PILLS */
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1.4; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.mute { background: var(--mute-bg); color: var(--mute); } .pill.info { background: var(--info-bg); color: var(--info); }
.pill.dark { background: var(--ink); color: #fff; } .pill.coral { background: var(--coral); color: #fff; } .pill.yellow { background: var(--yellow); color: var(--ink); } .pill.lilac { background: var(--lilac); color: var(--ink); } .pill.sky { background: var(--sky); color: var(--ink); } .pill.mint { background: var(--mint); color: var(--ink); }
.pill .pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* ------------------------------------------------------------------ BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border: var(--bd); border-radius: var(--r-md); background: #fff; cursor: pointer; font-weight: 600; font-size: 13.5px; white-space: nowrap; text-decoration: none; color: var(--ink); transition: transform .05s, background .15s; }
.btn:hover { background: var(--canvas); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--coral); color: #fff; }
.btn.primary:hover { background: var(--coral-d); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.dark:hover { background: #333; }
.btn.yellow { background: var(--yellow); } .btn.lilac { background: var(--lilac); } .btn.sky { background: var(--sky); } .btn.mint { background: var(--mint); }
.btn.danger { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(31,31,31,.06); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.xs { height: 26px; padding: 0 8px; font-size: 11.5px; border-radius: 7px; gap: 4px; }
.btn.xs .ms { font-size: 16px; }
.btn.lg { height: 52px; padding: 0 22px; font-size: 15px; }
.btn.block { width: 100%; }
.btn.icon { width: 40px; padding: 0; }
.btn.sm.icon { width: 32px; }
.seg { display: inline-flex; border: var(--bd); border-radius: 999px; padding: 3px; background: #fff; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 500; font-size: 13px; }
.seg button.on { background: var(--ink); color: #fff; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { border: 1.5px solid var(--ink); border-radius: 999px; padding: 7px 14px; background: #fff; cursor: pointer; font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.tabs button.on { background: var(--ink); color: #fff; }
.tabs button .n { background: var(--cream-2); color: var(--ink); border-radius: 99px; padding: 0 6px; font-size: 11px; }

/* v1.1 — submenu/kategori ≥3 pilihan tampil sebagai dropdown (ui.js dropdownkan) */
.dd-src { display: none !important; }
.tbl tr.pending { opacity: .55; pointer-events: none; transition: opacity .2s; }
.dd { position: relative; display: inline-flex; align-items: center; max-width: 100%; min-width: 230px; vertical-align: middle; }
.dd.mb { margin-bottom: 16px; } .dd.mt { margin-top: 16px; } .dd.full { display: flex; width: 100%; }
.dd > .ms { position: absolute; left: 14px; font-size: 19px; pointer-events: none; color: var(--ink); }
.dd::after { content: 'expand_more'; font-family: 'Material Symbols Outlined'; position: absolute; right: 12px; font-size: 22px; line-height: 1; pointer-events: none; color: var(--ink); }
.dd .ddsel { -webkit-appearance: none; appearance: none; width: 100%; height: 40px; border: 1.5px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); padding: 0 40px 0 42px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-overflow: ellipsis; }
.dd .ddsel:focus { outline: 2px solid var(--coral); outline-offset: 2px; }

/* ------------------------------------------------------------------ FORMS */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .lbl2 { font-size: 13px; font-weight: 500; }
.field > span em { color: var(--bad); font-style: normal; }
.field small { color: var(--ink-2); font-size: 11.5px; }
.inp, .field input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]), .field select, .field textarea, select.inp {
  width: 100%; height: 44px; border: var(--bd); border-radius: var(--r-md); padding: 0 12px; background: #fff; outline: none; }
.field textarea, textarea.inp { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.inp:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--coral); outline-offset: 2px; }
.inp.sm { height: 34px; border-radius: 8px; font-size: 13px; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--coral); }
.switch { position: relative; width: 46px; height: 26px; display: inline-block; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: #cfcabf; border-radius: 99px; transition: .2s; cursor: pointer; border: 1.5px solid var(--ink); }
.switch i::after { content: ''; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; border: 1.5px solid var(--ink); }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(20px); }
.dropzone { display: block; border: 2px dashed #c9c3b6; border-radius: var(--r-lg); background: #FBFAF6; padding: 20px; text-align: center; cursor: pointer; color: var(--ink-2); transition: .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--coral); color: var(--ink); }
.dropzone img { max-height: 120px; border-radius: 8px; }

/* ------------------------------------------------------------------ TABLES */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); background: var(--canvas); padding: 10px 14px; font-weight: 600; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: #FCFBF8; }
.tbl tr.dim td { opacity: .5; }
.tbl tr.warnrow td { background: #FFFBEB; }
.tbl td.act { text-align: right; white-space: nowrap; }
.tbl .act .btn { opacity: .75; }
.tbl tr:hover .act .btn { opacity: 1; }
.tbl.compact td { padding: 7px 10px; }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl th.c, .tbl td.c { text-align: center; }
.baca-saja [data-buat], .baca-saja [data-sync], .baca-saja [data-save], .baca-saja [data-cekwa], .baca-saja [data-imp], .baca-saja [data-int], .baca-saja [data-proses], .baca-saja [data-retry], .baca-saja [data-next], .baca-saja [data-stop] { display: none !important; }
/* v1.2 — Hak Akses Divisi */
.akses-tbl input.cb { width: 20px; height: 20px; accent-color: var(--coral); cursor: pointer; }
.akses-tbl input.cb:disabled { cursor: default; opacity: .55; }
.ak { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font-weight: 700; vertical-align: middle; }
.ak .ms { font-size: 15px; }
.ak-crud { background: var(--ok-bg); color: var(--ok); } .ak-baca { background: var(--info-bg); color: var(--info); } .ak-tidak { color: var(--ink-3); }
.akses-ring th.c .ms { font-size: 18px; }
/* v1.2 — papan distribusi rekrutmen */
.papan { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; align-items: start; }
.papan .kol { border: 1.5px solid var(--ink); border-radius: 16px; background: #fff; display: flex; flex-direction: column; min-height: 120px; }
.papan .kol.lebih { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.papan .kol.pas { border-color: var(--ok); }
.papan .kol-h { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.papan .kol-h b { font-size: 13.5px; line-height: 1.3; }
.papan .kol-b { padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 60px; flex: 1; }
.papan .kartu { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--canvas); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; cursor: grab; }
.papan .kartu.kunci { cursor: default; background: #F1EFE8; }
.papan .kartu.dipilih { outline: 2px solid var(--coral); outline-offset: 1px; background: #FFF4EF; }
.papan .kartu.pindah { border-color: var(--coral); border-style: dashed; }
.papan .kartu b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.papan .kartu .tiny { grid-column: 1 / -1; }
.papan .kartu select { grid-column: 1 / -1; width: 100%; font-size: 12px; height: 30px; padding: 0 6px; border-radius: 8px; border: 1px solid var(--line); background: #fff; margin-top: 4px; }
.papan .sortable-ghost { opacity: .4; }
.kuota-bar { height: 6px; border-radius: 99px; background: #ECE8DF; overflow: hidden; margin-top: 4px; }
.kuota-bar i { display: block; height: 100%; background: var(--ok); }
.kuota-bar i.lebih { background: var(--bad); } .kuota-bar i.kurang { background: var(--yellow); }
.simpan-bar { position: sticky; bottom: 12px; z-index: 5; margin-top: 12px; border: 1.5px solid var(--ink); background: var(--yellow); border-radius: 16px; padding: 10px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; box-shadow: 3px 3px 0 var(--ink); }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person small { color: var(--ink-2); font-size: 12px; }
.pager { display: flex; align-items: center; gap: 6px; justify-content: space-between; padding: 12px 14px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }

/* ------------------------------------------------------------------ MODAL / DRAWER / TOAST */
.overlay { position: fixed; inset: 0; background: rgba(31,31,31,.4); backdrop-filter: blur(4px); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border: var(--bd); border-radius: var(--r-xl); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 6px 6px 0 var(--ink); animation: pop .18s; }
.modal.wide { width: min(900px, 100%); }
.modal.xwide { width: min(1200px, 100%); }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-h h3 { flex: 1; font-size: 17px; }
.modal-b { padding: 20px 22px; overflow-y: auto; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.overlay.drawer { justify-content: flex-end; padding: 0; }
.overlay.drawer .modal { height: 100vh; max-height: 100vh; border-radius: 20px 0 0 20px; width: min(520px, 100%); animation: slide .2s; box-shadow: -6px 0 0 var(--ink); }
.overlay.drawer .modal.wide { width: min(760px, 100%); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 36px)); }
.toast { background: #fff; border: var(--bd); border-left-width: 6px; border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; box-shadow: 4px 4px 0 var(--ink); animation: pop .2s; font-size: 13.5px; }
.toast.ok { border-left-color: #16a34a; } .toast.err { border-left-color: #dc2626; } .toast.info { border-left-color: #2563eb; } .toast.warn { border-left-color: #d97706; }
.loading-bar { position: fixed; top: 0; left: 0; height: 3px; background: var(--coral); z-index: 200; width: 0; transition: width .3s, opacity .3s; }

/* ------------------------------------------------------------------ SKELETON & EMPTY */
.sk { background: linear-gradient(90deg, #ece8de 25%, #f5f2ea 50%, #ece8de 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }
.sk.line { height: 14px; margin: 8px 0; }
.sk.block { height: 180px; border-radius: var(--r-lg); }
.empty { text-align: center; padding: 36px 18px; color: var(--ink-2); }
.empty .ill { width: 84px; height: 84px; margin: 0 auto 12px; border-radius: 24px; background: var(--yellow); border: var(--bd); display: grid; place-items: center; transform: rotate(-4deg); }
.empty .ill .ms { font-size: 40px; color: var(--ink); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }

/* ------------------------------------------------------------------ CHART */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; padding: 6px 9px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .1s; z-index: 3; }
.chart .tip.on { opacity: 1; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hbar { display: grid; gap: 12px; }
.hbar .it .t { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 500; margin-bottom: 5px; gap: 8px; }
.hbar .trk { height: 10px; background: #EFEBE2; border-radius: 99px; overflow: hidden; }
.hbar .trk i { display: block; height: 100%; border-radius: 99px; }

/* ------------------------------------------------------------------ LOGIN */
.login { min-height: 100vh; padding: 16px; display: flex; }
.login-in { flex: 1; border-radius: var(--r-xl); background: var(--canvas) center/cover; position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; padding: 6vh 4vw; align-items: center; overflow: hidden; }
.login-in::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 15% 20%, rgba(255,211,92,.35), transparent 40%), radial-gradient(circle at 85% 80%, rgba(201,179,245,.4), transparent 45%), repeating-linear-gradient(135deg, rgba(31,31,31,.025) 0 2px, transparent 2px 14px); }
.login-in > * { position: relative; }
.login-hero { background: rgba(255,255,255,.75); backdrop-filter: blur(6px); border: 1px solid rgba(31,31,31,.12); border-radius: var(--r-xl); padding: 30px; }
.login-hero h1 { font-size: clamp(28px, 3.4vw, 42px); margin: 10px 0 8px; letter-spacing: -.02em; line-height: 1.1; }
.login-hero h1 span { color: var(--coral); }
.login-hero .art { margin-top: 18px; border-radius: var(--r-lg); border: var(--bd); background: var(--ink); color: #fff; padding: 22px; display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.login-card { background: var(--coral); color: #fff; border-radius: var(--r-xl); padding: 30px; border: var(--bd); box-shadow: 6px 6px 0 var(--ink); }
.login-card h2 { margin: 6px 0 2px; font-size: 26px; text-align: center; }
.login-card .sub { text-align: center; color: #ffe1d8; font-size: 13px; margin-bottom: 22px; }
.login-card .gbtn { background: #fff; color: var(--ink); border-radius: 12px; padding: 10px; display: flex; justify-content: center; min-height: 52px; align-items: center; }
.login-card .btn.dark { width: 100%; height: 50px; }
.login-card .note { background: rgba(0,0,0,.12); border-radius: 12px; padding: 12px; font-size: 12.5px; margin-top: 16px; }
.login-card input { border-color: var(--ink) !important; }

/* ------------------------------------------------------------------ PAGE-SPECIFIC (dipakai banyak halaman) */
.timeline { display: flex; flex-direction: column; gap: 10px; }
.tl-item { display: grid; grid-template-columns: 28px 92px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: #fff; border: var(--bd); border-radius: var(--r-lg); padding: 12px 14px; }
.tl-item.selesai { opacity: .55; }
.tl-item.berjalan { background: #EEF5FF; border-color: var(--info); }
.tl-item .drag { cursor: grab; color: var(--ink-3); }
.tl-item .jam { font-weight: 700; font-size: 15px; }
.tl-item .jam small { display: block; font-weight: 500; color: var(--ink-2); font-size: 12px; }
.tl-item .ttl { font-weight: 600; }
.tl-item .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; align-items: center; }
.sortable-ghost { opacity: .35; }
.kbd { font-family: ui-monospace, monospace; font-size: 12px; background: var(--cream-2); border-radius: 5px; padding: 1px 6px; }
.notice { border: 1.5px solid var(--warn); background: var(--warn-bg); color: var(--warn); border-radius: var(--r-lg); padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; }
.notice.info { border-color: var(--info); background: var(--info-bg); color: var(--info); }
.notice.bad { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.notice.ok { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }

/* Denah */
.denah { display: flex; flex-direction: column; gap: 14px; }
.stage { background: #F0EEE8; border-radius: 14px; border-top: 4px solid var(--coral); padding: 14px; }
.stage-in { background: var(--ink); border-radius: 12px; padding: 10px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.aisle-grid { display: grid; grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr); gap: 12px; }
.aisle { background: #FFE9E3; border-radius: 12px; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; color: var(--coral-dd); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.blok { border-radius: 14px; padding: 12px; }
.blok h4 { margin: 0 0 8px; font-size: 13px; display: flex; justify-content: space-between; gap: 6px; }
.blok .seats { display: grid; gap: 6px; }
.seat { min-height: 46px; border-radius: 9px; border: 1.5px solid rgba(31,31,31,.18); background: rgba(255,255,255,.65); font-size: 10.5px; padding: 4px 6px; cursor: pointer; text-align: left; overflow: hidden; line-height: 1.25; position: relative; }
.seat b { display: block; font-size: 10px; color: var(--ink-2); }
.seat span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.seat.isi { background: #fff; border-color: rgba(31,31,31,.45); }
.seat.sel { outline: 2.5px solid var(--coral); outline-offset: 1px; }
.seat.ganda { border-color: var(--bad); background: var(--bad-bg); }
.seat.me { background: var(--coral); color: #fff; border-color: var(--ink); }
.seat.me b { color: #ffe1d8; }
.seat.drop { outline: 2px dashed var(--coral); }
.stage .seat { background: #333; color: #fff; border-color: #555; min-width: 68px; text-align: center; }
.stage .seat b { color: #bbb; }
.z-VVIP { background: #EFE8FD; } .z-VIP, .z-DOSEN { background: #FFF5D6; } .z-WISUDAWAN, .z-WISUDAWATI { background: #E9F5FD; } .z-PENDAMPING { background: #E8F7EE; } .z-UMUM { background: #FAF9F5; border: 1px solid var(--line); } .z-PANITIA { background: #EEE; } .z-SENAT { background: #333; }

/* Scan */
.scanbox { position: relative; border-radius: 22px; overflow: hidden; background: #111; aspect-ratio: 1 / 1; max-height: 56vh; margin: 0 auto; width: 100%; }
.scanbox video { width: 100%; height: 100%; object-fit: cover; }
.scanbox #qr-reader { width: 100%; height: 100%; }
.scanbox #qr-reader video { object-fit: cover; }
.scanbox .corner { position: absolute; width: 44px; height: 44px; border: 4px solid var(--coral); z-index: 2; }
.scanbox .c1 { top: 18px; left: 18px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; } .scanbox .c2 { top: 18px; right: 18px; border-left: 0; border-bottom: 0; } .scanbox .c3 { bottom: 18px; left: 18px; border-right: 0; border-top: 0; } .scanbox .c4 { bottom: 18px; right: 18px; border-left: 0; border-top: 0; }
.scanbox .laser { position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; background: var(--coral); box-shadow: 0 0 16px 4px rgba(255,90,54,.6); animation: laser 2.2s infinite ease-in-out; z-index: 2; }
@keyframes laser { 0%,100% { top: 25%; } 50% { top: 75%; } }
.scanbox .modelbl { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.75); color: #fff; padding: 5px 14px; border-radius: 99px; font-size: 12px; font-weight: 700; letter-spacing: .08em; z-index: 2; white-space: nowrap; }
.scanres { border-radius: 18px; padding: 16px; border: var(--bd); display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; animation: pop .2s; }
.scanres.ok { background: #C7EFD6; } .scanres.dup { background: #FFD9D2; } .scanres.nf { background: #FFF1C2; }
.scanres .ph { width: 64px; height: 64px; border-radius: 14px; background: #fff; border: var(--bd); display: grid; place-items: center; overflow: hidden; }
.scanres .ph img { width: 100%; height: 100%; object-fit: cover; }
.scanres .big { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.scanres.ok .big { background: #15803d; } .scanres.dup .big { background: #b91c1c; } .scanres.nf .big { background: #a16207; }

/* MC */
.mc-wrap { max-width: 860px; margin: 0 auto; }
.mc-read { background: #fff; border: var(--bd); border-radius: var(--r-xl); padding: 26px 28px; font-size: var(--mcfs, 22px); line-height: 1.75; }
.mc-read.dark { background: #161616; color: #f3f0e8; border-color: #161616; }
.mc-read p { margin: 0 0 .7em; }
.mc-read .jeda { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; margin: 14px 0; }
.mc-read .jeda::before, .mc-read .jeda::after { content: ''; flex: 1; border-top: 1.5px dashed currentColor; }
.mc-read .var { background: var(--yellow); color: var(--ink); border-radius: 6px; padding: 0 5px; font-weight: 600; }
.mc-read .var.kosong { background: var(--bad-bg); color: var(--bad); }
.mc-read .ar { font-size: 1.18em; text-align: right; display: block; }
.mc-read .instr { font-size: 14px; border: 1.5px dashed var(--ink-3); border-radius: 12px; padding: 10px 12px; margin-bottom: 16px; color: var(--ink-2); line-height: 1.5; }
.mc-read.dark .instr { border-color: #444; color: #aaa; }
.mc-read .panggil { border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; margin: 10px 0 16px; font-size: .78em; }
.mc-read .panggil div { padding: 10px 14px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 40px 1fr; gap: 10px; }
.mc-read.dark .panggil, .mc-read.dark .panggil div { border-color: #333; }
.mc-read .panggil div:nth-child(odd) { background: rgba(0,0,0,.025); }

/* Live */
.live-now { background: radial-gradient(circle at 80% 0%, #4a3a33, #1f1f1f 60%); color: #fff; border-radius: 22px; padding: 22px; border: 1.5px solid #000; }
.live-now .ttl { font-size: 26px; font-weight: 600; line-height: 1.2; margin: 6px 0 10px; }
.live-now .timer { font-size: 44px; font-weight: 700; color: var(--coral); line-height: 1; }
.live-now .timer.over { color: #ff8a8a; }
.live-now .pic { background: rgba(255,255,255,.08); border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 12px; margin-top: 14px; }

/* Studio */
.studio { display: grid; grid-template-columns: 260px minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.canvas-wrap { background: repeating-conic-gradient(#EEE 0% 25%, #FAFAFA 0% 50%) 50% / 20px 20px; border: var(--bd); border-radius: var(--r-lg); padding: 22px; display: flex; justify-content: center; overflow: auto; }
.canvas { position: relative; background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.18); user-select: none; overflow: hidden; }
.canvas > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.fld { position: absolute; border: 1.5px dashed rgba(255,90,54,.85); cursor: move; display: flex; align-items: center; overflow: hidden; line-height: 1.15; padding: 0 2px; }
.fld.sel { border-style: solid; border-color: var(--coral); background: rgba(255,90,54,.08); }
.fld .h { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; background: var(--coral); cursor: nwse-resize; }
.fld .tag { position: absolute; top: -18px; left: -1.5px; font-size: 9px; background: var(--coral); color: #fff; padding: 1px 4px; border-radius: 4px 4px 0 0; white-space: nowrap; font-family: var(--font); }
.fldlist button { display: flex; width: 100%; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 7px 10px; margin-bottom: 6px; cursor: pointer; font-size: 13px; text-align: left; }
.fldlist button:hover { border-color: var(--ink); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.thumbs .t { border: var(--bd); border-radius: 10px; overflow: hidden; background: #fff; font-size: 11px; }
.thumbs .t img, .thumbs .t canvas { display: block; width: 100%; }
.thumbs .t div { padding: 6px 8px; }

/* Galeri */
.masonry { columns: 4 220px; column-gap: 14px; }
.masonry .ph { break-inside: avoid; margin-bottom: 14px; border: var(--bd); border-radius: 12px; overflow: hidden; background: #fff; }
.masonry .ph img { display: block; width: 100%; min-height: 80px; background: #eee; }
.masonry .ph div { padding: 8px 10px; font-size: 12px; display: flex; gap: 6px; align-items: center; }

/* WA preview */
.wa-preview { background: #E6DDD4 repeating-linear-gradient(45deg, rgba(255,255,255,.12) 0 6px, transparent 6px 12px); border-radius: 14px; padding: 16px; }
.wa-preview .bub { background: #DCF8C6; border-radius: 10px 0 10px 10px; padding: 9px 12px; max-width: 92%; margin-left: auto; white-space: pre-wrap; font-size: 13.5px; box-shadow: 0 1px 1px rgba(0,0,0,.12); }

/* LPJ preview */
.paper { background: #fff; border: 1px solid #ddd; box-shadow: 0 8px 30px rgba(0,0,0,.12); padding: 48px 56px; max-width: 820px; margin: 0 auto; font-family: 'Times New Roman', serif; font-size: 14.5px; line-height: 1.6; color: #111; }
.paper h1 { font-size: 18px; text-align: center; margin: 0 0 6px; }
.paper h2 { font-size: 16px; margin: 26px 0 10px; }
.paper h3 { font-size: 14.5px; margin: 18px 0 8px; }
.paper table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 13px; }
.paper th, .paper td { border: 1px solid #555; padding: 5px 7px; vertical-align: top; }
.paper th { background: #eee; }
.paper .edit { background: #FFF6D6; outline: 1px dashed #d4a800; border-radius: 3px; cursor: text; }
.paper .ttd { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 30px; text-align: center; }
.paper .ttd div { min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; }

/* Portal tamu */
.guest { max-width: 460px; margin: 0 auto; min-height: 100vh; background: var(--canvas); }
.guest-top { display: flex; align-items: center; gap: 10px; padding: 16px 18px; }
.guest-body { padding: 0 16px 28px; display: flex; flex-direction: column; gap: 14px; }
.inv { position: relative; border-radius: 18px; overflow: hidden; border: var(--bd); background: var(--ink); color: #fff; }
.inv canvas { display: block; width: 100%; }
.qrbox { background: #fff; border-radius: 14px; padding: 12px; display: inline-block; border: var(--bd); }
.qrbox img, .qrbox canvas { display: block; width: 180px; height: 180px; image-rendering: pixelated; }

/* Bottom nav (HP) */
.bnav { display: none; }
.mobile-only { display: none; }

/* ------------------------------------------------------------------ RESPONSIVE */
@media (max-width: 1279px) {
  :root { --side: 76px; }
  .side { padding: 6px 10px 10px; }
  .side .brand b, .side .brand small, .nav a span:not(.ms), .nav .grp, .nav a .badge-n { display: none; }
  .nav a { justify-content: center; padding: 11px 0; }
  .nav a .badge-n.dot { display: block; position: absolute; top: 6px; right: 10px; width: 8px; height: 8px; padding: 0; }
  .studio { grid-template-columns: 220px minmax(0, 1fr); }
  .studio > .props { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-2-1, .g-1-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .dd { display: flex; width: 100%; min-width: 0; }
  .g-hp1 { grid-template-columns: minmax(0, 1fr) !important; }
  .papan { grid-template-columns: minmax(0, 1fr); }
  .rekap-tbl td.c1 { min-width: 118px; } .rekap-tbl input.inp { width: 58px !important; padding: 0 8px; }
  .akses-tbl td.c1 { min-width: 0; }
  .akses-tbl th:nth-child(4), .akses-tbl td:nth-child(4) { display: none; }
  .akses-tbl th.c, .akses-tbl td.c { width: 56px !important; padding-left: 4px; padding-right: 4px; }
  .akses-tbl th.c .check { flex-direction: column; gap: 2px; font-size: 11px; }
  .akses-tbl td.c1 .ms { display: none; }
  .simpan-bar { bottom: 84px; }
  .paper { font-size: 13.5px; overflow-x: auto; }
  .tbl td.c1 { min-width: 170px; }
  :not(td) > .pill { white-space: normal; max-width: 100%; }
  .modes { width: 100%; padding: 3px 3px 3px 12px; gap: 2px; font-size: 0; }
  .modes::before { content: 'MODE'; font-size: 10.5px; letter-spacing: .08em; margin-right: auto; }
  .modes button { font-size: 12.5px; padding: 6px 10px; white-space: nowrap; }
  .paper table { font-size: 11.5px; }
  body { background: var(--canvas); font-size: 14.5px; }
  .shell { padding: 0; display: block; }
  .side { display: none; }
  .main { border-radius: 0; min-height: 100vh; overflow: visible; }
  .top { padding: 14px 16px 10px; gap: 10px; }
  .top .search { order: 9; width: 100%; }
  .who div { display: none; }
  .who { border: 0; padding: 0; }
  .subbar { padding: 0 16px 12px; }
  .kegsel { margin-left: 0; max-width: 100%; }
  .view { padding: 16px 16px 96px; overflow: visible; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .form { grid-template-columns: minmax(0, 1fr); }
  .stat { min-height: 0; }
  .stat .big { font-size: 34px; }
  .modal { box-shadow: 4px 4px 0 var(--ink); }
  .overlay.drawer .modal { border-radius: 18px 18px 0 0; height: 92vh; max-height: 92vh; margin-top: auto; width: 100%; box-shadow: 0 -4px 0 var(--ink); }
  .overlay.drawer { align-items: flex-end; }
  .bnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--frame); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); gap: 4px; }
  .bnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #cfcbc2; text-decoration: none; font-size: 10.5px; padding: 6px 0; border-radius: 12px; }
  .bnav a.on { background: var(--yellow); color: var(--ink); }
  .mobile-only { display: initial; }
  .desk-only { display: none !important; }
  .login-in { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .login-hero { display: none; }
  .aisle-grid { grid-template-columns: minmax(0, 1fr); }
  .aisle { writing-mode: horizontal-tb; padding: 6px; }
  .tl-item { grid-template-columns: 22px 70px minmax(0, 1fr); }
  .tl-item > :last-child { grid-column: 2 / -1; }
  .studio { grid-template-columns: minmax(0, 1fr); }
  .toasts { left: 12px; right: 12px; bottom: 84px; max-width: none; }
  .paper { padding: 22px 18px; }
}
@media print {
  body { background: #fff; }
  .side, .top, .subbar, .bnav, .noprint, .toasts { display: none !important; }
  .shell, .main, .view { padding: 0; display: block; background: #fff; overflow: visible; }
  .paper { box-shadow: none; border: 0; padding: 0; max-width: none; }
  .paper .edit { background: none; outline: 0; }
  .paper .pgb { border: 0 !important; margin: 0 !important; height: 0 !important; }
  .paper .chart .tip { display: none; }
  @page { size: A4; margin: 2cm 2cm 2cm 3cm; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
[hidden] { display: none !important; }
