/* ==========================================================
   LEAD CENTER - tema navy & emas (selaras dengan data.grahaijs.com)
   ========================================================== */
:root {
  --bg: #f6f3ea; --bg2: #fbf8f1; --panel: #ffffff; --text: #14203a; --muted: #66708a; --line: #e8e2d2;
  --navy: #0f1d3a; --navy2: #172a52; --navy3: #22396b; --gold: #c9a227; --gold2: #e2bd3f; --gold-soft: #fbf1d3;
  --brand: #1f3a75; --brand-soft: #e8eefb;
  --blue: #2f6fe4; --blue-soft: #e6efff; --green: #12935a; --green-soft: #e2f6ec;
  --amber: #c48a00; --amber-soft: #fff3d1; --red: #d23c2f; --red-soft: #fde8e5;
  --violet: #7a4fe0; --violet-soft: #efe8ff; --slate: #4a5872; --slate-soft: #eef0f5; --teal: #0f8f8a; --teal-soft: #dff5f3;
  --danger: var(--red); --danger-soft: var(--red-soft); --warn: var(--amber); --warn-soft: var(--amber-soft);
  --ok: var(--green); --ok-soft: var(--green-soft); --info: var(--blue); --info-soft: var(--blue-soft);
  --radius: 16px; --radius-s: 10px;
  --shadow: 0 1px 2px rgba(15, 29, 58, .05), 0 6px 20px -8px rgba(15, 29, 58, .12);
  --shadow-h: 0 2px 4px rgba(15, 29, 58, .06), 0 14px 32px -10px rgba(15, 29, 58, .22);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0c1426; --bg2: #101a30; --panel: #15213b; --text: #e8ecf5; --muted: #95a0b8; --line: #263556;
  --brand: #8fb0ff; --brand-soft: #1b2b50; --gold-soft: #3a3115;
  --blue: #7aa7ff; --blue-soft: #19294a; --green: #4fd391; --green-soft: #12301f;
  --amber: #f3c552; --amber-soft: #3a2f12; --red: #ff8a7d; --red-soft: #3d1b18;
  --violet: #b59bff; --violet-soft: #2a2148; --slate: #b3bfd6; --slate-soft: #212d47; --teal: #4fd6cf; --teal-soft: #11302f;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.5);
  --shadow-h: 0 2px 6px rgba(0,0,0,.35), 0 16px 36px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1426; --bg2: #101a30; --panel: #15213b; --text: #e8ecf5; --muted: #95a0b8; --line: #263556;
    --brand: #8fb0ff; --brand-soft: #1b2b50; --gold-soft: #3a3115;
    --blue: #7aa7ff; --blue-soft: #19294a; --green: #4fd391; --green-soft: #12301f;
    --amber: #f3c552; --amber-soft: #3a2f12; --red: #ff8a7d; --red-soft: #3d1b18;
    --violet: #b59bff; --violet-soft: #2a2148; --slate: #b3bfd6; --slate-soft: #212d47; --teal: #4fd6cf; --teal-soft: #11302f;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.5);
    --shadow-h: 0 2px 6px rgba(0,0,0,.35), 0 16px 36px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.55 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.layout.mini { grid-template-columns: 84px 1fr; }
.side { background: linear-gradient(180deg, var(--navy) 0%, #0b1730 100%); color: #dfe6f5; padding: 18px 14px;
  position: sticky; top: 0; height: 100vh; overflow: auto; display: flex; flex-direction: column; gap: 4px; z-index: 30; }
.brandbox { display: flex; align-items: center; gap: 12px; background: #fff; color: var(--navy); border-radius: 14px; padding: 10px 12px; margin-bottom: 6px; }
.logo { width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 15px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy3) 100%); color: var(--gold2); letter-spacing: -.5px; box-shadow: inset 0 0 0 2px rgba(226,189,63,.35); }
.brandbox b { display: block; font-size: 14px; line-height: 1.15; letter-spacing: .2px; }
.brandbox small { display: block; font-size: 11px; color: #6b7590; }
.side .tag { font-size: 12px; color: #9fb0d4; margin: 0 6px 12px; }
.side .grp { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: #7f8fb3; margin: 14px 10px 6px; }
.side a.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: #dfe6f5; text-decoration: none;
  font-weight: 600; transition: background .2s, color .2s, transform .2s; position: relative; }
.side a.nav:hover { background: rgba(255,255,255,.07); transform: translateX(2px); }
.side a.nav.active { background: linear-gradient(90deg, rgba(201,162,39,.22), rgba(201,162,39,.08)); color: var(--gold2); }
.side a.nav.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--gold); }
.side a.nav .badge { margin-left: auto; background: rgba(255,255,255,.12); color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 99px; font-weight: 700; }
.side a.nav .badge.red { background: var(--red); }
.side .bottom { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 4px; }
.side .bottom button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: #dfe6f5; font-weight: 600; }
.side .bottom button:hover { background: rgba(255,255,255,.07); }
.side .bottom small { display: block; color: #8b9abd; font-weight: 400; font-size: 11px; }
.layout.mini .side .lbl, .layout.mini .side .grp, .layout.mini .side .tag, .layout.mini .brandbox > div:not(.logo), .layout.mini .side .badge, .layout.mini .side .bottom small { display: none; }
.layout.mini .brandbox { justify-content: center; padding: 8px; }
.layout.mini .side a.nav, .layout.mini .side .bottom button { justify-content: center; }

main { min-width: 0; display: flex; flex-direction: column; }
.header { position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff; display: flex; align-items: center; gap: 12px;
  padding: 14px 28px; box-shadow: 0 6px 18px -10px rgba(0,0,0,.5); }
.hbtn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14); color: #fff; cursor: pointer; transition: background .2s; flex: none; padding: 0; }
.hbtn:hover { background: rgba(255,255,255,.14); }
.hbtn.on { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.header .title { flex: 1; min-width: 0; font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header .title span { color: #9fb0d4; font-weight: 500; }
.sync { color: #b9c6e3; font-size: 13px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.mode { font-size: 12px; font-weight: 800; letter-spacing: .6px; padding: 6px 12px; border-radius: 99px; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.mode.uji { background: var(--amber); color: #2b1e00; }
.mode.live { background: #19b46f; color: #032414; }
.mode.mati { background: var(--red); color: #fff; }
.mode .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
.who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--gold); color: var(--navy); flex: none; }
.who b { display: block; font-size: 14px; line-height: 1.2; } .who small { color: #9fb0d4; font-size: 12px; }
#app { padding: 26px 28px 70px; max-width: 1480px; width: 100%; }

/* ---------- page header ---------- */
.topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; animation: rise .45s ease both; }
.topbar h2 { margin: 0; font-size: 26px; flex: 1; letter-spacing: -.4px; font-weight: 800; }
.topbar h2 .small { font-size: 14px; font-weight: 600; }
.pagesub { color: var(--muted); margin: -12px 0 18px; animation: rise .5s ease both; }

/* ---------- guide ---------- */
.guide { position: relative; border-radius: var(--radius); margin-bottom: 20px; overflow: hidden;
  background: linear-gradient(120deg, var(--gold-soft) 0%, var(--bg2) 55%, var(--brand-soft) 100%); border: 1px solid var(--line);
  animation: rise .5s ease both; }
.guide-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; user-select: none; }
.guide-h .gi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--navy); color: var(--gold2); flex: none; }
.guide-h b { font-size: 15px; } .guide-h small { display: block; color: var(--muted); font-size: 12.5px; }
.guide-h .tg { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--brand); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.guide-h .tg svg { transition: transform .3s; }
.guide.closed .guide-h .tg svg { transform: rotate(-90deg); }
.guide-b { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .35s ease; }
.guide.closed .guide-b { grid-template-rows: 0fr; }
.guide-b > div { overflow: hidden; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; padding: 0 18px 16px; }
.step { background: var(--panel); border-radius: 14px; padding: 14px; border: 1px solid var(--line); position: relative; animation: rise .5s ease both;
  animation-delay: calc(var(--i, 0) * 70ms); transition: transform .2s, box-shadow .2s; }
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); }
.step .n { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; background: var(--navy); color: var(--gold2); }
.step .e { font-size: 24px; line-height: 1; margin-bottom: 8px; }
.step b { display: block; margin-bottom: 4px; font-size: 13.5px; padding-right: 24px; }
.step p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 16px; align-items: center; }
.legend .lt { font-size: 12px; font-weight: 700; color: var(--muted); margin-right: 4px; }
.tip { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  font-size: 11px; font-weight: 800; cursor: help; position: relative; vertical-align: 1px; margin-left: 4px; font-style: normal; }
.tipbox { position: fixed; z-index: 200; max-width: 280px; background: var(--navy); color: #fff; font-size: 12.5px; font-weight: 500; line-height: 1.5;
  padding: 9px 12px; border-radius: 10px; box-shadow: var(--shadow-h); pointer-events: none; animation: fade .15s ease both; border: 1px solid rgba(226,189,63,.35); }
