/* ============================================================
   LSP Klining Servis — Internal App Shell
   Reuses brand tokens; light theme + deep-blue sidebar
   ============================================================ */

:root {
  --blue:        #1a3d83;
  --blue-700:    #15336e;
  --blue-900:    #0f2350;
  --blue-ink:    #0b1a3d;
  --red:         #af231c;
  --red-700:     #94190f;

  --ink:         #13141f;
  --paper:       #ffffff;
  --mist:        #f4f7fc;
  --cloud:       #e9edf7;
  --on-blue-dim: #aab6d6;
  --line:        #e4e9f2;
  --line-soft:   #eef2f8;
  --muted:       #5c6580;
  --muted-2:     #8b93a8;

  --sb-bg:       #0f2350;
  --sb-fg:       #b9c5e3;
  --sb-fg-dim:   #7f8db5;
  --sb-active:   #1a3d83;

  --font-display: "Sora", system-ui, sans-serif;
  --font-body:    "Plus Jakarta Sans", system-ui, sans-serif;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;

  --sh-sm: 0 1px 2px rgba(15,35,80,.06), 0 1px 3px rgba(15,35,80,.05);
  --sh-md: 0 6px 20px rgba(15,35,80,.08), 0 2px 6px rgba(15,35,80,.05);
  --sh-lg: 0 18px 48px rgba(11,26,61,.16);

  --sidebar-w: 264px;

  /* status colors */
  --s-draft:    #8b93a8;
  --s-diajukan: #2563c9;
  --s-revisi:   #c77d12;
  --s-verif:    #0e8aa6;
  --s-tolak:    #af231c;
  --s-setuju:   #2f9e57;
  --s-jadwal:   #6b4fd1;
  --s-laksana:  #0e8aa6;
  --s-selesai:  #1f7a45;
  --s-batal:    #8b93a8;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--mist);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,h5 { font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
svg { display: block; }

/* ============================================================
   APP LAYOUT
   ============================================================ */
.app { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: var(--sb-bg);
  color: var(--sb-fg);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  border-right: 1px solid rgba(255,255,255,.06);
}
.sidebar__brand {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar__logo {
  background: #fff; border-radius: 11px; padding: 7px;
  flex: none; box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.sidebar__logo img { height: 34px; width: auto; }
.sidebar__brand b { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 15px; display: block; line-height: 1.1; }
.sidebar__brand span { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--sb-fg-dim); font-weight: 600; }

.sidebar__nav { padding: 14px 12px; overflow-y: auto; flex: 1; }
.sidebar__section { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--sb-fg-dim); font-weight: 700; padding: 16px 12px 8px; }
.sidebar__section:first-child { padding-top: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-md);
  color: var(--sb-fg); font-weight: 500; font-size: 14.5px;
  transition: background .15s ease, color .15s ease;
  position: relative;
}
.nav-item svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.is-active { background: var(--sb-active); color: #fff; }
.nav-item.is-active svg { opacity: 1; }
.nav-item__badge {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700; min-width: 20px; height: 20px;
  border-radius: 999px; display: grid; place-items: center; padding: 0 6px;
}
.nav-item.is-hidden { display: none; }

.sidebar__user {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar__avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: linear-gradient(140deg, #2a4d97, #15336e);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}
.sidebar__user-meta { min-width: 0; flex: 1; }
.sidebar__user-meta b { color: #fff; font-size: 13.5px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-body); }
.sidebar__user-meta span { font-size: 12px; color: var(--sb-fg-dim); }
.sidebar__logout { margin-left: auto; color: var(--sb-fg-dim); padding: 6px; border-radius: 8px; background: none; border: none; transition: color .15s, background .15s; }
.sidebar__logout:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar__logout svg { width: 18px; height: 18px; }

/* ---------- Main ---------- */
.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 68px; flex: none;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 18px;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 30;
}
.topbar__title h1 { font-size: 20px; font-weight: 600; }
.topbar__title p { font-size: 13px; color: var(--muted); margin-top: 1px; }
.topbar__spacer { flex: 1; }

.role-switch {
  display: flex; align-items: center; gap: 8px;
  background: var(--mist); border: 1px solid var(--line);
  padding: 5px 6px 5px 12px; border-radius: 999px;
}
.role-switch label { font-size: 12px; color: var(--muted); font-weight: 600; }
.role-switch select {
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--blue);
  border: none; background: #fff; padding: 6px 10px; border-radius: 999px;
  box-shadow: var(--sh-sm); cursor: pointer; outline: none;
}

.icon-btn {
  width: 40px; height: 40px; border-radius: 11px;
  border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; color: var(--muted);
  position: relative; transition: border-color .15s, color .15s;
}
.icon-btn:hover { color: var(--blue); border-color: var(--cloud); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn__dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #fff; }

.content { padding: 28px; flex: 1; }

/* ---------- Filters row ---------- */
.filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.field {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; font-size: 13.5px; color: var(--ink);
}
.field svg { width: 16px; height: 16px; color: var(--muted-2); }
.field select, .field input { border: none; outline: none; font-family: inherit; font-size: 13.5px; color: var(--ink); background: none; font-weight: 500; }
.filters__spacer { flex: 1; }

/* ============================================================
   CARDS / STAT TILES
   ============================================================ */
.grid { display: grid; gap: 16px; }
.stat-cards { grid-template-columns: repeat(4, 1fr); margin-bottom: 22px; }
.stat-cards--3 { grid-template-columns: repeat(3, 1fr); }
.stat-tile {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; box-shadow: var(--sh-sm);
  display: flex; flex-direction: column; gap: 8px;
}
.stat-tile__top { display: flex; align-items: center; gap: 10px; }
.stat-tile__ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--mist); color: var(--blue); }
.stat-tile__ic svg { width: 20px; height: 20px; }
.stat-tile__label { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat-tile__num { font-family: var(--font-display); font-weight: 700; font-size: 32px; letter-spacing: -0.02em; }
.stat-tile__delta { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.stat-tile__delta.up { color: var(--s-selesai); }
.stat-tile__delta.down { color: var(--red); }
.stat-tile__delta svg { width: 14px; height: 14px; }

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm); overflow: hidden;
}
.panel__head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.panel__head h3 { font-size: 16px; font-weight: 600; }
.panel__head p { font-size: 12.5px; color: var(--muted); }
.panel__head .spacer { flex: 1; }
.panel__link { font-size: 13px; font-weight: 600; color: var(--blue); display: inline-flex; align-items: center; gap: 5px; }
.panel__link svg { width: 15px; height: 15px; }
.panel__body { padding: 20px; }

.cols { display: grid; gap: 16px; }
.cols--2-1 { grid-template-columns: 2fr 1fr; }
.cols--1-1 { grid-template-columns: 1fr 1fr; }

/* ============================================================
   STATUS BADGES
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .01em;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--draft    { color: var(--s-draft);    background: #f0f2f7; }
.badge--diajukan { color: var(--s-diajukan); background: #e8f0fd; }
.badge--revisi   { color: var(--s-revisi);   background: #fbf2e1; }
.badge--verif    { color: var(--s-verif);    background: #e2f4f8; }
.badge--tolak    { color: var(--s-tolak);    background: #fbeaea; }
.badge--setuju   { color: var(--s-setuju);   background: #e7f5ec; }
.badge--jadwal   { color: var(--s-jadwal);   background: #efebfb; }
.badge--laksana  { color: var(--s-laksana);  background: #e2f4f8; }
.badge--selesai  { color: #fff; background: var(--s-selesai); }
.badge--selesai::before { background: rgba(255,255,255,.85); }
.badge--batal    { color: var(--s-batal);    background: #f0f2f7; }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data thead th {
  text-align: left; font-weight: 700; color: var(--muted); font-size: 11.5px;
  letter-spacing: .06em; text-transform: uppercase; padding: 12px 16px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data tbody td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background .12s ease; }
table.data tbody tr:hover { background: var(--mist); cursor: pointer; }
.cell-id { font-family: var(--font-display); font-weight: 600; color: var(--blue); font-size: 13px; }
.cell-strong { font-weight: 600; }
.cell-sub { color: var(--muted); font-size: 12.5px; }
.cell-avatars { display: flex; align-items: center; }
.mini-avatar { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(140deg,#2a4d97,#15336e); color:#fff; font-size:10px; font-weight:700; display:grid; place-items:center; margin-left:-7px; box-shadow:0 0 0 2px #fff; }
.mini-avatar:first-child { margin-left: 0; }

/* ============================================================
   ACTION QUEUE
   ============================================================ */
.queue { display: flex; flex-direction: column; }
.queue__item {
  display: flex; align-items: center; gap: 13px; padding: 14px 20px;
  border-bottom: 1px solid var(--line-soft); transition: background .12s;
}
.queue__item:last-child { border-bottom: none; }
.queue__item:hover { background: var(--mist); }
.queue__ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.queue__ic svg { width: 18px; height: 18px; }
.queue__ic--blue { background: #e8f0fd; color: var(--s-diajukan); }
.queue__ic--amber { background: #fbf2e1; color: var(--s-revisi); }
.queue__ic--purple { background: #efebfb; color: var(--s-jadwal); }
.queue__ic--teal { background: #e2f4f8; color: var(--s-laksana); }
.queue__ic--green { background: #e7f5ec; color: var(--s-selesai); }
.queue__meta { flex: 1; min-width: 0; }
.queue__meta b { font-size: 14px; font-weight: 600; display: block; }
.queue__meta span { font-size: 12.5px; color: var(--muted); }
.queue__count { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--ink); }
.queue__empty { padding: 30px 20px; text-align: center; color: var(--muted-2); font-size: 13.5px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 14px;
  padding: 10px 18px; border-radius: 10px; border: 1.5px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
}
.btn svg { width: 17px; height: 17px; }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-700); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-700); }
.btn--line { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--line:hover { border-color: var(--blue); color: var(--blue); }
.btn--sm { padding: 7px 13px; font-size: 13px; border-radius: 9px; }

/* ============================================================
   MINI BAR CHART (trend)
   ============================================================ */
.chart { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 24px; }
.chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.chart__val { font-size: 12px; font-weight: 700; color: var(--ink); }
.chart__bar {
  width: 100%; max-width: 34px; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #2a4d97, var(--blue));
  transform-origin: bottom;
}
.chart__bar:hover { background: linear-gradient(180deg, #3a5fad, var(--blue-700)); }
.chart__label { font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* ranking list */
.rank { display: flex; flex-direction: column; gap: 14px; }
.rank__item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.rank__pos { width: 24px; height: 24px; border-radius: 7px; background: var(--mist); color: var(--blue); font-family: var(--font-display); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.rank__bar-wrap { }
.rank__name { font-size: 13.5px; font-weight: 600; margin-bottom: 5px; display: flex; justify-content: space-between; }
.rank__name span { color: var(--muted); font-weight: 600; }
.rank__track { height: 7px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.rank__fill { height: 100%; background: linear-gradient(90deg, var(--blue), #3a5fad); border-radius: 999px; transform-origin: left; }

/* ============================================================
   REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; transition-delay: var(--rd, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .cols--2-1, .cols--1-1 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--sh-lg); }
  .sidebar.is-open { transform: none; }
  .main { margin-left: 0; }
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 11px; }
}
.menu-toggle { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .chart__bar { animation: growBar .8s cubic-bezier(.22,.61,.36,1) backwards; }
  .rank__fill { animation: growFill .8s cubic-bezier(.22,.61,.36,1) backwards; }
}
@keyframes growBar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes growFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   PENGAJUAN — TABS
   ============================================================ */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tab {
  position: relative; padding: 12px 16px; font-size: 14px; font-weight: 600;
  color: var(--muted); background: none; border: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px; transition: color .15s;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--blue); }
.tab.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2.5px; background: var(--blue); border-radius: 3px 3px 0 0; }
.tab__count { font-size: 11.5px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--mist); color: var(--muted); display: inline-grid; place-items: center; }
.tab.is-active .tab__count { background: #e8f0fd; color: var(--blue); }

/* table action / chevron cell */
.cell-actions { text-align: right; white-space: nowrap; }
.row-chevron { color: var(--muted-2); width: 18px; height: 18px; }
.table-empty { padding: 56px 20px; text-align: center; color: var(--muted-2); }
.table-empty svg { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--cloud); }
.table-empty b { display: block; color: var(--muted); font-size: 15px; font-weight: 600; margin-bottom: 4px; }

/* COI pill in table */
.coi-flag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--red); }
.coi-flag svg { width: 14px; height: 14px; }

/* ============================================================
   DRAWER (detail)
   ============================================================ */
.scrim { position: fixed; inset: 0; background: rgba(11,26,61,.42); backdrop-filter: blur(2px); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.scrim.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 560px; max-width: 94vw;
  background: var(--mist); z-index: 61; box-shadow: var(--sh-lg);
  transform: translateX(100%); transition: transform .3s cubic-bezier(.22,.61,.36,1);
  display: flex; flex-direction: column;
}
.drawer.is-open { transform: none; }
.drawer__head { background: #fff; border-bottom: 1px solid var(--line); padding: 20px 24px; flex: none; }
.drawer__head-top { display: flex; align-items: center; gap: 12px; }
.drawer__id { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); }
.drawer__close { margin-left: auto; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--muted); }
.drawer__close:hover { color: var(--ink); border-color: var(--cloud); }
.drawer__close svg { width: 18px; height: 18px; }
.drawer__title { font-size: 20px; font-weight: 600; margin-top: 14px; }
.drawer__sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.drawer__body { padding: 22px 24px; overflow-y: auto; flex: 1; }
.drawer__foot { background: #fff; border-top: 1px solid var(--line); padding: 16px 24px; flex: none; display: flex; gap: 10px; flex-wrap: wrap; }
.drawer__foot .btn { flex: 1; min-width: 130px; }

/* info grid */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin-bottom: 20px; }
.info-cell { background: #fff; padding: 13px 15px; }
.info-cell .k { font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }
.info-cell .v { font-size: 14px; font-weight: 600; margin-top: 3px; }
.info-cell--full { grid-column: 1 / -1; }

.drawer__section-label { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; margin: 22px 0 12px; }

/* COI warning box */
.coi-box { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); margin-bottom: 8px; font-size: 13px; line-height: 1.5; }
.coi-box svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.coi-box.bad { background: #fbeaea; color: var(--red-700); border: 1px solid #f1c9c7; }
.coi-box.ok { background: #e7f5ec; color: #1f7a45; border: 1px solid #c4e6d1; }
.coi-box b { font-weight: 700; }

/* assign penguji select */
.assign-row { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.assign-row select { flex: 1; font-family: inherit; font-size: 14px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; outline: none; color: var(--ink); font-weight: 500; }
.assign-row select:focus { border-color: var(--blue); }

/* timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -26px; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; }
.tl-dot svg { width: 11px; height: 11px; color: #fff; }
.tl-item.done .tl-dot { background: var(--s-selesai); border-color: var(--s-selesai); }
.tl-item.current .tl-dot { background: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 4px rgba(26,61,131,.14); }
.tl-item.current .tl-dot::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.tl-title { font-size: 14px; font-weight: 600; }
.tl-item.pending .tl-title { color: var(--muted-2); }
.tl-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tl-note { font-size: 12.5px; color: var(--muted); margin-top: 6px; background: var(--mist); border-left: 2px solid var(--cloud); padding: 7px 10px; border-radius: 0 8px 8px 0; }

/* ============================================================
   MODAL (new pengajuan)
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__scrim { position: absolute; inset: 0; background: rgba(11,26,61,.5); backdrop-filter: blur(2px); }
.modal__card { position: relative; width: 640px; max-width: 100%; max-height: 90vh; background: #fff; border-radius: 18px; box-shadow: var(--sh-lg); display: flex; flex-direction: column; transform: translateY(12px) scale(.98); transition: transform .25s cubic-bezier(.22,.61,.36,1); overflow: hidden; }
.modal.is-open .modal__card { transform: none; }
.modal__head { padding: 22px 26px 0; flex: none; }
.modal__head h3 { font-size: 20px; font-weight: 600; }
.modal__head p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.modal__close { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border-radius: 9px; border: none; background: var(--mist); color: var(--muted); display: grid; place-items: center; }
.modal__close:hover { color: var(--ink); }
.modal__close svg { width: 18px; height: 18px; }
.modal__body { padding: 22px 26px; overflow-y: auto; flex: 1; }
.modal__foot { padding: 16px 26px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex: none; }
.modal__foot .spacer { flex: 1; }

/* stepper */
.stepper { display: flex; align-items: center; gap: 8px; margin: 18px 0 4px; }
.step { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 600; color: var(--muted-2); }
.step__num { width: 24px; height: 24px; border-radius: 50%; background: var(--mist); color: var(--muted); display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 1.5px solid var(--line); }
.step.is-active .step__num { background: var(--blue); color: #fff; border-color: var(--blue); }
.step.is-active { color: var(--blue); }
.step.is-done .step__num { background: var(--s-selesai); color: #fff; border-color: var(--s-selesai); }
.step__line { flex: 1; height: 2px; background: var(--line); border-radius: 2px; min-width: 16px; }

/* form fields */
.form-step { display: none; }
.form-step.is-active { display: block; animation: fadeStep .25s ease; }
@keyframes fadeStep { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fg { margin-bottom: 16px; }
.fg label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.fg .hint { font-size: 12px; color: var(--muted-2); font-weight: 500; margin-left: 6px; }
.fg input, .fg select, .fg textarea {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--ink);
  padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; outline: none;
}
.fg input:focus, .fg select:focus, .fg textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,61,131,.1); }
.fg textarea { resize: vertical; min-height: 76px; }
.fg-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* upload box */
.upload { border: 1.5px dashed var(--cloud); border-radius: var(--r-md); padding: 22px; text-align: center; color: var(--muted); background: var(--mist); transition: border-color .15s, background .15s; cursor: pointer; }
.upload:hover { border-color: var(--blue); background: #fff; }
.upload svg { width: 28px; height: 28px; color: var(--muted-2); margin: 0 auto 8px; }
.upload b { color: var(--blue); font-weight: 600; }
.upload small { display: block; font-size: 12px; margin-top: 4px; color: var(--muted-2); }
.upload.has-file { border-color: var(--s-selesai); border-style: solid; background: #f0faf4; color: #1f7a45; }
.upload.has-file svg { color: #1f7a45; }

/* review list */
.review { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.review__row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 15px; background: #fff; font-size: 14px; }
.review__row .k { color: var(--muted); }
.review__row .v { font-weight: 600; text-align: right; }

/* toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 90; background: var(--ink); color: #fff; padding: 13px 20px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: var(--sh-lg); display: flex; align-items: center; gap: 10px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 18px; height: 18px; color: #6ee7a8; }

/* ============================================================
   DIALOG — pengganti window.confirm/prompt bawaan browser (API.confirm/prompt)
   ============================================================ */
.dialog { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .18s ease; }
.dialog.is-open { opacity: 1; pointer-events: auto; }
.dialog__scrim { position: absolute; inset: 0; background: rgba(11,26,61,.5); backdrop-filter: blur(2px); }
.dialog__card { position: relative; width: 440px; max-width: 100%; background: #fff; border-radius: 16px; box-shadow: var(--sh-lg); padding: 24px; transform: translateY(10px) scale(.98); transition: transform .2s cubic-bezier(.22,.61,.36,1); }
.dialog.is-open .dialog__card { transform: none; }
.dialog__icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; background: var(--mist); color: var(--blue); }
.dialog__icon.danger { background: #fbeaea; color: var(--red); }
.dialog__icon svg { width: 24px; height: 24px; }
.dialog__title { font-size: 18px; font-weight: 600; color: var(--ink); }
.dialog__msg { font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.55; white-space: pre-line; }
.dialog__code { display: inline-block; margin-top: 12px; font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: .12em; color: var(--blue); background: var(--mist); border: 1px solid var(--line); border-radius: 10px; padding: 10px 18px; }
.dialog__codes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dialog__codes .dialog__code { margin-top: 0; font-size: 19px; }
.dialog__field { margin-top: 14px; }
.dialog__field input, .dialog__field textarea { width: 100%; font-family: inherit; font-size: 14px; color: var(--ink); padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; outline: none; }
.dialog__field input:focus, .dialog__field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,61,131,.1); }
.dialog__field textarea { resize: vertical; min-height: 92px; }
.dialog__err { color: var(--red); font-size: 12.5px; margin-top: 7px; display: none; }
.dialog__err.show { display: block; }
.dialog__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
@media (max-width: 600px) {
  .dialog__card { width: 100%; }
  .dialog__foot { flex-direction: column-reverse; }
  .dialog__foot .btn { width: 100%; }
}

@media (max-width: 680px) {
  .info-grid, .fg-2 { grid-template-columns: 1fr; }
  .drawer { width: 100%; }

  /* Modal "Pengajuan Baru" jadi full-screen sheet di mobile. Centering grid
     dimatikan (display:block) supaya kartu tidak melebar ke 640px lalu
     terpotong — kartu kini selalu selebar layar. */
  .modal { padding: 0; display: block; }
  .modal__card {
    width: 100%; max-width: 100%;
    height: 100dvh; max-height: 100dvh;
    border-radius: 0;
  }
  .modal__head { padding: 18px 16px 0; }
  .modal__close { top: 14px; right: 14px; }
  .modal__body { padding: 16px; overflow-x: hidden; }
  .modal__foot { padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); gap: 8px; }

  /* Stepper: cukup tampilkan nomor (label disembunyikan) supaya muat penuh
     di layar sempit dan tidak terpotong ke samping. */
  .stepper { gap: 6px; margin: 16px 0 2px; }
  .step__lbl { display: none; }
  .step__num { width: 26px; height: 26px; }
}

/* ============================================================
   PENJADWALAN — CALENDAR
   ============================================================ */
.cal-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav button { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--muted); }
.cal-nav button:hover { color: var(--blue); border-color: var(--cloud); }
.cal-nav button svg { width: 18px; height: 18px; }
.cal-month { font-family: var(--font-display); font-weight: 600; font-size: 19px; min-width: 168px; }
.cal-legend { display: flex; align-items: center; gap: 14px; margin-left: auto; flex-wrap: wrap; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cal-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.cal { background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-sm); }
.cal__weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); }
.cal__weekday { background: #fff; padding: 11px 12px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--muted-2); text-align: left; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(108px, auto); gap: 1px; background: var(--line); }
.cal__cell { background: #fff; padding: 8px 8px 10px; display: flex; flex-direction: column; gap: 5px; min-width: 0; transition: background .12s; }
.cal__cell.is-other { background: #fafbfe; }
.cal__cell.is-other .cal__date { color: var(--cloud); }
.cal__cell.droppable { cursor: pointer; }
.cal__cell.droppable:hover { background: var(--mist); }
.cal__date { font-size: 13px; font-weight: 700; color: var(--ink); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; }
.cal__cell.is-today .cal__date { background: var(--blue); color: #fff; }
.cal__events { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-chip {
  display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600;
  padding: 4px 7px; border-radius: 6px; background: var(--mist); color: var(--ink);
  border-left: 3px solid var(--blue); min-width: 0; transition: transform .1s, box-shadow .1s;
}
.cal-chip:hover { transform: translateX(1px); box-shadow: var(--sh-sm); }
.cal-chip b { font-weight: 700; flex: none; }
.cal-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip.jadwal  { border-left-color: var(--s-jadwal); background: #efebfb; }
.cal-chip.laksana { border-left-color: var(--s-laksana); background: #e2f4f8; }
.cal-chip.selesai { border-left-color: var(--s-selesai); background: #e7f5ec; }
.cal-chip.conflict { border-left-color: var(--red); background: #fbeaea; }
.cal-more { font-size: 11px; color: var(--muted); font-weight: 600; padding: 2px 7px; }

/* schedule queue (side) */
.sched-q { display: flex; flex-direction: column; }
.sched-item { padding: 14px 18px; border-bottom: 1px solid var(--line-soft); transition: background .12s; cursor: pointer; }
.sched-item:last-child { border-bottom: none; }
.sched-item:hover { background: var(--mist); }
.sched-item__top { display: flex; align-items: center; gap: 8px; }
.sched-item__id { font-family: var(--font-display); font-weight: 700; font-size: 12.5px; color: var(--blue); }
.sched-item h4 { font-size: 14.5px; font-weight: 600; margin-top: 6px; }
.sched-item__meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sched-item__meta span { display: inline-flex; align-items: center; gap: 5px; }
.sched-item__meta svg { width: 13px; height: 13px; color: var(--muted-2); }
.sched-item__cta { margin-top: 10px; }
.sched-empty { padding: 34px 18px; text-align: center; color: var(--muted-2); font-size: 13px; }
.sched-empty svg { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--cloud); }

/* agenda list */
.agenda { display: flex; flex-direction: column; }
.agenda__day { padding: 12px 18px 4px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--muted-2); }
.agenda__item { display: flex; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line-soft); }
.agenda__item:last-child { border-bottom: none; }
.agenda__time { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--ink); flex: none; width: 48px; }
.agenda__bar { width: 3px; border-radius: 3px; background: var(--s-jadwal); flex: none; }
.agenda__bar.laksana { background: var(--s-laksana); }
.agenda__bar.selesai { background: var(--s-selesai); }
.agenda__meta b { font-size: 14px; font-weight: 600; display: block; }
.agenda__meta span { font-size: 12.5px; color: var(--muted); }

/* day field with addon */
.fg-date-time { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.conflict-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }

@media (max-width: 920px) {
  .cal__grid { grid-auto-rows: minmax(88px, auto); }
}

/* ============================================================
   PELAKSANAAN & HASIL
   ============================================================ */
.session-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.session-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm); padding: 20px; display: flex; flex-direction: column; gap: 14px;
  transition: transform .15s, box-shadow .15s;
}
.session-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.session-card__top { display: flex; align-items: center; gap: 10px; }
.session-card__id { font-family: var(--font-display); font-weight: 700; font-size: 12.5px; color: var(--blue); }
.session-card h4 { font-size: 17px; font-weight: 600; }
.session-card__meta { display: grid; gap: 8px; }
.session-card__meta .m { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--muted); }
.session-card__meta .m svg { width: 16px; height: 16px; color: var(--muted-2); flex: none; }
.session-card__meta .m b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.session-card__foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; gap: 10px; }
.session-card__foot .btn { flex: 1; }

/* result summary chips */
.res-summary { display: flex; gap: 8px; }
.res-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 9px; font-size: 13px; font-weight: 700; }
.res-chip.k { background: #e7f5ec; color: #1f7a45; }
.res-chip.bk { background: #fbeceb; color: var(--red); }
.res-chip b { font-family: var(--font-display); font-size: 15px; }
.res-progress { height: 7px; border-radius: 999px; background: var(--line-soft); overflow: hidden; display: flex; }
.res-progress i { height: 100%; display: block; }
.res-progress .k { background: var(--s-selesai); }
.res-progress .bk { background: var(--red); }

/* roster (in drawer) */
.roster { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.roster__row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; }
.roster__av { width: 34px; height: 34px; border-radius: 50%; flex: none; background: linear-gradient(140deg,#2a4d97,#15336e); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.roster__name { flex: 1; min-width: 0; }
.roster__name b { font-size: 14px; font-weight: 600; display: block; }
.roster__name span { font-size: 12px; color: var(--muted-2); }
/* segmented K/BK */
.seg { display: inline-flex; background: var(--mist); border: 1px solid var(--line); border-radius: 9px; padding: 2px; flex: none; }
.seg button { border: none; background: none; font-family: inherit; font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 7px; color: var(--muted); transition: all .12s; }
.seg button.k.is-on { background: var(--s-selesai); color: #fff; }
.seg button.bk.is-on { background: var(--red); color: #fff; }
.seg button:not(.is-on):hover { color: var(--ink); }
.roster__readout { flex: none; font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.roster__readout.k { background: #e7f5ec; color: #1f7a45; }
.roster__readout.bk { background: #fbeceb; color: var(--red); }

.bulk-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bulk-row span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.bulk-row .spacer { flex: 1; }
.link-btn { background: none; border: none; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--blue); padding: 4px 6px; border-radius: 6px; }
.link-btn:hover { background: var(--mist); }

.tally { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--mist); border-radius: var(--r-md); margin: 14px 0; }
.tally__big { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.tally__lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* Mobile: "Hasil per Asesi" — pindahkan segmented control ke baris penuh
   di bawah nama agar tidak bertumpuk dengan nama asesi. */
@media (max-width: 600px) {
  .roster__row { flex-wrap: wrap; row-gap: 10px; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 8px 4px; text-align: center; }

  .bulk-row { flex-wrap: wrap; row-gap: 8px; }
  .bulk-row .spacer { display: none; }
  .bulk-row span { width: 100%; }
  .link-btn { flex: 1; text-align: center; background: var(--mist); white-space: nowrap; }
}

/* certificate-ready banner */
.cert-banner { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-md); background: linear-gradient(135deg,#0f2350,#1a3d83); color: #fff; margin-bottom: 18px; }
.cert-banner__seal { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.cert-banner__seal svg { width: 24px; height: 24px; color: #fff; }
.cert-banner b { font-size: 15px; display: block; }
.cert-banner span { font-size: 12.5px; color: var(--on-blue-dim, #aab6d6); }

/* ============================================================
   MASTER DATA
   ============================================================ */
.md-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
.md-kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.md-kpi__ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--mist); color: var(--blue); flex: none; }
.md-kpi__ic svg { width: 22px; height: 22px; }
.md-kpi__big { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -.02em; }
.md-kpi__lbl { font-size: 13px; color: var(--muted); font-weight: 600; }

/* entity switcher (segmented) */
.seg-tabs { display: inline-flex; background: var(--cloud); border-radius: 12px; padding: 4px; gap: 4px; }
.seg-tabs button { border: none; background: none; font-family: inherit; font-size: 14px; font-weight: 700; color: var(--muted); padding: 9px 18px; border-radius: 9px; display: inline-flex; align-items: center; gap: 8px; transition: all .15s; }
.seg-tabs button svg { width: 17px; height: 17px; }
.seg-tabs button.is-on { background: #fff; color: var(--blue); box-shadow: var(--sh-sm); }

/* toggle switch */
.switch { position: relative; display: inline-flex; align-items: center; width: 38px; height: 22px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track { width: 100%; height: 100%; border-radius: 999px; background: var(--cloud); transition: background .18s; }
.switch .thumb { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--sh-sm); transition: transform .18s; }
.switch input:checked + .track { background: var(--s-selesai); }
.switch input:checked ~ .thumb { transform: translateX(16px); }

/* status segmented picker (Aktif / Nonaktif) */
.seg-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg-pick button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: inherit; font-size: 14px; font-weight: 700; color: var(--muted);
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 11px 14px; transition: all .14s;
}
.seg-pick button svg { width: 16px; height: 16px; opacity: .55; }
.seg-pick button:hover { border-color: var(--cloud); }
.seg-pick button.is-on.on { background: #e7f5ec; border-color: #2f9e57; color: #1f7a45; }
.seg-pick button.is-on.off { background: #f0f2f7; border-color: var(--muted-2); color: var(--muted); }
.seg-pick button.is-on svg { opacity: 1; }

/* row action buttons */
.tbl-actions { display: inline-flex; gap: 6px; }
.tbl-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--muted); transition: all .12s; }
.tbl-btn:hover { color: var(--blue); border-color: var(--cloud); }
.tbl-btn.danger:hover { color: var(--red); border-color: #f1c9c7; background: #fcf3f2; }
.tbl-btn svg { width: 16px; height: 16px; }

/* selectable scheme chips (in asesor form) */
.chip-pick { display: flex; flex-wrap: wrap; gap: 7px; max-height: 168px; overflow-y: auto; padding: 4px; border: 1px solid var(--line); border-radius: 10px; }
.chip-pick button { border: 1.5px solid var(--line); background: #fff; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 6px 11px; border-radius: 999px; transition: all .12s; }
.chip-pick button.is-on { background: var(--blue); border-color: var(--blue); color: #fff; }

.chips-cell { display: flex; flex-wrap: wrap; gap: 5px; max-width: 280px; }
.chips-cell .chip { font-size: 11px; font-weight: 600; color: var(--blue); background: var(--mist); padding: 3px 8px; border-radius: 999px; }
.chips-cell .more { font-size: 11px; color: var(--muted-2); font-weight: 600; padding: 3px 4px; }

/* repeatable rows (unit kompetensi / persyaratan skema) */
.md-rep { display: flex; flex-direction: column; gap: 8px; }
.md-rep:empty { display: none; }
.md-rep__row { display: flex; align-items: center; gap: 8px; }
.md-rep__no, .md-rep__dot { flex: 0 0 24px; text-align: center; font-size: 13px; font-weight: 700; color: var(--muted-2); }
.md-rep__kode { flex: 0 0 150px; }
.md-rep__main { flex: 1 1 auto; min-width: 0; }
.md-rep__del {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 1.5px solid var(--line); background: #fff;
  border-radius: 9px; color: var(--muted-2); transition: all .12s;
}
.md-rep__del svg { width: 15px; height: 15px; }
.md-rep__del:hover { border-color: #e2554f; color: #e2554f; background: #fdecec; }
.md-rep__add {
  margin-top: 9px; align-self: flex-start; font-family: inherit; font-size: 12.5px; font-weight: 700;
  color: var(--blue); background: var(--mist); border: 1.5px dashed var(--cloud);
  border-radius: 9px; padding: 8px 13px; transition: all .12s;
}
.md-rep__add:hover { border-color: var(--blue); }

/* dokumen PDF skema */
.md-dok { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.md-dok__btn {
  display: inline-flex; align-items: center; gap: 7px; font-family: inherit; font-size: 13px; font-weight: 700;
  color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 9px; padding: 9px 13px; transition: all .12s;
}
.md-dok__btn svg { width: 16px; height: 16px; }
.md-dok__btn:hover { border-color: var(--blue); color: var(--blue); }
.md-dok__btn--del:hover { border-color: #e2554f; color: #e2554f; }
.md-dok__file {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--blue);
  background: var(--mist); border: 1px solid var(--cloud); border-radius: 9px; padding: 8px 12px; max-width: 100%;
}
.md-dok__file svg { width: 16px; height: 16px; flex: 0 0 auto; }
.md-dok__file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-dok__hint { font-size: 12px; color: var(--muted-2); }

.status-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; }
.status-dot i { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.on { color: #1f7a45; } .status-dot.on i { background: #2f9e57; }
.status-dot.off { color: var(--muted-2); } .status-dot.off i { background: var(--muted-2); }

/* access lock */
.access-lock { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: 56px 32px; text-align: center; max-width: 460px; margin: 40px auto; }
.access-lock__ic { width: 64px; height: 64px; border-radius: 50%; background: var(--mist); color: var(--blue); display: grid; place-items: center; margin: 0 auto 18px; }
.access-lock__ic svg { width: 30px; height: 30px; }
.access-lock h3 { font-size: 19px; font-weight: 600; }
.access-lock p { font-size: 14px; color: var(--muted); margin-top: 8px; }

@media (max-width: 760px) {
  .md-kpis { grid-template-columns: 1fr; }
}

/* ============================================================
   LAPORAN & EXPORT
   ============================================================ */
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.report-grid--3 { grid-template-columns: 1.1fr 1fr 1fr; }

/* donut */
.donut-wrap { display: flex; align-items: center; gap: 24px; }
.donut { position: relative; width: 168px; height: 168px; flex: none; }
.donut svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.donut__center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut__center b { font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: -.02em; display: block; line-height: 1; }
.donut__center span { font-size: 12px; color: var(--muted); font-weight: 600; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.donut-legend__item { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.donut-legend__sw { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.donut-legend__lbl { color: var(--ink); font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donut-legend__val { font-weight: 700; color: var(--ink); }
.donut-legend__pct { color: var(--muted-2); font-size: 12px; font-weight: 600; width: 38px; text-align: right; }

/* horizontal breakdown bars */
.hbars { display: flex; flex-direction: column; gap: 16px; }
.hbar__top { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 6px; }
.hbar__name { font-weight: 600; }
.hbar__val { color: var(--muted); font-weight: 600; }
.hbar__track { height: 9px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.hbar__fill { height: 100%; border-radius: 999px; }

/* export format picker */
.fmt-pick { display: inline-flex; gap: 6px; }
.fmt-pick button {
  display: inline-flex; align-items: center; gap: 7px; font-family: inherit;
  font-size: 13px; font-weight: 700; color: var(--muted);
  background: #fff; border: 1.5px solid var(--line); border-radius: 9px; padding: 8px 13px; transition: all .14s;
}
.fmt-pick button svg { width: 15px; height: 15px; }
.fmt-pick button.is-on { border-color: var(--blue); color: var(--blue); background: var(--mist); }

.kpi-pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.kpi-pill.good { background: #e7f5ec; color: #1f7a45; }

/* ============================================================
   AUDIT LOG
   ============================================================ */
.log-list { display: flex; flex-direction: column; }
.log-row {
  display: grid; grid-template-columns: 168px 220px 1fr auto; gap: 16px; align-items: center;
  padding: 14px 20px; border-bottom: 1px solid var(--line-soft); transition: background .12s;
}
.log-row:last-child { border-bottom: none; }
.log-row:hover { background: var(--mist); }
.log-when { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.log-when b { display: block; color: var(--ink); font-weight: 600; font-size: 13px; font-family: var(--font-body); }
.log-actor { display: flex; align-items: center; gap: 10px; min-width: 0; }
.log-actor__av { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; }
.log-actor__meta { min-width: 0; }
.log-actor__meta b { font-size: 13px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-actor__meta span { font-size: 11.5px; color: var(--muted-2); font-weight: 600; }
.log-action { font-size: 13.5px; }
.log-action .verb { font-weight: 700; }
.log-action .ent { font-family: var(--font-display); font-weight: 600; color: var(--blue); }
.log-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.log-tag.create { background: #e8f0fd; color: #2563c9; }
.log-tag.update { background: #fbf2e1; color: #c77d12; }
.log-tag.approve { background: #e7f5ec; color: #2f9e57; }
.log-tag.reject { background: #fbeaea; color: #af231c; }
.log-tag.assign { background: #efebfb; color: #6b4fd1; }
.log-tag.issue { background: #e2f4f8; color: #0e8aa6; }
.log-tag.auth { background: #f0f2f7; color: #5c6580; }

.role-av-admin { background: linear-gradient(140deg,#5c6580,#3a4055); }
.role-av-asesor { background: linear-gradient(140deg,#2a4d97,#15336e); }
.role-av-sekretariat { background: linear-gradient(140deg,#0e8aa6,#0a6378); }
.role-av-manajer { background: linear-gradient(140deg,#6b4fd1,#4a36a0); }

@media (max-width: 980px) {
  .report-grid, .report-grid--3 { grid-template-columns: 1fr; }
  .log-row { grid-template-columns: 1fr auto; row-gap: 8px; }
  .log-when { grid-column: 1 / -1; }
  .donut-wrap { flex-direction: column; }
}

/* ============================================================
   PEMBAYARAN (payments / invoices)
   ============================================================ */
.badge--unpaid  { color: #b06a12; background: #fbf2e1; }
.badge--pending { color: #0e6e85; background: #e2f4f8; }
.badge--paid    { color: #fff; background: #1f7a45; }
.badge--paid::before { background: rgba(255,255,255,.85); }
.badge--overdue { color: #af231c; background: #fbeaea; }

.cell-amount { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* invoice header in drawer */
.inv-hero { background: linear-gradient(155deg, var(--blue) 0%, var(--blue-900) 100%); color: #fff; border-radius: var(--r-lg); padding: 22px 24px; }
.inv-hero__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.inv-hero__label { font-size: 12px; color: var(--on-blue-dim, #aab6d6); font-weight: 600; letter-spacing: .03em; }
.inv-hero__amount { font-family: var(--font-display); font-weight: 700; font-size: 32px; letter-spacing: -.02em; margin-top: 4px; }
.inv-hero__due { font-size: 12.5px; color: var(--on-blue-dim, #aab6d6); margin-top: 10px; }

/* line items */
.inv-lines { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.inv-line { display: flex; justify-content: space-between; gap: 12px; padding: 13px 16px; font-size: 13.5px; border-bottom: 1px solid var(--line-soft); }
.inv-line:last-child { border-bottom: none; }
.inv-line .muted { color: var(--muted); }
.inv-line--total { background: var(--mist); font-weight: 700; font-size: 15px; }
.inv-line--total .cell-amount { color: var(--blue); }

/* payment method picker */
.pay-methods { display: grid; gap: 10px; }
.pay-method { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r-md); cursor: pointer; transition: all .14s; background: #fff; }
.pay-method:hover { border-color: var(--cloud); }
.pay-method.is-on { border-color: var(--blue); background: var(--mist); }
.pay-method__ic { width: 42px; height: 30px; border-radius: 6px; display: grid; place-items: center; background: var(--mist); color: var(--blue); flex: none; font-weight: 800; font-size: 11px; letter-spacing: .02em; border: 1px solid var(--line); }
.pay-method.is-on .pay-method__ic { background: #fff; }
.pay-method__meta { flex: 1; min-width: 0; }
.pay-method__meta b { font-size: 14px; font-weight: 600; display: block; }
.pay-method__meta span { font-size: 12.5px; color: var(--muted); }
.pay-method__radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; position: relative; }
.pay-method.is-on .pay-method__radio { border-color: var(--blue); }
.pay-method.is-on .pay-method__radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--blue); }

/* VA / number to copy */
.copy-box { display: flex; align-items: center; gap: 10px; background: var(--mist); border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; margin-top: 10px; }
.copy-box code { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: .04em; color: var(--ink); flex: 1; }
.copy-box button { border: none; background: var(--blue); color: #fff; font-family: inherit; font-size: 12.5px; font-weight: 700; padding: 7px 12px; border-radius: 8px; }

/* ============================================================
   NOTIFIKASI WHATSAPP
   ============================================================ */
.notif-grid { display: grid; grid-template-columns: 1fr 380px; gap: 16px; align-items: start; }

/* outbox status pills */
.wa-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.wa-pill svg { width: 13px; height: 13px; }
.wa-pill.read   { color: #0e6e85; background: #e2f4f8; }
.wa-pill.sent   { color: #1f7a45; background: #e7f5ec; }
.wa-pill.queued { color: #b06a12; background: #fbf2e1; }
.wa-pill.failed { color: #af231c; background: #fbeaea; }

.wa-recip { display: flex; align-items: center; gap: 11px; }
.wa-recip__av { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; background: linear-gradient(140deg,#25b462,#0f7d3c); }
.wa-recip__meta b { font-size: 13.5px; font-weight: 600; display: block; }
.wa-recip__meta span { font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

/* event template cards */
.tmpl-list { display: flex; flex-direction: column; }
.tmpl-row { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.tmpl-row:last-child { border-bottom: none; }
.tmpl-row__ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--mist); color: var(--blue); }
.tmpl-row__ic svg { width: 19px; height: 19px; }
.tmpl-row__meta { flex: 1; min-width: 0; }
.tmpl-row__meta b { font-size: 14px; font-weight: 600; display: block; }
.tmpl-row__meta span { font-size: 12.5px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 460px; }
.tmpl-row__trigger { font-size: 11px; font-weight: 700; letter-spacing: .03em; color: var(--blue); background: var(--mist); padding: 3px 9px; border-radius: 999px; }

/* WhatsApp phone preview */
.wa-phone {
  background: #0b141a; border-radius: 30px; padding: 12px; box-shadow: var(--sh-lg);
  border: 8px solid #0b141a; position: sticky; top: 92px;
}
.wa-phone__screen { border-radius: 22px; overflow: hidden; background: #0b141a; }
.wa-phone__bar { background: #1f2c34; color: #fff; display: flex; align-items: center; gap: 11px; padding: 14px 16px; }
.wa-phone__av { width: 38px; height: 38px; border-radius: 50%; background: #fff; padding: 4px; flex: none; }
.wa-phone__av img { width: 100%; height: 100%; object-fit: contain; }
.wa-phone__title b { font-size: 14px; font-weight: 600; display: block; line-height: 1.2; }
.wa-phone__title span { font-size: 11.5px; color: #8aa0ab; }
.wa-phone__body {
  background-color: #0b141a;
  background-image: linear-gradient(rgba(11,20,26,.92), rgba(11,20,26,.92)), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 20h40M20 0v40' stroke='%23223138' stroke-width='.5'/%3E%3C/svg%3E");
  padding: 18px 14px; min-height: 360px; display: flex; flex-direction: column; gap: 10px;
}
.wa-day { align-self: center; background: #182229; color: #8aa0ab; font-size: 11px; font-weight: 600; padding: 4px 12px; border-radius: 8px; }
.wa-msg { max-width: 85%; align-self: flex-end; background: #005c4b; color: #e9edef; border-radius: 10px 10px 2px 10px; padding: 9px 11px 7px; font-size: 13px; line-height: 1.45; box-shadow: 0 1px 1px rgba(0,0,0,.2); white-space: pre-wrap; }
.wa-msg__time { display: block; text-align: right; font-size: 10px; color: #8fb9ae; margin-top: 3px; }
.wa-msg__time svg { width: 15px; height: 11px; display: inline-block; vertical-align: middle; margin-left: 3px; color: #53bdeb; }
.wa-msg b { font-weight: 700; }

/* settings toggle rows */
.set-row { display: flex; align-items: center; gap: 14px; padding: 15px 20px; border-bottom: 1px solid var(--line-soft); }
.set-row:last-child { border-bottom: none; }
.set-row__meta { flex: 1; min-width: 0; }
.set-row__meta b { font-size: 14px; font-weight: 600; display: block; }
.set-row__meta span { font-size: 12.5px; color: var(--muted); }

@media (max-width: 1100px) {
  .notif-grid { grid-template-columns: 1fr; }
  .wa-phone { position: static; max-width: 380px; }
}

/* ============================================================
   SERTIFIKAT (digital certificate + QR)
   ============================================================ */
.badge--aktif    { color: #fff; background: #1f7a45; }
.badge--aktif::before { background: rgba(255,255,255,.85); }
.badge--tersedia { color: #fff; background: #1f7a45; }
.badge--tersedia::before { background: rgba(255,255,255,.85); }
.badge--menunggu { color: #b06a12; background: #fbf2e1; }
.badge--segera   { color: #b06a12; background: #fbf2e1; }
.badge--kadaluwarsa { color: var(--muted); background: #f0f2f7; }
.badge--dicabut  { color: #af231c; background: #fbeaea; }

/* certificate detail/upload modal */
.cd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px 16px; margin-bottom: 18px; }
.cd-kv { display: flex; flex-direction: column; gap: 1px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.cd-kv:last-child, .cd-kv:nth-last-child(2):nth-child(odd) { border-bottom: none; }
.cd-kv .k { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.cd-kv .v { font-size: 14px; font-weight: 600; }
.cd-kv .v.mono { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-size: 13px; }
.cd-section { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); margin: 4px 0 12px; }

/* uploaded file card */
.file-card { display: flex; align-items: center; gap: 14px; background: var(--mist); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.file-card__ic { width: 44px; height: 50px; border-radius: 7px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--red); flex: none; position: relative; }
.file-card__ic svg { width: 22px; height: 22px; }
.file-card__ic span { position: absolute; bottom: 6px; font-size: 7.5px; font-weight: 800; letter-spacing: .04em; color: var(--red); }
.file-card__meta { flex: 1; min-width: 0; }
.file-card__meta b { font-size: 14px; font-weight: 600; display: block; word-break: break-all; }
.file-card__meta span { font-size: 12.5px; color: var(--muted); }
.file-card__dl { flex: none; }

/* upload dropzone */
.dropzone { border: 2px dashed var(--line); border-radius: var(--r-md); padding: 26px 20px; text-align: center; transition: border-color .15s, background .15s; cursor: pointer; background: #fff; }
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: var(--mist); }
.dropzone__ic { width: 52px; height: 52px; border-radius: 50%; background: var(--mist); color: var(--blue); display: grid; place-items: center; margin: 0 auto 12px; }
.dropzone__ic svg { width: 26px; height: 26px; }
.dropzone b { font-size: 14.5px; display: block; }
.dropzone span { font-size: 12.5px; color: var(--muted); display: block; margin-top: 4px; }
.dropzone input { display: none; }
.dz-picked { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--blue); }
.dz-picked svg { width: 16px; height: 16px; }

.cd-empty { text-align: center; padding: 24px 16px; color: var(--muted-2); }
.cd-empty svg { width: 30px; height: 30px; margin-bottom: 8px; }
.cd-empty b { display: block; font-size: 14px; color: var(--muted); }
.cd-empty span { font-size: 13px; }

@media (max-width: 600px) { .cd-grid { grid-template-columns: 1fr; } }

/* ============================================================
   BLOG CMS (KelolaBlog.html)
   ============================================================ */
.badge--published { color: #fff; background: #1f7a45; }
.badge--published::before { background: rgba(255,255,255,.85); }
.badge--draft { color: var(--muted); background: #f0f2f7; }

.cms-cover-cell { width: 64px; height: 42px; border-radius: 7px; background-size: cover; background-position: center; flex: none; border: 1px solid var(--line); }
.cms-title-cell { display: flex; align-items: center; gap: 12px; }

/* editor modal — wide */
.cms-modal .modal__card { width: 860px; max-width: 96vw; }
.cms-form { display: grid; grid-template-columns: 1fr 300px; gap: 22px; }
.cms-main { min-width: 0; }
.cms-side { border-left: 1px solid var(--line-soft); padding-left: 22px; }

/* rich text toolbar */
.rte-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border: 1px solid var(--line); border-bottom: none; border-radius: 10px 10px 0 0; background: var(--mist); }
.rte-btn { width: 34px; height: 32px; border: 1px solid transparent; background: none; border-radius: 7px; display: grid; place-items: center; color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 14px; cursor: pointer; transition: all .12s; }
.rte-btn:hover { background: #fff; border-color: var(--line); }
.rte-btn svg { width: 17px; height: 17px; }
.rte-sep { width: 1px; background: var(--line); margin: 4px 3px; }
.rte-area {
  border: 1px solid var(--line); border-radius: 0 0 10px 10px; padding: 16px 18px;
  min-height: 280px; max-height: 440px; overflow-y: auto; outline: none;
  font-size: 15px; line-height: 1.7; color: #2a2f40; font-family: var(--font-body);
}
/* Tampilkan font seragam di editor walau konten lama bawa font inline. */
.rte-area *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) { font-family: inherit !important; }
.rte-area:focus { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.rte-area h2 { font-family: var(--font-display); font-size: 20px; margin: 16px 0 8px; color: var(--ink); }
.rte-area p { margin: 0 0 12px; }
.rte-area ul { margin: 0 0 12px; padding-left: 20px; }
.rte-area:empty::before { content: attr(data-ph); color: var(--muted-2); }

.cms-slug { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.cms-slug code { font-family: var(--font-display); color: var(--blue); background: var(--mist); padding: 3px 7px; border-radius: 5px; word-break: break-all; }
.char-count { font-size: 11.5px; color: var(--muted-2); text-align: right; margin-top: 4px; }

/* cover picker */
.cover-presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.cover-swatch { height: 34px; border-radius: 7px; cursor: pointer; border: 2px solid transparent; position: relative; }
.cover-swatch.on { border-color: var(--ink); box-shadow: 0 0 0 2px #fff inset; }
.cover-preview { height: 90px; border-radius: 10px; background-size: cover; background-position: center; margin-bottom: 10px; border: 1px solid var(--line); position: relative; display: grid; place-items: end start; }
.cover-preview .post__cat { position: static; margin: 10px; }

.carousel-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.carousel-thumbs:empty { display: none; }
.carousel-empty { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted-2); padding: 4px 0; }
.carousel-thumb { position: relative; height: 56px; border-radius: 8px; background-size: cover; background-position: center; border: 1px solid var(--line); }
.carousel-thumb__rm { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; display: grid; place-items: center; border: none; border-radius: 50%; background: rgba(15,23,42,.72); color: #fff; cursor: pointer; padding: 0; }
.carousel-thumb__rm:hover { background: var(--red, #d33); }
.carousel-thumb__rm svg { width: 12px; height: 12px; }

.seg-status { display: inline-flex; background: var(--cloud); border-radius: 9px; padding: 3px; gap: 3px; }
.seg-status button { border: none; background: none; font-family: inherit; font-size: 13px; font-weight: 700; color: var(--muted); padding: 7px 14px; border-radius: 7px; cursor: pointer; }
.seg-status button.on { background: #fff; box-shadow: var(--sh-sm); }
.seg-status button.on[data-st="published"] { color: #1f7a45; }
.seg-status button.on[data-st="draft"] { color: var(--muted); }

@media (max-width: 760px) { .cms-form { grid-template-columns: 1fr; } .cms-side { border-left: none; padding-left: 0; border-top: 1px solid var(--line-soft); padding-top: 18px; } }

/* QR */
.qr { display: grid; background: #fff; padding: 6px; border-radius: 8px; }
.qr--lg { width: 132px; height: 132px; }
.qr--sm { width: 84px; height: 84px; }
.qr i { background: var(--blue-ink); }
.qr i.off { background: transparent; }

/* certificate sheet */
.cert-stage { display: flex; justify-content: center; padding: 4px; }
.cert-sheet {
  width: 940px; flex: none;
  background:
    radial-gradient(120% 80% at 50% -10%, #f3f7ff 0%, rgba(243,247,255,0) 60%),
    #fff;
  aspect-ratio: 1.414 / 1;
  position: relative; overflow: hidden;
  font-family: var(--font-body); color: var(--ink);
  box-shadow: var(--sh-lg);
}
.cert-sheet__edge { position: absolute; inset: 18px; border: 2px solid var(--blue); border-radius: 4px; }
.cert-sheet__edge::after { content: ""; position: absolute; inset: 6px; border: 1px solid #c7a23a; border-radius: 2px; }
.cert-corner { position: absolute; width: 46px; height: 46px; border: 0 solid #c7a23a; z-index: 3; }
.cert-corner.tl { top: 26px; left: 26px; border-top-width: 3px; border-left-width: 3px; }
.cert-corner.tr { top: 26px; right: 26px; border-top-width: 3px; border-right-width: 3px; }
.cert-corner.bl { bottom: 26px; left: 26px; border-bottom-width: 3px; border-left-width: 3px; }
.cert-corner.br { bottom: 26px; right: 26px; border-bottom-width: 3px; border-right-width: 3px; }
.cert-wm { position: absolute; inset: 0; display: grid; place-items: center; opacity: .04; z-index: 1; }
.cert-wm svg { width: 460px; height: 460px; color: var(--blue); }
.cert-body { position: relative; z-index: 2; padding: 60px 70px; height: 100%; display: flex; flex-direction: column; }

.cert-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.cert-head__org { display: flex; align-items: center; gap: 14px; }
.cert-head__logo { width: 62px; height: 62px; border-radius: 12px; background: #fff; padding: 6px; box-shadow: var(--sh-sm); border: 1px solid var(--line); }
.cert-head__logo img { width: 100%; height: 100%; object-fit: contain; }
.cert-head__org b { font-family: var(--font-display); font-size: 17px; font-weight: 700; display: block; letter-spacing: -.01em; }
.cert-head__org span { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }
.cert-head__lic { text-align: right; font-size: 11px; color: var(--muted); line-height: 1.5; }
.cert-head__lic b { color: var(--blue); font-weight: 700; }

.cert-title { text-align: center; margin-top: 26px; }
.cert-title .k { font-size: 13px; letter-spacing: .42em; text-transform: uppercase; color: #c7a23a; font-weight: 700; }
.cert-title h1 { font-family: var(--font-display); font-size: 44px; font-weight: 700; letter-spacing: .02em; margin-top: 8px; color: var(--blue-ink); }
.cert-title .no { font-size: 12.5px; color: var(--muted); margin-top: 10px; font-variant-numeric: tabular-nums; }

.cert-mid { text-align: center; margin-top: auto; margin-bottom: auto; }
.cert-mid .lbl { font-size: 13px; color: var(--muted); }
.cert-mid .name { font-family: var(--font-display); font-size: 36px; font-weight: 600; color: var(--ink); margin: 10px 0; padding-bottom: 12px; border-bottom: 2px solid var(--cloud); display: inline-block; min-width: 420px; }
.cert-mid .nik { font-size: 12.5px; color: var(--muted-2); letter-spacing: .04em; }
.cert-mid .decl { font-size: 14px; color: var(--ink); margin-top: 18px; line-height: 1.6; }
.cert-mid .decl b { color: var(--blue); }
.cert-mid .scheme { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--blue); margin-top: 6px; }
.cert-mid .scheme small { display: block; font-family: var(--font-body); font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 4px; letter-spacing: .04em; }

.cert-foot { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: end; margin-top: 30px; }
.cert-sign { text-align: center; font-size: 12.5px; color: var(--muted); }
.cert-sign .place { margin-bottom: 6px; }
.cert-sign .role { font-weight: 600; color: var(--ink); }
.cert-sign .line { height: 44px; }
.cert-sign .nm { font-weight: 700; color: var(--ink); border-top: 1px solid var(--ink); padding-top: 5px; display: inline-block; min-width: 160px; }
.cert-seal-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cert-seal {
  width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 50% 40%, #d8b24a, #b8902f 70%);
  box-shadow: 0 4px 12px rgba(184,144,47,.4), inset 0 0 0 3px rgba(255,255,255,.5), inset 0 0 0 5px #b8902f;
  color: #6b4e12;
}
.cert-seal svg { width: 40px; height: 40px; }
.cert-seal::after { content: ""; position: absolute; inset: 10px; border: 1px dashed rgba(107,78,18,.5); border-radius: 50%; }
.cert-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cert-qr-wrap span { font-size: 9.5px; color: var(--muted-2); letter-spacing: .02em; }

/* scaler used in modal */
.cert-scaler { transform-origin: top center; }

/* ============================================================
   VERIFIKASI (public QR landing)
   ============================================================ */
.vf-page { min-height: 100vh; background:
  radial-gradient(120% 80% at 80% -10%, #21407f 0%, rgba(33,64,127,0) 55%),
  linear-gradient(165deg, var(--blue, #1a3d83) 0%, #0f2350 70%, #0b1a3d 100%);
  color: #fff; display: flex; flex-direction: column; align-items: center; padding: 32px 20px 60px; }
.vf-top { width: 100%; max-width: 560px; display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.vf-top__logo { background: #fff; border-radius: 12px; padding: 8px; }
.vf-top__logo img { height: 38px; }
.vf-top b { font-family: var(--font-display); font-size: 16px; display: block; }
.vf-top span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #aab6d6; }
.vf-card { width: 100%; max-width: 560px; background: #fff; color: var(--ink); border-radius: 20px; box-shadow: 0 30px 70px rgba(7,18,46,.5); overflow: hidden; }
.vf-result { padding: 32px; text-align: center; }
.vf-status { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; }
.vf-status svg { width: 38px; height: 38px; }
.vf-status.ok { background: #e7f5ec; color: #1f7a45; }
.vf-status.bad { background: #fbeaea; color: #af231c; }
.vf-status.revoked { background: #fbf2e1; color: #b06a12; }
.vf-result h2 { font-size: 22px; font-weight: 700; }
.vf-result .sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.vf-detail { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 8px; text-align: left; }
.vf-row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.vf-row:last-child { border-bottom: none; }
.vf-row .k { color: var(--muted); }
.vf-row .v { font-weight: 600; text-align: right; }
.vf-search { padding: 22px 32px 30px; border-top: 1px solid var(--line); background: var(--mist); }
.vf-search label { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.vf-search .row { display: flex; gap: 10px; margin-top: 8px; }
.vf-search input { flex: 1; border: 1.5px solid var(--line); border-radius: 11px; padding: 12px 14px; font-family: inherit; font-size: 14px; outline: none; }
.vf-search input:focus { border-color: var(--blue); }
.vf-note { color: #aab6d6; font-size: 12.5px; margin-top: 22px; max-width: 560px; text-align: center; }

@media (max-width: 980px) {
  .cert-sheet { width: 100%; }
}
@media print {
  body * { visibility: hidden; }
  #printCert, #printCert * { visibility: visible; }
  #printCert { position: absolute; inset: 0; }
}

/* ============================================================
   PORTAL ASESI (public self-service)
   ============================================================ */
.pa-body { margin: 0; background: var(--mist); min-height: 100vh; }

/* top brand bar */
.pa-top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.9); backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.pa-top__in { max-width: 1080px; margin-inline: auto; padding: 0 24px; height: 72px; display: flex; align-items: center; gap: 12px; }
.pa-brand { display: flex; align-items: center; gap: 11px; }
.pa-brand__logo { background: #fff; border-radius: 11px; padding: 6px; box-shadow: var(--sh-sm); border: 1px solid var(--line); }
.pa-brand__logo img { height: 36px; width: auto; display: block; }
.pa-brand b { font-family: var(--font-display); font-size: 15px; font-weight: 700; display: block; line-height: 1.1; }
.pa-brand span { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; }
.pa-top__spacer { flex: 1; }

/* gate */
.pa-gate {
  min-height: calc(100vh - 0px); position: relative; overflow: hidden;
  display: grid; place-items: center; padding: 40px 20px;
  background:
    radial-gradient(120% 80% at 80% -10%, #21407f 0%, rgba(33,64,127,0) 55%),
    linear-gradient(165deg, var(--blue) 0%, #0f2350 70%, #0b1a3d 100%);
}
#paBubbles { position: absolute; inset: 0; z-index: 0; }
.pa-gate__grid { position: absolute; inset: 0; z-index: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 30%, transparent 80%); mask-image: radial-gradient(70% 60% at 50% 30%, #000 30%, transparent 80%); }
.pa-gate__card { position: relative; z-index: 2; width: 100%; max-width: 460px; background: #fff; border-radius: 22px; box-shadow: 0 30px 70px rgba(7,18,46,.5); overflow: hidden; }
.pa-gate__head { padding: 34px 34px 8px; text-align: center; }
.pa-gate__logo { display: inline-block; background: #fff; border-radius: 16px; padding: 12px; box-shadow: var(--sh-md); border: 1px solid var(--line); margin-bottom: 18px; }
.pa-gate__logo img { height: 54px; }
.pa-gate__head h1 { font-size: 23px; font-weight: 600; }
.pa-gate__head p { color: var(--muted); font-size: 14px; margin-top: 8px; }
.pa-gate__form { padding: 22px 34px 30px; }
.pa-field { margin-bottom: 14px; }
.pa-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.pa-field input { width: 100%; border: 1.5px solid var(--line); border-radius: 11px; padding: 13px 15px; font-family: inherit; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s; }
.pa-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,61,131,.1); }
.pa-gate__form .btn { width: 100%; padding: 13px; font-size: 15px; margin-top: 4px; }
.pa-err { background: #fbeaea; color: #93190f; font-size: 13px; font-weight: 600; padding: 10px 13px; border-radius: 10px; margin-bottom: 14px; display: none; align-items: center; gap: 8px; }
.pa-err.show { display: flex; }
.pa-err svg { width: 16px; height: 16px; flex: none; }
.pa-demo { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.pa-demo__lbl { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; margin-bottom: 10px; }
.pa-demo__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.pa-demo__chips button { border: 1.5px solid var(--line); background: #fff; font-family: inherit; font-size: 12px; font-weight: 600; color: var(--ink); padding: 7px 11px; border-radius: 999px; transition: all .12s; }
.pa-demo__chips button:hover { border-color: var(--blue); color: var(--blue); background: var(--mist); }

/* dashboard */
.pa-wrap { max-width: 1080px; margin-inline: auto; padding: 28px 24px 64px; }
.pa-hero {
  position: relative; overflow: hidden; border-radius: var(--r-lg); color: #fff;
  background: radial-gradient(120% 120% at 88% 0%, #2a4d97 0%, rgba(42,77,151,0) 55%), linear-gradient(155deg, var(--blue) 0%, var(--blue-900) 100%);
  padding: 28px 30px; margin-bottom: 22px;
}
.pa-hero__grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 40px 40px; -webkit-mask-image: radial-gradient(60% 100% at 85% 0%, #000, transparent 70%); mask-image: radial-gradient(60% 100% at 85% 0%, #000, transparent 70%); }
.pa-hero__top { position: relative; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pa-hero__id { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .03em; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); padding: 5px 12px; border-radius: 999px; }
.pa-hero h1 { position: relative; font-size: clamp(22px, 3vw, 30px); font-weight: 700; margin-top: 16px; }
.pa-hero__meta { position: relative; display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; color: var(--on-blue-dim, #aab6d6); font-size: 14px; }
.pa-hero__meta b { color: #fff; font-weight: 600; }
.pa-hero__pct { position: absolute; top: 26px; right: 30px; text-align: right; }
.pa-hero__pct b { font-family: var(--font-display); font-size: 38px; font-weight: 700; letter-spacing: -.02em; display: block; line-height: 1; }
.pa-hero__pct span { font-size: 12px; color: var(--on-blue-dim, #aab6d6); }

.pa-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; }

/* progress timeline */
.pa-track { position: relative; padding-left: 8px; }
.pa-step { display: grid; grid-template-columns: 34px 1fr; gap: 14px; position: relative; padding-bottom: 22px; }
.pa-step:last-child { padding-bottom: 0; }
.pa-step::before { content: ""; position: absolute; left: 16px; top: 30px; bottom: -4px; width: 2px; background: var(--line); }
.pa-step:last-child::before { display: none; }
.pa-step__dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line); color: var(--muted-2); z-index: 1; }
.pa-step__dot svg { width: 17px; height: 17px; }
.pa-step.done .pa-step__dot { background: var(--s-selesai); border-color: var(--s-selesai); color: #fff; }
.pa-step.done::before { background: var(--s-selesai); }
.pa-step.current .pa-step__dot { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 0 4px rgba(26,61,131,.15); }
.pa-step.reject .pa-step__dot { background: var(--red); border-color: var(--red); color: #fff; }
.pa-step__body { padding-top: 4px; }
.pa-step__body b { font-size: 15px; font-weight: 600; display: block; }
.pa-step.muted .pa-step__body b { color: var(--muted-2); }
.pa-step__body span { font-size: 13px; color: var(--muted); }
.pa-step__when { font-size: 12px; color: var(--muted-2); font-weight: 600; margin-top: 2px; }
.pa-step__tag { display: inline-block; margin-top: 6px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.pa-step__tag.now { background: #e8f0fd; color: var(--s-diajukan); }

/* side info cards */
.pa-side { display: flex; flex-direction: column; gap: 16px; }
.pa-info { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); overflow: hidden; }
.pa-info__head { padding: 15px 18px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 9px; }
.pa-info__head svg { width: 17px; height: 17px; color: var(--blue); }
.pa-info__head b { font-size: 14px; font-weight: 600; }
.pa-info__body { padding: 16px 18px; }
.pa-kv { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; font-size: 13.5px; }
.pa-kv .k { color: var(--muted); }
.pa-kv .v { font-weight: 600; text-align: right; }

/* alert callouts */
.pa-alert { display: flex; gap: 13px; padding: 16px 18px; border-radius: var(--r-md); margin-bottom: 18px; }
.pa-alert__ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.pa-alert__ic svg { width: 20px; height: 20px; }
.pa-alert b { font-size: 14.5px; display: block; }
.pa-alert p { font-size: 13.5px; margin-top: 3px; }
.pa-alert.warn { background: #fbf2e1; } .pa-alert.warn .pa-alert__ic { background: #f6e2bd; color: #946012; } .pa-alert.warn b { color: #946012; } .pa-alert.warn p { color: #7d5417; }
.pa-alert.bad { background: #fbeaea; } .pa-alert.bad .pa-alert__ic { background: #f4cfcc; color: #93190f; } .pa-alert.bad b { color: #93190f; } .pa-alert.bad p { color: #7e2019; }
.pa-alert.good { background: #e7f5ec; } .pa-alert.good .pa-alert__ic { background: #c9ecd5; color: #1f7a45; } .pa-alert.good b { color: #1f7a45; } .pa-alert.good p { color: #226a3f; }

/* certificate download card */
.pa-cert { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); overflow: hidden; }
.pa-cert__band { background: linear-gradient(155deg, var(--blue) 0%, var(--blue-900) 100%); color: #fff; padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.pa-cert__seal { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #d8b24a, #b8902f 70%); color: #6b4e12; box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); }
.pa-cert__seal svg { width: 22px; height: 22px; }
.pa-cert__band b { font-size: 15px; display: block; }
.pa-cert__band span { font-size: 12.5px; color: var(--on-blue-dim, #aab6d6); }
.pa-cert__body { padding: 18px 20px; display: flex; align-items: center; gap: 16px; }
.pa-cert__qr { flex: none; }
.pa-cert__no { font-size: 12px; color: var(--muted); }
.pa-cert__no b { display: block; font-family: var(--font-display); font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; margin-top: 2px; }
.pa-cert__actions { display: flex; gap: 10px; padding: 0 20px 20px; flex-wrap: wrap; }
.pa-cert__actions .btn { flex: 1; justify-content: center; min-width: 130px; }

@media (max-width: 860px) {
  .pa-cols { grid-template-columns: 1fr; }
  .pa-hero__pct { position: static; text-align: left; margin-top: 14px; }
}

/* ============================================================
   AJUKAN SERTIFIKASI (public application wizard)
   ============================================================ */
.wiz-body-bg { margin: 0; background: var(--mist); min-height: 100vh; }
.wiz-wrap { max-width: 800px; margin-inline: auto; padding: 28px 24px 72px; }

/* step indicator */
.wiz-steps { display: flex; align-items: center; margin: 6px 0 26px; }
.wiz-stepper { display: flex; align-items: center; gap: 0; flex: 1; }
.wiz-st { display: flex; flex-direction: column; align-items: center; gap: 7px; position: relative; flex: none; }
.wiz-st__dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line); color: var(--muted-2); font-family: var(--font-display); font-weight: 700; font-size: 14px; transition: all .2s; }
.wiz-st__dot svg { width: 17px; height: 17px; }
.wiz-st__lbl { font-size: 11.5px; font-weight: 600; color: var(--muted-2); white-space: nowrap; }
.wiz-st.active .wiz-st__dot { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 0 4px rgba(26,61,131,.14); }
.wiz-st.active .wiz-st__lbl { color: var(--blue); }
.wiz-st.done .wiz-st__dot { background: var(--s-selesai); border-color: var(--s-selesai); color: #fff; }
.wiz-st.done .wiz-st__lbl { color: var(--ink); }
.wiz-line { flex: 1; height: 2px; background: var(--line); margin: 0 6px; position: relative; top: -13px; min-width: 18px; }
.wiz-line.fill { background: var(--s-selesai); }

/* card */
.wiz-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-md); overflow: hidden; }
.wiz-head { padding: 24px 28px 0; }
.wiz-head h2 { font-size: 21px; font-weight: 600; }
.wiz-head p { font-size: 13.5px; color: var(--muted); margin-top: 5px; }
.wiz-cont { padding: 22px 28px 26px; }
.wiz-foot { display: flex; align-items: center; gap: 12px; padding: 18px 28px; border-top: 1px solid var(--line-soft); background: var(--mist); }
.wiz-foot .spacer { flex: 1; }

/* form fields */
.wf-group { margin-bottom: 16px; }
.wf-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wf-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.wf-group label .req { color: var(--red); }
.wf-input, .wf-select, .wf-area { width: 100%; border: 1.5px solid var(--line); border-radius: 11px; padding: 12px 14px; font-family: inherit; font-size: 14.5px; outline: none; background: #fff; transition: border-color .15s, box-shadow .15s; color: var(--ink); }
.wf-input:focus, .wf-select:focus, .wf-area:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,61,131,.1); }
.wf-area { resize: vertical; min-height: 84px; }
.wf-hint { font-size: 12px; color: var(--muted-2); margin-top: 6px; }
.wf-err { font-size: 12.5px; color: var(--red); font-weight: 600; margin-top: 6px; display: none; }
.wf-err.show { display: block; }

/* big choice cards (applicant type) */
.opt-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.opt-card { border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 20px; cursor: pointer; transition: all .15s; background: #fff; text-align: center; }
.opt-card:hover { border-color: var(--cloud); }
.opt-card.on { border-color: var(--blue); background: var(--mist); box-shadow: 0 0 0 3px rgba(26,61,131,.08); }
.opt-card__ic { width: 50px; height: 50px; border-radius: 14px; background: var(--mist); color: var(--blue); display: grid; place-items: center; margin: 0 auto 12px; }
.opt-card.on .opt-card__ic { background: #fff; }
.opt-card__ic svg { width: 26px; height: 26px; }
.opt-card b { font-size: 15.5px; display: block; }
.opt-card span { font-size: 12.5px; color: var(--muted); display: block; margin-top: 3px; }

/* scheme picker */
.scheme-group-lbl { display: flex; align-items: center; gap: 12px; margin: 18px 0 11px; }
.scheme-group-lbl:first-child { margin-top: 4px; }
.scheme-group-lbl b { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.scheme-group-lbl .rl { flex: 1; height: 1px; background: var(--line-soft); }
.scheme-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.scheme-opt { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; cursor: pointer; transition: all .14s; background: #fff; }
.scheme-opt:hover { border-color: var(--cloud); }
.scheme-opt.on { border-color: var(--blue); background: var(--mist); }
.scheme-opt__code { font-family: var(--font-display); font-size: 11px; font-weight: 700; color: var(--blue); background: var(--mist); padding: 4px 8px; border-radius: 6px; flex: none; }
.scheme-opt.on .scheme-opt__code { background: #fff; }
.scheme-opt__meta { flex: 1; min-width: 0; }
.scheme-opt__meta b { font-size: 14px; font-weight: 600; display: block; }
.scheme-opt__meta span { font-size: 12px; color: var(--muted); }
.scheme-opt__rd { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; position: relative; }
.scheme-opt.on .scheme-opt__rd { border-color: var(--blue); }
.scheme-opt.on .scheme-opt__rd::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--blue); }

/* method segmented */
.wf-seg { display: flex; gap: 10px; }
.wf-seg button { flex: 1; border: 1.5px solid var(--line); background: #fff; font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); padding: 12px; border-radius: 11px; transition: all .14s; text-align: left; }
.wf-seg button.on { border-color: var(--blue); background: var(--mist); color: var(--blue); }
.wf-seg button b { display: block; font-size: 14px; }
.wf-seg button span { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.wf-seg button.on span { color: var(--blue); }

/* requirement upload rows */
.req-list { display: flex; flex-direction: column; gap: 10px; }
.req-row { display: flex; align-items: center; gap: 13px; border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 13px 15px; transition: border-color .15s; }
.req-row.filled { border-color: #bfe3cb; background: #f4fbf6; }
.req-row__ic { width: 38px; height: 38px; border-radius: 9px; background: var(--mist); color: var(--blue); display: grid; place-items: center; flex: none; }
.req-row.filled .req-row__ic { background: #e7f5ec; color: #1f7a45; }
.req-row__ic svg { width: 18px; height: 18px; }
.req-row__meta { flex: 1; min-width: 0; }
.req-row__meta b { font-size: 14px; font-weight: 600; display: block; }
.req-row__meta span { font-size: 12px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req-row__tag { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; flex: none; }
.req-row__tag.wajib { color: var(--red); background: #fbeaea; }
.req-row__tag.opsi { color: var(--muted); background: #f0f2f7; }
.req-row__btn { flex: none; }

/* review */
.rv-section { margin-bottom: 18px; }
.rv-section__h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rv-section__h b { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); }
.rv-section__h button { border: none; background: none; font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--blue); cursor: pointer; }
.rv-grid { border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px 16px; }
.rv-kv { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.rv-kv:last-child { border-bottom: none; }
.rv-kv .k { color: var(--muted); }
.rv-kv .v { font-weight: 600; text-align: right; }
.wf-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.wf-check input { width: 17px; height: 17px; accent-color: var(--blue); flex: none; margin-top: 1px; }

/* success */
.wiz-done { text-align: center; padding: 14px 8px 8px; }
.wiz-done__ic { width: 76px; height: 76px; border-radius: 50%; background: #e7f5ec; color: #1f7a45; display: grid; place-items: center; margin: 0 auto 18px; }
.wiz-done__ic svg { width: 40px; height: 40px; }
.wiz-done h2 { font-size: 23px; font-weight: 600; }
.wiz-done p { font-size: 14px; color: var(--muted); margin-top: 8px; max-width: 440px; margin-inline: auto; }
.wiz-tracknum { display: inline-flex; flex-direction: column; gap: 3px; background: var(--mist); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 28px; margin: 22px 0; }
.wiz-tracknum span { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }
.wiz-tracknum b { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--blue); letter-spacing: .02em; }
.wiz-done__acts { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }

@media (max-width: 680px) {
  .wf-2, .opt-cards, .scheme-pick { grid-template-columns: 1fr; }
  .wiz-st__lbl { display: none; }
  .wf-seg { flex-direction: column; }

  /* Kartu skema lebih ringkas di mobile: satu kolom penuh, padding & teks
     dikecilkan, nama panjang dibungkus rapi agar tidak terpotong ke samping. */
  .scheme-pick { gap: 8px; }
  .scheme-opt { padding: 10px 12px; gap: 10px; }
  .scheme-opt__code { font-size: 10px; padding: 3px 6px; }
  .scheme-opt__meta { overflow-wrap: anywhere; }
  .scheme-opt__meta b { font-size: 13px; }
  .scheme-opt__meta span { font-size: 11px; }
  .scheme-group-lbl { margin: 14px 0 9px; }
}

/* ============================================================
   MOBILE SHELL — bottom tab bar, drawer scrim, dark topbar
   (built by initShell() in api.js; hidden on desktop)
   ============================================================ */
.bottomnav { display: none; }
.sidebar-scrim { display: none; }
.topbar__brand { display: none; }
.page-head { display: none; }

@media (max-width: 760px) {
  /* dark topbar to match mobile design */
  .topbar {
    background: var(--sb-bg);
    backdrop-filter: none;
    border-bottom: none;
    color: #fff;
    gap: 10px;
    padding: 10px 16px;
    height: auto;
    min-height: 58px;
  }
  /* judul halaman tidak lagi di topbar (pindah ke body) */
  .topbar__title { display: none; }
  .topbar__spacer { display: none; }
  .role-switch select { padding: 5px 8px; }

  /* brand (logo + nama LSP) di topbar — sesuai desain Claude */
  .topbar__brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
  .topbar__logo { background: #fff; border-radius: 10px; padding: 5px; flex: none; display: flex; box-shadow: 0 3px 10px rgba(0,0,0,.22); }
  .topbar__logo img { height: 26px; width: auto; }
  .topbar__brandname { min-width: 0; line-height: 1.12; }
  .topbar__brandname b { color: #fff; font-family: var(--font-display); font-size: 13px; font-weight: 700; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar__brandname > span { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-blue-dim); font-weight: 600; }

  /* judul halaman ("Dasbor Sistem" dst.) tampil di awal body */
  .page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
  .page-head__text { min-width: 0; }
  .page-head h1 { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
  .page-head p { font-size: 13px; color: var(--muted); margin-top: 3px; }
  .page-head .role-switch { margin-left: auto; }
  /* hamburger replaced by the bottom "Lainnya" tab */
  .menu-toggle { display: none !important; }
  .topbar .icon-btn {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.12);
    color: #fff;
  }
  .topbar .icon-btn:hover { color: #fff; border-color: rgba(255,255,255,.24); }
  .topbar .icon-btn__dot { box-shadow: 0 0 0 2px var(--sb-bg); }
  /* role switch wraps under title on small screens */
  .role-switch { padding: 4px 4px 4px 10px; }
  .role-switch label { display: none; }

  .content { padding: 18px 16px calc(76px + env(safe-area-inset-bottom, 0px)); }
  .filters { gap: 10px; margin-bottom: 16px; }

  /* dashboard filter pills: 2 kolom sejajar (sesuai desain), tombol full-width */
  .filters--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .filters--grid .field { max-width: none; justify-content: flex-start; }
  .filters--grid .field select { width: 100%; }
  .filters--grid .filters__spacer { display: none; }
  .filters--grid .btn { grid-column: 1 / -1; width: 100%; }

  /* logout ada di footer sidebar — pastikan tak ketutup safe area saat drawer dibuka */
  .sidebar__user { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  /* drawer terbuka: sembunyikan tab bar agar seluruh menu + tombol Keluar terlihat */
  .drawer-open .bottomnav { display: none; }

  /* filter segmented (Sertifikat/Pembayaran/MasterData): jadi strip yang
     bisa di-scroll horizontal agar tidak melebarkan halaman di mobile */
  .seg-tabs { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg-tabs::-webkit-scrollbar { display: none; }
  .seg-tabs button { flex: none; white-space: nowrap; }

  /* drawer backdrop when sidebar is open */
  .sidebar { width: 280px; max-width: 84vw; }
  .sidebar-scrim {
    display: block; position: fixed; inset: 0; z-index: 39;
    background: rgba(11,26,61,.45); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity .25s ease;
  }
  .sidebar-scrim.is-open { opacity: 1; pointer-events: auto; }

  /* bottom tab bar */
  .bottomnav {
    display: flex; justify-content: space-around; align-items: stretch;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: #fff; border-top: 1px solid var(--line);
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 16px rgba(11,26,61,.06);
  }
  .bottomnav__item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 4px 2px; color: var(--muted-2); font-size: 10px; font-weight: 600;
    background: none; border: none; position: relative; min-width: 0;
    text-align: center; line-height: 1.1;
  }
  .bottomnav__item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottomnav__item svg { width: 22px; height: 22px; }
  .bottomnav__item.is-active { color: var(--blue); font-weight: 700; }
  .bottomnav__badge {
    position: absolute; top: -2px; left: calc(50% + 6px);
    min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
    background: var(--red); color: #fff; font-size: 9.5px; font-weight: 800;
    display: flex; align-items: center; justify-content: center; line-height: 1;
  }
}
