/* =========================================================
   DASHBOARD ADMIN — memakai token warna dari style.css
   ========================================================= */
:root {
  --sb-w: 264px;
  --c-app: #4f46e5;   /* seri grafik: Aplikasi */
  --c-tech: #ea580c;  /* seri grafik: Jasa Teknis */
  --good: #16a34a; --warn: #d97706; --bad: #dc2626; --info: #0284c7;
}
[data-theme="dark"] { --c-app: #818cf8; --c-tech: #ea580c; --good: #4ade80; --warn: #fbbf24; --bad: #f87171; --info: #38bdf8; }
.admin-body { background: var(--bg); min-height: 100vh; }
.admin-body .reveal { opacity: 1; transform: none; }
.mt { margin-top: 16px; }
.nowrap { white-space: nowrap; }
.danger-text { color: var(--danger) !important; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.logo-mark.has-img { background: var(--surface); padding: 3px; box-shadow: 0 0 0 1px var(--border); }
.logo-mark.has-img img { width: 100%; height: 100%; object-fit: contain; border-radius: 7px; }

/* ---------------- Login ---------------- */
.login { min-height: 100vh; display: grid; }
@media (min-width: 960px) { .login { grid-template-columns: 1.1fr 1fr; } }
.login-art {
  position: relative; overflow: hidden; display: none; color: #fff; padding: 48px;
  background: radial-gradient(600px 400px at 80% 10%, rgba(124,58,237,.55), transparent 60%), radial-gradient(500px 400px at 10% 90%, rgba(6,182,212,.35), transparent 60%), #0b0f1a;
}
@media (min-width: 960px) { .login-art { display: flex; align-items: flex-end; } }
.la-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 40px 40px; mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%); -webkit-mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%); }
.la-card { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(12px); animation: float 6s ease-in-out infinite; }
.la-card span { font-size: 22px; }
.la-card small { display: block; opacity: .7; font-size: .75rem; }
.la-card.c1 { top: 14%; left: 12%; } .la-card.c2 { top: 30%; right: 12%; animation-delay: -2s; } .la-card.c3 { top: 48%; left: 26%; animation-delay: -4s; }
.la-copy { position: relative; max-width: 420px; }
.la-copy b { font-size: 2.2rem; line-height: 1.15; letter-spacing: -.02em; display: block; margin-bottom: 12px; }
.la-copy p { opacity: .75; }
.login-panel { display: grid; place-items: center; padding: 28px 20px; }
.login-card { width: 100%; max-width: 380px; display: grid; gap: 14px; }
.lc-logo { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin-bottom: 12px; }
.login-card h1 { font-size: 1.8rem; margin: 0; }
.login-card .pin-input { margin: 0; }
.back-link { color: var(--muted); font-size: .88rem; text-align: center; }
.back-link:hover { color: var(--primary); }
.mode-chip { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: .78rem; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot.ok { background: var(--good); box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 20%, transparent); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 20%, transparent); }