.tipbox::after { content: ""; position: absolute; left: var(--ax, 50%); top: 100%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--navy); }
.tipbox.below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--navy); }

/* ---------- cards & stats ---------- */
.banner { padding: 12px 16px 12px 46px; border-radius: 12px; margin-bottom: 14px; position: relative; animation: rise .4s ease both; border: 1px solid transparent; }
.banner::before { font-size: 18px; line-height: 1.2; position: absolute; left: 16px; top: 11px; }
.banner.warn { background: var(--amber-soft); color: var(--text); border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
.banner.warn::before { content: "🧪"; }
.banner.danger { background: var(--red-soft); color: var(--text); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.banner.danger::before { content: "⚠️"; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px;
  animation: rise .5s ease both; animation-delay: calc(var(--i, 0) * 60ms); }
.card h3 { margin: 0 0 14px; font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.card h3 .hi { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; background: var(--gold-soft); }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 20px; }
.stat { --c: var(--slate); --cs: var(--slate-soft); background: var(--cs); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent);
  border-radius: var(--radius); padding: 16px 18px; position: relative; overflow: hidden; animation: rise .5s ease both;
  animation-delay: calc(var(--i, 0) * 70ms); transition: transform .2s, box-shadow .2s; }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); }
.stat::after { content: ""; position: absolute; right: -24px; top: -24px; width: 90px; height: 90px; border-radius: 50%; background: var(--c); opacity: .08; }
.stat .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--c); color: #fff; margin-bottom: 10px; font-size: 16px; }
.stat .label { color: var(--c); font-size: 13px; font-weight: 700; }
.stat .val { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.8px; line-height: 1.15; color: var(--text); }
.stat .sub { color: var(--muted); font-size: 12px; }
.stat.blue { --c: var(--blue); --cs: var(--blue-soft); } .stat.green { --c: var(--green); --cs: var(--green-soft); }
.stat.amber { --c: var(--amber); --cs: var(--amber-soft); } .stat.red { --c: var(--red); --cs: var(--red-soft); }
.stat.violet { --c: var(--violet); --cs: var(--violet-soft); } .stat.teal { --c: var(--teal); --cs: var(--teal-soft); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.two > .card { margin-bottom: 18px; }

/* ---------- hero (dashboard) ---------- */
.hero { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; animation: rise .45s ease both; }
.hero h2 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.6px; }
.hero p { margin: 2px 0 0; color: var(--muted); }
.hero .grow { flex: 1; min-width: 240px; }
.datenav { display: flex; align-items: center; background: var(--navy); border-radius: 14px; padding: 4px; color: #fff; }
.datenav button { background: transparent; border: 0; color: #fff; width: 38px; height: 38px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.datenav button:hover { background: rgba(255,255,255,.12); }
.datenav input[type=date] { background: transparent; border: 0; color: #fff; font-weight: 700; padding: 6px 8px; color-scheme: dark; box-shadow: none; }
.btn.gold, button.gold { background: linear-gradient(180deg, var(--gold2), var(--gold)); border-color: var(--gold); color: var(--navy); font-weight: 800; }

/* ---------- alur otomatis ---------- */
.flow { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 4px 2px 8px; }
.fnode { flex: 1; min-width: 132px; text-align: center; padding: 14px 10px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line);
  position: relative; animation: rise .5s ease both; animation-delay: calc(var(--i, 0) * 110ms); }
.fnode .fe { font-size: 26px; display: inline-block; animation: bob 3s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 300ms); }
.fnode b { display: block; font-size: 13px; margin-top: 4px; }
.fnode .fv { font-size: 22px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.fnode small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.flink { flex: 0 0 34px; position: relative; align-self: center; height: 4px; }
.flink::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 11px); border-radius: 2px; opacity: .7; }
.flink::after { content: ""; position: absolute; top: -3px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 25%, transparent); animation: travel 1.8s linear infinite; }

