/* =====================================================================
   GUDANG KURMA POS — Design System
   Brand: Gudang Kurma / Gudangkurma.id / @gudangkurma.bkt / Bukittinggi
   Natural · Bersih · Segar · Amanah · Ramah · Modern
   ===================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand palette (from PRD) */
  --forest:        #014421;  /* Primary Forest — sidebar, headers, brand text */
  --forest-700:    #013a1c;
  --forest-900:    #012a14;
  --deep-green:    #086736;  /* Secondary — hover, active, tab aktif */
  --fresh-green:   #8DC643;  /* Accent — CTA, tombol bayar, badge positif */
  --fresh-600:     #79b531;
  --fresh-200:     #cfe9a6;
  --pomelo:        #F9FFE3;  /* Background utama */
  --soft-surface:  #F1FCE1;  /* Card, table row, panel lembut */

  /* Warm "kurma" accent — used sparingly for dates/seasonal warmth */
  --kurma:         #B5722E;
  --kurma-soft:    #F6E9D6;
  --honey:         #E0A731;

  /* Saudagar Pro — premium gold accent (used sparingly) */
  --gold:          #C99A2E;
  --gold-bright:   #E8B73E;
  --gold-soft:     #FBF3DA;

  /* Functional */
  --danger:        #C0392B;
  --danger-soft:   #FBEAE7;
  --warn:          #C98A1B;
  --warn-soft:     #FBF1DC;
  --info:          #0E7C86;
  --info-soft:     #E0F4F5;
  --success:       #2E8B47;
  --success-soft:  #E6F4E9;

  /* Neutrals tuned green-warm, never cold corporate gray */
  --ink:           #16261b;   /* primary text */
  --ink-soft:      #4a5b50;   /* secondary text */
  --ink-faint:     #7c8a80;   /* tertiary / muted */
  --line:          #dfeccb;   /* borders on light */
  --line-soft:     #eaf4d8;
  --white:         #ffffff;

  /* Surfaces */
  --surface:       #ffffff;
  --surface-2:     var(--soft-surface);
  --surface-3:     #fbffee;

  /* Shadows — soft, natural, layered (no harsh black) */
  --sh-xs: 0 1px 2px rgba(1, 68, 33, 0.06);
  --sh-sm: 0 2px 8px rgba(1, 68, 33, 0.07), 0 1px 2px rgba(1, 68, 33, 0.05);
  --sh-md: 0 8px 24px rgba(1, 68, 33, 0.09), 0 2px 6px rgba(1, 68, 33, 0.05);
  --sh-lg: 0 18px 48px rgba(1, 68, 33, 0.16), 0 6px 16px rgba(1, 68, 33, 0.08);
  --sh-glow: 0 6px 20px rgba(141, 198, 67, 0.4);

  /* Radii — rounded, friendly */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Type */
  --font-display: 'Quicksand', system-ui, sans-serif;
  --font-body: 'Hind Madurai', 'Quicksand', system-ui, sans-serif;

  /* Spacing rhythm (4/8) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;

  --sidebar-w: 264px;
  --topbar-h: 68px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--pomelo);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4,h5 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; color: var(--forest); letter-spacing: -.01em; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid rgba(141,198,67,.55); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--fresh-200); color: var(--forest-900); }

/* subtle natural background texture on the whole app */
body {
  background-image:
    radial-gradient(1200px 600px at 100% -10%, rgba(141,198,67,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(8,103,54,.07), transparent 55%);
  background-attachment: fixed;
}

/* ====================================================================
   Boot / loading
   ==================================================================== */
.app-loading { display: grid; place-items: center; min-height: 100vh; }
.boot { display: grid; place-items: center; gap: 14px; }
.boot__logo { animation: bob 2.4s var(--ease) infinite; }
.boot__name { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--forest); letter-spacing: .02em; }
.boot__spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--fresh-200); border-top-color: var(--deep-green); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.iconbtn.is-spin svg { animation: spin .7s linear infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0)} 50%{ transform: translateY(-7px)} }

/* ====================================================================
   App shell layout
   ==================================================================== */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  background: linear-gradient(185deg, var(--forest) 0%, var(--forest-900) 100%);
  color: #dff3df;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  padding: 18px 14px 14px;
  overflow: hidden;
}
/* decorative date-palm pattern */
.sidebar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    radial-gradient(120px 120px at 100% 0%, rgba(141,198,67,.18), transparent 70%),
    radial-gradient(160px 160px at 0% 100%, rgba(141,198,67,.10), transparent 70%);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 16px; position: relative; z-index: 1; }
.brand__mark { flex: none; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.brand__text { line-height: 1.05; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: #fff; letter-spacing: .01em; }
.brand__sub { font-size: 11px; color: var(--fresh-green); font-weight: 500; letter-spacing: .04em; }

.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; padding: 4px 2px; position: relative; z-index: 1; margin: 0 -2px; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 6px; }
.nav__group { display: flex; flex-direction: column; gap: 2px; }
.nav__section { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: none; cursor: pointer; text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: rgba(223,243,223,.45); font-weight: 600; padding: 13px 12px 6px; transition: color .15s; }
.nav__section:hover { color: rgba(223,243,223,.8); }
.nav__section svg { width: 13px; height: 13px; opacity: .5; transition: transform .2s var(--ease); }
.nav__items { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.nav__group.is-collapsed .nav__section svg { transform: rotate(-90deg); }
.nav__group.is-collapsed .nav__items { display: none; }
.nav__item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-sm);
  color: #cfe6cf; font-weight: 500; font-size: 14px;
  position: relative; transition: background .18s var(--ease), color .18s var(--ease);
}
.nav__item svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.nav__item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav__item.is-active { background: var(--deep-green); color: #fff; box-shadow: inset 0 0 0 1px rgba(141,198,67,.25); }
.nav__item.is-active svg { opacity: 1; color: var(--fresh-green); }
.nav__item.is-active::before { content:""; position: absolute; left: -14px; top: 50%; transform: translateY(-50%); width: 4px; height: 22px; background: var(--fresh-green); border-radius: 0 4px 4px 0; }
.nav__badge { margin-left: auto; background: var(--fresh-green); color: var(--forest-900); font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: var(--r-pill); font-family: var(--font-display); }
.nav__badge--warn { background: var(--honey); color: #3a2a06; }

.sidebar__foot { position: relative; z-index: 1; padding: 10px 6px 2px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 6px; }
.userchip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-sm); transition: background .18s, box-shadow .18s, transform .18s; color: inherit; text-decoration: none; cursor: pointer; min-width: 0; }
.userchip:hover { background: rgba(255,255,255,.07); }
.userchip:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(141,198,67,.55); }
.userchip:active { transform: translateY(1px); }
.userchip__avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--fresh-green); color: var(--forest-900); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 14px; flex: none; }
.userchip__name { font-size: 13.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 128px; }
.userchip__role { font-size: 11px; color: var(--fresh-green); text-transform: capitalize; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 128px; }