/* ---------------- Shell ---------------- */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sb-w); z-index: 60; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--border); transform: translateX(-100%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
.sb-overlay { position: fixed; inset: 0; z-index: 55; background: rgba(2,6,23,.45); opacity: 0; pointer-events: none; transition: opacity .25s; }
.sb-overlay.open { opacity: 1; pointer-events: auto; }
@media (min-width: 1024px) {
  .sidebar { transform: none; }
  .sb-overlay, .sb-close, .tb-menu { display: none !important; }
  .main { margin-left: var(--sb-w); }
}
.sb-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 12px; }
.sb-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sb-brand b { display: block; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.sb-brand small { display: block; font-size: .72rem; color: var(--muted); }
.sb-nav { flex: 1; overflow-y: auto; padding: 6px 12px 16px; }
.sb-group { margin-top: 14px; }
.sb-group > small { display: block; padding: 0 12px 6px; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sb-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 11px; color: var(--text-2); font-weight: 600; font-size: .92rem; transition: background .15s, color .15s; position: relative; }
.sb-link svg { flex: none; opacity: .8; }
.sb-link:hover { background: var(--surface-2); color: var(--text); }
.sb-link.active { background: var(--primary-soft); color: var(--primary); }
.sb-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.sb-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; font-style: normal; font-size: .72rem; font-weight: 800; background: var(--danger); color: #fff; }
.sb-foot { padding: 12px 16px 18px; border-top: 1px solid var(--border); }
.sb-mode { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.sb-mode b { display: block; font-size: .85rem; }
.sb-mode small { font-size: .72rem; color: var(--muted); }

.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 12px 20px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
}
.tb-title { min-width: 0; flex: 1; }
.tb-title h1 { font-size: 1.25rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-actions { display: flex; align-items: center; gap: 8px; }
@media (max-width: 640px) { .tb-site span, .tb-title p { display: none; } }
.tb-user { position: relative; }
.tb-avatar { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; background: var(--grad); color: #fff; font-weight: 800; }
.tb-menu-pop { position: absolute; right: 0; top: 48px; width: 220px; padding: 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); display: grid; z-index: 70; }
.tb-menu-pop a, .tb-menu-pop button { display: block; text-align: left; padding: 9px 12px; border-radius: 9px; border: 0; background: none; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--text-2); }
.tb-menu-pop a:hover, .tb-menu-pop button:hover { background: var(--surface-2); }
.tbm-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.tbm-head small { display: block; color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; }

.banner { display: flex; align-items: flex-start; gap: 10px; margin: 16px 20px 0; padding: 12px 16px; border-radius: 14px; font-size: .88rem; color: var(--text-2); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--border)); }
.banner svg { flex: none; margin-top: 2px; color: var(--warn); }
.banner a { color: var(--primary); font-weight: 700; white-space: nowrap; }
.banner.bad { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 30%, var(--border)); }
.banner.bad svg { color: var(--bad); }
.page { padding: 20px; display: grid; gap: 18px; max-width: 1400px; outline: none; }
@media (min-width: 1024px) { .page { padding: 24px 28px 48px; } .banner { margin: 18px 28px 0; } }
.page-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 40px 0; }
.page-loading svg { animation: spin 1s linear infinite; }