/* ---------- progress / leaderboard ---------- */
.prog { height: 8px; border-radius: 99px; background: var(--slate-soft); overflow: hidden; min-width: 70px; }
.prog > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--green), var(--teal)); width: 0; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.lb { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-radius: 12px; cursor: pointer; transition: background .2s; }
.lb:hover { background: var(--bg2); }
.lb .rank { width: 22px; text-align: center; font-weight: 800; color: var(--muted); font-size: 13px; }
.lb .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; font-size: 14px; }
.lb .nm { flex: 1; min-width: 0; } .lb .nm b { display: block; font-size: 13.5px; } .lb .nm small { color: var(--muted); font-size: 12px; }
.lb .ct { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.medal { font-size: 16px; }

/* ---------- tren ---------- */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 22px; }
.bars div { flex: 1; background: linear-gradient(180deg, var(--navy3), var(--navy)); border-radius: 8px 8px 3px 3px; min-height: 3px; position: relative;
  transform-origin: bottom; animation: grow .8s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 40ms); transition: filter .2s; }
.bars div.hl { background: linear-gradient(180deg, var(--gold2), var(--gold)) !important; }
.bars div:hover { filter: brightness(1.25); }
.bars div span { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: var(--muted); }
:root[data-theme="dark"] .bars div:not(.hl) { background: linear-gradient(180deg, #4a6cc0, #2a4588); }
.bars-lbl { display: flex; gap: 8px; font-size: 11px; color: var(--muted); margin-top: 6px; }
.bars-lbl span { flex: 1; text-align: center; }

/* ---------- table ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 700; white-space: nowrap; background: var(--bg2); text-transform: none; }
tr:first-child th:first-child { border-top-left-radius: 10px; } tr:first-child th:last-child { border-top-right-radius: 10px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; transition: background .15s; } tr.click:hover td { background: var(--gold-soft); }
.table-wrap { overflow-x: auto; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; background: var(--panel); border: 1px solid var(--line);
  padding: 14px; border-radius: var(--radius); box-shadow: var(--shadow); animation: rise .5s ease both; }

/* ---------- forms ---------- */
input[type=text], input[type=password], input[type=date], input[type=datetime-local], input[type=number], select, textarea {
  background: var(--panel); border: 1.5px solid var(--line); border-radius: 11px; padding: 9px 12px; min-width: 0; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 18%, transparent); }
textarea { width: 100%; min-height: 140px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--gold); vertical-align: -3px; }
button, .btn { background: var(--panel); border: 1.5px solid var(--line); border-radius: 11px; padding: 9px 15px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text); transition: transform .15s, box-shadow .2s, background .2s; }
button:hover, .btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
button:active, .btn:active { transform: translateY(0); }
button.primary, .btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
:root[data-theme="dark"] button.primary, :root[data-theme="dark"] .btn.primary { background: var(--gold); border-color: var(--gold); color: var(--navy); }
button.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
button:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
button.small, .btn.small { padding: 5px 11px; font-size: 12px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--slate-soft); color: var(--slate); }
.pill.ok { background: var(--green-soft); color: var(--green); }
.pill.danger { background: var(--red-soft); color: var(--red); }
.pill.warn { background: var(--amber-soft); color: var(--amber); }
.pill.info { background: var(--blue-soft); color: var(--blue); }
.pill.ok::before, .pill.danger::before, .pill.warn::before, .pill.info::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--text); margin-bottom: 6px; font-weight: 700; }
.field .small.muted { margin-top: 4px; }
.field input[type=text], .field input[type=number], .field input[type=password], .field select { width: 100%; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 14px; }
.modal-bg { position: fixed; inset: 0; background: rgba(8, 15, 32, .55); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow: auto; z-index: 60; animation: fade .2s ease both; }
.modal { background: var(--panel); border-radius: 20px; max-width: 880px; width: 100%; padding: 24px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5);
  animation: pop .3s cubic-bezier(.2,.9,.3,1.2) both; border-top: 5px solid var(--gold); }