/* ---------- Main column ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: 16px;
  padding: 0 26px;
  background: rgba(249,255,227,.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.topbar__title h1 { font-size: 21px; }
.topbar__title p { font-size: 12.5px; color: var(--ink-faint); margin-top: 1px; }
.topbar__spacer { flex: 1; }
.search {
  display: flex; align-items: center; gap: 9px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 8px 16px; min-width: 240px;
  color: var(--ink-faint); box-shadow: var(--sh-xs);
}
.search { position: relative; }
.search input { border: none; background: none; outline: none; flex: 1; color: var(--ink); font-size: 14px; }
.search svg { width: 18px; height: 18px; flex: none; }
.search-results {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0; min-width: 340px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-lg); padding: 6px; z-index: 60; max-height: 70vh; overflow-y: auto;
  animation: viewin .18s var(--ease);
}
.search-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); font-weight: 600; padding: 9px 10px 4px; }
.search-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); transition: background .12s; }
.search-item:hover { background: var(--surface-2); }
.kbd-active,
.search-item.kbd-active,
[data-kbd-option].kbd-active,
[data-cs-pick].kbd-active,
[data-cid].kbd-active,
[data-osi].kbd-active,
[data-fbpick].kbd-active,
[data-sipick].kbd-active,
[data-etpick].kbd-active {
  background: var(--soft-surface, #e8f5e9) !important;
  box-shadow: inset 3px 0 0 var(--fresh-green, #2d6a4f);
}
[data-kbd-option] {
  outline: none;
}
.search-item__ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.search-item__t { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; color: var(--ink); }
.search-item__t mark { background: var(--fresh-200); color: var(--forest-900); border-radius: 3px; padding: 0 1px; }
.search-item__s { font-size: 11.5px; color: var(--ink-faint); }
.search-item__r { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--forest); white-space: nowrap; }
.search-empty { display: flex; align-items: center; gap: 8px; padding: 18px 14px; color: var(--ink-faint); font-size: 13px; justify-content: center; }
.iconbtn {
  width: 42px; height: 42px; border-radius: var(--r-sm);
  display: grid; place-items: center; color: var(--forest);
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--sh-xs);
  position: relative; transition: .18s var(--ease);
}
.iconbtn:hover { border-color: var(--fresh-green); color: var(--deep-green); transform: translateY(-1px); }
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn__dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; border: 2px solid var(--white); }
.sync-pill { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-display); font-weight: 600; font-size: 12px; color: var(--success); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px 12px; box-shadow: var(--sh-xs); white-space: nowrap; }
.sync-pill svg { width: 14px; height: 14px; }
@media (max-width: 720px) { .sync-pill span { display: none; } .sync-pill { padding: 8px; } }

.content { padding: 26px; flex: 1; min-width: 0; animation: viewin .4s var(--ease); }
@keyframes viewin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ====================================================================
   Buttons
   ==================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: var(--r-sm);
  transition: .18s var(--ease); white-space: nowrap; line-height: 1;
  border: 1px solid transparent;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--fresh-green); color: var(--forest-900); box-shadow: var(--sh-glow); }
.btn-primary:hover { background: var(--fresh-600); box-shadow: 0 8px 26px rgba(141,198,67,.5); transform: translateY(-1px); }
.btn-forest { background: var(--forest); color: #fff; }
.btn-forest:hover { background: var(--deep-green); transform: translateY(-1px); }
.btn-ghost { background: var(--white); color: var(--forest); border-color: var(--line); box-shadow: var(--sh-xs); }
.btn-ghost:hover { border-color: var(--fresh-green); color: var(--deep-green); }
.btn-soft { background: var(--soft-surface); color: var(--deep-green); }
.btn-soft:hover { background: var(--fresh-200); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.06); }
.btn-danger-ghost { background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: var(--r-xs); }
.btn-lg { padding: 14px 24px; font-size: 16px; border-radius: var(--r-md); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-icon { padding: 9px; }

/* ====================================================================
   Cards & surfaces
   ==================================================================== */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
}
.card--soft { background: var(--soft-surface); }
.card__head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.card__head h3 { font-size: 16px; }
.card__head .sub { font-size: 12.5px; color: var(--ink-faint); }
.card__body { padding: 20px; }
.card__foot { padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.card-hover { transition: .2s var(--ease); }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--fresh-200); }

.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.section-title h2 { font-size: 18px; }
.section-title .sub { font-size: 13px; color: var(--ink-faint); font-family: var(--font-body); }

/* ---------- KPI stat cards ---------- */
.stat {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--sh-sm);
  transition: .2s var(--ease);
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.stat__ico { width: 44px; height: 44px; border-radius: var(--r-sm); display: grid; place-items: center; margin-bottom: 14px; }
.stat__ico svg { width: 22px; height: 22px; }
.stat__label { font-size: 12.5px; color: var(--ink-soft); font-weight: 500; }
.stat__value { font-family: var(--font-display); font-weight: 700; font-size: 26px; color: var(--forest); letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat__delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; margin-top: 8px; padding: 2px 8px; border-radius: var(--r-pill); }
.stat__delta svg { width: 13px; height: 13px; }
.delta-up { color: var(--success); background: var(--success-soft); }
.delta-down { color: var(--danger); background: var(--danger-soft); }
.delta-flat { color: var(--ink-faint); background: var(--surface-2); }
.stat__spark { position: absolute; right: 14px; bottom: 12px; opacity: .9; }
.ico-green { background: var(--success-soft); color: var(--deep-green); }
.ico-fresh { background: var(--fresh-200); color: var(--forest); }
.ico-honey { background: var(--warn-soft); color: var(--honey); }
.ico-kurma { background: var(--kurma-soft); color: var(--kurma); }
.ico-info  { background: var(--info-soft); color: var(--info); }
.ico-danger{ background: var(--danger-soft); color: var(--danger); }

/* ====================================================================
   Badges & chips
   ==================================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; font-family: var(--font-display);
  padding: 3px 10px; border-radius: var(--r-pill); line-height: 1.4;
  white-space: nowrap;
}
.badge svg { width: 12px; height: 12px; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-neutral { background: var(--surface-2); color: var(--ink-soft); }
.badge-fresh { background: var(--fresh-200); color: var(--forest); }
.badge-kurma { background: var(--kurma-soft); color: var(--kurma); }
.badge-dot::before { content:""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ====================================================================
   Tables
   ==================================================================== */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl thead th {
  text-align: left; font-family: var(--font-display); font-weight: 600;
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-faint); padding: 12px 16px; border-bottom: 1px solid var(--line);
  white-space: nowrap; background: var(--surface-3);
}
.tbl tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tbody tr { transition: background .14s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .strong { font-weight: 600; color: var(--forest); }
.cellprod { display: flex; align-items: center; gap: 11px; }
.cellprod__img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface-2); display: grid; place-items: center; color: var(--deep-green); }
.cellprod__name { font-weight: 600; color: var(--ink); }
.cellprod__sku { font-size: 11.5px; color: var(--ink-faint); }