/* ---------------- Kartu & grid ---------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px; box-shadow: var(--shadow-sm); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h3 { font-size: 1.05rem; margin: 0; }
.card-head p { margin: 2px 0 0; }
.card h4 { font-size: .95rem; margin: 0 0 10px; }
.grid-2 { display: grid; gap: 18px; }
.grid-3 { display: grid; gap: 18px; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.page-ringkasan .grid-2 { grid-template-columns: 1fr; }
@media (min-width: 1100px) { .page-ringkasan .grid-2 { grid-template-columns: 1.8fr 1fr; } }

.hello { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.hello h2 { font-size: 1.5rem; margin: 0 0 4px; }
.hello p { margin: 0; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }

.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.kpi { position: relative; display: grid; gap: 4px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; overflow: hidden; }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi small { color: var(--muted); font-weight: 600; font-size: .82rem; }
.kpi b { font-size: 1.6rem; letter-spacing: -.02em; line-height: 1.2; }
.kpi em { font-style: normal; font-size: .78rem; color: var(--muted); }
.kpi em.up { color: var(--good); font-weight: 700; } .kpi em.down { color: var(--bad); font-weight: 700; }
.k-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 8px; }
.kpi.k-primary { background: var(--grad); color: #fff; border: 0; }
.kpi.k-primary small, .kpi.k-primary em { color: rgba(255,255,255,.85); }
.kpi.k-primary .k-ic { background: rgba(255,255,255,.18); color: #fff; }
.kpi.k-primary::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.1); }

.progress { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; margin-bottom: 14px; }
.progress i { display: block; height: 100%; background: var(--grad); border-radius: 8px; transition: width .6s; }
.checklist-ui { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.checklist-ui li { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; }
.checklist-ui li span { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; flex: none; }
.checklist-ui li a { font-weight: 600; font-size: .9rem; }
.checklist-ui li a:hover { color: var(--primary); }
.checklist-ui li.ok span { background: var(--good); border-color: var(--good); color: #fff; }
.checklist-ui li.ok a { color: var(--muted); text-decoration: line-through; }
.link-card { display: grid; gap: 4px; transition: transform .2s, border-color .2s; }
.link-card svg { color: var(--primary); margin-bottom: 6px; }
.link-card small { color: var(--muted); }
.link-card:hover { transform: translateY(-2px); border-color: var(--primary); }

/* ---------------- Grafik ---------------- */
.chart-wrap { position: relative; }
.chart-wrap svg { display: block; overflow: visible; }
.g-line { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 4; }
.g-base { stroke: var(--muted); stroke-width: 1; opacity: .5; }
.g-tick { fill: var(--muted); font-size: 11px; font-family: inherit; }
.bar.s-app { fill: var(--c-app); } .bar.s-tech { fill: var(--c-tech); }
.hit { fill: transparent; cursor: crosshair; }
.hit.on { fill: color-mix(in srgb, var(--text) 5%, transparent); }
.chart-tip { position: absolute; top: 4px; width: 190px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: .8rem; pointer-events: none; z-index: 2; }
.chart-tip b { display: block; margin-bottom: 6px; }
.chart-tip div { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.chart-tip div span { margin-left: auto; color: var(--text); font-weight: 700; }
.chart-tip .tot { border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 6px; font-weight: 700; }
.legend { display: flex; gap: 14px; font-size: .8rem; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.sw.s-app, .rank-bar i.s-app { background: var(--c-app); } .sw.s-tech, .rank-bar i.s-tech { background: var(--c-tech); }
.tbl-toggle { margin-top: 10px; font-size: .85rem; }
.tbl-toggle summary { cursor: pointer; color: var(--primary); font-weight: 600; }

/* ---------------- Tabel & pill ---------------- */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th { text-align: left; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl td small { display: block; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.orders-tbl tbody tr { cursor: pointer; transition: background .15s; }
.orders-tbl tbody tr:hover, .orders-tbl tbody tr:focus { background: var(--surface-2); outline: none; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; white-space: nowrap; }
.card:not(.flush) > .table-wrap { margin: 0 -20px -20px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tone-info { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.tone-warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.tone-primary { background: var(--primary-soft); color: var(--primary); }
.tone-good { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.tone-bad { background: color-mix(in srgb, var(--bad) 13%, transparent); color: var(--bad); }
.tone-muted { background: var(--surface-2); color: var(--muted); }
.type-tag { white-space: nowrap; display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .72rem; font-weight: 800; }
.type-tag.t-aplikasi { background: color-mix(in srgb, var(--c-app) 14%, transparent); color: var(--c-app); }
.type-tag.t-teknis { background: color-mix(in srgb, var(--c-tech) 14%, transparent); color: var(--c-tech); }
.empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 40px 20px; }
.empty > span { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); margin-bottom: 4px; }
.empty p { max-width: 420px; margin: 0; }
.empty.wide { grid-column: 1 / -1; }

/* ---------------- Toolbar ---------------- */
.toolbar-x { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.tx-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.search.sm { height: 38px; padding: 0 12px; }
.search.grow { flex: 1; min-width: 200px; }
@media (min-width: 760px) { .search.sm { width: 240px; } .search.grow { width: auto; } }
.sel.sm { height: 38px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: .88rem; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.seg { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; border: 0; background: none; cursor: pointer; font-weight: 700; font-size: .85rem; color: var(--text-2); position: relative; }
.seg span { font-size: .72rem; opacity: .6; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg.active, .seg:has(input:checked) { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.mini-stats { display: flex; gap: 16px; font-size: .88rem; color: var(--muted); }
.mini-stats b { color: var(--text); }

/* ---------------- Drawer ---------------- */
.drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; pointer-events: none; }
.drawer.open { visibility: visible; pointer-events: auto; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(2,6,23,.5); opacity: 0; transition: opacity .25s; }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); overflow-y: auto; background: var(--surface); padding: 26px 22px 0; box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.drawer.open .drawer-panel { transform: none; }
.drawer-panel h3 { padding-right: 44px; }
.drawer-panel > div > *:last-child { margin-bottom: 24px; }
.od-head h3 { font-size: 1.4rem; margin: 8px 0 2px; font-family: ui-monospace, Menlo, monospace; }
.od-head p { margin: 0 0 14px; }
.stepper { display: flex; gap: 4px; margin: 6px 0 18px; }
.stepper span { flex: 1; display: grid; gap: 6px; }
.stepper i { height: 6px; border-radius: 6px; background: var(--surface-2); }
.stepper span.done i { background: var(--grad); }
.stepper small { font-size: .68rem; color: var(--muted); line-height: 1.2; }
.stepper span.cur small { color: var(--text); font-weight: 800; }
.stepper.is-cancel i { background: color-mix(in srgb, var(--bad) 30%, var(--surface-2)); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; margin: 0 0 20px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.kv a { color: var(--primary); font-weight: 600; }
.od-form { display: grid; gap: 12px; padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.od-form h4 { margin: 0; }
.od-form .field input, .od-form .field select, .od-form .field textarea { background: var(--surface); }
.check-row { display: flex; align-items: center; gap: 10px; font-size: .88rem; font-weight: 600; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--primary); }
.timeline { list-style: none; padding: 0 0 0 18px; margin: 0 0 24px; border-left: 2px solid var(--border); display: grid; gap: 14px; }
.timeline li { position: relative; font-size: .88rem; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); }
.timeline small { display: block; color: var(--muted); }
.timeline p { margin: 2px 0 0; color: var(--text-2); }

/* ---------------- Form ---------------- */
.form-grid.one { grid-template-columns: 1fr; }
.settings { display: grid; gap: 18px; }
.save-bar { position: sticky; bottom: 12px; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 18px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); border: 1px solid var(--border); box-shadow: var(--shadow); }
.sticky-actions { position: sticky; bottom: 0; margin: 8px -22px 0; padding: 14px 22px; background: var(--surface); border-top: 1px solid var(--border); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; cursor: pointer; }
.toggle-row b { display: block; font-size: .92rem; }
.toggle-row small { display: block; color: var(--muted); font-size: .8rem; }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; margin: 0; }
.switch i { position: absolute; inset: 0; border-radius: 26px; background: var(--border); transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s cubic-bezier(.3,1.4,.6,1); }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 4px var(--primary-soft); }

.img-field > span { font-weight: 600; font-size: .875rem; }
.img-box { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.img-prev { position: relative; width: 200px; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; border: 1px dashed var(--border); background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 16px 16px; display: grid; place-items: center; color: var(--muted); }
.img-field.square .img-prev { width: 140px; aspect-ratio: 1; }
.img-field.portrait .img-prev { width: 130px; aspect-ratio: 4 / 5; }
.img-prev img { width: 100%; height: 100%; object-fit: contain; }
.img-field.wide .img-prev img, .img-field.portrait .img-prev img { object-fit: cover; }
.img-prev.loading::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--surface) 70%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2.5'%3E%3Cpath d='M21 12a9 9 0 1 1-6.2-8.6'/%3E%3C/svg%3E") center / 28px no-repeat; animation: spin 1s linear infinite; }
.img-acts { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; flex: 1; min-width: 150px; }
.img-acts small { line-height: 1.4; }

/* ---------------- Katalog ---------------- */
.p-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.p-tile { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); transition: box-shadow .2s, transform .2s; }
.p-tile:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.pt-img { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); }
.pt-img img { width: 100%; height: 100%; object-fit: cover; }
.pt-img .type-tag { position: absolute; left: 10px; top: 10px; background: var(--surface); }
.pt-hidden { position: absolute; right: 10px; top: 10px; padding: 2px 8px; border-radius: 6px; font-size: .7rem; font-weight: 800; background: rgba(15,23,42,.8); color: #fff; }
.pt-body { padding: 12px 14px 6px; display: grid; gap: 2px; flex: 1; }
.pt-body b { font-size: .95rem; line-height: 1.3; }
.pt-price { font-weight: 800; color: var(--primary); font-size: .9rem; margin-top: 4px; }
.p-tile.is-tech .pt-price { color: var(--c-tech); }
.pt-acts { display: flex; gap: 6px; padding: 10px 14px 14px; }
.pt-acts .btn { flex: 1; }

.sort-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.sort-list > li, .menu-tree > li { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); transition: opacity .2s, border-color .2s; }
.sort-list > li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.sort-list.secs > li { display: block; padding: 0; }
.sort-list > li.is-off, .menu-tree li.is-off > .mt-row { opacity: .55; }
.sort-list.cards > li { padding: 12px 14px; }
.ord { display: grid; gap: 2px; flex: none; }
.mini { width: 26px; height: 20px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); display: grid; place-items: center; cursor: pointer; padding: 0; }
.mini:hover:not([disabled]) { color: var(--primary); border-color: var(--primary); }
.mini[disabled] { opacity: .3; cursor: default; }
.sl-main { flex: 1; min-width: 0; }
.sl-main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-main small { display: block; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.sl-thumb { width: 56px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--grad); font-size: .8rem; }
.sl-thumb.vis-pos { background: linear-gradient(135deg, #f97316, #db2777); }
.sl-thumb.vis-web { background: linear-gradient(135deg, #7c3aed, #4f46e5); }
.sl-thumb.vis-inventory { background: linear-gradient(135deg, #0891b2, #4f46e5); }
.sl-thumb.vis-mobile { background: linear-gradient(135deg, #ec4899, #7c3aed); }
.sl-thumb.vis-tech { background: linear-gradient(135deg, #f59e0b, #ea580c); }
@media (max-width: 600px) { .sort-list > li, .mt-row { flex-wrap: wrap; } .sl-acts { width: 100%; justify-content: flex-end; } }
.inline-add { display: flex; gap: 8px; margin-bottom: 12px; }
.inline-add input { flex: 1; min-width: 0; padding: .55rem .8rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); outline: 0; }
.inline-add input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }

/* ---------------- Tampilan ---------------- */
.sec-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.sec-texts { padding: 4px 14px 14px 50px; border-top: 1px dashed var(--border); margin-top: 2px; }
.split-preview { display: grid; gap: 18px; }
.sp-main { display: grid; gap: 18px; min-width: 0; }
@media (min-width: 1280px) {
  .split-preview { grid-template-columns: minmax(0, 1fr) 400px; align-items: start; }
  .sp-preview { position: sticky; top: 84px; }
}
.pv-frame { position: relative; height: 620px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); margin-bottom: 8px; }
.pv-frame iframe { width: 250%; height: 250%; border: 0; transform: scale(.4); transform-origin: 0 0; }
@media (max-width: 1279px) { .pv-frame { height: 460px; } .pv-frame iframe { width: 200%; height: 200%; transform: scale(.5); } }
.layout-form { display: grid; gap: 18px; }
.opt-group { display: grid; gap: 8px; }
.opt-group > b { font-size: .9rem; }
.opt-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.opt-card { cursor: pointer; display: grid; gap: 6px; justify-items: center; }
.opt-card input { position: absolute; opacity: 0; }
.opt-card small { font-weight: 600; color: var(--text-2); }
.lo { width: 130px; height: 80px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface-2); display: flex; align-items: center; gap: 8px; padding: 12px; transition: .2s; }
.lo i { display: block; border-radius: 4px; background: color-mix(in srgb, var(--text) 18%, transparent); }
.lo-a { flex: 1.2; height: 44px; } .lo-b { flex: 1; height: 50px; background: var(--primary-soft) !important; }
.lo-center { justify-content: center; } .lo-c { width: 70%; height: 40px; }
.opt-card input:checked + .lo { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { cursor: pointer; display: grid; justify-items: center; gap: 4px; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); transition: .2s; }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--text); transform: scale(1.06); }
.swatch small { font-size: .72rem; color: var(--muted); font-weight: 600; }

/* ---------------- Menu navigasi ---------------- */
.nav-preview { display: flex; align-items: center; gap: 20px; padding: 14px 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); flex-wrap: wrap; }
.np-brand { font-weight: 800; }
.nav-preview > ul { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; margin: 0; padding: 0; font-weight: 600; font-size: .9rem; color: var(--text-2); }
.nav-preview > ul > li { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 6px 0; cursor: default; }
.nav-preview li ul { position: absolute; top: 100%; left: -10px; min-width: 190px; list-style: none; margin: 0; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); display: none; z-index: 5; }
.nav-preview li:hover ul { display: block; }
.nav-preview li ul li { padding: 8px 10px; border-radius: 8px; }
.nav-preview li ul li:hover { background: var(--surface-2); }
.menu-tree { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.menu-tree ul { list-style: none; margin: 0; padding: 0 12px 10px 44px; display: grid; gap: 6px; }
.menu-tree ul li { border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.mt-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.mt-row.sub { padding: 8px 10px; }

/* ---------------- Profil & pembayaran & lokasi ---------------- */
.logo-demo { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.stats-edit { display: grid; gap: 8px; }
.stats-edit .lbl { font-weight: 600; font-size: .875rem; }
.stats-edit input, .bank-edit input, .hour-row input { width: 100%; padding: .6rem .8rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); outline: 0; min-width: 0; }
.stats-edit input:focus, .bank-edit input:focus, .hour-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); background: var(--surface); }
.bank-edit, .hour-row { display: grid; gap: 8px; align-items: center; margin-bottom: 8px; }
.bank-edit { grid-template-columns: 1fr 1.4fr auto; }
.bank-edit input[name=holder] { grid-column: 1 / 3; }
.bank-edit [data-rm] { grid-row: 1 / 3; grid-column: 3; }
.hour-row { grid-template-columns: 1fr 1fr auto; }
@media (min-width: 1200px) { .bank-edit { grid-template-columns: .8fr 1.3fr 1.3fr auto; } .bank-edit input[name=holder] { grid-column: auto; } .bank-edit [data-rm] { grid-row: auto; grid-column: auto; } }
.map-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.map-results { list-style: none; margin: 0 0 10px; padding: 6px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); max-height: 220px; overflow-y: auto; }
.map-results button { width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: none; cursor: pointer; font-size: .85rem; }
.map-results button:hover { background: var(--surface-2); }
.map-results li.muted { padding: 8px 10px; font-size: .85rem; }
.map-box { height: 380px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); position: relative; z-index: 0; }
.map-fallback { height: 100%; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); font-size: .9rem; }