.modal h3 { margin-top: 0; font-size: 18px; }
pre.msg { white-space: pre-wrap; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 6px 0; font: 13px/1.5 "Plus Jakarta Sans", system-ui, sans-serif; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { border: 1.5px solid var(--line); border-radius: 99px; padding: 4px 12px; cursor: pointer; user-select: none; font-weight: 600; font-size: 13px; transition: all .15s; background: var(--panel); }
.chip:hover { border-color: var(--gold); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
:root[data-theme="dark"] .chip.on { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 80;
  box-shadow: var(--shadow-h); border-left: 4px solid var(--gold); animation: slidein .35s cubic-bezier(.2,.9,.3,1.2) both; font-weight: 600; }
code { background: var(--bg2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: 12px; word-break: break-all; }
.empty { text-align: center; padding: 26px; color: var(--muted); }
.empty .e { font-size: 34px; display: block; margin-bottom: 6px; }

/* ---------- animasi ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes slidein { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes travel { from { left: 0; } to { left: calc(100% - 10px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- login ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; background: var(--bg); }
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px;
  background: radial-gradient(circle at 20% 15%, var(--gold-soft), transparent 45%), linear-gradient(160deg, var(--bg2), var(--bg)); }
.login-art h1 { font-size: 30px; margin: 26px 0 6px; text-align: center; letter-spacing: -.5px; }
.login-art p { color: var(--muted); max-width: 460px; text-align: center; margin: 0; }
.scene { position: relative; width: min(520px, 100%); height: 330px; }
.scene .bar { position: absolute; bottom: 30px; width: 68px; border-radius: 12px 12px 4px 4px; background: linear-gradient(180deg, var(--navy3), var(--navy));
  transform-origin: bottom; animation: grow 1s cubic-bezier(.2,.8,.2,1) both; }
.scene .bar::after { content: ""; position: absolute; top: 14px; left: 16px; right: 16px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.35); }
.scene .bar.g { background: linear-gradient(180deg, var(--gold2), var(--gold)); }
.scene .floor { position: absolute; left: 10%; right: 10%; bottom: 14px; height: 40px; border-radius: 50%; background: rgba(15,29,58,.08); }
.float { position: absolute; background: var(--panel); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow-h); display: flex; align-items: center; gap: 10px;
  font-size: 13px; animation: rise .7s ease both, bob 4s ease-in-out infinite; border: 1px solid var(--line); }
.float b { display: block; font-size: 13.5px; } .float small { color: var(--muted); font-size: 11.5px; }
.float .fi { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; flex: none; }
.login-box { display: flex; align-items: center; justify-content: center; padding: 30px 20px; }
.login-card { width: 100%; max-width: 440px; background: var(--panel); border-radius: 26px; padding: 36px 34px; box-shadow: var(--shadow-h); border: 1px solid var(--line);
  text-align: center; animation: pop .5s cubic-bezier(.2,.9,.3,1.2) both; }
.login-card .logo { width: 84px; height: 84px; border-radius: 22px; font-size: 30px; margin: 0 auto 18px; }
.login-card h2 { font-size: 28px; margin: 4px 0 2px; letter-spacing: -.5px; font-weight: 800; }
.login-card .hello { color: var(--muted); margin: 0; } .login-card .org { color: var(--muted); font-size: 13px; margin: 0 0 24px; }
.login-card form { text-align: left; }
.pw { position: relative; } .pw input { width: 100%; padding: 13px 44px 13px 42px; font-size: 15px; }
.pw .lk { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.pw .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; padding: 6px; box-shadow: none; color: var(--muted); }
.login-card button.primary { width: 100%; justify-content: center; padding: 14px; font-size: 16px; margin-top: 8px; border-radius: 14px; }
.login-card .err { background: var(--red-soft); color: var(--red); padding: 10px; border-radius: 10px; font-weight: 700; margin-bottom: 14px; text-align: center; }
.login-card .feat { display: flex; justify-content: space-around; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.login-card .feat div { font-size: 12px; color: var(--muted); font-weight: 600; } .login-card .feat span { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 6px; border-radius: 12px; font-size: 18px; }
.copy { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }

/* ---------- kepala kartu (judul / label / tombol) ---------- */
.chead { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "t a" "m a"; column-gap: 12px; row-gap: 6px; align-items: center; margin-bottom: 14px; }
.chead h3 { grid-area: t; margin: 0; min-width: 0; }
.chead h3 > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.chead .cmeta { grid-area: m; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 38px; }
.chead .cact { grid-area: a; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hbrand, .sclose { display: none; }

/* ---------- mobile (HP & tablet kecil) ---------- */
.scrim { display: none; }
html.noscroll, html.noscroll body { overflow: hidden; overscroll-behavior: none; }
@media (max-width: 960px) {
  html, body { font-size: 14px; -webkit-text-size-adjust: 100%; }
  .layout, .layout.mini { grid-template-columns: 1fr; }

  /* laci menu */
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-105%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
    z-index: 40; overscroll-behavior: contain; padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); box-shadow: 20px 0 40px -20px rgba(0,0,0,.6); }
  .layout.open .side { transform: none; }
  .layout.open .scrim { display: block; position: fixed; inset: 0; background: rgba(8,15,32,.55); backdrop-filter: blur(2px); z-index: 35; touch-action: none; animation: fade .2s ease both; }
  /* mode mini (laptop) tidak berlaku di HP */
  .layout.mini .side .lbl, .layout.mini .side .grp, .layout.mini .side .tag, .layout.mini .brandbox > div:not(.logo), .layout.mini .side .badge, .layout.mini .side .bottom small { display: revert; }
  .layout.mini .side a.nav, .layout.mini .side .bottom button { justify-content: flex-start; }
  .layout.mini .brandbox { justify-content: flex-start; padding: 10px 12px; }
  .only-desk { display: none !important; }
  .brandbox { position: relative; padding-right: 44px; }
  .sclose { display: grid; place-items: center; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 10px;
    border: 0; background: var(--slate-soft); color: var(--navy); font-size: 15px; font-weight: 800; padding: 0; box-shadow: none; }
  .side a.nav { padding: 12px 12px; font-size: 15px; }
  .side a.nav:hover { transform: none; }
  .side a.nav.active::before { left: -12px; }

  /* header atas */
  .header { padding: 8px 12px; gap: 8px; padding-top: max(8px, env(safe-area-inset-top)); }
  .header .title, .header .who, .sync { display: none; }
  .hbrand { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
  .hbrand .logo { width: 34px; height: 34px; border-radius: 9px; }
  .hbrand b { display: block; font-size: 14px; line-height: 1.1; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hbrand small { display: block; font-size: 11px; color: #9fb0d4; line-height: 1.1; }
  .hbtn { width: 38px; height: 38px; border-radius: 11px; }
  .mode { padding: 5px 10px; font-size: 11px; }

  /* isi halaman */
  #app { padding: 16px 14px calc(70px + env(safe-area-inset-bottom)); }
  .topbar { gap: 8px; margin-bottom: 14px; }
  .topbar h2 { flex: 1 1 100%; font-size: 22px; line-height: 1.25; }
  .topbar > button, .topbar > a.btn, .topbar > input { flex: 1 1 auto; justify-content: center; }
  .hero { gap: 12px; margin-bottom: 16px; }
  .hero h2 { font-size: 23px; line-height: 1.25; }
  .hero p { font-size: 13px; }
  .card { padding: 15px; border-radius: 14px; margin-bottom: 14px; }
  .card h3 { font-size: 15px; line-height: 1.3; }
  .card h3 .hi { width: 28px; height: 28px; font-size: 14px; flex: none; }
  .two { grid-template-columns: 1fr; gap: 0; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
  .stat { padding: 13px 14px; }
  .stat .ic { width: 30px; height: 30px; margin-bottom: 8px; }
  .stat .val { font-size: 26px; }
  .stat .label { font-size: 12.5px; }
  .stat .sub { font-size: 11.5px; line-height: 1.4; }

  /* kepala kartu: judul, lalu label, lalu tombol selebar kartu */
  .chead { grid-template-columns: 1fr; grid-template-areas: "t" "m" "a"; row-gap: 8px; }
  .chead .cmeta { padding-left: 0; }
  .chead .cact { justify-content: stretch; }
  .chead .cact > * { flex: 1 1 0; justify-content: center; padding: 10px 8px; font-size: 13px; }

  /* panduan: geser ke samping */
  .guide-h { padding: 12px 14px; align-items: flex-start; }
  .guide-h small { font-size: 12px; }
  .guide-h .tg { font-size: 0; gap: 0; margin-top: 6px; }
  .guide-h .tg svg { width: 20px; height: 20px; }
  .steps { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 80%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 14px 14px; scrollbar-width: none; }
  .steps::-webkit-scrollbar { display: none; }
  .step { scroll-snap-align: start; }
  .legend { padding: 0 14px 14px; }

  /* tabel & formulir */
  th, td { padding: 10px 10px; }
  .filters { padding: 12px; gap: 8px; }
  .filters > input[type=text], .filters > select { flex: 1 1 100%; }
  .filters > input[type=date] { flex: 1 1 40%; }
  .filters > button, .filters > a.btn { flex: 1 1 40%; justify-content: center; }
  input[type=text], input[type=password], input[type=date], input[type=datetime-local], input[type=number], select, textarea { font-size: 16px; } /* cegah zoom otomatis iOS */
  .modal-bg { padding: 0; align-items: flex-end; }
  .modal { border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 92vh; overflow: auto; overscroll-behavior: contain; }
  .modal .two { grid-template-columns: 1fr; }
  .stickyact { bottom: calc(-18px - env(safe-area-inset-bottom)); }
  .toast { left: 14px; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom)); text-align: center; }

  /* giliran AE */
  .rotline { gap: 8px; }
  .rbox { min-width: 0; flex: 1 1 100%; padding: 11px 12px; }
  .queue { min-width: 0; flex: 1 1 100%; gap: 6px; }
  .qchip { font-size: 12.5px; }
  .urow { gap: 8px; } .urow .grip { display: none; }

  .login-page { grid-template-columns: 1fr; } .login-art { display: none; }
  .login-card { padding: 28px 20px; border-radius: 22px; }
}
.two > * { min-width: 0; } .flow { max-width: 100%; }
.bars-lbl span { min-width: 0; overflow: hidden; white-space: nowrap; }
.bars div span { white-space: nowrap; }
@media (max-width: 960px) { .bars, .bars-lbl { gap: 3px; } .bars-lbl { font-size: 9px; } .bars div span { font-size: 9px; } }

/* ---------- giliran rotasi ---------- */
.rotline { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.rbox { border-radius: 14px; padding: 12px 14px; border: 1px solid var(--line); background: var(--bg2); min-width: 200px; }
.rbox small { display: block; font-weight: 700; color: var(--muted); margin-bottom: 8px; font-size: 12px; }
.rbox.next { background: linear-gradient(135deg, var(--gold-soft), var(--panel)); border: 2px solid var(--gold); cursor: default; position: relative;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 50%, transparent); animation: glow 2.2s ease-in-out infinite; }
.rbox.next small { color: var(--amber); }
.rarrow { align-self: center; color: var(--gold); font-size: 20px; font-weight: 800; animation: nudge 1.4s ease-in-out infinite; }
.queue { flex: 1; display: flex; flex-wrap: wrap; gap: 7px; align-content: center; min-width: 220px; }
.qchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 5px; border-radius: 99px; background: var(--panel); border: 1.5px solid var(--line);
  font-weight: 600; font-size: 13px; cursor: pointer; transition: all .15s; animation: rise .4s ease both; }
.qchip:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow); }
.qchip i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--gold2); font-size: 11px; font-weight: 800; }
.qchip.more { padding: 5px 12px; cursor: default; color: var(--muted); }
.rot .av { border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; font-size: 15px; }
.pooldet { margin-top: 12px; } .pooldet summary { cursor: pointer; color: var(--brand); font-weight: 700; }
.chip.off { opacity: .5; cursor: not-allowed; text-decoration: line-through; }
.urow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 6px; background: var(--panel); transition: background .15s, border-color .15s; }
.urow .av { border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; }
.urow.off { opacity: .6; } .urow.drag { opacity: .4; } .urow.over { border-color: var(--gold); background: var(--gold-soft); }
.urow .grip { cursor: grab; color: var(--muted); font-weight: 800; letter-spacing: -2px; }
.urow .uno { width: 22px; text-align: center; color: var(--muted); }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 45%, transparent); } 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--gold) 0%, transparent); } }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
@media (max-width: 960px) { .rarrow { display: none; } .urow { flex-wrap: wrap; } }
.nextgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.nextitem { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line);
  text-decoration: none; color: var(--text); transition: transform .2s, box-shadow .2s, border-color .2s; animation: rise .45s ease both; animation-delay: calc(var(--i, 0) * 50ms); }