/* ====================================================================
   Forms
   ==================================================================== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--forest); font-family: var(--font-display); }
.field label .req { color: var(--danger); }
.field .hint { font-size: 11.5px; color: var(--ink-faint); }
.input, .select, textarea.input {
  width: 100%; padding: 11px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  transition: .16s var(--ease); font-size: 14px;
}
.input::placeholder { color: var(--ink-faint); }
.input:focus, .select:focus, textarea.input:focus { border-color: var(--fresh-green); box-shadow: 0 0 0 4px rgba(141,198,67,.16); outline: none; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%234a5b50' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-group .addon { display: grid; place-items: center; padding: 0 14px; background: var(--surface-2); border: 1px solid var(--line); border-left: none; border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.switch { position: relative; width: 44px; height: 25px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: var(--r-pill); transition: .2s; cursor: pointer; }
.switch span::before { content:""; position: absolute; height: 19px; width: 19px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s var(--ease); box-shadow: var(--sh-xs); }
.switch input:checked + span { background: var(--fresh-green); }
.switch input:checked + span::before { transform: translateX(19px); }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .col-2 { grid-column: span 2; }

/* ====================================================================
   Modal / drawer
   ==================================================================== */
.overlay { position: fixed; inset: 0; background: rgba(1,42,20,.5); backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 24px; animation: fade .2s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--pomelo); border-radius: var(--r-xl); box-shadow: var(--sh-lg); width: 100%; max-width: 560px; max-height: 90vh; display: flex; flex-direction: column; animation: pop .26s var(--ease); overflow: hidden; }
.modal--lg { max-width: 880px; }
.modal--xl { max-width: 1100px; }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(12px); } }
.modal__head { display: flex; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); background: var(--white); }
.modal__head h3 { font-size: 18px; }
.modal__head .sub { font-size: 12.5px; color: var(--ink-faint); }
.modal__close { margin-left: auto; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-soft); transition: .16s; }
.modal__close:hover { background: var(--danger-soft); color: var(--danger); }
.modal__body { padding: 24px; overflow-y: auto; }
.modal__foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: var(--white); }

/* drawer variant (right) */
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 460px; max-width: 92vw; background: var(--pomelo); box-shadow: var(--sh-lg); z-index: 100; display: flex; flex-direction: column; animation: slidein .3s var(--ease); }
@keyframes slidein { from { transform: translateX(100%); } }

/* ====================================================================
   Toasts
   ==================================================================== */
.toast-stack { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast {
  display: flex; align-items: flex-start; gap: 11px; padding: 13px 16px;
  background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--deep-green);
  border-radius: var(--r-md); box-shadow: var(--sh-md); animation: toastin .3s var(--ease);
}
@keyframes toastin { from { opacity: 0; transform: translateX(30px); } }
.toast.is-out { animation: toastout .25s var(--ease) forwards; }
@keyframes toastout { to { opacity: 0; transform: translateX(30px); } }
.toast__ico { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.toast__title { font-weight: 600; font-family: var(--font-display); font-size: 14px; color: var(--forest); }
.toast__msg { font-size: 12.5px; color: var(--ink-soft); }
.toast--success { border-left-color: var(--success); }
.toast--success .toast__ico { color: var(--success); }
.toast--warn { border-left-color: var(--warn); }
.toast--warn .toast__ico { color: var(--warn); }
.toast--danger { border-left-color: var(--danger); }
.toast--danger .toast__ico { color: var(--danger); }
.toast--info { border-left-color: var(--info); }
.toast--info .toast__ico { color: var(--info); }

/* ====================================================================
   Empty / loading states
   ==================================================================== */
.empty { display: grid; place-items: center; text-align: center; padding: 48px 24px; gap: 12px; }
.empty__ico { width: 64px; height: 64px; border-radius: 20px; background: var(--soft-surface); display: grid; place-items: center; color: var(--deep-green); }
.empty__ico svg { width: 30px; height: 30px; }
.empty h4 { font-size: 16px; }
.empty p { font-size: 13.5px; color: var(--ink-faint); max-width: 320px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line-soft) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: var(--r-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ====================================================================
   Charts (hand-drawn SVG)
   ==================================================================== */
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-soft); }
.chart-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.bar-track { height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: var(--r-pill); background: var(--fresh-green); transition: width .6s var(--ease); }

/* progress / meter */
.meter { height: 10px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; position: relative; }
.meter > i { position: absolute; inset: 0 auto 0 0; border-radius: var(--r-pill); }

/* ====================================================================
   Login
   ==================================================================== */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login__brandside {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--forest) 0%, var(--forest-900) 60%, #011f0f 100%);
  color: #eafbe6; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
}
.login__brandside::before { content:""; position: absolute; inset: 0;
  background:
    radial-gradient(520px 520px at 85% 10%, rgba(141,198,67,.22), transparent 60%),
    radial-gradient(420px 420px at 0% 100%, rgba(8,103,54,.45), transparent 60%);
}
.login__brandside::after { content:""; position: absolute; right: -80px; bottom: -80px; width: 360px; height: 360px; border-radius: 50%; border: 1px solid rgba(141,198,67,.2); box-shadow: 0 0 0 40px rgba(141,198,67,.05), 0 0 0 80px rgba(141,198,67,.03); }
.login__brandrow { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.login__brandrow .name { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: #fff; }
.login__brandrow .sub { font-size: 12px; color: var(--fresh-green); letter-spacing: .04em; }
.login__hero { position: relative; z-index: 1; max-width: 440px; }
.login__hero h2 { color: #fff; font-size: 38px; line-height: 1.1; letter-spacing: -.02em; }
.login__hero h2 span { color: var(--fresh-green); }
.login__hero p { margin-top: 16px; font-size: 15px; color: #cfe6cf; line-height: 1.6; }
.login__feats { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; }
.login__feat { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #dff3df; }
.login__feat .ic { width: 34px; height: 34px; border-radius: 10px; background: rgba(141,198,67,.16); display: grid; place-items: center; color: var(--fresh-green); flex: none; }
.login__feat .ic svg { width: 18px; height: 18px; }
.login__formside { display: grid; place-items: center; padding: 40px; background: var(--pomelo); }
.login__form { width: 100%; max-width: 380px; }
.login__form h3 { font-size: 26px; }
.login__form > p { color: var(--ink-faint); font-size: 14px; margin-top: 4px; margin-bottom: 26px; }
.login__roles { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 22px; }
.rolepick { padding: 11px 8px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--white); text-align: center; transition: .16s var(--ease); cursor: pointer; }
.rolepick:hover { border-color: var(--fresh-green); }
.rolepick.is-sel { border-color: var(--deep-green); background: var(--soft-surface); box-shadow: 0 0 0 3px rgba(141,198,67,.16); }
.rolepick .ic { width: 30px; height: 30px; margin: 0 auto 6px; border-radius: 9px; background: var(--soft-surface); display: grid; place-items: center; color: var(--deep-green); }
.rolepick .ic svg { width: 17px; height: 17px; }
.rolepick .lbl { font-size: 11.5px; font-weight: 600; font-family: var(--font-display); color: var(--forest); }

/* ====================================================================
   Utilities
   ==================================================================== */
.grid { display: grid; }
.flex { display: flex; }
.iflex { display: inline-flex; }
.col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; }
.mt-1{margin-top:4px}.mt-2{margin-top:8px}.mt-3{margin-top:12px}.mt-4{margin-top:16px}.mt-5{margin-top:20px}.mt-6{margin-top:24px}
.mb-2{margin-bottom:8px}.mb-3{margin-bottom:12px}.mb-4{margin-bottom:16px}.mb-5{margin-bottom:20px}.mb-6{margin-bottom:24px}
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.muted { color: var(--ink-faint); }
.soft { color: var(--ink-soft); }
.tnum { font-variant-numeric: tabular-nums; }
.fw6 { font-weight: 600; }
.fdisplay { font-family: var(--font-display); }
.fs-xs { font-size: 11.5px; } .fs-sm { font-size: 13px; } .fs-lg { font-size: 17px; } .fs-xl { font-size: 22px; }
.hide { display: none !important; }
.cap { text-transform: capitalize; }
.divider { height: 1px; background: var(--line-soft); margin: 16px 0; }
.pill-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: var(--r-pill); }
.pill-tabs button { padding: 7px 16px; border-radius: var(--r-pill); font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--ink-soft); transition: .16s; }
.pill-tabs button.is-active { background: var(--white); color: var(--forest); box-shadow: var(--sh-xs); }

/* "Pro" gold badge — premium product accent */
.pro-badge { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-display); font-weight: 700; font-size: 10.5px; letter-spacing: .06em; color: #4a3a08; background: linear-gradient(135deg, var(--gold-bright), var(--gold)); padding: 2px 8px; border-radius: var(--r-pill); box-shadow: 0 2px 6px rgba(201,154,46,.35); }
.text-gold { color: var(--gold); }

.grid-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.grid-dash { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }

.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.list-row:last-child { border-bottom: none; }
.alert-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: var(--r-md); background: var(--surface-2); transition: .16s; }
.alert-row:hover { background: var(--fresh-200); }
.alert-row .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }

