/* Metric Lite — identitas visual: biru elektrik dengan hitam, putih, dan dark gray.
   Font mengikuti permintaan pemilik: HK Grotesk (isi) + Poppins (judul), di-host lokal. */
@font-face { font-family: "hkgrotesk"; src: url(../fonts/hkgrotesk-light.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "hkgrotesk"; src: url(../fonts/hkgrotesk-regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "hkgrotesk"; src: url(../fonts/hkgrotesk-medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "hkgrotesk"; src: url(../fonts/hkgrotesk-semibold.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "hkgrotesk"; src: url(../fonts/hkgrotesk-bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Poppins"; src: url(../fonts/poppins-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url(../fonts/poppins-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url(../fonts/poppins-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url(../fonts/poppins-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

/* Palet: biru elektrik + hitam, putih, dark gray */
:root {
  --font: "hkgrotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Poppins", "hkgrotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs: 0.8125rem;           /* 13px, sama dengan dasar Kodafi */
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --ink: #0e1116;
  --ink-2: #2b303a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --accent: #1f6bff;
  --accent-hover: #1556dd;
  --accent-soft: #e8f0ff;
  --accent-ink: #0f4fd1;
  --accent-2: #5b93ff;
  --amber: #2b303a;          /* nama lama; kini dark gray */
  --amber-soft: #eef0f3;
  --sky: #5b93ff;
  --sky-soft: #eef4ff;
  --coral: #4b5563;
  --coral-soft: #f1f2f4;
  --plum: #0b3fb3;
  --plum-soft: #e6edfb;
  --ok: #16a34a;
  --ok-bg: #e9f7ee;
  --warn: #b7791f;
  --warn-bg: #fdf5e3;
  --danger: #e5484d;
  --danger-bg: #fdecec;
  --sidebar: #0b0d11;
  --sidebar-2: #15181f;
  --sidebar-ink: #c3c8d2;
  --sidebar-dim: #6b7280;
  --shadow: 0 1px 2px rgba(14, 17, 22, .05), 0 6px 18px rgba(14, 17, 22, .05);
  --radius: 12px;
  --sb-w: 252px;
  --top-h: 60px;
}
[data-theme="dark"] {
  --bg: #0b0d11;
  --surface: #14171d;
  --surface-2: #1a1e26;
  --ink: #e8eaee;
  --ink-2: #c3c8d2;
  --muted: #8b93a1;
  --line: #262b35;
  --line-strong: #343a46;
  --accent-soft: #14254a;
  --accent-ink: #8ab4ff;
  --amber: #c3c8d2; --amber-soft: #232833;
  --sky-soft: #172440;
  --coral: #9ca3af; --coral-soft: #232833;
  --plum: #8ab4ff; --plum-soft: #172440;
  --ok-bg: #11291b; --warn-bg: #30260f; --danger-bg: #341719;
  --sidebar: #050608; --sidebar-2: #0b0d11;
  --shadow: 0 1px 2px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html { font-size: 16px; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--fs); font-weight: 400; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5 { font-family: var(--font-head); font-weight: 500; color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.pad { padding: 12px 14px; margin: 0; }
[hidden] { display: none !important; }

/* ---------- Wordmark ---------- */
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.wordmark img { display: block; border-radius: 10px; }
.wm-txt { font-family: var(--font-head); font-size: 19px; letter-spacing: -.02em; line-height: 1; color: #fff; white-space: nowrap; }
.wm-txt b { font-weight: 600; }
.wm-txt i { font-style: normal; font-weight: 400; color: var(--accent-2); margin-left: 3px; }
.wordmark.dark .wm-txt { color: var(--ink); }
.wordmark.lg .wm-txt { font-size: 26px; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--sb-w) 1fr; min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%); color: var(--sidebar-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow: hidden; z-index: 30; }
.brand { display: flex; align-items: center; justify-content: space-between; height: var(--top-h); padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,.06); flex: none; }
.nav { padding: 6px 12px 18px; display: flex; flex-direction: column; gap: 1px; overflow-y: auto; flex: 1; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.nav-title { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--sidebar-dim); padding: 16px 10px 6px; }
.nav-btn { display: flex; align-items: center; gap: 10px; background: transparent; border: 0; color: var(--sidebar-ink); text-align: left; padding: 6px 8px; border-radius: 9px; cursor: pointer; width: 100%; font-size: 13.5px; position: relative; }
.nav-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.05); color: #9aa3b2; flex: none; transition: background .15s, color .15s; }
.nav-ico .ico { width: 16px; height: 16px; }
.nav-btn:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-btn:hover .nav-ico { color: #fff; }
.nav-btn.active { background: rgba(31,107,255,.16); color: #fff; font-weight: 500; }
.nav-btn.active .nav-ico { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(31,107,255,.45); }
.nav-btn.active::after { content: ""; position: absolute; right: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px 0 0 3px; background: var(--accent); }
.side-foot { padding: 12px 18px; border-top: 1px solid rgba(255,255,255,.06); font-size: 11px; color: var(--sidebar-dim); flex: none; }
.sb-close { background: transparent; border: 0; color: var(--sidebar-ink); cursor: pointer; padding: 6px; }
.sb-scrim { display: none; }

html.sb-kecil .app { grid-template-columns: 76px 1fr; }
html.sb-kecil .nav-txt, html.sb-kecil .wm-txt, html.sb-kecil .side-foot span { display: none; }
html.sb-kecil .nav-title { font-size: 0; padding: 10px 0 4px; border-top: 1px solid rgba(255,255,255,.06); margin: 6px 8px 0; }
html.sb-kecil .nav-btn { justify-content: center; padding: 6px 0; }
html.sb-kecil .brand { justify-content: center; padding: 0; }

.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { display: flex; align-items: center; gap: 6px; height: var(--top-h); padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.crumb { display: flex; flex-direction: column; line-height: 1.2; margin-left: 6px; min-width: 0; }
.crumb span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb strong { font-family: var(--font-head); font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spacer { flex: 1; }
.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); display: inline-grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--accent-soft); color: var(--accent-ink); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); border: 2px solid var(--surface); }
.ico-sun { display: none; } [data-theme="dark"] .ico-sun { display: block; } [data-theme="dark"] .ico-moon { display: none; }
.user-chip { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 12px; margin-left: 4px; }
.user-chip:hover { background: var(--surface-2); }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #1f6bff, #0b3fb3); color: #fff; font-family: var(--font-head); font-weight: 600; overflow: hidden; }
.user-txt { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.user-txt b { font-weight: 600; font-size: 13px; }
.user-txt small { color: var(--muted); font-size: 11.5px; }
.dd { position: relative; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(14,17,22,.14); min-width: 220px; z-index: 50; overflow: hidden; }
.dd-menu.wide { width: min(360px, 92vw); }
.dd-head { padding: 10px 14px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-bottom: 1px solid var(--line); }
.dd-item, .dd-foot { display: flex; gap: 10px; align-items: center; width: 100%; border: 0; background: transparent; padding: 10px 14px; cursor: pointer; text-align: left; }
.dd-item:hover, .dd-foot:hover { background: var(--surface-2); }
.dd-foot { justify-content: center; color: var(--accent); font-weight: 600; border-top: 1px solid var(--line); }
.dd-menu form { margin: 0; }
.notif-row { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.notif-row:last-child { border-bottom: 0; }
.notif-row .nav-ico { background: var(--accent-soft); color: var(--accent-ink); }
.notif-row b { display: block; font-weight: 600; font-size: 12.5px; word-break: break-all; }
.notif-row small { color: var(--muted); }

.filterbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; padding: 8px 24px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.filterbar .flt-mode { min-width: 148px; }
.filterbar .periode-ringkas { font-size: 12px; color: var(--muted); padding: 0 4px 8px; align-self: flex-end; white-space: nowrap; }
.periode-chip { font-size: 12px; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid transparent; border-radius: 999px; padding: 4px 10px; white-space: nowrap; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.periode-chip[role="button"] { cursor: pointer; }
@media (max-width: 900px) {
  .periode-chip { max-width: 46vw; font-size: 11px; padding: 3px 8px; }
  .filterbar .periode-ringkas { flex: 1 1 100%; padding-bottom: 0; }
}
.flt { display: flex; flex-direction: column; gap: 4px; }
.flt label { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.flt input, .flt select, input[type=text], input[type=date], input[type=number], input[type=search], input[type=password], input[type=month], input:not([type]), select, textarea {
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 10px; background: var(--surface); min-height: 36px;
}
.flt input:focus, .flt select:focus, input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.content { padding: 24px 24px 56px; width: 100%; max-width: 1480px; flex: 1; }
.app-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 24px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); background: var(--surface); }

/* ---------- Komponen ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 14px; box-shadow: var(--shadow); min-height: 104px; position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.kpi .lbl { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.kpi .val { font-family: var(--font-head); font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin-top: 8px; line-height: 1.15; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
.kpi.warn::before { background: var(--warn); } .kpi.warn .val { color: var(--warn); }
.kpi.ok::before { background: var(--ok); } .kpi.ok .val { color: var(--ok); }
.kpi.danger::before { background: var(--danger); } .kpi.danger .val { color: var(--danger); }
.kpi.sky::before { background: var(--sky); } .kpi.gray::before { background: var(--amber); } .kpi.slate::before { background: var(--coral); } .kpi.plum::before { background: var(--plum); }
.kpi .kpi-ico { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.kpi.sky .kpi-ico { background: var(--sky-soft); color: var(--sky); } .kpi.gray .kpi-ico { background: var(--amber-soft); color: var(--amber); }
.kpi.slate .kpi-ico { background: var(--coral-soft); color: var(--coral); } .kpi.plum .kpi-ico { background: var(--plum-soft); color: var(--plum); }
.kpi .kpi-ico .ico { width: 20px; height: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; min-width: 0; }
.card h3 { margin: 0 0 12px; font-size: 14.5px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 14px 18px 0; }
.card.flush > .table-wrap { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.table-wrap { overflow: auto; max-height: min(70vh, 760px); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: var(--surface-2); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; z-index: 1; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num { font-family: var(--mono); font-size: 12px; white-space: nowrap; }
td.mono { font-family: var(--mono); font-size: 12px; }
tbody tr:hover td { background: var(--surface-2); }
tr.tot td { font-weight: 700; background: var(--surface-2); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 6px; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.badge.info { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.badge.sky { background: var(--sky-soft); color: var(--sky); border-color: transparent; }
.badge.plum { background: var(--plum-soft); color: var(--plum); border-color: transparent; }
.badge.segera { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; padding: 7px 13px; cursor: pointer; font-weight: 500; text-decoration: none; color: var(--ink); min-height: 36px; }
.btn .ico { width: 16px; height: 16px; }
.btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); color: #fff; }
.btn.danger { color: var(--danger); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.small { padding: 3px 9px; font-size: 12px; min-height: 28px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.banner { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid transparent; }
.banner.err, .banner.danger { background: var(--danger-bg); color: var(--danger); }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner.ok { background: var(--ok-bg); color: var(--ok); }
.om-filters, .ml-filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; margin-bottom: 14px; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 12px; color: var(--muted); flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 9px 14px; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--accent-ink); border-bottom-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid textarea { min-height: 70px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .nav-ico { width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 12px; background: var(--accent-soft); color: var(--accent-ink); }
.empty .nav-ico .ico { width: 24px; height: 24px; }
.empty b { display: block; color: var(--ink); font-family: var(--font-head); font-weight: 500; font-size: 15px; margin-bottom: 4px; }
.soon-card { border: 1px dashed var(--line-strong); background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 10px, var(--surface-2) 10px, var(--surface-2) 20px); }
.matrix td.yes { color: var(--ok); font-weight: 700; text-align: center; }
.matrix td.no { color: var(--muted); text-align: center; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-side { background: radial-gradient(circle at 20% 15%, rgba(31,107,255,.35) 0, transparent 55%), linear-gradient(160deg, #0b0d11, #1d222b); color: #c3c8d2; padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.login-side h2 { color: #fff; font-size: 28px; line-height: 1.25; max-width: 460px; margin: 18px 0 0; }
.login-side p { max-width: 440px; margin: 0; font-size: 14px; }
.login-card { align-self: center; justify-self: center; width: min(400px, 100% - 40px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px; box-shadow: var(--shadow); }
.login-card h1 { font-size: 22px; margin: 10px 0 2px; }
.login-sub { margin: 0 0 14px; color: var(--muted); }
.login-card label { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; font-size: 13px; font-weight: 500; }
.login-card .btn { margin-top: 8px; min-height: 42px; }
.only-mobile-flex { display: none !important; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(11,13,17,.55); z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal-back[hidden] { display: none !important; }
body.modal-open { overflow: hidden; }
.modal { background: var(--surface); width: min(820px, 100%); max-height: 90vh; overflow: auto; border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.modal header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal header h3 { margin: 0; font-size: 15.5px; }
.modal-body { padding: 18px; }
.dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; }
.dl div { display: contents; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.dl .sum { font-weight: 700; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }

/* ---------- Laporan ---------- */
.report-title { margin: 0 0 4px; font-size: 19px; }
.report-sub { color: var(--muted); margin: 0 0 16px; }
.ratio-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
.ledger { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; background: var(--surface); }
.ledger summary { cursor: pointer; padding: 10px 14px; font-weight: 600; background: var(--surface-2); list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.ledger summary::-webkit-details-marker { display: none; }

/* ---------- Dashboard ---------- */
.dash { max-width: 1480px; }
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.dash-kpis .kpi { min-height: 104px; display: flex; flex-direction: column; }
.dash-kpis .kpi .val { font-size: clamp(17px, 1.6vw, 22px); }
.dash-kpis .kpi .sub { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; border-radius: 6px; padding: 1px 7px; }
.delta.up { background: var(--ok-bg); color: var(--ok); }
.delta.down { background: var(--danger-bg); color: var(--danger); }
.delta.flat { background: var(--surface-2); color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 0; }
.dash-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.dash-grid.eq { grid-template-columns: 1fr 1fr; }
.dash-grid.wide-left { grid-template-columns: 2fr 1fr; }
.card.tight { padding: 16px 18px; }
.card .card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card .card-head h3 { margin: 0; }
.card .hint, .hint { margin: 0; font-size: 12px; color: var(--muted); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); }
.seg button.active { background: var(--surface); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(14,17,22,.1); }
.chart-wrap { position: relative; height: 270px; }
.chart-wrap.sm { height: 210px; }
.chart-wrap.tall { height: 340px; }
.sku-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.sku-row:last-child { border-bottom: 0; }
.sku-row .nama { font-weight: 500; font-size: 13px; line-height: 1.35; }
.sku-row .meta { font-size: 11px; color: var(--muted); grid-column: 1; }
.sku-row .num { font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 12px; text-align: right; }
.sku-bar { grid-column: 1 / -1; height: 5px; background: var(--accent-soft); border-radius: 99px; overflow: hidden; }
.sku-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; }
.dash-table th, .dash-table td { white-space: nowrap; }
.dash-table td:first-child, .dash-table th:first-child { white-space: normal; }
.hl-list { display: flex; flex-direction: column; gap: 8px; }
.hl-item { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: 13px; }
button.linkish, .hl-item button.linkish { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-align: left; font: inherit; }
button.linkish:hover { text-decoration: underline; }
.legend-inline { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.legend-inline i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.hero-strip { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-bottom: 16px; }
.hero { background: radial-gradient(circle at 85% 0%, rgba(31,107,255,.55) 0, transparent 50%), linear-gradient(135deg, #15181f, #0b0d11); color: #c3c8d2; border-radius: var(--radius); padding: 20px 22px; position: relative; overflow: hidden; }
.hero h3 { color: #fff; margin: 0 0 4px; font-size: 15px; }
.hero .big { font-family: var(--font-head); font-size: 30px; font-weight: 600; color: #fff; letter-spacing: -.02em; margin: 10px 0 2px; }
.hero .row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 14px; }
.hero .row div { display: flex; flex-direction: column; }
.hero .row b { color: #fff; font-family: var(--font-head); font-weight: 500; font-size: 15px; }
.hero .row span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8b93a1; }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; border: 28px solid rgba(31,107,255,.22); }

.only-mobile { display: none !important; }
@media (max-width: 1200px) {
  .kpis, .ratio-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .dash-grid.three, .dash-grid.eq, .dash-grid.wide-left, .hero-strip { grid-template-columns: 1fr; }
  .chart-wrap { height: 240px; }
}
@media (max-width: 900px) {
  .app, html.sb-kecil .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-100%); transition: transform .2s ease; pointer-events: none; }
  .sidebar.open { transform: none; pointer-events: auto; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  html.sb-kecil .nav-txt, html.sb-kecil .wm-txt { display: inline; }
  .sb-scrim { position: fixed; inset: 0; background: rgba(11,13,17,.5); z-index: 25; }
  .sidebar.open + .sb-scrim { display: block; }
  .only-mobile { display: inline-flex !important; }
  .hide-sm { display: none !important; }
  .user-txt { display: none; }
  .topbar { padding: 0 10px; }
  .filterbar { display: none; padding: 10px 12px; gap: 8px; }
  .filterbar.open { display: flex; }
  .filterbar .flt { flex: 1 1 calc(50% - 8px); min-width: 140px; }
  .filterbar .flt input, .filterbar .flt select { width: 100%; }
  .filterbar #btnRefresh { flex: 1 1 100%; }
  .filterbar .flt:has(#fToko),
  .om-filters .flt:has(#omToko),
  .ps-filter .pf-toko { flex: 1 1 100%; min-width: 0; }
  .toko-cell b, .detail-toko b, .inv-sub b, .msel-btn span, .msel-opt span {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  #fToko, #omToko, #impToko, #psTpBtn { max-width: 100%; }
  .content { padding: 16px 12px 40px; }
  .kpis, .ratio-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dash-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .kpi { padding: 12px; min-height: 92px; }
  .kpi .val, .dash-kpis .kpi .val { font-size: 16px; }
  .kpi .kpi-ico { width: 30px; height: 30px; border-radius: 9px; right: 10px; top: 10px; }
  .kpi .kpi-ico .ico { width: 16px; height: 16px; }
  .card { padding: 14px; }
  .page-head h2 { font-size: 17px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { display: none; }
  .only-mobile-flex { display: inline-flex !important; }
  .modal-back { padding: 10px; align-items: end; }
  .modal { max-height: 88vh; border-radius: 16px 16px 12px 12px; }
  .app-foot { padding: 12px; }
  .hero .big { font-size: 24px; }
}
@media print {
  .sidebar, .topbar, .filterbar, .btn, .pager, .om-filters, .app-foot { display: none !important; }
  .app { display: block; }
  .content { max-width: none; padding: 0; }
  .card, .kpi { box-shadow: none; }
}
.kpi:has(.kpi-ico) .lbl { padding-right: 46px; }
@media (max-width: 900px) { .kpi:has(.kpi-ico) .lbl { padding-right: 34px; font-size: 10.5px; letter-spacing: .04em; } }

/* ---------- Neraca (laporan posisi keuangan) ---------- */
.nr-sum { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.nr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.nr-side { padding: 0; overflow: hidden; }
.nr-side > h3 { margin: 0; padding: 14px 18px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; background: var(--sidebar); color: #fff; display: flex; justify-content: space-between; }
.nr-side > h3 span { color: var(--accent-2); font-family: var(--mono); letter-spacing: 0; font-size: 13px; }
table.nr { font-size: 12.5px; }
table.nr td { border-bottom: 1px solid var(--line); padding: 7px 18px; vertical-align: baseline; }
table.nr td.kode { font-family: var(--mono); font-size: 11.5px; color: var(--muted); width: 74px; white-space: nowrap; }
table.nr td.n { text-align: right; font-family: var(--mono); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.nr td.n.neg { color: var(--danger); }
table.nr tr.grp td { background: var(--surface-2); font-family: var(--font-head); font-weight: 500; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); padding-top: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line-strong); }
table.nr tr.sub td { font-weight: 700; border-top: 1px solid var(--line-strong); border-bottom: 2px solid var(--line-strong); }
table.nr tr.grand td { font-weight: 700; font-size: 13.5px; background: var(--accent); color: #fff; border: 0; padding-top: 11px; padding-bottom: 11px; }
table.nr tr.grand td.n { font-size: 13.5px; color: #fff; }
table.nr tr:hover td { background: inherit; }
table.nr tr.baris:hover td { background: var(--surface-2); }
.nr-note { font-size: 12px; color: var(--muted); padding: 10px 18px 14px; margin: 0; }
@media (max-width: 1100px) { .nr-grid { grid-template-columns: 1fr; } .nr-sum { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { table.nr td { padding: 7px 12px; } table.nr td.kode { width: 58px; } .nr-side > h3 { padding: 12px; } }

/* ---------- Pesanan ---------- */
.ps-filter { margin-bottom: 12px; }
.ps-kpis { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.badge.pill { border-radius: 999px; padding: 3px 10px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 4px; }
td.num.neg { color: var(--danger); }
@media (max-width: 1200px) { .ps-kpis { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 900px) { .ps-kpis { grid-template-columns: 1fr 1fr; } .ps-filter .flt { flex: 1 1 calc(50% - 8px); min-width: 130px; } .ps-filter .flt input, .ps-filter .flt select { width: 100%; } .ps-filter #psGo { flex: 1 1 100%; } }
body[data-page="ml-pesanan"] .filterbar, body[data-page="ml-pesanan"] #btnFilter { display: none !important; }
.ps-kpis .kpi .val { font-size: clamp(16px, 1.35vw, 21px); padding-right: 30px; white-space: nowrap; }
@media (max-width: 900px) { .ps-kpis .kpi:last-child { grid-column: span 2; } .ps-kpis .kpi .val { font-size: 16px; padding-right: 0; } }

/* Toko & platform */
.toko-cell b { font-weight: 600; white-space: nowrap; }
.toko-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.toko-kode { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.plat { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 8px 2px 6px; font-size: 11px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.plat i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.plat-shp { color: #d9441f; background: #fff1ec; border-color: #ffd6c8; }
.plat-tts { color: #111318; background: #eef0f4; border-color: #d9dde5; }
.plat-tts i { background: linear-gradient(135deg, #25f4ee 50%, #fe2c55 50%); }
.plat-tkp { color: #04891a; background: #eaf8ec; border-color: #c6ecca; }
.plat-jak { color: #c4122f; background: #fdecef; border-color: #f7c9d1; }
.plat-laz { color: #1b2a8f; background: #eceffd; border-color: #cdd3f7; }
.plat-lain { color: var(--muted); background: var(--bg); border-color: var(--line); }
[data-theme="dark"] .plat-shp { background: rgba(238,77,45,.14); border-color: rgba(238,77,45,.35); color: #ff8a6b; }
[data-theme="dark"] .plat-tts { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #f2f4f8; }
[data-theme="dark"] .plat-tkp { background: rgba(3,172,14,.14); border-color: rgba(3,172,14,.35); color: #5fd96a; }
[data-theme="dark"] .plat-jak { background: rgba(196,18,47,.16); border-color: rgba(196,18,47,.4); color: #ff7d92; }
.detail-toko { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.detail-toko b { font-size: 15px; font-weight: 600; }

/* ===== Pesanan (struktur Order Masuk) ===== */
.ps { display: flex; flex-direction: column; gap: 16px; }
.ps-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ps-title h2 { margin: 0; font-size: 15px; letter-spacing: .06em; font-weight: 600; }
.ps-bc { display: flex; gap: 6px; font-size: 12.5px; color: var(--muted); }
.ps-bc b { color: var(--ink); font-weight: 500; }
.ps-card { padding: 16px 18px; margin: 0; }
.ps-card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ps-card-h h3 { margin: 0; font-size: 14.5px; }
.ps-card-h:last-child { margin-bottom: 0; }
.ps-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.small { min-height: 32px; padding: 5px 11px; font-size: 12px; }
.btn.small .ico { width: 14px; height: 14px; }
.btn.soft { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.btn.soft:hover { background: #dce7ff; }
.btn.ghost-b { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn.ghost-b:hover { background: var(--accent-soft); }
.btn.danger-o { background: transparent; color: var(--danger); border-color: var(--danger); margin-right: auto; }
.ps-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.mini { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--surface); min-height: 96px; }
.mini.sk { background: var(--surface-2); }
.mini-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.mini-lbl { font-size: 12px; color: var(--muted); }
.mini-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.mini-ico .ico { width: 16px; height: 16px; }
.mini.gray .mini-ico { background: #eceef2; color: #2b303a; }
.mini.sky .mini-ico { background: var(--sky-soft); color: var(--sky); }
.mini.green .mini-ico { background: var(--ok-bg); color: var(--ok); }
.mini-val { font-family: var(--font-head); font-size: clamp(17px, 1.45vw, 21px); font-weight: 600; margin-top: 4px; white-space: nowrap; letter-spacing: -.01em; }
.mini-cap { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.neg { color: var(--danger); }
.pos { color: var(--ok); }
.ps-filter { display: grid; grid-template-columns: minmax(250px, 1.5fr) minmax(190px, 1.2fr) repeat(3, minmax(150px, 1fr)); gap: 14px; align-items: end; }
.pf label { display: block; font-size: 12px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.pf select, .pf input[type=text] { width: 100%; }
.dmy-range { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); overflow: hidden; }
.dmy-range .to { padding: 0 8px; font-size: 11px; color: var(--muted); background: var(--surface-2); align-self: stretch; display: grid; place-items: center; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.dmy { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; }
.dmy input[type=text] { border: 0 !important; box-shadow: none !important; min-height: 36px; padding: 6px 4px 6px 10px; width: 100%; font-variant-numeric: tabular-nums; background: transparent; }
.dmy input[type=date] { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dmy-btn { border: 0; background: transparent; color: var(--muted); padding: 0 8px; cursor: pointer; display: grid; place-items: center; min-height: 36px; }
.dmy-btn .ico { width: 15px; height: 15px; }
.msel { position: relative; }
.msel-btn { width: 100%; min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); padding: 6px 10px; cursor: pointer; color: var(--ink); font: inherit; text-align: left; }
.msel-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msel-btn .ico { width: 14px; height: 14px; color: var(--muted); flex: none; }
.msel-pop { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; width: max(100%, 330px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(14,17,22,.14); }
.msel-list { max-height: 300px; overflow: auto; padding: 6px; }
.msel-opt { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 500; margin: 0 !important; color: var(--ink) !important; }
.msel-opt:hover { background: var(--surface-2); }
.msel-opt span:first-of-type { flex: 1; }
.msel-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 8px; border-top: 1px solid var(--line); }
.ps-filter-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.sw { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; cursor: pointer; user-select: none; }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw-t { width: 32px; height: 18px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .15s; }
.sw-t::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.sw input:checked + .sw-t { background: var(--accent); }
.sw input:checked + .sw-t::after { transform: translateX(14px); }
.ps-tabs { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.ps-tabs button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font: inherit; font-weight: 600; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.ps-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ps-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.ps-len { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.ps-len select { width: auto; min-height: 32px; padding: 4px 26px 4px 8px; }
.ps-tools input[type=search] { width: min(300px, 100%); min-height: 34px; }
.ps-loading { padding: 30px; text-align: center; color: var(--muted); }
.ps-table { border: 1px solid var(--line); border-radius: 10px; }
.ps-table table { font-size: 12.5px; }
.ps-table th { background: var(--surface-2); font-size: 11.5px; text-transform: none; letter-spacing: 0; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.ps-table td { vertical-align: middle; padding-top: 9px; padding-bottom: 9px; }
.ps-table td.num { white-space: nowrap; }
.ps-table .nw { white-space: nowrap; }
.ps-table .c-no { color: var(--muted); }
.ps-table .c-det { display: none; }
.show-detail .ps-table .c-det { display: table-cell; }
.xbtn { width: 18px; height: 18px; border-radius: 4px; border: 0; background: var(--accent); color: #fff; font-weight: 700; line-height: 18px; padding: 0; cursor: pointer; font-size: 13px; }
.xbtn.on { background: var(--danger); }
.dots { border: 1px solid var(--line); background: var(--surface-2); border-radius: 6px; width: 28px; height: 28px; cursor: pointer; font-size: 16px; line-height: 1; color: var(--ink-2); }
.dots:hover { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
tr.child > td { background: var(--surface-2); padding: 10px 16px 12px 44px; }
.child-dl { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; }
.child-dl dt { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.child-dl dd { margin: 0; }
.m-only { display: none; }
.sb { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 600; white-space: nowrap; border-left: 2px solid currentColor; background: var(--accent-soft); color: var(--accent-ink); line-height: 1.5; }
.sb.mono { font-family: var(--mono); font-weight: 500; font-size: 10.5px; }
.sb-soft { background: var(--accent-soft); color: var(--accent-ink); }
.sb-info { background: var(--accent-soft); color: var(--accent); }
.sb-sky { background: var(--sky-soft); color: #2f6fe8; }
.sb-ok { background: var(--ok-bg); color: var(--ok); }
.sb-warn { background: var(--warn-bg); color: var(--warn); }
.sb-danger { background: var(--danger-bg); color: var(--danger); }
.sb-gray { background: #eef0f3; color: #3b414c; border-left-color: #9aa1ad; }
[data-theme="dark"] .sb-gray { background: rgba(255,255,255,.07); color: #c9ced8; }
[data-theme="dark"] .mini.gray .mini-ico { background: rgba(255,255,255,.08); color: #d6dae2; }
.ps-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 14px; font-size: 12.5px; color: var(--ink-2); }
.pg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.pg button, .pg .pg-gap { border: 0; border-left: 1px solid var(--line); background: var(--surface); padding: 6px 11px; font: inherit; font-size: 12px; color: var(--ink-2); cursor: pointer; min-width: 32px; }
.pg button:first-child { border-left: 0; }
.pg button.on { background: var(--accent); color: #fff; }
.pg button:disabled { color: var(--muted); cursor: default; }
.pg .pg-gap { cursor: default; }
.ps-menu { position: fixed; z-index: 120; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(14,17,22,.16); padding: 5px; min-width: 190px; }
.ps-menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 6px; font: inherit; font-size: 12.5px; color: var(--ink); cursor: pointer; }
.ps-menu button:hover { background: var(--accent-soft); color: var(--accent-ink); }
.modal.xl { width: min(1140px, 100%); }
.sku-t td.wrap { white-space: normal; min-width: 220px; }
.sku-t tfoot td { border-top: 2px solid var(--line-strong); }
@media (max-width: 1280px) { .ps-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ps-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .ps-filter { grid-template-columns: 1fr 1fr; }
  .pf-date, .pf-toko { grid-column: 1 / -1; }
  .ps-mini { gap: 10px; }
  .mini { padding: 12px; min-height: 0; }
  .mini-val { font-size: 15.5px; }
  .ps-card { padding: 14px; }
  .ps-title h2 { font-size: 14px; }
  .ps-table .m-hide, .show-detail .ps-table .c-det { display: none; }
  .m-only { display: block; }
  .m-sub { margin-top: 4px; font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
  tr.child > td { padding: 10px 12px; }
  .child-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
  .child-dl > div:has(.toko-cell) { grid-column: 1 / -1; }
  .ps-tools input[type=search] { width: 100%; }
  .ps-pager { flex-direction: column; align-items: flex-start; }
  .pg { max-width: 100%; overflow-x: auto; }
  .msel-pop { width: 100%; }
  .modal.xl { width: 100%; }
}
.ps-table table { font-size: 12px; }
.ps-table th, .ps-table td { padding-left: 7px; padding-right: 7px; }
.ps-table th:first-child, .ps-table td:first-child { padding-left: 12px; }
.ps-table .toko-cell b { font-size: 12px; }
.ps-table .sb.mono { font-size: 10px; padding: 1px 6px; }
.m-sub .plat { font-size: 10.5px; }
@media (max-width: 1500px) { .ps-table .c-no { display: none; } }
/* responsif kolom Pesanan (JS) */
.ps-table .c-det, .show-detail .ps-table .c-det { display: revert; }
.ps-table [data-c].c-off { display: none !important; }
.ps-table .c-no { display: table-cell; }
.ps-table.tanpa-x .c-x { display: none; }
@media (max-width: 1500px) { .ps-table .c-no { display: table-cell; } }
@media (max-width: 900px) { .child-dl > div:has(.toko-cell) { grid-column: 1 / -1; } }
.inv-sub { display: none; margin-top: 5px; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11.5px; }
.inv-sub b { font-weight: 600; }
.ps-table.toko-off .inv-sub { display: flex; }
.child-dl > div[data-cc="inv"], .child-dl > div[data-cc="profit"] { display: none; }

/* KAS-19: Daftar Akun (COA) */
.coa-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.coa-head .ps-tabs { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.coa-head .ps-tabs button { white-space: nowrap; }
.coa-head .ps-tabs .hint { display: inline; font-size: 11px; margin-left: 2px; }
#coaTabel td.mono { white-space: nowrap; }
@media (max-width: 700px) {
  .coa-head { padding: 12px 12px 10px !important; }
  .coa-head input[type=search] { width: 100%; min-width: 0 !important; }
  #coaTabel td .hint { display: none; }
}

/* KAS-22: kerangka loading instan saat pindah menu */
.skel-wrap{display:flex;flex-direction:column;gap:14px;padding:4px 0}
.skel{border-radius:10px;background:linear-gradient(90deg,var(--skel-a,#eceef2) 25%,var(--skel-b,#f6f7f9) 37%,var(--skel-a,#eceef2) 63%);background-size:400% 100%;animation:skel-kilau 1.2s ease-in-out infinite}
[data-theme="dark"] .skel{--skel-a:#1c2028;--skel-b:#262b35}
.skel-h{height:28px;width:38%}
.skel-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}
.skel-card{display:flex;flex-direction:column;gap:8px;padding:14px;border-radius:12px;border:1px solid var(--line,#eceef2)}
.skel-t{height:12px;width:55%}.skel-v{height:22px;width:75%}
.skel-box{height:220px}.skel-row{height:16px}
@keyframes skel-kilau{0%{background-position:100% 50%}100%{background-position:0 50%}}
@media (prefers-reduced-motion:reduce){.skel{animation:none}}

/* KAS-21 / KAS-22: Komplain & Performa Upload (staging uji) */
.peran-terbatas #filterbar { display: none !important; }
/* Akun terkunci 1 toko (Veri / TRIVELA): tampilkan filter periode, sembunyikan entitas. */
body.peran-terbatas.toko-terkunci #filterbar { display: flex !important; }
body.toko-terkunci #fltEntitas { display: none !important; }
body.halaman-ops.toko-terkunci #filterbar,
body[data-page="ml-pesanan"].toko-terkunci #filterbar { display: none !important; }
@media (max-width: 900px) {
  body.peran-terbatas.toko-terkunci #filterbar { display: none !important; }
  body.peran-terbatas.toko-terkunci #filterbar.open { display: flex !important; }
  body.halaman-ops.toko-terkunci #filterbar,
  body.halaman-ops.toko-terkunci #filterbar.open,
  body[data-page="ml-pesanan"].toko-terkunci #filterbar,
  body[data-page="ml-pesanan"].toko-terkunci #filterbar.open { display: none !important; }
}
.ops-grid2 { display: grid; grid-template-columns: 1.4fr .8fr; gap: 16px; }
@media (max-width: 900px) { .ops-grid2 { grid-template-columns: 1fr; } }
.ops-aktual { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13px; }
.ops-aktual h4 { margin: 0 0 8px; font-size: 13px; }
.ops-aktual dl { display: grid; grid-template-columns: 120px 1fr; gap: 4px 10px; margin: 0; }
.ops-aktual dt { color: var(--muted); }
.ops-aktual dd { margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.form-grid label, .ops-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.form-grid label.full, .ops-form label.full { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea,
.ops-form input, .ops-form select, .ops-form textarea { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.ops-form label.ops-field-url { font-size: 13px; color: var(--ink); }
.ops-form label.ops-field-url input,
.ops-form label.ops-field-url textarea { font-size: 14.5px; padding: 10px 12px; border-color: var(--line-strong, var(--line)); }
a.ops-url-produk { color: var(--accent-ink, var(--accent)); word-break: break-all; text-decoration: none; }
a.ops-url-produk:hover { text-decoration: underline; }
.ops-url-produk-wrap { margin: 8px 0 12px; }
.ops-url-produk-wrap .hint { display: block; margin-bottom: 2px; }
.ps-pager-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.harga-preview { font-size: 12.5px; color: var(--accent-ink); background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; margin-top: 4px; }
.badge.diskon-belum, .badge.warn-diskon { background: var(--warn-bg); color: var(--warn); }
.skor-bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; min-width: 64px; }
.skor-bar > i { display: block; height: 100%; background: var(--accent); }
.skor-bar.ok > i { background: var(--ok); }
.skor-bar.warn > i { background: var(--warn); }
.skor-bar.danger > i { background: var(--danger); }
.saran-list { margin: 8px 0 0; padding-left: 18px; font-size: 13px; }
.saran-list li { margin: 0 0 4px; }
.draf-budiman { white-space: pre-wrap; font-size: 13px; background: var(--surface-2); border-radius: 10px; padding: 12px 14px; border: 1px solid var(--line); }
.kpis:has(.kpi:nth-child(5)) { grid-template-columns: repeat(3, minmax(0,1fr)); }
.kpis:has(.kpi:nth-child(5)) .kpi .val { padding-right: 44px; }
th.col-diskon, td.col-diskon { min-width: 168px; white-space: nowrap; vertical-align: top; }
.ops-cari-besar { padding: 16px 16px 8px; }
.ops-cari-besar > label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ops-cari-bar { display: flex; gap: 8px; align-items: stretch; }
.ops-cari-bar input[type="search"] { flex: 1; font-size: 15px; padding: 10px 14px; border: 1px solid var(--line-strong, var(--line)); border-radius: 10px; background: var(--surface); color: var(--ink); min-height: 42px; }
.ops-cari-bar input[type="search"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.status-pills { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 16px 12px; }
.status-pill { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.status-pill:hover { border-color: var(--accent); color: var(--accent-ink); }
.status-pill.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.status-pill .pill-n { background: var(--surface-2); border-radius: 999px; padding: 0 6px; font-variant-numeric: tabular-nums; font-size: 11px; min-width: 18px; text-align: center; }
.status-pill.active .pill-n { background: var(--accent); color: #fff; }
.aksi-cepat { display: flex; flex-wrap: wrap; gap: 4px; min-width: 200px; }
.btn.tiny { font-size: 11px; padding: 3px 7px; border-radius: 6px; line-height: 1.3; }
td.col-aksi { vertical-align: top; }
.ops-filter-bar .flt label { font-size: 11px; }
.ops-komplain .kpis { margin-bottom: 12px; }
.ops-komplain .kpi { min-height: 82px; padding: 12px 12px 10px; }
.ops-komplain .kpi .val { font-size: 20px; margin-top: 4px; }
.ops-komplain .ops-cari-besar { padding: 12px 16px 4px; }
.ops-komplain .status-pills { padding: 2px 16px 8px; }
.ops-komplain .page-head { margin-bottom: 10px; }
body.halaman-ops #filterbar { display: none !important; }
.ops-komplain .kpis:has(.kpi:nth-child(5)) { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.ops-komplain .kpi { min-height: 74px; padding: 10px 10px 8px; }
.ops-komplain .kpi .val { font-size: 17px; margin-top: 2px; padding-right: 30px; }
.ops-komplain .kpi .sub { font-size: 11px; margin-top: 2px; }
.ops-komplain .kpi .kpi-ico { width: 28px; height: 28px; top: 10px; right: 10px; }
.ops-komplain .page-head h2 { margin-bottom: 0; }
.ops-komplain .ops-cari-bar input[type="search"] { min-height: 38px; font-size: 14px; padding: 8px 12px; }
.aksi-cepat { display: grid; grid-template-columns: repeat(3, max-content); gap: 3px; min-width: 0; }
.btn.tiny { font-size: 10.5px; padding: 3px 6px; }
.ops-pembanding { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
.ops-pembanding-judul { font-size: 12.5px; color: var(--ink-2); margin: 0 0 10px; }
.ops-pembanding-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
@media (max-width: 900px) { .ops-pembanding-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.ops-pembanding-item { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.ops-pembanding-item .lbl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ops-pembanding-item .val { font-family: var(--font-head); font-size: 16px; font-weight: 600; margin-top: 2px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.ops-pembanding-item .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ops-pembanding .delta { font-size: 11px; font-weight: 700; }
.ops-pembanding .delta.up { color: var(--ok, #128a4c); }
.ops-pembanding .delta.down { color: var(--danger, #c0392b); }
.ops-pembanding .delta.flat { color: var(--muted); }

.ops-wm-box { background: var(--surface, #fff); border: 1px solid var(--line, #e6e8ee); border-radius: 10px; padding: 10px 12px; }
.ops-wm-box .ops-wm-warn, .ops-wm-box .banner { margin: 0 0 8px; }
.ops-wm-actions .btn.primary, .ops-wm-actions .btn.danger { font-weight: 650; }


/* KAS-21 t153u/t154u: rekonsiliasi refund + chat internal */
.ops-rekon { background: var(--surface-2, #f4f6fa); border: 1px solid var(--line, #e6e8ee); border-radius: 12px; padding: 12px 14px; margin-top: 10px; font-size: 13px; }
.ops-rekon h4 { margin: 0 0 8px; font-size: 13px; }
.ops-rekon-row { margin: 0 0 8px; }
.ops-rekon-row .lbl { font-weight: 650; display: inline-block; min-width: 150px; }
.ops-rekon-verif { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line, #e6e8ee); }
.ml-chat-fab { position: fixed; right: 20px; bottom: 20px; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent, #1f6feb); color: #fff; box-shadow: 0 8px 24px rgba(31,111,235,.35); cursor: pointer; z-index: 70; display: grid; place-items: center; }
.ml-chat-fab .ico { width: 24px; height: 24px; stroke: currentColor; fill: none; }
.ml-chat-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #e11d48; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.ml-chat-panel { position: fixed; right: 20px; bottom: 86px; width: min(380px, calc(100vw - 24px)); height: min(520px, calc(100vh - 120px)); background: var(--surface, #fff); border: 1px solid var(--line, #e6e8ee); border-radius: 16px; box-shadow: 0 18px 48px rgba(14,17,22,.2); z-index: 71; display: flex; flex-direction: column; overflow: hidden; }
.ml-chat-panel[hidden] { display: none !important; }
.ml-chat-panel header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line, #e6e8ee); background: var(--surface, #fff); }
.ml-chat-panel header strong { font-size: 13px; }
.ml-chat-toolbar { padding: 8px 12px 0; }
.ml-chat-toolbar select { width: 100%; }
.ml-chat-tautan-bar { margin: 8px 12px 0; padding: 0; background: transparent; font-size: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.ml-chat-stream { flex: 1; overflow: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.ml-chat-bubble { max-width: 94%; padding: 10px 12px 11px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; }
.ml-chat-bubble.me { align-self: flex-end; background: #1f6feb; color: #fff; }
.ml-chat-bubble.them { align-self: flex-start; background: var(--surface-2, #f4f6fa); }
.ml-chat-bubble.me .hint, .ml-chat-bubble.me .ml-chat-who, .ml-chat-bubble.me .ml-chat-waktu { color: rgba(255,255,255,.82); }
.ml-chat-who { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 11px; font-weight: 600; letter-spacing: .01em; margin-bottom: 6px; color: var(--muted, #5c6570); }
.ml-chat-waktu { font-weight: 500; opacity: .8; white-space: nowrap; }
.ml-chat-isi { white-space: pre-line; word-break: break-word; line-height: 1.55; }
.ml-chat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ml-chat-chip { display: inline-flex; align-items: center; max-width: 100%; padding: 4px 9px; border-radius: 999px; background: rgba(15,23,42,.06); font-size: 11px; line-height: 1.35; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-chat-bubble.me .ml-chat-chip { background: rgba(255,255,255,.18); color: inherit; }
.ml-chat-wait { margin: 8px 12px 0; padding: 8px 10px; border-radius: 10px; background: #fff7ed; color: #9a3412; font-size: 12px; line-height: 1.4; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ml-chat-wait[hidden] { display: none !important; }
.ml-chat-wait .btn { flex: 0 0 auto; }
.ml-chat-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line, #e6e8ee); align-items: end; }
.ml-chat-form textarea { width: 100%; resize: none; font: inherit; border: 1px solid var(--line, #e6e8ee); border-radius: 10px; padding: 8px; }


/* KAS-24: perluasan pop-up chat internal */
.ml-chat-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 12px 0; }
.ml-chat-quick .btn { font-size: 11px; }
.ml-chat-toolbar select option { white-space: normal; }
tr.ops-row-peringatan td:first-child { box-shadow: inset 3px 0 0 #e11d48; }
.btn.ingat-chat { white-space: nowrap; }
.ml-chat-panel header .hint { font-size: 11px; }


/* KAS-25 anti-curang upload */
.ops-anticurang-banner { margin: 8px 0 12px; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45; }
.ops-anticurang-banner b { display: block; margin-bottom: 4px; }
.ops-review-ac td.ac-alasan { font-size: 12px; max-width: 280px; white-space: normal; }

/* KAS-26: Pratinjau GajiHub */
.gh-banner { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; flex-wrap:wrap; margin:0 0 16px; padding:12px 16px; border-radius:12px; border:1px solid var(--line); background: var(--surface-2); }
.gh-banner.warn { border-color: var(--warn); background: var(--warn-bg); }
.gh-banner.danger { border-color: var(--danger); background: var(--danger-bg); }
.gh-tabs { display:flex; gap:8px; flex-wrap:wrap; margin:0 0 16px; }
.gh-tabs button { border:1px solid var(--line); background: var(--surface); border-radius:999px; padding:6px 14px; font: inherit; font-size:13px; font-weight:600; cursor:pointer; color: var(--ink-2); }
.gh-tabs button.active { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.gh-profil-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap:12px; margin:0 0 14px; }
.gh-kartu { background: var(--surface); border:1px solid var(--line); border-radius: var(--radius); padding:12px 14px; box-shadow: var(--shadow); min-width:0; display:flex; flex-direction:column; gap:8px; }
.gh-kartu.kodafi { opacity:.72; border-style:dashed; }
.gh-kartu-kepala { display:flex; gap:12px; align-items:flex-start; }
.gh-foto, .gh-inisial { width:56px; height:56px; border-radius:14px; object-fit:cover; flex:0 0 64px; background: linear-gradient(135deg, #1f6bff, #0b3fb3); color:#fff; display:grid; place-items:center; font-family: var(--font-head); font-weight:600; font-size:20px; }
.gh-kartu h3 { margin:0; font-size:15px; line-height:1.25; }
.gh-kartu .gh-meta { margin:2px 0 0; font-size:12px; color: var(--muted); }
.gh-dl { display:grid; grid-template-columns: 92px 1fr; gap:4px 8px; font-size:12.5px; margin:0; }
.gh-dl dt { color: var(--muted); }
.gh-dl dd { margin:0; word-break:break-word; }
.gh-porsi { display:flex; flex-wrap:wrap; gap:6px; }
.gh-catatan { font-size:12px; color: var(--muted); margin:0; }
.gh-token-form { display:grid; grid-template-columns: 1fr auto auto; gap:10px; align-items:end; }
.gh-token-form input { width:100%; }
@media (max-width: 800px) {
  .gh-token-form { grid-template-columns: 1fr; }
}

.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.avatar.avatar-lg { width: 52px; height: 52px; border-radius: 14px; font-size: 18px; flex: 0 0 52px; overflow: hidden; }
.gh-profil-saya { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.gh-profil-judul { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 2px; }
.gh-profil-saya b { display: block; font-size: 14px; line-height: 1.3; }
.gh-nik { margin-top: 6px; font-size: 12.5px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.gh-slip-kosong { border-color: var(--warn); background: var(--warn-bg); }
.gh-slip-kosong h3 { margin: 0 0 8px; }

/* ---------- Sambutan login (clean, minimal, motion halus) ---------- */
.sambutan-back {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: rgba(11, 13, 17, .28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: sambutan-fade .4s ease both;
}
.sambutan-back.is-keluar { animation: sambutan-fade-out .25s ease both; }
.sambutan-back.is-keluar .sambutan-kartu { animation: sambutan-out .25s ease both; }
.sambutan-kartu {
  position: relative;
  width: min(470px, 100%);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 28px 22px;
  box-shadow: 0 18px 50px rgba(11, 13, 17, .18), 0 2px 8px rgba(11, 13, 17, .06);
  text-align: center;
  overflow: hidden;
  animation: sambutan-in .7s cubic-bezier(.22, 1.2, .36, 1) both;
}
.sambutan-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.sambutan-x:hover { background: var(--surface-2); color: var(--ink); }
.sambutan-lencana {
  width: 72px;
  height: 72px;
  margin: 4px auto 14px;
  border-radius: 22px;
  padding: 3px;
  background: linear-gradient(120deg, #1f6bff, #8ab4ff, #1f6bff, #5b93ff);
  background-size: 220% 220%;
  animation: sambutan-shimmer 3.2s linear infinite;
  box-shadow: 0 8px 20px rgba(31, 107, 255, .28);
}
.sambutan-avatar {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 19px;
  overflow: hidden;
  background: linear-gradient(135deg, #1f6bff, #0b3fb3);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 26px;
}
.sambutan-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sambutan-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.sambutan-kartu h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -.02em;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sambutan-sapaan {
  font-weight: 500;
  font-size: 13.5px;
  color: var(--muted);
  letter-spacing: 0;
  line-height: 1.45;
}
.sambutan-nama {
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.sambutan-pesan {
  margin: 0 0 20px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.6;
  white-space: pre-line;
}
.sambutan-pesan:has(+ .sambutan-sumber) { margin-bottom: 8px; }
.sambutan-sumber {
  margin: 0 0 20px;
  font-size: 11.5px;
  font-style: italic;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .02em;
  line-height: 1.4;
}
.sambutan-lanjut { min-width: 148px; min-height: 40px; border-radius: 10px; }
.sambutan-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--line);
}
.sambutan-progress > span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  background: var(--accent);
  transform: scaleX(1);
}
.sambutan-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  opacity: .45;
  top: 22px;
  left: 28px;
  animation: sambutan-spark 2.8s ease-in-out infinite;
  pointer-events: none;
}
.sambutan-spark.s2 { top: 36px; right: 36px; left: auto; width: 4px; height: 4px; animation-delay: .6s; opacity: .35; }
.sambutan-spark.s3 { top: 88px; left: 42px; width: 5px; height: 5px; animation-delay: 1.1s; opacity: .3; }
@keyframes sambutan-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes sambutan-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes sambutan-in {
  from { opacity: 0; transform: translateY(22px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes sambutan-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(8px) scale(.98); }
}
@keyframes sambutan-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes sambutan-spark {
  0%, 100% { transform: translateY(0) scale(1); opacity: .2; }
  50% { transform: translateY(-8px) scale(1.25); opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
  .sambutan-back,
  .sambutan-back.is-keluar,
  .sambutan-kartu,
  .sambutan-back.is-keluar .sambutan-kartu,
  .sambutan-lencana,
  .sambutan-spark {
    animation: none !important;
  }
  .sambutan-progress > span { transition: none !important; }
}

/* KAS-3 Sinkron Pesanan — ringkas */
body[data-page="sinkron-pesanan"] .filterbar, body[data-page="sinkron-pesanan"] #btnFilter, body[data-page="sinkron-pesanan"] #periodeChip { display: none !important; }
.tabs .sk-n { margin-left: 6px; font-size: 11px; color: var(--muted); font-weight: 600; }
.sk-kpis { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.sk-kpi { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 132px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font: inherit; color: var(--ink-2); text-align: left; }
.sk-kpi span { font-size: 12px; color: var(--muted); font-weight: 600; }
.sk-kpi b { font-size: 18px; color: var(--ink); }
.sk-kpi.static { cursor: default; }
.sk-kpi.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.sk-kpi.ok b { color: var(--ok); } .sk-kpi.warn b { color: var(--warn); } .sk-kpi.danger b { color: var(--danger); } .sk-kpi.info b { color: var(--accent-ink); }
.sk-bulk { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.sk-bulk span { font-weight: 600; margin-right: 6px; }
.sk-cat { max-width: 220px; white-space: normal; }
.linklike { border: 0; background: none; padding: 0; color: var(--accent-ink); cursor: pointer; font: inherit; text-decoration: underline dotted; }
.sk-form { display: flex; flex-direction: column; gap: 14px; }
.sk-form .flt span { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.sk-form textarea { width: 100%; }
.sk-dl { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.sk-dl th { text-align: left; color: var(--muted); font-weight: 600; width: 38%; padding: 4px 8px 4px 0; vertical-align: top; }
.sk-dl td { padding: 4px 0; }
.sk-token { display: flex; gap: 6px; margin-bottom: 6px; } .sk-token input { flex: 1; font-family: ui-monospace, monospace; font-size: 12px; }

/* KAS-3 v0.1.3 — progress live tarikan ekstensi */
.sk-prog{padding:14px 16px;margin:0 0 14px;display:flex;flex-direction:column;gap:8px}
.sk-prog-top{display:flex;align-items:center;gap:10px}
.sk-prog-top b{font-weight:600}
.sk-prog-top .hint{color:var(--muted,#6b7280)}
.sk-pct{margin-left:auto;font-variant-numeric:tabular-nums;font-weight:600}
.sk-dot{width:8px;height:8px;border-radius:50%;background:#2563eb;box-shadow:0 0 0 0 rgba(37,99,235,.5);animation:skPuls 1.6s infinite}
@keyframes skPuls{0%{box-shadow:0 0 0 0 rgba(37,99,235,.45)}70%{box-shadow:0 0 0 8px rgba(37,99,235,0)}100%{box-shadow:0 0 0 0 rgba(37,99,235,0)}}
.sk-bar{height:8px;border-radius:99px;background:rgba(127,127,127,.15);overflow:hidden}
.sk-bar i{display:block;height:100%;border-radius:99px;background:#2563eb;transition:width .6s ease}
.sk-bar.run i{background-image:linear-gradient(90deg,rgba(255,255,255,0) 0,rgba(255,255,255,.35) 50%,rgba(255,255,255,0) 100%);background-size:200px 100%;background-repeat:no-repeat;animation:skKilau 1.4s linear infinite}
@keyframes skKilau{from{background-position:-200px 0}to{background-position:calc(100% + 200px) 0}}
.sk-prog-msg{font-size:13px;color:var(--muted,#6b7280)}
.sk-prog-msg b{color:inherit;font-weight:600}
.sk-steps{display:flex;flex-wrap:wrap;gap:6px}
.sk-step{font-size:12px;padding:3px 9px;border-radius:99px;background:rgba(127,127,127,.1);color:var(--muted,#6b7280)}
.sk-step b{font-weight:600;color:var(--text,#111827)}
.sk-step em{font-style:normal;color:#047857}
.sk-step.on{background:rgba(37,99,235,.12);color:#1d4ed8}
.sk-prog.done{flex-direction:column;gap:4px;padding:10px 16px}
.sk-ic{width:20px;height:20px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:12px;background:rgba(4,120,87,.12);color:#047857}
.sk-prog.warn .sk-ic{background:rgba(180,83,9,.12);color:#b45309}
.sk-x{margin-left:auto;font-size:18px;line-height:1;color:var(--muted,#6b7280)}

/* Penilaian skor Budiman — satu angka, rincian di modal */
button.skor-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 28px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
  font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; letter-spacing: .01em;
}
button.skor-badge:hover { border-color: var(--accent); color: var(--accent-ink); }
button.skor-badge.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
button.skor-badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
button.skor-badge.danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
button.skor-badge.belum { font-weight: 600; font-size: 11px; color: var(--ink-2); }
.sb-detail-skor { margin: 12px 0 16px; }
.sb-modal { display: flex; flex-direction: column; gap: 12px; }
.sb-hero { display: flex; align-items: center; gap: 14px; }
.sb-hero-skor {
  width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center;
  font-size: 24px; font-weight: 750; background: var(--surface-2); color: var(--ink);
  flex: 0 0 auto;
}
.sb-hero-skor.ok { background: var(--ok-bg); color: var(--ok); }
.sb-hero-skor.warn { background: var(--warn-bg); color: var(--warn); }
.sb-hero-skor.danger { background: var(--danger-bg); color: var(--danger); }
.sb-hero-skor.belum { color: var(--ink-2); }
.sb-produk { margin-top: 2px; }
.sb-aspek-list { display: flex; flex-direction: column; }
.sb-aspek { padding: 6px 0; border-bottom: 1px solid var(--line); }
.sb-aspek:last-child { border-bottom: 0; }
.sb-aspek-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.sb-aspek-head b { font-size: 13.5px; }
.sb-nilai { font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.sb-nilai.ok { color: var(--ok); } .sb-nilai.warn { color: var(--warn); } .sb-nilai.danger { color: var(--danger); }
.sb-bar { margin-top: 8px; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.sb-bar > i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.sb-bar.ok > i { background: var(--ok); }
.sb-bar.warn > i { background: var(--warn); }
.sb-bar.danger > i { background: var(--danger); }
.sb-aspek input[type=range] { width: 100%; margin-top: 8px; accent-color: var(--accent); }
.sb-cepat { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sb-cepat .btn.tiny { padding: 2px 8px; min-width: 36px; }
.sb-catatan, .sb-catatan-lihat { display: flex; flex-direction: column; gap: 6px; }
.sb-catatan textarea { width: 100%; min-height: 48px; resize: vertical; }
.sb-catatan-lihat { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.sb-catatan-lihat h4 { margin: 0 0 4px; font-size: 13px; }
.sb-catatan-lihat p { margin: 0; white-space: pre-wrap; }

.sb-modal.sb-edit .sb-bar { display: none; }
.sb-aspek input[type=range] { margin-top: 4px; }
.sb-cepat { margin-top: 4px; }

.sb-edit-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.sb-edit-row input[type=range] { flex: 1; margin-top: 0; min-width: 0; }
.sb-edit-row .sb-cepat { margin-top: 0; flex: 0 0 auto; }
.sb-hero { margin-bottom: 2px; }

.modal:has(#sbForm) { max-height: calc(100vh - 16px); }
.modal:has(#sbForm) .modal-body { padding: 12px 18px; }
.sb-modal .form-actions { margin-top: 4px; }

/* KAS-34: Komplain & Retur — tampilan ringkas */
.modal.k-modal-edit { width: min(640px, 100%); }
.modal.k-modal-edit .modal-body { padding: 16px 18px 12px; }
.k-edit-identitas { margin: 0 0 14px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; display: flex; flex-direction: column; gap: 3px; }
.k-edit-identitas .k-edit-id { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.k-edit-identitas .k-edit-toko { font-weight: 650; }
.k-edit-blok { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; margin: 0 0 12px; }
.k-edit-blok h4 { margin: 0 0 10px; font-size: 13px; font-weight: 700; }
.k-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.k-edit-grid label.full { grid-column: 1 / -1; }
.k-edit-grid textarea { min-height: 64px; resize: vertical; }
.k-form-actions { position: sticky; bottom: 0; background: var(--surface); padding: 10px 0 4px; margin-top: 8px; border-top: 1px solid var(--line); z-index: 2; justify-content: flex-end; }
.k-status { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.k-status + .k-status { margin-top: 4px; }
.k-status-k { font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--muted); min-width: 18px; }
.k-aksi { white-space: nowrap; }
.k-aksi .btn { margin: 0 4px 0 0; }
.k-tanya-wrap { position: relative; display: inline-block; }
.k-tanya-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 8; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(14,17,22,.16); padding: 4px; min-width: 180px; display: flex; flex-direction: column; }
.k-tanya-menu button { border: 0; background: transparent; text-align: left; padding: 7px 10px; border-radius: 7px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--ink); }
.k-tanya-menu button:hover { background: var(--surface-2); }
.badge-umur { display: inline-block; margin-top: 4px; padding: 1px 7px; border-radius: 999px; background: #f4efe4; color: #8a6a2a; font-size: 11px; font-weight: 650; }
.ops-komplain .seg { flex-wrap: wrap; }
.ops-komplain .seg button .pill-n { display: inline-block; margin-left: 6px; background: var(--surface); border-radius: 999px; padding: 0 6px; font-variant-numeric: tabular-nums; font-size: 11px; min-width: 18px; text-align: center; }
.ops-komplain .seg button.active .pill-n { background: var(--accent); color: #fff; }
.ops-komplain td.k-col-tgl { white-space: nowrap; }
@media (max-width: 700px) {
  .k-edit-grid { grid-template-columns: 1fr; }
  .k-form-actions { justify-content: stretch; }
  .k-form-actions .btn { flex: 1; }
}

/* KAS-34: atas halaman Komplain yang lebih ringkas */
.ops-komplain .k-kpis { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin: 0 0 12px; }
.ops-komplain .k-kpis .kpi { min-height: 76px; padding: 10px 12px 10px; }
.ops-komplain .k-kpis .kpi .val { font-size: 18px; margin-top: 4px; padding-right: 28px; }
.ops-komplain .k-kpis .kpi .sub { font-size: 11.5px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; }
.ops-komplain .k-kpis .delta { font-size: 11px; font-weight: 700; }
.ops-komplain .k-kpis .delta.up { color: var(--ok, #128a4c); }
.ops-komplain .k-kpis .delta.down { color: var(--danger, #c0392b); }
.ops-komplain .k-kpis .delta.flat { color: var(--muted); }
.ops-komplain .k-vs { color: var(--muted); font-weight: 500; }
.ops-komplain .seg { margin-bottom: 0; }
.ops-komplain .k-daftar-card { margin-top: 12px; }
.ops-komplain .k-toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px 8px; }
.ops-komplain .k-toolbar input[type="search"] { flex: 1; min-width: 0; font-size: 14px; padding: 8px 12px; min-height: 38px; border: 1px solid var(--line-strong, var(--line)); border-radius: 10px; background: var(--surface); color: var(--ink); }
.ops-komplain .k-toolbar input[type="search"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.ops-komplain .k-urut { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: 11px; font-weight: 600; color: var(--ink-2); flex: 0 0 auto; }
.ops-komplain .k-urut span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ops-komplain .k-urut select { font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); padding: 8px 10px; min-height: 38px; min-width: 200px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.ops-komplain #kToggleFilter { position: relative; min-height: 38px; flex: 0 0 auto; }
.ops-komplain .k-filter-n { display: inline-flex; align-items: center; justify-content: center; margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; }
.ops-komplain #kToggleFilter:not(.primary) .k-filter-n { background: var(--accent); }
.ops-komplain .k-filter-lanjut { padding: 4px 16px 12px; border-top: 1px solid var(--line); }
.ops-komplain .k-filter-grid { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.ops-komplain .k-filter-aksi { display: flex; gap: 6px; align-items: end; padding-bottom: 1px; }
.ops-komplain .status-pills { padding: 0 16px 10px; gap: 6px; }
@media (max-width: 900px) {
  .ops-komplain .k-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ops-komplain .k-toolbar { flex-wrap: wrap; }
  .ops-komplain .k-toolbar input[type="search"] { flex: 1 1 100%; }
}


/* Label toko: jangan terpotong di HP */
@media (max-width: 900px) {
  .table-wrap td, .ps-table td, table td { overflow-wrap: anywhere; }
  .msel-btn { white-space: normal; height: auto; min-height: 36px; text-align: left; }
  .msel-opt { align-items: flex-start; white-space: normal; }
  .msel-opt span { line-height: 1.3; }
}