.nextitem:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); border-color: var(--gold); }
.nextitem .pill { align-self: flex-start; } .nextitem b { font-size: 16px; } .nextitem b::before { content: "⭐ "; }
.nextitem small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stickyact { position: sticky; bottom: -24px; background: var(--panel); padding: 12px 0; margin-bottom: -12px; border-top: 1px solid var(--line); z-index: 2; }

/* ---------- pemilih periode (bulan & minggu) ---------- */
.periode { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.datenav select { background: transparent; border: 0; color: #fff; font-weight: 800; font-size: 16px; padding: 8px 6px; min-width: 170px; text-align: center;
  border-left: 2px solid var(--gold); border-right: 2px solid var(--gold); border-radius: 0; cursor: pointer; box-shadow: none; }
.datenav select:focus { box-shadow: none; }
.datenav select option { color: var(--text); background: var(--panel); font-weight: 600; }
.datenav button:disabled { opacity: .35; }
select.selgold { background: var(--gold-soft); border: 2px solid color-mix(in srgb, var(--gold) 55%, transparent); border-radius: 14px; padding: 10px 14px;
  font-weight: 800; font-size: 15px; color: var(--text); cursor: pointer; min-width: 170px; }
select.selgold:hover { border-color: var(--gold); }
.periode button.gold, .periode button#hrini { padding: 11px 18px; border-radius: 14px; font-size: 15px; }
@media (max-width: 960px) { .periode { width: 100%; } .periode .datenav { flex: 1 1 100%; justify-content: space-between; } .periode select.selgold { flex: 1 1 45%; min-width: 0; } }

.hero .grow { flex: 1 1 100%; }
.hero .periode { flex: 1 1 100%; }

.logo img { width: 74%; height: 74%; object-fit: contain; display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.logo { box-shadow: inset 0 0 0 2px rgba(226,189,63,.25), 0 4px 12px -4px rgba(15,29,58,.5); }

/* ---------- baris urutan rotasi ---------- */
.urow .unm { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.urow .uctl { display: flex; align-items: center; gap: 6px; }
.unext { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 9px; border-radius: 99px;
  border: 1.5px solid var(--line); cursor: pointer; white-space: nowrap; }
.unext.on { border-color: var(--gold); background: var(--gold-soft); color: var(--amber); }
.unext span { display: none; } .unext.on span { display: inline; }

@media (max-width: 960px) {
  .urow { display: grid; grid-template-columns: auto auto 1fr auto; grid-template-areas: "no av nm nx" "ct ct ct ct"; gap: 8px 10px; padding: 10px 12px; }
  .urow .uno { grid-area: no; } .urow .av { grid-area: av; } .urow .unm { grid-area: nm; } .urow .unext { grid-area: nx; }
  .urow .uctl { grid-area: ct; justify-content: flex-end; border-top: 1px dashed var(--line); padding-top: 8px; }
  .urow .uctl label { margin-right: auto; }
  .urow .uctl button { min-width: 42px; justify-content: center; }

  /* tabel -> kartu per baris */
  table.stack, table.stack tbody { display: block; }
  table.stack tr.thead { display: none; }
  table.stack tr { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 6px 12px; margin-bottom: 10px; background: var(--panel); }
  table.stack tr.click:active { background: var(--gold-soft); }
  table.stack td { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: start; border: 0; border-bottom: 1px dashed var(--line);
    padding: 8px 0; text-align: left !important; max-width: none !important; overflow-wrap: anywhere; }
  table.stack td:last-child { border-bottom: 0; }
  table.stack td::before { content: attr(data-label); font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: none; padding-top: 1px; }
  table.stack td:not([data-label])::before { content: none; } table.stack td:not([data-label]) { grid-template-columns: 1fr; }
  table.stack tr.full { padding: 0; border: 0; background: transparent; } table.stack tr.full td { grid-template-columns: 1fr; border: 0; }
  table.stack td.num { font-weight: 800; }
  table.stack tr.click:hover td { background: transparent; }
  .table-wrap { overflow: visible; }
  .card > .table-wrap, .card.table-wrap { margin: 0; }
  .card.table-wrap { padding: 12px; background: transparent; border: 0; box-shadow: none; }
}
.layout.mini .brandbox { background: transparent; padding: 4px; } .layout.mini .brandbox .logo { width: 48px; height: 48px; }
@media (max-width: 960px) { .layout.mini .brandbox { background: #fff; } .layout.mini .brandbox .logo { width: 40px; height: 40px; } }

/* ---------- perbaikan HP: menu bisa digeser, teks panjang turun ke bawah ---------- */
main { overflow-x: clip; }                 /* tidak ada yang bisa membuat halaman melebar ke samping */
@media (max-width: 960px) {
  .side { height: 100vh; height: 100dvh; max-height: 100dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
  .side .bottom { padding-bottom: 6px; }
  table.stack td > * { min-width: 0; max-width: 100%; }
  table.stack .pill, .rbox .pill, .chead .pill { white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
  table.stack .pill { display: inline-block; border-radius: 10px; padding: 3px 10px; text-align: left; }
  table.stack .pill::before { display: inline-block; margin-right: 6px; vertical-align: 2px; }
  .pill { max-width: 100%; }
  code { overflow-wrap: anywhere; }
}
@media (max-width: 960px) { table.stack td > * { justify-self: start; } table.stack td > .prog { justify-self: stretch; } }
.stw { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.stket { font-size: 11.5px; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; max-width: 340px; }

/* ---------- tanpa bayangan biru saat diketuk (Chrome Android / Safari) ---------- */
html { -webkit-tap-highlight-color: transparent; }
* { -webkit-tap-highlight-color: transparent; }
a, button, label, summary, select, .chip, .qchip, .lb, .nextitem, tr.click, .tip, .guide-h { -webkit-touch-callout: none; touch-action: manipulation; }
button:focus, a:focus, summary:focus, .tip:focus { outline: none; }
button:focus-visible, a:focus-visible, summary:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* ganti dengan efek tekan yang halus */
.hbtn:active { transform: scale(.92); background: rgba(255,255,255,.18); }
.side a.nav:active, .side .bottom button:active { background: rgba(255,255,255,.1); }
.sclose:active { transform: translateY(-50%) scale(.9); }
@media (max-width: 960px) {
  .side { will-change: transform; backface-visibility: hidden; }
  .layout:not(.open) .side { visibility: hidden; transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s linear .28s; }
  .layout.open .side { visibility: visible; transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s; }
}
.seg { display: inline-flex; background: var(--panel); border: 1.5px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; box-shadow: none; padding: 7px 12px; border-radius: 9px; font-weight: 700; color: var(--muted); }
.seg button:hover { transform: none; box-shadow: none; color: var(--text); }
.seg button.on { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .seg button.on { background: var(--gold); color: var(--navy); }
.pills { display: flex; flex-wrap: wrap; gap: 4px; }
.pill.jml { margin-top: 4px; }
@media (max-width: 960px) { .topbar .seg { flex: 1 1 100%; } .topbar .seg button { flex: 1; justify-content: center; } }
.leadlink { color: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- panel judul kolom sheet di editor template ---------- */
.kolomsheet { position: sticky; top: -24px; z-index: 3; background: linear-gradient(135deg, var(--gold-soft), var(--panel)); border: 1.5px solid color-mix(in srgb, var(--gold) 45%, transparent);
  border-radius: 14px; padding: 12px 14px; margin: 6px 0 14px; box-shadow: var(--shadow); max-height: 46vh; overflow: auto; }
.kolomsheet:empty { display: none; }
.kshead { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.kchip { font-size: 12.5px; padding: 4px 11px; }
.kchip.known { border-color: color-mix(in srgb, var(--green) 55%, transparent); background: var(--green-soft); }
.kchip.known::before { content: "●"; color: var(--green); margin-right: 5px; font-size: 9px; vertical-align: 2px; }
.kchip:active { transform: scale(.95); }
@media (max-width: 960px) { .kolomsheet { top: -18px; max-height: 40vh; } }

/* ---------- blok kategori kampanye (KBM, SCM, LPM, ...) ---------- */
.grp-title { font-weight: 800; font-size: 15px; margin: 22px 2px 10px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.card.fam { padding: 0; overflow: hidden; border-width: 1.5px; }
.famhead { display: flex; gap: 14px; align-items: center; padding: 16px 20px; background: linear-gradient(120deg, var(--navy), var(--navy3)); color: #fff; }
.famhead .small.muted { color: #b9c6e3; }
.famico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: rgba(255,255,255,.1); flex: none; }
.famtitle { font-size: 20px; font-weight: 800; letter-spacing: -.3px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.famtitle span { font-size: 14px; font-weight: 600; color: var(--gold2); }
.famsec { padding: 14px 20px 16px; border-top: 1px solid var(--line); }
.famsec:first-of-type { border-top: 0; }
.famlbl { font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 4px; }
.tplcard { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; background: var(--bg2); position: relative; }
.tplcard:last-child { margin-bottom: 0; }
.tplcard.off { opacity: .7; }
.tplcard .chead { margin-bottom: 10px; }
.tplcard + .tplcard::before { content: ""; position: absolute; left: 30px; top: -11px; height: 10px; border-left: 2px dashed var(--line); }
@media (max-width: 960px) { .famhead { padding: 14px 16px; } .famsec { padding: 12px 14px 14px; } .famtitle { font-size: 18px; } .tplcard { padding: 12px; } }
.modal.shake { animation: shake .35s ease; } @keyframes shake { 0%,100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.famact { display: flex; gap: 8px; flex-wrap: wrap; }
.famact button { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.famact button.danger { color: #ffb4ab; border-color: rgba(255,138,125,.45); }
details.hiddenlist { margin-top: 10px; } details.hiddenlist summary, details.hiddenfam summary { cursor: pointer; color: var(--brand); font-weight: 700; padding: 4px 0; }
details.hiddenlist[open] summary { margin-bottom: 10px; }
details.hiddenfam { border-style: dashed; }
@media (max-width: 960px) { .famhead { flex-wrap: wrap; } .famact { width: 100%; } .famact button { flex: 1; justify-content: center; } }
.btn.disabled { pointer-events: none; opacity: .4; }
/* ---------- pemilih nomor (beberapa nomor dalam satu domain) ---------- */
.nomorsel { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.08); border: 1px solid rgba(226,189,63,.55); border-radius: 12px; padding: 0 4px 0 10px; height: 42px; }
.nomorsel select { background: transparent; border: 0; color: #fff; font-weight: 800; padding: 6px 4px; max-width: 220px; box-shadow: none; }
.nomorsel select option { color: var(--text); background: var(--panel); }
@media (max-width: 960px) { .nomorsel { height: 38px; padding-left: 8px; } .nomorsel select { max-width: 120px; font-size: 13px; } .header:has(.nomorsel) .hbrand { display: none; } .nomorsel { flex: 1; } }