/* Jabatan & Akses */
.ra-access-layout { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
.ra-roles-panel { position: sticky; top: calc(var(--topbar-h) + 14px); }
.ra-role-card { min-height: 72px; }
.ra-role-card.is-active { box-shadow: inset 4px 0 0 var(--fresh-green), var(--sh-xs); }
.ra-detail-panel { min-width: 0; }
.ra-detail-head { align-items: center; }
.ra-menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ra-menu-card { min-width: 0; }
.ra-menu-head { align-items: center; }
.ra-menu-row { min-width: 0; }
.ra-switch { width: 74px; justify-content: center; flex: 0 0 74px; }

/* mobile nav toggle */
.menu-toggle { display: none; }
.mobile-tabbar { display: none; }

/* ====================================================================
   Responsive
   ==================================================================== */
@media (max-width: 1180px) {
  .grid-kpi { grid-template-columns: repeat(2,1fr); }
  .grid-dash { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  :root { --sidebar-w: 0px; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: min(310px, 88vw); z-index: 90; transform: translateX(-100%); transition: transform .28s var(--ease); }
  .sidebar.is-open { transform: none; box-shadow: var(--sh-lg); }
  .menu-toggle { display: grid; }
  .scrim { position: fixed; inset: 0; background: rgba(1,42,20,.4); z-index: 80; }
  .login { grid-template-columns: 1fr; min-height: 100svh; }
  .login__brandside { display: none; }
  .login__formside {
    min-height: 100svh;
    place-items: start center;
    padding: max(24px, env(safe-area-inset-top, 0px)) 18px calc(28px + env(safe-area-inset-bottom, 0px));
  }
  .login__form { max-width: 430px; }
  .login__form h3 { font-size: 25px; }
  .login__form > p { font-size: 13.5px; margin-bottom: 18px; }
  .login__roles { gap: 10px; margin-bottom: 18px; }
  .rolepick { min-height: 70px; padding: 12px 6px; border-radius: 14px; }
  .rolepick .ic { width: 32px; height: 32px; margin-bottom: 6px; }
  .rolepick .lbl { font-size: 11px; line-height: 1.15; }
  .login__form .field { margin-bottom: 14px; }
  .login__form .input { min-height: 48px; font-size: 16px; }
  .login__form .btn-lg { min-height: 52px; font-size: 15px; border-radius: 15px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .col-2 { grid-column: span 1; }
}
@media (max-width: 480px) {
  .login__formside {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(14px, env(safe-area-inset-top, 0px)) 14px calc(22px + env(safe-area-inset-bottom, 0px));
  }
  .login__form { width: 100%; max-width: 380px; }
  .login__form h3 { font-size: 24px; }
  .login__form > p { margin-bottom: 14px; }
  .login__roles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
  .rolepick {
    min-height: 62px;
    display: flex;
    align-items: center;
    gap: 9px;
    text-align: left;
    padding: 9px 10px;
  }
  .rolepick .ic { width: 30px; height: 30px; margin: 0; flex: none; }
  .rolepick .lbl { font-size: 12px; }
  .login__form .field { margin-bottom: 12px; }
  .login__form .input { min-height: 50px; }
  .login__form .hint { font-size: 11.5px; }
  .login__form .divider { margin: 12px 0; }
}
@media (max-width: 980px) {
  :root { --topbar-h: 58px; }
  html, body, #app { max-width: 100%; overflow-x: hidden; }
  body { font-size: 14px; }
  .shell { min-height: 100dvh; }
  .grid-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .content { padding: 14px 12px calc(88px + env(safe-area-inset-bottom, 0px)); }
  .topbar { padding: 0 10px; gap: 8px; }
  .topbar__title { min-width: 0; }
  .topbar__title h1 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
  .topbar__title p { display: none; }
  .topbar__spacer { flex: 1; }
  .topbar .search { display: none; }
  .sync-pill { display: none; }
  .iconbtn { width: 38px; height: 38px; border-radius: 12px; }
  #pinWarnBtn { width: 38px; height: 38px; padding: 0; font-size: 0; border-radius: 12px; }
  #pinWarnBtn svg { width: 18px; height: 18px; margin: 0; }
  #quickPos { display: none; }
  .section-title { align-items: flex-start; margin-bottom: 12px; }
  .section-title h2 { font-size: 17px; }
  .section-title .sub { font-size: 12.5px; }
  .card { border-radius: var(--r-md); }
  .card__head { padding: 14px 14px; gap: 8px; flex-wrap: wrap; }
  .card__body { padding: 14px; }
  .card__foot { padding: 12px 14px; }
  .stat { padding: 13px 13px; border-radius: var(--r-md); }
  .stat:hover { transform: none; }
  .stat__ico { width: 36px; height: 36px; margin-bottom: 8px; border-radius: 11px; }
  .stat__ico svg { width: 19px; height: 19px; }
  .stat__label { font-size: 11.5px; line-height: 1.2; }
  .stat__value { font-size: 18px !important; line-height: 1.2; word-break: break-word; }
  .btn { min-height: 42px; padding: 10px 14px; }
  .btn-sm { min-height: 36px; padding: 8px 11px; }
  .input, .select, textarea.input { min-height: 42px; font-size: 14px; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -14px; padding: 0 14px; }
  table.tbl { min-width: 620px; font-size: 13px; }
  .tbl thead th { padding: 10px 12px; }
  .tbl tbody td { padding: 11px 12px; }
  .overlay { align-items: flex-end; padding: 10px; }
  .modal { max-height: 92dvh; border-radius: 22px 22px 16px 16px; }
  .modal__head { padding: 16px 18px; }
  .modal__body { padding: 16px; }
  .modal__foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); flex-wrap: wrap; }
  .modal__foot .btn { flex: 1; }
  .toast-stack { left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); max-width: none; }
  .mobile-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 28px rgba(1,68,33,.12); backdrop-filter: blur(12px);
  }
  .mobile-tab {
    min-width: 0; height: 54px; border-radius: 16px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--ink-soft); font-family: var(--font-display); font-size: 10.5px; font-weight: 700;
  }
  .mobile-tab svg { width: 19px; height: 19px; }
  .mobile-tab.is-active { background: var(--soft-surface); color: var(--forest); box-shadow: inset 0 0 0 1px var(--line-soft); }
  .mobile-tab--menu { color: var(--deep-green); }
  .sidebar { padding: 14px 12px 12px; }
  .brand { padding-bottom: 10px; }
  .nav__item { min-height: 44px; }
  .ra-access-layout { grid-template-columns: 1fr; gap: 12px; }
  .ra-roles-panel { position: static; }
  .ra-roles-panel .card__body { max-height: none; }
  .ra-detail-panel {
    border-color: rgba(8,103,54,.22);
    box-shadow: 0 12px 28px rgba(1,68,33,.12);
    scroll-margin-top: 72px;
  }
  .ra-detail-head { align-items: stretch; gap: 8px; }
  .ra-detail-head .stat__ico { width: 34px !important; height: 34px !important; }
  .ra-detail-head .flex-1 { flex-basis: calc(100% - 46px); }
  .ra-detail-head .btn,
  .ra-detail-head .badge { flex: 1 1 calc(50% - 6px); justify-content: center; }
  .ra-menu-grid { grid-template-columns: 1fr; gap: 10px; }
  .ra-menu-head { align-items: stretch; }
  .ra-menu-head .btn { flex: 1 1 calc(50% - 6px); justify-content: center; }
  .ra-menu-row { align-items: flex-start; gap: 9px; flex-wrap: wrap; }
  .ra-menu-row .ic { width: 30px; height: 30px; }
  .ra-menu-row .flex-1 { flex-basis: 100%; }
  .ra-menu-labels { display: none; }
  .ra-switch {
    width: 56px;
    flex-basis: 56px;
    padding-top: 3px;
  }
  .ra-role-card {
    min-height: 66px;
    padding: 10px 11px !important;
  }
  .ra-role-card .badge { white-space: normal; text-align: center; }
}

