/* ===========================================================
   Toko Plastik Putri Aulia — design system
   Palet: ungu-magenta, kartu putih, latar lavender lembut
   =========================================================== */
:root {
  --p900: #33074d;
  --p800: #45106a;
  --p700: #6a1b9a;
  --p600: #8e24aa;
  --p500: #a21caf;
  --pink: #e91e63;
  --ink: #241733;
  --ink-2: #4b3a5e;
  --muted: #857792;
  --line: #ede7f5;
  --line-2: #f4effa;
  --bg: #f6f3fb;
  --white: #fff;
  --green: #16a34a;
  --green-soft: #e8f7ee;
  --orange: #f59e0b;
  --orange-soft: #fef4e2;
  --red: #ef4444;
  --red-soft: #fdeaea;
  --blue: #3b82f6;
  --blue-soft: #eaf1fe;
  --violet: #8b5cf6;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(74, 16, 106, .07);
  --shadow-lg: 0 24px 60px rgba(51, 7, 77, .18);
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
::selection { background: #f0d7fb; }
.svg-i { width: 20px; height: 20px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ============ LOGIN ============ */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.login-hero {
  background: radial-gradient(1200px 600px at 10% 0%, #7b1fa2 0%, transparent 55%),
              linear-gradient(150deg, #4b0f6e 0%, #2c0743 55%, #4a0e6b 100%);
  color: #fff; padding: 54px 56px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-hero::after {
  content: ""; position: absolute; width: 520px; height: 520px; right: -180px; bottom: -190px;
  border-radius: 50%; background: radial-gradient(circle, rgba(233,30,99,.45), transparent 65%);
}
.login-brand { display: flex; align-items: center; gap: 14px; }
.login-brand img { width: 56px; height: 56px; border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.28); }
.login-brand b { font-size: 19px; letter-spacing: .2px; display: block; line-height: 1.15; }
.login-brand span { font-size: 12px; opacity: .7; letter-spacing: 2.4px; text-transform: uppercase; }
.login-hero h1 { font-size: 40px; line-height: 1.15; margin: 26px 0 14px; letter-spacing: -.6px; }
.login-hero h1 em { font-style: normal; color: #ffd1e6; }
.login-hero p.lead { font-size: 14.5px; line-height: 1.75; color: #e5d3f0; max-width: 430px; margin: 0 0 26px; }
.hero-feats { display: grid; gap: 12px; position: relative; z-index: 2; }
.hero-feat { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: #f3e6fa; }
.hero-feat i {
  width: 30px; height: 30px; border-radius: 10px; background: rgba(255,255,255,.14);
  display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.18);
}
.hero-feat b { display: block; font-size: 13.5px; }
.hero-feat small { color: #cdb3dd; font-size: 12px; }
.login-hero footer { font-size: 11.5px; color: #b99bcb; position: relative; z-index: 2; }
.login-panel { display: grid; place-items: center; padding: 40px 24px; background: #fff; }
.login-card { width: 100%; max-width: 392px; }
.login-card .tag {
  display: inline-flex; align-items: center; gap: 7px; background: #f7edfd; color: var(--p700);
  font-size: 11.5px; font-weight: 700; padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.login-card h2 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.4px; }
.login-card .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 26px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; }
.input, .select, textarea.input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fdfbfe; color: var(--ink); outline: none; transition: .18s;
}
.input:focus, .select:focus, textarea.input:focus { border-color: #c98fe0; background: #fff; box-shadow: 0 0 0 4px #f6e9fc; }
.input-icon { position: relative; }
.input-icon .svg-i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #b3a4c2; width: 18px; height: 18px; }
.input-icon .input { padding-left: 40px; }
.login-note { background: #faf5ff; border: 1px dashed #e3cdf3; border-radius: 14px; padding: 13px 15px; margin-top: 22px; }
.login-note b { font-size: 12px; color: var(--p700); display: block; margin-bottom: 8px; }
.login-note .acct { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); padding: 3px 0; gap: 10px; }
.login-note .acct span:last-child { color: var(--muted); font-family: ui-monospace, monospace; }
.pw-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); padding: 6px; }

/* ============ APP SHELL ============ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 254px; flex: 0 0 254px; background: linear-gradient(180deg, #4b0f6e 0%, #340853 62%, #2b0643 100%);
  color: #fff; padding: 16px 14px 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; z-index: 40;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 4px; }
.brand-card {
  background: #fff; border-radius: 14px; padding: 10px 11px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.brand-card img { width: 40px; height: 40px; border-radius: 11px; }
.brand-card .bt { font-size: 13.5px; font-weight: 800; color: var(--p700); line-height: 1.15; letter-spacing: -.2px; }
.brand-card .bs { font-size: 10px; color: #a794b8; margin-top: 2px; letter-spacing: .4px; }
.side-label { font-size: 10px; letter-spacing: 1.6px; color: #a984c2; font-weight: 700; margin: 20px 0 8px; padding-left: 12px; text-transform: uppercase; }
.side-link {
  display: flex; align-items: center; gap: 11px; padding: 9.5px 12px; border-radius: 11px;
  color: #dcccE9; font-size: 13px; font-weight: 500; margin-bottom: 2px; transition: .16s; position: relative;
}
.side-link .svg-i { width: 18px; height: 18px; opacity: .95; }
.side-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-link.active {
  background: linear-gradient(135deg, #a21caf, #7b1fa2); color: #fff; font-weight: 700;
  box-shadow: 0 8px 20px rgba(162,28,175,.38);
}
.side-link .badge-dot { margin-left: auto; background: #ff4d8d; color: #fff; font-size: 10px; font-weight: 800; border-radius: 999px; padding: 1px 6px; }
.side-foot {
  margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(255,255,255,.1);
  font-size: 10px; line-height: 1.55; color: #9a76b3; letter-spacing: 0; overflow-wrap: anywhere;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 68px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px;
  padding: 0 24px; position: sticky; top: 0; z-index: 30;
}
.gudang-pick {
  display: inline-flex; align-items: center; gap: 9px; background: #fbf8fe; border: 1.5px solid var(--line);
  border-radius: 12px; padding: 9px 13px; font-size: 12.8px; font-weight: 700; color: var(--p700); transition: .16s;
}
.gudang-pick:hover { border-color: #d9bcef; background: #fff; }
.gudang-pick .svg-i { width: 17px; height: 17px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff;
  display: grid; place-items: center; color: var(--ink-2); position: relative; transition: .16s;
}
.icon-btn:hover { border-color: #dcbfef; color: var(--p700); }
.icon-btn .dot {
  position: absolute; top: 7px; right: 8px; min-width: 16px; height: 16px; border-radius: 999px;
  background: #ff3d71; color: #fff; font-size: 9.5px; font-weight: 800; display: grid; place-items: center;
  border: 2px solid #fff; padding: 0 3px;
}
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 6px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; }
.user-chip:hover { border-color: #dcbfef; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  font-weight: 800; font-size: 13px; background: linear-gradient(135deg, #a21caf, #e91e63); flex: 0 0 auto;
}
.user-chip .un { font-size: 12.5px; font-weight: 800; line-height: 1.2; }
.user-chip .ur { font-size: 10.5px; color: var(--muted); }
.content { padding: 22px 24px 34px; flex: 1; }
.page-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 21px; margin: 0 0 3px; letter-spacing: -.35px; }
.page-head p { margin: 0; color: var(--muted); font-size: 12.8px; }
.page-head .spacer { flex: 1; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* mobile header & nav */
.m-head, .m-nav, .m-only { display: none; }

/* ============ COMPONENTS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px;
  padding: 11px 16px; font-size: 13px; font-weight: 700; border: 1.5px solid transparent; transition: .16s;
  white-space: nowrap;
}
.btn .svg-i { width: 17px; height: 17px; }
.btn-primary { background: linear-gradient(135deg, #a21caf, #e91e63); color: #fff; box-shadow: 0 8px 20px rgba(162,28,175,.26); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: #dcbfef; color: var(--p700); }
.btn-soft { background: #f7edfd; color: var(--p700); }
.btn-soft:hover { background: #f0ddfb; }
.btn-sm { padding: 7px 11px; font-size: 12px; border-radius: 10px; }
.btn-danger { background: #fdeaea; color: #d32f2f; }
.btn-danger:hover { background: #fbdada; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 17px 18px; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel-head h3 { font-size: 14px; margin: 0; letter-spacing: -.2px; }
.panel-head .link { margin-left: auto; font-size: 12px; color: var(--p600); font-weight: 700; }
.panel-head .link:hover { text-decoration: underline; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 15px 16px;
  display: flex; align-items: center; gap: 13px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat::after { content: ""; position: absolute; inset: auto auto -30px -20px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, var(--tint, #f4e8fd), transparent 70%); }
.stat .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 auto; }
.stat .ic .svg-i { width: 22px; height: 22px; }
.stat .v { font-size: 23px; font-weight: 800; letter-spacing: -.7px; line-height: 1.1; }
.stat .l { font-size: 11.5px; color: var(--muted); margin-top: 2px; font-weight: 600; }
.stat .trend { margin-left: auto; font-size: 10.5px; font-weight: 800; color: var(--green); background: var(--green-soft); padding: 3px 7px; border-radius: 8px; align-self: flex-start; }
.t-purple { background: #f5e9fd; color: #8e24aa; --tint: #f2e2fb; }
.t-green { background: var(--green-soft); color: #16a34a; --tint: #e4f7ea; }
.t-blue { background: var(--blue-soft); color: #2563eb; --tint: #e6efff; }
.t-orange { background: var(--orange-soft); color: #d97706; --tint: #fdf1de; }
.t-red { background: var(--red-soft); color: #dc2626; --tint: #fdeaea; }
.t-pink { background: #fdeaf2; color: #db2777; }

.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; margin-bottom: 14px; align-items: start; }
.grid-2b { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; align-items: start; }

.bars { display: grid; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 1fr 92px 46px; align-items: center; gap: 10px; font-size: 12.3px; }
.bar-row .nm { color: var(--ink-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .nm small { color: var(--muted); font-weight: 500; }
.bar-track { height: 8px; border-radius: 999px; background: #f2edf8; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width .7s cubic-bezier(.2,.8,.2,1); }
.bar-row .val { text-align: right; font-weight: 800; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.total-row { display: flex; align-items: center; justify-content: space-between; border-top: 1px dashed var(--line); margin-top: 13px; padding-top: 11px; font-size: 12px; color: var(--muted); }
.total-row b { font-size: 15px; color: var(--p700); }

.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.donut { position: relative; width: 168px; height: 168px; }
.donut svg { transform: rotate(-90deg); }
.donut .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut .center b { font-size: 19px; letter-spacing: -.6px; display: block; }
.donut .center span { font-size: 10.5px; color: var(--muted); }
.legend { display: grid; gap: 7px; width: 100%; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.legend-row .sq { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; }
.legend-row b { margin-left: auto; font-variant-numeric: tabular-nums; }
.legend-row small { color: var(--muted); font-size: 10.5px; }

.chart-legend { display: flex; gap: 14px; margin-left: auto; font-size: 11.5px; color: var(--ink-2); font-weight: 600; }
.chart-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.chart-box { width: 100%; overflow: hidden; }
.chart-box svg { width: 100%; height: 205px; display: block; overflow: visible; }

.notif-list { display: grid; gap: 9px; }
.notif-item { display: flex; gap: 11px; padding: 10px 11px; border-radius: 12px; background: #fcfaff; border: 1px solid #f3ecfa; }
.notif-item.unread { background: #fdf6ff; border-color: #f0ddfb; }
.notif-item .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; }
.notif-item .ic .svg-i { width: 15px; height: 15px; }
.notif-item b { font-size: 12.2px; display: block; }
.notif-item span { font-size: 11.5px; color: var(--muted); line-height: 1.45; display: block; margin-top: 1px; }
.notif-item time { font-size: 10px; color: #b3a6c1; margin-top: 3px; display: block; }

.feature-card { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: center; background: linear-gradient(120deg, #faf5ff, #fdf2f8); border: 1px solid #f0e2fb; border-radius: var(--radius); padding: 16px; }
.feature-card img { width: 100%; border-radius: 14px; display: block; }
.feature-card h4 { margin: 0 0 10px; font-size: 14.5px; }
.feature-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.feature-card li { display: flex; gap: 8px; font-size: 12.3px; color: var(--ink-2); align-items: flex-start; }
.feature-card li .svg-i { width: 15px; height: 15px; color: var(--green); margin-top: 1px; }

/* tables */
.table-wrap { width: 100%; overflow-x: auto; border-radius: 14px; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 640px; }
table.tbl th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted);
  font-weight: 800; padding: 10px 12px; background: #faf7fd; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tbl th:first-child { border-radius: 10px 0 0 0; }
table.tbl th:last-child { border-radius: 0 10px 0 0; }
table.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); font-size: 12.6px; vertical-align: middle; }
table.tbl tbody tr:hover td { background: #fdfaff; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl td b { font-weight: 700; }
.mono { font-family: ui-monospace, "SF Mono", monospace; font-size: 11.5px; color: var(--p700); background: #f7edfd; padding: 2px 7px; border-radius: 6px; }
.cell-sub { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10.8px; font-weight: 800; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.b-green { background: var(--green-soft); color: #15803d; }
.b-orange { background: var(--orange-soft); color: #b45309; }
.b-red { background: var(--red-soft); color: #b91c1c; }
.b-blue { background: var(--blue-soft); color: #1d4ed8; }
.b-purple { background: #f7edfd; color: var(--p700); }
.b-gray { background: #f2eff6; color: #6b5b7a; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.search { position: relative; flex: 1; min-width: 180px; max-width: 330px; }
.search .svg-i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: #b3a4c2; }
.search input { padding-left: 38px; }
.pager { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.pager .pages { margin-left: auto; display: flex; gap: 4px; }
.pager button { min-width: 30px; height: 30px; border-radius: 9px; border: 1.5px solid var(--line); background: #fff; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.pager button.on { background: var(--p600); border-color: var(--p600); color: #fff; }
.pager button:disabled { opacity: .4; }

.empty { text-align: center; padding: 34px 16px; color: var(--muted); font-size: 12.8px; }
.empty .svg-i { width: 40px; height: 40px; color: #d9c9e8; margin-bottom: 8px; }

/* modal */
.overlay {
  position: fixed; inset: 0; background: rgba(40, 10, 60, .42); backdrop-filter: blur(3px);
  z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .16s;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  background: #fff; border-radius: 20px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto;
  box-shadow: var(--shadow-lg); animation: pop .18s ease-out;
}
.modal.wide { max-width: 760px; }
.modal::-webkit-scrollbar { width: 8px; }
.modal::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb { background: #ddcdea; border-radius: 99px; }
.modal::-webkit-scrollbar-thumb:hover { background: #c9b2de; }
@keyframes pop { from { transform: translateY(10px) scale(.985); opacity: .6 } to { transform: none; opacity: 1 } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 17px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.modal-head h3 { margin: 0; font-size: 15.5px; }
.modal-head .x { margin-left: auto; border: 0; background: #f6f2fa; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 9px; justify-content: flex-end; position: sticky; bottom: 0; background: #fff; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid .full { grid-column: 1 / -1; }
.line-row { display: grid; grid-template-columns: 1fr 96px 130px 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: grid; gap: 8px; }
.toast {
  background: #2b0d3f; color: #fff; padding: 12px 15px; border-radius: 12px; font-size: 12.5px;
  display: flex; gap: 9px; align-items: center; box-shadow: var(--shadow-lg); animation: pop .2s; max-width: 340px;
}
.toast.ok .svg-i { color: #4ade80; }
.toast.err .svg-i { color: #fb7185; }

.pick-list { display: grid; gap: 8px; }
.pick-item {
  display: flex; align-items: center; gap: 11px; padding: 12px 13px; border: 1.5px solid var(--line);
  border-radius: 12px; background: #fff; width: 100%; text-align: left; transition: .15s;
}
.pick-item:hover { border-color: #dcc0f0; background: #fdfaff; }
.pick-item.on { border-color: var(--p500); background: #faf1ff; box-shadow: 0 0 0 3px #f7e9fd; }
.pick-item .ic { width: 34px; height: 34px; border-radius: 10px; background: #f5e9fd; color: var(--p600); display: grid; place-items: center; flex: 0 0 auto; }
.pick-item .t { font-size: 13px; font-weight: 700; }
.pick-item .s { font-size: 11px; color: var(--muted); }
.pick-item .radio { margin-left: auto; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #e2d5ee; }
.pick-item.on .radio { border-color: var(--p500); background: radial-gradient(circle, var(--p500) 44%, #fff 46%); }

/* product detail */
.detail-hero { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: center; }
.detail-hero img { width: 100%; border-radius: 16px; background: #f7f9fd; }
.detail-hero h2 { margin: 0 0 4px; font-size: 19px; }
.detail-hero .kode { font-size: 11.5px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 14px; }
.kv div { font-size: 12px; color: var(--muted); }
.kv b { display: block; color: var(--ink); font-size: 13px; margin-top: 2px; }

/* chips */
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 11px; padding: 7px 11px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.chip.on { border-color: var(--p500); background: #faf1ff; color: var(--p700); }
.chip .n { font-size: 10px; color: var(--muted); }

/* skeleton / misc */
.spin { width: 18px; height: 18px; border: 2px solid #eadcf6; border-top-color: var(--p600); border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg) } }
.loading-page { display: grid; place-items: center; padding: 60px; }

/* ============ EXTRA COMPONENTS ============ */
.grid-2c { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.hint-box { background: #faf7fd; border: 1px dashed #e6d8f4; border-radius: 12px; padding: 11px 13px; font-size: 12px; color: #5f4a72; margin-top: 12px; line-height: 1.5; }
.hint-box b { color: var(--ink); }
.acct-hero { display: flex; align-items: center; gap: 14px; }
.acct-hero h2 { margin: 0; font-size: 18px; letter-spacing: -.3px; }
.acct-hero span { font-size: 12px; color: var(--muted); }
.avatar.lg { width: 62px; height: 62px; font-size: 20px; border-radius: 20px; }

.kat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; }
.kat-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px; box-shadow: var(--shadow); display: grid; gap: 4px; transition: .16s; font-family: inherit; }
.kat-card:hover { border-color: #dcc0f0; transform: translateY(-2px); box-shadow: 0 16px 34px rgba(74,16,106,.1); }
.kat-top { display: flex; align-items: center; gap: 6px; justify-content: space-between; margin-bottom: 3px; }
.kat-card > b { font-size: 13.5px; color: var(--ink); }
.kat-kode { font-size: 11px; color: var(--muted); }
.kat-stok { display: flex; align-items: baseline; justify-content: space-between; border-top: 1px dashed var(--line); margin-top: 7px; padding-top: 7px; font-size: 11.5px; color: var(--muted); }
.kat-stok b { font-size: 17px; color: var(--p700); letter-spacing: -.4px; }
.kat-more { font-size: 11px; font-weight: 700; color: var(--p600); display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.kat-more .svg-i { width: 13px; height: 13px; }
table.tbl tfoot td { padding: 11px 12px; border-top: 2px solid var(--line); background: #fbf8fe; font-size: 12.4px; }
table.tbl tfoot td b { color: var(--p800); }
.mob-cards { display: none; }
.chart-box svg text { font-family: inherit; }

/* ============ RESPONSIVE ============ */
/* ============ FILTER PERIODE ============ */
.per-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.seg {
  display: inline-flex; gap: 3px; padding: 4px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 2px 6px rgba(74, 20, 110, .05);
}
.seg button {
  border: 0; background: transparent; padding: 7px 16px; border-radius: 9px; cursor: pointer;
  font: inherit; font-size: 11.8px; font-weight: 700; color: #7c6b8c; transition: .16s;
}
.seg button:hover { background: #f8f2fd; color: var(--p700); }
.seg button.on {
  background: linear-gradient(135deg, #a21caf, #e91e63); color: #fff;
  box-shadow: 0 4px 10px rgba(162, 28, 175, .28);
}
.per-hint { font-size: 11.5px; color: var(--muted); }
.per-hint b { color: var(--p700); }

@media (max-width: 640px) {
  .per-bar { gap: 8px; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 8px 0; }
  .per-hint { font-size: 11px; }
}

/* ============ DASHBOARD: STOK PER GUDANG & RANKING ============ */
.gd-list { display: grid; gap: 11px; }
.gd-row {
  display: grid; gap: 7px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 13px;
  background: linear-gradient(180deg, #fdfbff, #faf7fe);
}
.gd-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.gd-nm b { font-size: 12.8px; color: var(--p900); display: block; line-height: 1.25; }
.gd-nm span { font-size: 10.3px; color: var(--muted); }
.gd-qty { font-size: 14.5px; font-weight: 800; color: var(--p700); white-space: nowrap; letter-spacing: -.3px; }
.gd-qty small { font-size: 9.5px; font-weight: 600; color: var(--muted); }
.gd-meta { display: flex; flex-wrap: wrap; gap: 11px; font-size: 10.4px; color: var(--muted); }
.gd-meta span { display: inline-flex; align-items: center; gap: 3px; }
.gd-meta .svg-i { width: 12px; height: 12px; }
.gd-meta .in { color: #15803d; font-weight: 700; }
.gd-meta .out { color: #b91c1c; font-weight: 700; }
.gd-meta .pct { margin-left: auto; font-weight: 600; }

.rank-list { display: grid; gap: 6px; }
.rank-row {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center;
  padding: 9px 10px; border-radius: 12px; border: 1px solid transparent; transition: .15s;
}
.rank-row:hover { background: #faf5ff; border-color: #eadcf5; text-decoration: none; }
.rank-no {
  width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; background: #f4eefb; color: #7b1fa2;
}
.rank-no.top { background: linear-gradient(135deg, #a21caf, #e91e63); color: #fff; }
.rank-no.low { background: #f6f2f9; color: #9a8aa8; }
.rank-nm { min-width: 0; }
.rank-nm b { font-size: 12.2px; color: #2a1035; display: block; line-height: 1.3; }
.rank-nm span { font-size: 10px; color: var(--muted); }
.rank-qty { text-align: right; }
.rank-qty b { font-size: 14px; color: var(--p700); display: block; line-height: 1.2; }
.rank-qty span { font-size: 9.3px; color: var(--muted); white-space: nowrap; }

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-2b { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .grid-2c { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  body { background: #f7f4fb; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .22s ease;
    width: 268px; flex-basis: 268px; box-shadow: 20px 0 50px rgba(30,5,45,.3);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(30,8,45,.4); z-index: 39; }
  .topbar { display: none; }
  .m-head {
    display: flex; align-items: center; gap: 11px; padding: 11px 14px; background: #fff; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 25;
  }
  .m-head .brand-mini { display: flex; align-items: center; gap: 9px; }
  .m-head .brand-mini img { width: 34px; height: 34px; border-radius: 10px; }
  .m-head .brand-mini b { font-size: 12.6px; color: var(--p700); display: block; line-height: 1.1; }
  .m-head .brand-mini span { font-size: 9.5px; color: var(--muted); letter-spacing: .4px; }
  .m-head .spacer { flex: 1; }
  .content { padding: 13px 13px 90px; }
  .m-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line);
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom)); z-index: 26; box-shadow: 0 -8px 24px rgba(50,15,75,.07);
  }
  .m-nav a {
    flex: 1; display: grid; justify-items: center; gap: 3px; font-size: 10px; color: #9d8fae; font-weight: 700;
    padding: 4px 2px; border-radius: 10px;
  }
  .m-nav a .svg-i { width: 21px; height: 21px; }
  .m-nav a.on { color: var(--p600); }
  .m-nav a.on .svg-i { stroke-width: 2.2; }
  .page-head h1 { font-size: 17.5px; }
  .page-head p { font-size: 11.8px; }
  .page-head .spacer { display: none; }
  .page-head .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
  .stat { padding: 12px; gap: 10px; border-radius: 14px; }
  .stat .ic { width: 38px; height: 38px; border-radius: 11px; }
  .stat .ic .svg-i { width: 18px; height: 18px; }
  .stat .v { font-size: 19px; }
  .stat .l { font-size: 10px; }
  .stat .trend { display: none; }
  .panel { padding: 14px; border-radius: 16px; }
  .panel-head h3 { font-size: 13px; }
  .bar-row { grid-template-columns: 1fr 78px 42px; font-size: 11.5px; gap: 8px; }
  .chart-box svg { height: 175px; }
  .donut { width: 150px; height: 150px; }
  .feature-card { grid-template-columns: 1fr; }
  .feature-card img { max-width: 240px; margin: 0 auto; }
  .detail-hero { grid-template-columns: 110px 1fr; }
  .detail-hero h2 { font-size: 16px; }
  .kv { grid-template-columns: 1fr 1fr; }
  .overlay { padding: 0; align-items: flex-end; }
  .modal { max-width: 100%; border-radius: 20px 20px 0 0; max-height: 92vh; }
  .form-grid { grid-template-columns: 1fr; }
  .line-row { grid-template-columns: 1fr 74px; grid-template-areas: "b q" "s x"; }
  .line-row select.b { grid-area: b; } .line-row input.q { grid-area: q; }
  .line-row select.s { grid-area: s; } .line-row .del { grid-area: x; }
  .toast-wrap { left: 12px; right: 12px; bottom: 76px; }
  .toast { max-width: none; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-panel { padding: 28px 20px; align-items: start; padding-top: 44px; }
  .mob-cards { display: grid; gap: 9px; }
  .table-wrap { position: relative; }
  .table-wrap::before {
    content: "geser tabel ke samping →"; display: block; position: sticky; left: 2px; width: max-content;
    font-size: 9.5px; font-weight: 700; letter-spacing: .3px; color: #a294b3; padding: 0 0 6px 2px;
  }
  .tbl th:first-child, .tbl td:first-child {
    position: sticky; left: 0; background: #fff; z-index: 3;
    box-shadow: 7px 0 9px -7px rgba(48,10,70,.28);
  }
  .tbl thead th:first-child { background: #faf7fd; }
}
@media (min-width: 901px) { .mob-cards { display: none; } }
@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .m-nav a { font-size: 9.2px; }
}