/* ---------------- Database ---------------- */
.db-status { display: flex; gap: 16px; align-items: flex-start; }
.db-status h3 { margin: 0 0 4px; }
.db-status p { margin: 0; }
.db-ic { width: 54px; height: 54px; border-radius: 16px; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.db-status.ok .db-ic { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.db-status.bad .db-ic { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.page-database .db-status.ok:not(:has(h3:first-child)) { }
.btn-stack { display: grid; gap: 8px; }
.btn-stack .btn { justify-content: flex-start; }
.btn-stack small { opacity: .75; font-weight: 500; }
.pros { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: .9rem; color: var(--text-2); }
.pros li.warn { list-style: none; margin-left: -18px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
.steps-guide { margin: 0; padding-left: 22px; display: grid; gap: 14px; font-size: .92rem; }
.steps-guide a { color: var(--primary); font-weight: 700; }
.code-box { position: relative; margin-top: 8px; }
.code-box button { position: absolute; right: 8px; top: 8px; }
.code-box pre { margin: 0; padding: 14px; padding-right: 110px; border-radius: 12px; background: #0f172a; color: #e2e8f0; font-size: .78rem; max-height: 260px; overflow: auto; white-space: pre; }

/* ---------------- Laporan ---------------- */
.rank { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.rank li { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr auto; gap: 12px; align-items: center; font-size: .9rem; }
.rank li b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank li small { display: block; font-size: .78rem; }
.rank-bar { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.rank .num { font-weight: 700; font-variant-numeric: tabular-nums; }
.status-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.status-list div { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 999px; border: 1px solid var(--border); }
#customRange input { padding: 6px 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.print-head { display: none; }

@media print {
  .sidebar, .topbar, .banner, .no-print, .sb-overlay, .toast, .tbl-toggle { display: none !important; }
  .main { margin: 0 !important; }
  .page { padding: 0; }
  .print-head { display: block; margin-bottom: 16px; }
  .card, .kpi { box-shadow: none; break-inside: avoid; }
  .kpi.k-primary { background: none; color: inherit; border: 1px solid #ccc; }
  .kpi.k-primary small, .kpi.k-primary em { color: #555; }
}

.chart-empty { position: absolute; inset: 20% 10% auto 10%; text-align: center; padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--muted); font-size: .88rem; }
.steps-guide > li { min-width: 0; }
.code-box { max-width: 100%; overflow: hidden; }
.code-box pre { max-width: 100%; }
.page > * { min-width: 0; }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 20%, transparent); }
.mode-chip.is-bad { color: var(--bad); font-weight: 600; text-align: center; line-height: 1.4; }