@media (max-width: 380px) {
  .grid-kpi { grid-template-columns: 1fr; }
  .topbar__title h1 { max-width: 40vw; }
}

/* ---------- Mobile hardening across modules ---------- */
@media (max-width: 980px) {
  .content > * { min-width: 0; }
  .card,
  .section-title,
  .card__head,
  .card__body,
  .modal__head,
  .modal__body,
  .modal__foot { min-width: 0; }
  .card__head > *,
  .section-title > *,
  .modal__head > * { min-width: 0; }
  .card__head .search {
    display: flex;
    width: 100%;
    max-width: none !important;
    min-width: 0;
  }
  .section-title > .flex,
  .card__head > .flex,
  .modal__body > .flex { flex-wrap: wrap; }
  .section-title .input,
  .section-title .select,
  .card__head .input,
  .card__head .select {
    width: 100% !important;
    max-width: 100%;
  }
  .form-grid[style] { grid-template-columns: 1fr !important; }
  .grid-kpi[style] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .pill-tabs {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .pill-tabs button { flex: 0 0 auto; }
  .input-group,
  .input-group .input { min-width: 0; }
  div[style*="overflow-x:auto"],
  div[style*="overflow-x: auto"] {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  table.data-table,
  table.tbl { max-width: 100%; }
  .modal { max-width: calc(100vw - 20px); }
  .modal__head h3 {
    font-size: 16px;
    overflow-wrap: anywhere;
  }
  .modal__head .sub { overflow-wrap: anywhere; }
}

@media (max-width: 720px) {
  .grid-kpi[style] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .section-title,
  .card__head { align-items: stretch; }
  .section-title .btn,
  .card__head .btn {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    line-height: 1.2;
  }
  .card__head .btn[style*="margin-left:auto"],
  .section-title .btn[style*="margin-left:auto"] { margin-left: 0 !important; }
  .tbl--responsive {
    min-width: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
  }
  .tbl--responsive thead { display: none; }
  .tbl--responsive tbody { display: grid; gap: 10px; }
  .tbl--responsive tbody tr {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--white);
    box-shadow: var(--sh-xs);
  }
  .tbl--responsive tbody td {
    display: grid;
    grid-template-columns: minmax(92px, 36%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 0 !important;
    border: 0 !important;
    text-align: left !important;
    min-width: 0 !important;
    white-space: normal !important;
  }
  .tbl--responsive tbody td::before {
    content: attr(data-label);
    color: var(--ink-faint);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0;
    font-weight: 700;
  }
  .tbl--responsive tbody td[data-label=""] {
    grid-template-columns: 1fr;
  }
  .tbl--responsive tbody td[data-label=""]::before { display: none; }
  table.data-table {
    min-width: 620px;
    font-size: 13px;
  }
  table.data-table th,
  table.data-table td { padding: 9px 10px; }
  .drawer {
    width: 100vw;
    max-width: 100vw;
  }
}

@media (max-width: 540px) {
  .overlay {
    align-items: stretch;
    padding: 0;
  }
  .modal {
    max-width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
  }
  .modal__head {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px;
  }
  .modal__body { padding: 14px; }
  .modal__foot {
    position: sticky;
    bottom: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .modal__foot .btn { min-width: min(150px, 100%); }
  .grid-kpi,
  .grid-kpi[style] { grid-template-columns: 1fr !important; }
  .stat { min-height: 96px; }
  .search-results {
    position: fixed;
    left: 10px !important;
    right: 10px !important;
    top: calc(var(--topbar-h) + 8px) !important;
    min-width: 0;
    max-height: 62dvh;
  }
  .toast { border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ====================================================================
   POS / Kasir
   ==================================================================== */
.pos { display: grid; grid-template-columns: 1fr 400px; grid-template-rows: minmax(0, 1fr); gap: 18px; height: calc(100vh - var(--topbar-h) - 52px); }
.pos__left { display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 0; }
.cart { min-height: 0; }
.pos__tools { display: flex; gap: 10px; align-items: center; }
.pos__search { flex: 1; display: flex; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px; box-shadow: var(--sh-xs); }
.pos__search input { border: none; outline: none; background: none; flex: 1; font-size: 15px; }
.pos__search svg { color: var(--deep-green); }
.pos__cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.pos__cats::-webkit-scrollbar { height: 5px; }
.pos__cats::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
.catchip { padding: 8px 16px; border-radius: var(--r-pill); background: var(--white); border: 1px solid var(--line); font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--ink-soft); white-space: nowrap; transition: .16s var(--ease); }
.catchip:hover { border-color: var(--fresh-green); }
.catchip.is-active { background: var(--forest); color: #fff; border-color: var(--forest); }
.pos__grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; align-content: start; padding: 2px; }
.pos__grid::-webkit-scrollbar { width: 7px; }
.pos__grid::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
.pcard { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; cursor: pointer; transition: .16s var(--ease); position: relative; display: flex; flex-direction: column; box-shadow: var(--sh-xs); text-align: left; }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--fresh-green); }
.pcard:active { transform: translateY(0) scale(.98); }
.pcard:disabled { opacity: .55; cursor: not-allowed; }
.pcard__img { aspect-ratio: 1.5; border-radius: 10px; background: linear-gradient(140deg, var(--soft-surface), var(--fresh-200)); display: grid; place-items: center; color: var(--deep-green); margin-bottom: 10px; position: relative; overflow: hidden; }
.pcard__img svg { width: 30px; height: 30px; opacity: .8; }
.pcard__name { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--ink); line-height: 1.25; min-height: 32px; }
.pcard__sku { font-size: 10.5px; color: var(--ink-faint); margin-top: 2px; }
.pcard__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.pcard__price { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--forest); }
.pcard__price small { font-weight: 500; color: var(--ink-faint); font-size: 10px; }
.pcard__badge { position: absolute; top: 8px; left: 8px; }
.pcard__exp { position: absolute; top: 8px; right: 8px; }

/* Cart panel */
.cart { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); display: flex; flex-direction: column; min-height: 0; }
.cart__head { padding: 16px 18px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 10px; }
.cart__head h3 { font-size: 16px; }
.cart__cust { padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.cart__items { flex: 1; overflow-y: auto; padding: 8px 14px; }
.cart__items::-webkit-scrollbar { width: 6px; }
.cart__items::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
.citem { display: flex; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line-soft); align-items: flex-start; }
.citem:last-child { border-bottom: none; }
.citem__main { flex: 1; min-width: 0; }
.citem__name { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--ink); line-height: 1.2; }
.citem__meta { font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; }
.citem__total { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; color: var(--forest); white-space: nowrap; }
.qtyctl { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: var(--r-pill); overflow: hidden; margin-top: 6px; }
.qtyctl button { width: 26px; height: 26px; display: grid; place-items: center; color: var(--deep-green); background: var(--soft-surface); }
.qtyctl button:hover { background: var(--fresh-200); }
.qtyctl span { min-width: 46px; text-align: center; font-weight: 600; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.citem__rm { color: var(--ink-faint); padding: 2px; }
.citem__rm:hover { color: var(--danger); }
.cart__summary { padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface-3); }
.sumrow { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-soft); padding: 3px 0; }
.sumrow.total { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--forest); padding-top: 10px; margin-top: 6px; border-top: 1px dashed var(--line); }
.cart__actions { padding: 14px 18px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.cart__actions .row { display: flex; gap: 8px; }

/* numpad / cash chips */
.cash-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cash-chip { padding: 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--white); font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--forest); transition: .14s; }
.cash-chip:hover { border-color: var(--fresh-green); background: var(--soft-surface); }
.paymethods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.paymethod { padding: 14px 8px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--white); display: flex; flex-direction: column; align-items: center; gap: 7px; transition: .16s var(--ease); }
.paymethod:hover { border-color: var(--fresh-green); }
.paymethod.is-sel { border-color: var(--deep-green); background: var(--soft-surface); box-shadow: 0 0 0 3px rgba(141,198,67,.16); }
.paymethod .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--soft-surface); display: grid; place-items: center; color: var(--deep-green); }
.paymethod .lbl { font-family: var(--font-display); font-weight: 600; font-size: 12.5px; color: var(--forest); }

/* shift gate */
.shiftgate { display: grid; place-items: center; min-height: 60vh; }
.shiftgate__card { max-width: 420px; text-align: center; }

/* receipt */
.receipt { background: #fff; border-radius: var(--r-md); padding: 22px; font-family: 'Hind Madurai', monospace; box-shadow: var(--sh-sm); border: 1px dashed var(--line); }
.receipt__brand { text-align: center; border-bottom: 1px dashed var(--line); padding-bottom: 12px; margin-bottom: 12px; }
.receipt__brand h4 { font-family: var(--font-display); font-size: 18px; }
.receipt__brand p { font-size: 11px; color: var(--ink-faint); }
.receipt__line { display: flex; justify-content: space-between; font-size: 12.5px; padding: 2px 0; }
.receipt__items { border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); padding: 10px 0; margin: 10px 0; }

@media (max-width: 1100px) {
  .pos { grid-template-columns: 1fr; height: auto; }
  .pos__grid { max-height: 460px; }
  .cart { position: sticky; bottom: 0; }
}

@media (max-width: 980px) {
  .pos { gap: 12px; height: auto; }
  .pos__tools { flex-wrap: wrap; gap: 8px; }
  .pos__search { min-width: 100%; padding: 10px 12px; }
  .pos__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; gap: 10px; }
  .pcard { padding: 10px; border-radius: var(--r-sm); }
  .pcard__img { aspect-ratio: 1.35; margin-bottom: 8px; }
  .pcard__name { font-size: 12.5px; min-height: 34px; }
  .pcard__foot { align-items: flex-start; gap: 6px; flex-direction: column; }
  .cart { position: static; margin-bottom: 8px; }
  .cart__head, .cart__cust, .cart__summary, .cart__actions { padding-left: 14px; padding-right: 14px; }
  .cart__actions .row { flex-wrap: wrap; }
  .cart__actions .row .btn { flex: 1; }
}

/* ===== Permintaan Stok Toko → Gudang ===== */
.btn-xs { padding: 5px 10px; font-size: 12px; gap: 4px; border-radius: var(--r-sm); }
.btn.danger, .btn-xs.danger { color: var(--danger); }
.btn.danger:hover { background: #fff0f0; }
.text-danger { color: var(--danger) !important; }

/* stok split di tabel inventory */
.loc-split { display: flex; gap: 8px; justify-content: flex-end; margin-top: 2px; color: var(--ink-faint); font-size: 11px; }
.loc-split span { display: inline-flex; align-items: center; gap: 3px; }
.loc-split svg { opacity: .7; }

/* baris ringkas barang dalam kartu/permintaan */
.reqlines, .kancard__lines { display: flex; flex-direction: column; gap: 4px; }
.reqln { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 3px 0; border-bottom: 1px dashed var(--line-soft); }
.reqln:last-child { border-bottom: 0; }
.reqln__name { color: var(--ink-soft); min-width: 0; }
.reqln__qty { font-weight: 700; color: var(--forest); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* pemilih produk pada modal buat-permintaan & kirim */
.reqpick { display: flex; flex-direction: column; gap: 6px; }
.reqpick__row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); }
.reqpick__row.is-low { border-color: #f3c9a0; background: #fffaf3; }
.reqpick__info { flex: 1; min-width: 0; }
.reqpick__qty { width: 56px; text-align: center; border: none; background: transparent; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--forest); }
.qtyctl--sm button { width: 24px; height: 24px; }
.qtyctl--sm .reqpick__qty { width: 50px; }

/* timeline riwayat */
.timeline { display: flex; flex-direction: column; gap: 0; padding-left: 4px; }
.timeline__item { display: flex; gap: 12px; padding: 0 0 14px 2px; position: relative; }
.timeline__item:not(:last-child)::before { content: ''; position: absolute; left: 5px; top: 14px; bottom: -2px; width: 2px; background: var(--line); }
.timeline__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--fresh-green); border: 2px solid var(--white); box-shadow: 0 0 0 2px var(--fresh-200); margin-top: 2px; flex-shrink: 0; z-index: 1; }

/* ===== Papan Kanban Gudang ===== */
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.kancol { background: var(--surface-3, #f3f8ea); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; min-height: 160px; }
.kancol__head { display: flex; align-items: center; gap: 8px; padding: 11px 14px; font-family: var(--font-display); font-weight: 700; font-size: 13.5px; color: var(--forest); border-bottom: 2px solid var(--line); background: var(--white); }
.kancol__head svg { opacity: .85; }
.kancol__count { margin-left: auto; background: var(--soft-surface); color: var(--deep-green); border-radius: var(--r-pill); padding: 1px 9px; font-size: 12px; }
.kancol.col-warn .kancol__head { border-bottom-color: #e6b800; }
.kancol.col-info .kancol__head { border-bottom-color: #4a90d9; }
.kancol.col-kurma .kancol__head { border-bottom-color: var(--gold, #c99a2e); }
.kancol__body { padding: 12px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.kancol__empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink-faint); font-size: 12px; padding: 22px 0; opacity: .55; }

.kancard { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--fresh-green); border-radius: var(--r-sm); padding: 11px 12px; box-shadow: var(--shadow-xs, 0 1px 2px rgba(0,0,0,.05)); }
.kancard--urgent { border-left-color: var(--danger); }
.kancard__top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.kancard__no { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--forest); }
.kancard__from { font-size: 11.5px; color: var(--ink-faint); display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.kancard__note { margin-top: 8px; font-size: 11.5px; color: var(--ink-soft); background: var(--soft-surface); border-radius: var(--r-sm); padding: 6px 9px; }
.kancard__acts { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* ===== Mode Display (layar gudang) ===== */
body.in-display .sidebar, body.in-display .topbar { display: none; }
body.in-display .main, body.in-display .view { padding: 0 !important; max-width: none !important; }
.display-wrap { position: fixed; inset: 0; background: linear-gradient(160deg, #06301f, #014421 60%, #022b1a); color: #fff; padding: 22px 26px; overflow: auto; z-index: 200; }
.display-bar { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.display-bar__brand { display: flex; align-items: center; gap: 12px; }
.display-bar__title { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.display-bar__sub { font-size: 12.5px; opacity: .75; }
.display-bar .btn { margin-left: auto; color: #fff; border-color: rgba(255,255,255,.3); }
.kanban--display { grid-template-columns: repeat(3, 1fr); gap: 20px; }
.kanban--display .kancol { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.kanban--display .kancol__head { background: rgba(255,255,255,.1); color: #fff; font-size: 16px; padding: 14px 18px; border-bottom-width: 3px; }
.kanban--display .kancol__count { background: rgba(255,255,255,.16); color: #fff; font-size: 14px; }
.kanban--display .kancard { background: rgba(255,255,255,.96); padding: 14px 16px; }
.kanban--display .kancard__no { font-size: 16px; }
.kanban--display .reqln { font-size: 14.5px; }
.kanban--display .kancol__empty { color: rgba(255,255,255,.5); }

@media (max-width: 980px) {
  .kanban, .kanban--display { grid-template-columns: 1fr; }
}

/* ===== Marketplace ===== */
.ch-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; vertical-align: middle; box-shadow: 0 0 0 2px rgba(0,0,0,.04); }
.select-sm { padding: 6px 10px; font-size: 12.5px; }
.mp-sum .sumrow { padding: 4px 0; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }

/* stok per-lokasi di kartu POS */
.pcard__loc { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--ink-faint); margin-top: 2px; }
.pcard__loc svg { opacity: .65; }

/* ---------- Input Modal Produk (HPP) ---------- */
.mp-kpis .mp-stat { min-height: 132px; }
.mp-panel { overflow: visible; }
.mp-head { background: rgba(255,255,255,.98); }
.mp-toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) auto; gap: 10px; padding: 12px 14px 8px; align-items: center; }
.mp-search { position: relative; }
.mp-search span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--deep-green); display: grid; place-items: center; pointer-events: none; }
.mp-search .input { padding-left: 42px; height: 46px; border-color: var(--fresh-green); box-shadow: 0 0 0 3px rgba(141,198,67,.12); }
.mp-guide { margin: 8px 14px 0; padding: 11px 12px; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--info-soft), var(--soft-surface)); color: var(--ink-soft); font-size: 12.5px; display: flex; align-items: center; gap: 10px; }
.mp-body { padding: 12px 0 0; overflow: visible; }
.mp-table-wrap { overflow-x: auto; }
.mp-table { width: 100%; min-width: 680px; border-collapse: separate; border-spacing: 0; }
.mp-table thead th { background: var(--soft-surface); color: var(--ink-faint); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; padding: 10px 14px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line); }
.mp-col-product { text-align: left; }
.mp-col-stock, .mp-col-input, .mp-col-status { text-align: right; }
.mp-col-stock { width: 130px; }
.mp-col-input { width: 240px; }
.mp-col-status { width: 118px; }
.mp-table tbody tr { transition: background .16s var(--ease), box-shadow .16s var(--ease); }
.mp-table tbody tr + tr td { border-top: 1px solid var(--line-soft); }
.mp-table tbody tr.is-empty { background: rgba(255,252,244,.72); }
.mp-table tbody tr:hover { background: #fbfff1; }
.mp-table td { padding: 10px 14px; vertical-align: middle; }
.mp-product-cell { padding-left: 18px; }
.mp-product-name { color: var(--forest); font-weight: 700; font-size: 13px; line-height: 1.3; }
.mp-product-meta { color: var(--ink-faint); font-size: 11.5px; margin-top: 2px; }
.mp-stock-cell { text-align: right; color: var(--ink-soft); font-size: 13px; white-space: nowrap; }
.mp-input-cell { min-width: 230px; }
.mp-money { margin: 0; justify-content: flex-end; }
.mp-money .addon { background: var(--soft-surface); color: var(--forest); border-color: var(--line); border-left: 1px solid var(--line); min-width: 44px; }
.mp-money .addon:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.mp-money .mp-unit { border-radius: 0 var(--r-sm) var(--r-sm) 0; min-width: 58px; }
.mp-money .mp-modal { width: 110px; text-align: right; border-radius: 0; border-left: none; border-right: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.mp-money .mp-modal:focus { position: relative; z-index: 1; box-shadow: inset 0 0 0 1px var(--fresh-green), 0 0 0 3px rgba(141,198,67,.16); }
.mp-status-cell { text-align: center; white-space: nowrap; }
.mp-badge { gap: 4px; font-size: 10px; padding: 4px 8px; }

@media (max-width: 900px) {
  .mp-toolbar { grid-template-columns: 1fr; }
  .mp-head { position: static; }
  .mp-table thead th { top: 0; }
}

@media (max-width: 720px) {
  .mp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mp-guide { align-items: flex-start; font-size: 12px; }
  .mp-body { padding: 10px 12px 12px; }
  .mp-table-wrap { overflow: visible; }
  .mp-table { min-width: 0; border-collapse: separate; border-spacing: 0 10px; }
  .mp-table thead { display: none; }
  .mp-table tbody tr { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); box-shadow: var(--sh-xs); }
  .mp-table tbody tr + tr td { border-top: none; }
  .mp-table tbody tr.is-empty { border-color: var(--warn-soft); background: #fffdf7; }
  .mp-table td { padding: 0; }
  .mp-table td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--ink-faint); font-size: 10px; text-transform: uppercase; letter-spacing: .03em; font-weight: 700; }
  .mp-stock-cell, .mp-status-cell { text-align: left; }
  .mp-money { justify-content: stretch; }
  .mp-money .mp-modal { flex: 1; width: auto; min-width: 0; }
}

/* ---------- Riwayat Pesanan Online ---------- */
.os-history .tbl thead th { padding: 9px 12px; }
.os-history .tbl tbody td { padding: 7px 12px; }
.os-history .tbl thead th:nth-child(2),
.os-history .tbl tbody td:nth-child(2) { display: none; }
.os-history .tbl tbody td:first-child { min-width: 150px; }
.os-history .tbl tbody td:last-child { min-width: 290px; white-space: nowrap; }
.os-history .tbl tbody td:last-child .btn-xs {
  width: 29px;
  height: 29px;
  padding: 0;
  justify-content: center;
  font-size: 0;
  border-radius: 9px;
  vertical-align: middle;
}
.os-history .tbl tbody td:last-child .btn-xs svg { width: 14px; height: 14px; }
.os-history .tbl tbody td:last-child .btn-xs.os-action-wa,
.os-history .tbl tbody td:last-child .btn-xs.os-action-paid {
  width: auto;
  min-width: 48px;
  padding: 0 9px;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
}
.os-history .tbl tbody td:last-child .os-action-wa {
  color: #0f7a36;
  border-color: #b8e6c7;
  background: #f2fbf4;
}
.os-history .tbl tbody td:last-child .os-action-paid {
  color: var(--forest-900);
  border-color: var(--fresh-green);
  background: var(--fresh-green);
}
.os-history .tbl tbody td:last-child .iconbtn {
  width: 29px !important;
  height: 29px !important;
  border-radius: 9px;
  vertical-align: middle;
}
.os-history .tbl tbody td:last-child .btn-xs + .btn-xs,
.os-history .tbl tbody td:last-child .btn-xs + .iconbtn,
.os-history .tbl tbody td:last-child .iconbtn + .btn-xs,
.os-history .tbl tbody td:last-child .iconbtn + .iconbtn { margin-left: 4px; }

@media (max-width: 720px) {
  .os-history .tbl tbody td { padding: 7px 10px; }
  .os-history .tbl thead th:nth-child(4),
  .os-history .tbl tbody td:nth-child(4) { display: none; }
  .os-history .tbl tbody td:last-child { min-width: 280px; }
}

/* ---------- Datasheet Harga per Level ---------- */
.ps-card { overflow: hidden; }
.ps-head {
  align-items: center;
  gap: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfff3 100%);
}
.ps-title { display: flex; align-items: center; gap: 10px; min-width: 260px; }
.ps-title h3 { display: flex; align-items: center; gap: 6px; margin: 0; }
.ps-title__ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--soft-surface);
  color: var(--forest);
  border: 1px solid var(--line-soft);
}
.ps-toolbar {
  margin-left: auto;
  display: grid;
  grid-template-columns: minmax(220px, 280px) 190px auto auto;
  gap: 8px;
  align-items: center;
}
.ps-search { position: relative; }
.ps-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--deep-green);
  pointer-events: none;
}
.ps-search .input { height: 42px; padding-left: 38px; }
.ps-toolbar .select { height: 42px; }
.ps-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-3);
}
.ps-summary div {
  min-height: 58px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: #fff;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ps-summary span {
  color: var(--ink-faint);
  font-size: 10.5px;
  text-transform: uppercase;
  font-weight: 700;
}
.ps-summary strong {
  margin-top: 3px;
  color: var(--forest);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.ps-body { padding: 0; overflow: auto; max-height: calc(100vh - 265px); }
.ps-table { width: 100%; min-width: 900px; border-collapse: separate; border-spacing: 0; }
.ps-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 12px;
  background: #eef8df;
  color: var(--forest);
  border-bottom: 1px solid var(--line);
}
.ps-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.ps-table tbody tr:nth-child(even) { background: #fcfdf9; }
.ps-table tbody tr:hover { background: #f4fbeb; }
.ps-prod__name { color: var(--forest); font-size: 13px; font-weight: 700; line-height: 1.25; }
.ps-prod__cat { margin-top: 3px; color: var(--ink-faint); font-size: 11px; }
.ps-sku,
.ps-unit {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 11.5px;
  white-space: nowrap;
}
.ps-unit { background: #f0f8e6; color: var(--forest); font-weight: 700; }
.ps-price-cell { white-space: nowrap; }
.ps-price {
  display: inline-flex;
  justify-content: flex-end;
  min-width: 82px;
  padding: 5px 9px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}
.ps-price--main {
  background: linear-gradient(180deg, #f2ffd8, #e6f7c9);
  border-color: #cfe8a9;
  color: var(--forest);
  font-weight: 800;
}
.ps-empty { text-align: center; padding: 42px !important; color: var(--ink-faint); }

@media (max-width: 980px) {
  .ps-head { align-items: stretch; }
  .ps-title { width: 100%; }
  .ps-toolbar { margin-left: 0; width: 100%; grid-template-columns: 1fr 180px auto auto; }
  .ps-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .ps-toolbar { grid-template-columns: 1fr 1fr; }
  .ps-toolbar .ps-search { grid-column: span 2; }
  .ps-summary { grid-template-columns: 1fr; }
  .ps-body { max-height: none; }
}

/* ===== Repacking ===== */
.field-inline { display: flex; flex-direction: column; gap: 2px; }
.field-inline label { white-space: nowrap; }
.field-inline .input { padding: 6px 8px; }
