/* =========================================================
   ArtosPOS — Design System
   Navy · bright blue · white · light grey (palet logo Satu Arah Digital)
   ========================================================= */
:root {
  /* ----- Palet brand (mengikuti logo Satu Arah Digital) ----- */
  --navy-950: #061729;   /* navy tergelap — sidebar/login bg */
  --navy-900: #0A2340;   /* navy logo */
  --navy-850: #0D2C4E;
  --navy-800: #11375F;   /* navy permukaan gelap aktif */
  --blue-700: #0F5FCB;   /* biru untuk teks/tautan (kontras di putih) */
  --blue-600: #1877F2;   /* biru terang logo */
  --blue-500: #2E8BFF;
  --sky: #5AA9FF;        /* aksen terang di atas navy */
  --tint-200: #BBD9FD;
  --tint-50: #EAF2FE;

  /* Alias nama lama agar seluruh komponen & inline style tetap bekerja */
  --green-950: var(--navy-950);
  --green-900: var(--navy-900);
  --green-850: var(--navy-850);
  --green-800: var(--navy-800);
  --green-700: var(--blue-700);
  --green-600: var(--blue-600);
  --green-500: var(--blue-500);
  --mint: var(--sky);
  --mint-200: var(--tint-200);
  --mint-50: var(--tint-50);

  /* ----- Netral (abu kebiruan, bukan kehijauan) ----- */
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --surface-2: #FAFBFD;
  --line: #E3E9F0;
  --line-strong: #D2DBE6;
  --ink: #0F2338;
  --muted: #5E7183;
  --muted-2: #8798A8;

  /* ----- Warna status (tetap) ----- */
  --amber: #B45309;
  --amber-bg: #FEF3C7;
  --red: #B91C1C;
  --red-bg: #FEE2E2;
  --blue: #1D4ED8;
  --blue-bg: #DBEAFE;

  --shadow-sm: 0 1px 2px rgba(10, 35, 64, .05);
  --shadow: 0 4px 16px rgba(10, 35, 64, .07);
  --shadow-lg: 0 18px 44px rgba(10, 35, 64, .16);
  --radius: 14px;
  --radius-lg: 18px;
  --sidebar-w: 264px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
svg { display: block; }

/* ------------------------- Shell ------------------------- */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: linear-gradient(180deg, #0D2C4E 0%, #061729 100%);
  color: #B9CBE0;
  display: flex; flex-direction: column;
  padding: 22px 16px 16px;
  z-index: 40;
  border-right: 1px solid rgba(255, 255, 255, .04);
}
.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 0 8px 20px;
}
.brand-mark { border-radius: 10px; flex: 0 0 auto; }
.brand-text { font-size: 21px; font-weight: 800; letter-spacing: -.03em; color: #fff; }
.brand-pos { color: var(--mint); }
.outlet-pill {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px; color: #D7E5F5;
  margin: 0 4px 18px;
}
.outlet-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(90, 169, 255, .18); flex: 0 0 auto; }
.outlet-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding-bottom: 12px; }
.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 5px; }
.nav-group-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .11em;
  color: #6E88A6; font-weight: 600; padding: 0 12px; margin-bottom: 7px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px;
  color: #B9CBE0; font-weight: 500; font-size: 13.5px;
  transition: background .15s, color .15s, transform .15s;
  margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.is-active {
  background: linear-gradient(90deg, rgba(90, 169, 255, .22), rgba(90, 169, 255, .06));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(90, 169, 255, .25);
}
.nav-item.is-active .nav-icon { color: var(--mint); }
.nav-icon { width: 20px; height: 20px; flex: 0 0 auto; color: #8FA9C4; }
.nav-icon svg { width: 20px; height: 20px; }
.sidebar-footer { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 12px; }
.shift-mini { margin-bottom: 10px; }
.shift-mini-card {
  display: flex; align-items: center; gap: 8px;
  background: rgba(90, 169, 255, .1); border: 1px solid rgba(90, 169, 255, .22);
  border-radius: 10px; padding: 8px 11px; font-size: 11.5px; color: #C9E0F7;
}
.shift-mini-card b { color: #fff; font-weight: 600; }
.shift-mini-card.is-off { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .1); color: #9FB4CC; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); animation: pulse 2s infinite; flex: 0 0 auto; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.user-box { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.user-box:hover { background: rgba(255, 255, 255, .05); }
.avatar {
  width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--mint), var(--green-600));
  color: #061729; font-weight: 700; font-size: 13px;
  display: grid; place-items: center;
}
.user-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.user-meta strong { color: #fff; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta span { color: #86A0BC; font-size: 11px; }
.logout-form { margin: 0; }
.icon-btn {
  border: 1px solid var(--line); background: var(--surface);
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  cursor: pointer; color: var(--muted); transition: .15s;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line-strong); }
.icon-btn.ghost-light { background: transparent; border: none; color: #8FA9C4; width: 30px; height: 30px; }
.icon-btn.ghost-light:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.mobile-only { display: none !important; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 28px;
  background: rgba(244, 246, 250, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.page-heading { flex: 1; min-width: 0; }
.page-heading h1 { font-size: 21px; font-weight: 700; }
.page-heading p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.content { padding: 24px 28px 40px; flex: 1; max-width: 1440px; width: 100%; }
.content-wide { max-width: none; }

/* ------------------------- Buttons ------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; border: 1px solid transparent;
  padding: 10px 16px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: .15s; white-space: nowrap; background: transparent; color: var(--ink);
}
.btn svg { width: 17px; height: 17px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--green-700), var(--green-800));
  color: #fff; box-shadow: 0 6px 16px rgba(17, 55, 95, .22);
}
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, var(--green-600), var(--green-700)); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); border-color: #BFCAC3; }
.btn-soft { background: var(--mint-50); color: var(--green-700); border-color: #C4DCFB; }
.btn-soft:hover:not(:disabled) { background: #DCEAFD; }
.btn-danger { background: var(--red-bg); color: var(--red); border-color: #FBC5C5; }
.btn-danger:hover:not(:disabled) { background: #FCD2D2; }
.btn-dark { background: var(--green-900); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 20px; font-size: 15px; border-radius: 12px; }
.btn-sm { padding: 7px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-icon-only { padding: 8px; }
.link-btn { background: none; border: none; color: var(--green-700); font-weight: 600; cursor: pointer; font-size: 13px; padding: 4px; }
.link-btn:hover { text-decoration: underline; }

/* ------------------------- Cards / layout ------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.card-title { font-size: 15px; font-weight: 700; }
.card-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card-body { padding: 20px; }
.card-body.tight { padding: 14px 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 700; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* Stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(218px, 1fr)); gap: 20px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.stat-card::after { content: ''; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, rgba(90, 169, 255, .16), transparent 70%); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--mint-50); color: var(--green-700); }
.stat-icon svg { width: 18px; height: 18px; }
.stat-value { font-size: 23px; font-weight: 800; letter-spacing: -.03em; }
.stat-foot { margin-top: 8px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12px; }
.trend.up { color: var(--green-600); } .trend.down { color: var(--red); }

/* ------------------------- Forms ------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .form-label { font-size: 12.5px; font-weight: 600; color: #2C4258; }
.field .hint { font-size: 11.5px; color: var(--muted-2); }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line-strong); background: #fff;
  border-radius: 10px; padding: 10px 12px; font-size: 13.5px; color: var(--ink);
  font-family: inherit; transition: border .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(46, 139, 255, .13); }
.textarea { resize: vertical; min-height: 76px; }
.select { appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7B73' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 32px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.search-box { position: relative; flex: 1; min-width: 180px; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted-2); }
.search-box .input { padding-left: 37px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; font-weight: 500; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 40px; height: 23px; border-radius: 999px; background: #D5DDD8; transition: .2s; position: relative; flex: 0 0 auto; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked + .track { background: var(--green-600); }
.switch input:checked + .track::after { transform: translateX(17px); }

/* ------------------------- Table ------------------------- */
.table-wrap { width: 100%; overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; padding: 11px 16px; font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); font-weight: 600;
  background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid #EDF2F8; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #FBFCFE; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .name-cell { font-weight: 600; }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ------------------------- Badges ------------------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge-green { background: var(--mint-50); color: var(--green-700); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-gray { background: #F0F4F9; color: #5A6C7E; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ------------------------- Empty / misc ------------------------- */
.empty-state { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty-icon { font-size: 30px; margin-bottom: 10px; opacity: .8; }
.empty-state h3 { font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.empty-state p { font-size: 13px; max-width: 380px; margin: 0 auto; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13px; border: 1px solid; }
.alert svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.alert-warn { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }
.alert-info { background: #EFF6FF; border-color: #BFDBFE; color: #1E40AF; }
.alert-danger { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font-size: 12.5px; font-weight: 500; cursor: pointer; color: var(--muted); transition: .15s; }
.chip:hover { border-color: var(--green-500); color: var(--green-700); }
.chip.is-active { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.progress { height: 7px; border-radius: 999px; background: #EDF2F8; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green-600), var(--mint)); }
.avatar-sm { width: 26px; height: 26px; border-radius: 8px; font-size: 11px; }

/* ------------------------- Dashboard ------------------------- */
.hero-card {
  background: linear-gradient(120deg, #11375F 0%, #0D2C4E 55%, #061729 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 24px 26px; position: relative; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .07);
}
.hero-card::before {
  content: ''; position: absolute; right: -80px; top: -110px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(90, 169, 255, .3), transparent 65%);
}
.hero-card::after {
  content: ''; position: absolute; right: 40px; bottom: -120px; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(90, 169, 255, .16), transparent 70%);
}
.hero-inner { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.hero-title { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.hero-sub { color: #AFC8E4; font-size: 13px; margin-top: 6px; max-width: 480px; }
.hero-amount { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 14px; }
.hero-meta { display: flex; gap: 22px; margin-top: 18px; flex-wrap: wrap; }
.hero-meta div span { display: block; color: #94AECF; font-size: 11.5px; }
.hero-meta div strong { font-size: 15px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-btn { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); color: #fff; }
.hero-btn:hover { background: rgba(255, 255, 255, .18); }
.hero-primary { background: var(--mint); color: #061729; border-color: transparent; box-shadow: 0 8px 20px rgba(90, 169, 255, .25); }
.hero-primary:hover { background: #7CBAFF; }

.chart-bars { display: flex; align-items: flex-end; gap: 10px; height: 176px; padding-top: 8px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.chart-bar-wrap { width: 100%; flex: 1; display: flex; align-items: flex-end; }
.chart-bar { width: 100%; border-radius: 7px 7px 4px 4px; background: linear-gradient(180deg, #5AA9FF, #0F5FCB); min-height: 4px; transition: height .4s; position: relative; }
.chart-bar:hover { filter: brightness(1.08); }
.chart-bar.is-today { background: linear-gradient(180deg, #11375F, #061729); }
.chart-label { font-size: 10.5px; color: var(--muted-2); white-space: nowrap; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #EDF2F8; }
.list-row:last-child { border-bottom: none; }
.list-row .rank { width: 26px; height: 26px; border-radius: 8px; background: var(--mint-50); color: var(--green-700); font-weight: 700; font-size: 12px; display: grid; place-items: center; flex: 0 0 auto; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .grow strong { font-size: 13.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .grow span { font-size: 11.5px; color: var(--muted); }
.list-row .val { text-align: right; font-weight: 700; font-size: 13px; white-space: nowrap; }
.list-row .val small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }

/* ------------------------- POS ------------------------- */
.pos-shell { display: grid; grid-template-columns: minmax(0, 1fr) 388px; gap: 20px; align-items: start; }
.pos-left { min-width: 0; }
.pos-toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pos-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 12px; scrollbar-width: thin; }
.pos-cats::-webkit-scrollbar { height: 5px; }
.pos-cats::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 5px; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; }
.prod-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px;
  cursor: pointer; transition: .15s; text-align: left; display: flex; flex-direction: column; gap: 8px; position: relative;
}
.prod-card:hover { border-color: var(--green-500); box-shadow: 0 8px 20px rgba(17, 55, 95, .1); transform: translateY(-2px); }
.prod-card:active { transform: translateY(0); }
.prod-thumb {
  height: 62px; border-radius: 10px; display: grid; place-items: center;
  font-size: 24px; background: linear-gradient(135deg, #EAF2FE, #F5F8FD); border: 1px solid #DDE8F5;
}
.prod-name { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 34px; }
.prod-price { font-size: 13.5px; font-weight: 700; color: var(--green-700); }
.prod-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.prod-stock { font-size: 11px; color: var(--muted); }
.prod-add { position: absolute; top: 9px; right: 9px; width: 24px; height: 24px; border-radius: 7px; background: var(--green-800); color: #fff; display: grid; place-items: center; opacity: 0; transition: .15s; }
.prod-add svg { width: 14px; height: 14px; }
.prod-card:hover .prod-add { opacity: 1; }
.prod-card.has-var .prod-thumb::after { content: 'Varian'; position: absolute; }

.cart-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); position: sticky; top: 88px; display: flex; flex-direction: column; max-height: calc(100vh - 108px); overflow: hidden; }
.cart-head { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cart-head-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.cart-head h2 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.cart-count { background: var(--mint-50); color: var(--green-700); border-radius: 999px; font-size: 11.5px; font-weight: 700; padding: 2px 8px; }
.st-only { display: flex; gap: 7px; flex-wrap: wrap; }
.st-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; font-size: 12px; font-weight: 600;
  border-radius: 9px; border: 1px solid var(--line-strong); background: #fff; cursor: pointer; color: var(--muted); transition: .15s;
}
.st-chip:hover { border-color: var(--green-500); }
.st-chip.is-active { background: var(--green-800); color: #fff; border-color: var(--green-800); }
.st-chip.is-active .st-dot { background: var(--mint); }
.st-dot { width: 6px; height: 6px; border-radius: 50%; background: #C3CDC7; }
.cart-items { flex: 1; overflow-y: auto; padding: 6px 18px; min-height: 120px; }
.cart-empty { padding: 32px 10px; text-align: center; color: var(--muted); }
.cart-empty .empty-icon { font-size: 26px; }
.cart-item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid #EDF2F8; }
.cart-item:last-child { border-bottom: none; }
.ci-info { flex: 1; min-width: 0; }
.ci-info strong { font-size: 13px; display: block; line-height: 1.3; }
.ci-info .ci-var { font-size: 11.5px; color: var(--muted); }
.ci-info .ci-price { font-size: 12px; color: var(--green-700); font-weight: 600; margin-top: 2px; }
.ci-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.qty-ctrl { display: flex; align-items: center; gap: 2px; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.qty-ctrl button { width: 24px; height: 26px; border: none; background: #fff; color: var(--green-700); font-weight: 700; cursor: pointer; font-size: 14px; display: grid; place-items: center; }
.qty-ctrl button:hover { background: var(--mint-50); }
.qty-ctrl input { width: 34px; border: none; text-align: center; font-size: 12.5px; font-weight: 600; padding: 0; height: 26px; font-family: inherit; }
.qty-ctrl input:focus { outline: none; background: #F7FAFE; }
.ci-total { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ci-remove { border: none; background: none; color: var(--muted-2); cursor: pointer; padding: 2px; }
.ci-remove:hover { color: var(--red); }
.ci-remove svg { width: 15px; height: 15px; }
.cart-foot { border-top: 1px solid var(--line); padding: 14px 18px; background: var(--surface-2); }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 3px 0; color: var(--muted); }
.sum-row strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.sum-row.total { font-size: 18px; color: var(--ink); padding-top: 8px; margin-top: 6px; border-top: 1px dashed var(--line-strong); }
.sum-row.total strong { font-size: 20px; font-weight: 800; color: var(--green-700); }
.discount-row { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.discount-row .select { width: 96px; padding: 7px 26px 7px 9px; font-size: 12.5px; background-size: 13px; }
.discount-row .input { padding: 7px 9px; font-size: 12.5px; }
.cart-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 10px 0; }
.pay-btn { border: 1px solid var(--line-strong); background: #fff; border-radius: 9px; padding: 8px 6px; font-size: 11.5px; font-weight: 600; cursor: pointer; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 3px; transition: .15s; }
.pay-btn span.pay-ico { font-size: 15px; }
.pay-btn:hover { border-color: var(--green-500); color: var(--green-700); }
.pay-btn.is-active { background: var(--green-800); color: #fff; border-color: var(--green-800); }
.pos-shift-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; font-size: 13px; flex-wrap: wrap; }
.stock-pill { position: absolute; top: 9px; left: 9px; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .9); color: var(--muted); }
.stock-pill.low { background: #FEF3C7; color: #92400E; }

/* ------------------------- Modal ------------------------- */
.modal-root:empty { display: none; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(6, 23, 41, .5); backdrop-filter: blur(4px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn .16s ease; }
.modal-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; max-height: 92vh; display: flex; flex-direction: column; animation: popIn .18s ease; overflow: hidden; }
.modal-card.lg { max-width: 720px; }
.modal-card.sm { max-width: 420px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; font-weight: 700; }
.modal-head p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: var(--surface-2); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* ------------------------- Toast ------------------------- */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { background: #11375F; color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 9px; animation: slideUp .2s ease; max-width: 360px; }
.toast.error { background: #7F1D1D; }
.toast svg { width: 17px; height: 17px; flex: 0 0 auto; }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ------------------------- Login ------------------------- */
.auth-body { background: #F4F6FA; min-height: 100vh; }
.auth-split { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }
.auth-side {
  background: linear-gradient(150deg, #11375F 0%, #0A2340 55%, #061729 100%);
  color: #fff; padding: 48px 52px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-side::before { content: ''; position: absolute; width: 480px; height: 480px; border-radius: 50%; right: -160px; top: -140px; background: radial-gradient(circle, rgba(90, 169, 255, .28), transparent 65%); }
.auth-side::after { content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%; left: -120px; bottom: -160px; background: radial-gradient(circle, rgba(90, 169, 255, .14), transparent 70%); }
.auth-side > * { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.auth-headline { font-size: 34px; font-weight: 800; letter-spacing: -.035em; line-height: 1.18; margin: 40px 0 16px; max-width: 430px; }
.auth-headline em { color: var(--mint); font-style: normal; }
.auth-desc { color: #A9C3DF; font-size: 14.5px; max-width: 400px; line-height: 1.65; }
.auth-features { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; max-width: 440px; }
.auth-feature { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .09); border-radius: 12px; padding: 12px 14px; font-size: 12.5px; color: #D3E3F5; display: flex; gap: 9px; align-items: flex-start; }
.auth-feature svg { width: 17px; height: 17px; color: var(--mint); flex: 0 0 auto; margin-top: 1px; }
.auth-foot { color: #7891AC; font-size: 12px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.auth-card .sub { color: var(--muted); font-size: 13.5px; margin: 6px 0 26px; }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-form .input { padding: 12px 13px; font-size: 14px; }
.demo-box { margin-top: 24px; border: 1px dashed var(--line-strong); border-radius: 12px; padding: 13px 15px; background: #fff; }
.demo-box p { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.demo-accounts { display: flex; flex-direction: column; gap: 6px; }
.demo-acc { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; padding: 5px 0; border-bottom: 1px dashed #EDF2F8; }
.demo-acc:last-child { border-bottom: none; }
.demo-acc code { background: #F0F4F9; padding: 2px 7px; border-radius: 6px; font-size: 11.5px; color: var(--green-700); }
.demo-acc button { border: none; background: none; color: var(--green-700); font-weight: 600; font-size: 11.5px; cursor: pointer; }
.demo-acc button:hover { text-decoration: underline; }
.forbidden-card { max-width: 460px; margin: 12vh auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 40px; text-align: center; box-shadow: var(--shadow); }
.forbidden-icon { font-size: 34px; margin-bottom: 12px; }
.forbidden-card h1 { font-size: 22px; margin-bottom: 8px; }
.forbidden-card p { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }

/* ------------------------- Receipt ------------------------- */
.receipt-modal .modal-card { max-width: 400px; }
.receipt-wrap { background: #F4F6FA; border-radius: 12px; padding: 16px; display: flex; justify-content: center; }
.receipt { background: #fff; padding: 14px 12px; width: 100%; max-width: 300px; font-family: 'Courier New', ui-monospace, monospace; font-size: 11.5px; color: #111; line-height: 1.45; border: 1px dashed #D8DFDB; }
.receipt.paper-58 { max-width: 220px; font-size: 10.5px; }
.rc-head { text-align: center; padding-bottom: 8px; border-bottom: 1px dashed #999; }
.rc-store { font-size: 14px; font-weight: 700; letter-spacing: .02em; }
.rc-sub { font-size: 10.5px; margin-top: 2px; }
.rc-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 10.5px; }
.rc-meta div { display: flex; flex-direction: column; gap: 1px; }
.rc-meta div:last-child { text-align: right; }
.rc-items { margin: 8px 0; }
.rc-item { margin-bottom: 5px; }
.rc-item-top { display: flex; justify-content: space-between; gap: 8px; }
.rc-item-sub { font-size: 10px; color: #555; display: flex; justify-content: space-between; }
.rc-totals { border-top: 1px dashed #999; padding-top: 6px; }
.rc-line { display: flex; justify-content: space-between; gap: 8px; font-size: 10.8px; padding: 1px 0; }
.rc-line.grand { font-size: 13px; font-weight: 700; border-top: 1px solid #333; margin-top: 4px; padding-top: 4px; }
.rc-foot { text-align: center; margin-top: 9px; border-top: 1px dashed #999; padding-top: 8px; font-size: 10px; white-space: pre-line; }
.rc-pay { background: #F6F9FD; border-radius: 6px; padding: 5px 7px; margin-top: 6px; font-size: 10.3px; }
.rc-pay div { display: flex; justify-content: space-between; gap: 8px; }
.rc-void { border: 2px solid #B91C1C; color: #B91C1C; text-align: center; font-weight: 700; padding: 3px; margin: 6px 0; letter-spacing: .15em; font-size: 11px; }

/* ------------------------- Sales types ------------------------- */
.st-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; transition: .15s; position: relative; }
.st-card:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.st-card.is-off { background: #FAFBFD; opacity: .82; }
.st-card-top { display: flex; align-items: flex-start; gap: 12px; }
.st-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex: 0 0 auto; }
.st-card h3 { font-size: 15px; font-weight: 700; }
.st-card .st-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.st-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.st-actions { display: flex; gap: 6px; margin-top: auto; border-top: 1px solid #EDF2F8; padding-top: 12px; }
.st-usage { font-size: 11.5px; color: var(--muted); }
.st-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ------------------------- Tabs ------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; margin-bottom: 20px; }
.tab { padding: 11px 16px; font-size: 13.5px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; background: none; border-top: none; border-left: none; border-right: none; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--green-700); border-bottom-color: var(--green-600); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ------------------------- Filter bar ------------------------- */
.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filter-bar .select, .filter-bar .input { width: auto; min-width: 130px; }
.seg { display: inline-flex; background: #EDF1F7; border-radius: 10px; padding: 3px; gap: 2px; }
.seg a, .seg button { border: none; background: none; padding: 7px 13px; font-size: 12.5px; font-weight: 600; color: var(--muted); border-radius: 8px; cursor: pointer; }
.seg a.is-active, .seg button.is-active { background: #fff; color: var(--green-700); box-shadow: var(--shadow-sm); }

/* ------------------------- Report ------------------------- */
.report-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--line); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }
.report-cell { background: #fff; padding: 16px 18px; }
.report-cell span { font-size: 12px; color: var(--muted); }
.report-cell strong { display: block; font-size: 19px; font-weight: 800; margin-top: 4px; letter-spacing: -.02em; }
.bar-list { display: flex; flex-direction: column; gap: 14px; }
.bar-item .bar-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 6px; }
.bar-item .bar-top strong { font-weight: 600; }

/* ------------------------- Settings ------------------------- */
.settings-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 88px; }
.settings-nav button {
  text-align: left; padding: 10px 13px; border-radius: 10px; border: none; background: none;
  font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; display: flex; align-items: center; gap: 9px;
}
.settings-nav button svg { width: 17px; height: 17px; }
.settings-nav button:hover { background: #EDF1F7; color: var(--ink); }
.settings-nav button.is-active { background: var(--green-800); color: #fff; }
.settings-panel { display: none; }
.settings-panel.is-active { display: block; }

/* ------------------------- Print ------------------------- */
@media print {
  body { background: #fff !important; }
  body > * { display: none !important; }
  body > #printArea { display: block !important; }
  #printArea { position: static; }
  #printArea .receipt { border: none; max-width: none; width: 100%; padding: 0; margin: 0; font-size: 11px; }
  @page { margin: 4mm; }
}

/* ------------------------- Responsive ------------------------- */
@media (max-width: 1180px) {
  .pos-shell { grid-template-columns: minmax(0, 1fr) 348px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(6, 23, 41, .45); z-index: 35; }
  .sidebar-overlay.is-open { display: block; }
  .main { margin-left: 0; }
  .mobile-only { display: grid !important; }
  .content { padding: 20px; }
  .topbar { padding: 14px 20px; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; }
  .pos-shell { grid-template-columns: 1fr; }
  .cart-panel { position: static; max-height: none; }
  .cart-items { max-height: 340px; }
}
@media (max-width: 860px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-main { padding: 28px 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page-heading h1 { font-size: 18px; }
  .hero-amount { font-size: 25px; }
  .topbar-actions .btn span.btn-label { display: none; }
}
@media (max-width: 560px) {
  .content { padding: 16px 14px 32px; }
  .topbar { padding: 12px 14px; }
  .prod-grid { grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 10px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-value { font-size: 19px; }
  .card-body { padding: 16px; }
  .modal-backdrop { padding: 10px; align-items: flex-end; }
  .modal-card { max-height: 94vh; border-radius: 16px; }
  .page-heading p { display: none; }
  .hero-card { padding: 20px; }
  .pay-grid { grid-template-columns: repeat(2, 1fr); }
  .toast-stack { left: 14px; right: 14px; align-items: stretch; }
  .toast { max-width: none; }
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Prevent grid/flex children from forcing horizontal overflow */
.card, .stat-card, .table-wrap, .grid > *, .stack > *, .pos-left, .cart-panel { min-width: 0; }
.table td, .table th { word-break: normal; }

/* Accessible focus for switch controls whose checkbox is visually hidden */
.switch input:focus-visible + .track { outline: 2px solid var(--green-600); outline-offset: 2px; }

/* ------------------------- Promo di kasir ------------------------- */
.promo-box { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.promo-line {
  display: flex; align-items: center; gap: 7px; font-size: 11.5px;
  background: var(--mint-50); border: 1px solid #C4DCFB; color: var(--green-700);
  border-radius: 8px; padding: 5px 8px;
}
.promo-line .pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.promo-line .pamt { font-weight: 700; white-space: nowrap; }
.promo-line.is-bonus { background: #F5F3FF; border-color: #DDD6FE; color: #5B21B6; }
.promo-warn { font-size: 11px; color: var(--amber); display: flex; gap: 5px; align-items: flex-start; }
.promo-blocked { font-size: 11px; color: var(--red); }
.discount-locked { opacity: .55; pointer-events: none; }
.ci-badge {
  display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700;
  background: var(--mint-50); color: var(--green-700); border-radius: 5px; padding: 1px 5px; margin-left: 4px;
}
.price-matrix input::placeholder { color: var(--muted-2); font-size: 11px; }

/* ------------------------- Customer & loyalty (kasir) ------------------------- */
.cust-picker { margin-top: 10px; }
.cust-pick-btn {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 9px 11px; border-radius: 10px; cursor: pointer;
  border: 1px dashed var(--line-strong); background: #fff; color: var(--muted);
  font-size: 12.5px; font-weight: 500; transition: .15s; font-family: inherit;
}
.cust-pick-btn:hover { border-color: var(--green-500); color: var(--green-700); background: var(--mint-50); }
.cust-pick-btn .tiny { margin-left: auto; }
.cust-chip {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  background: var(--mint-50); border: 1px solid #C4DCFB; border-radius: 10px; padding: 8px 10px;
}
.cust-chip-main { min-width: 0; display: flex; flex-direction: column; }
.cust-chip-main strong { font-size: 12.5px; color: var(--green-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-chip-main span { font-size: 11px; color: var(--muted); }
.cust-chip-main b { color: var(--green-700); }
.cust-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  cursor: pointer; text-align: left; margin-bottom: 6px; transition: .15s; font-family: inherit;
}
.cust-row:hover { border-color: var(--green-500); background: var(--mint-50); }
.cust-row-main { display: flex; flex-direction: column; min-width: 0; }
.cust-row-main strong { font-size: 13px; }
.cust-row-main span { font-size: 11.5px; color: var(--muted); }
.cust-row-side { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.cust-row-side b { font-size: 12.5px; color: var(--green-700); }
.cust-row-side span { font-size: 11px; color: var(--muted-2); }

.loyalty-toggle {
  display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 12.5px;
  background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E;
  border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; position: relative;
}
.loyalty-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.loyalty-toggle .track {
  width: 34px; height: 20px; border-radius: 999px; background: #E7D9A8; position: relative; flex: 0 0 auto; transition: .2s;
}
.loyalty-toggle .track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px;
  border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.loyalty-toggle input:checked + .track { background: var(--green-600); }
.loyalty-toggle input:checked + .track::after { transform: translateX(14px); }
.loyalty-toggle b { font-weight: 700; }
.loyalty-note { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }

.loyalty-result {
  background: linear-gradient(135deg, #EAF2FE, #F2F7FF);
  border: 1px solid #BBD9FD; border-radius: 12px; padding: 12px 14px; margin-top: 12px;
}
.loyalty-result-main { display: flex; flex-direction: column; margin-bottom: 8px; }
.loyalty-result-main strong { font-size: 14px; color: var(--green-800); }
.loyalty-result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.loyalty-result-grid div { display: flex; flex-direction: column; }
.loyalty-result-grid span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.loyalty-result-grid strong { font-size: 16px; font-weight: 800; }

@media (max-width: 560px) {
  .loyalty-result-grid { grid-template-columns: 1fr 1fr; }
}

/* ------------------------- Ingredient / resep ------------------------- */
.recipe-head, .recipe-row {
  display: grid;
  grid-template-columns: minmax(0,1.6fr) 96px 84px 92px 34px;
  gap: 8px;
  align-items: center;
}
.recipe-head {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 600; padding: 0 2px;
}
.recipe-head span:nth-child(4) { text-align: right; }
.recipe-row { margin-bottom: 8px; }
.recipe-row .select, .recipe-row .input { padding: 7px 9px; font-size: 12.5px; }
.recipe-cost { text-align: right; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.recipe-row .icon-btn { width: 32px; height: 32px; }
.recipe-totals {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 4px;
}
.recipe-totals > div { background: #fff; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.recipe-totals span { font-size: 11px; color: var(--muted); }
.recipe-totals strong { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }

@media (max-width: 640px) {
  .recipe-head { display: none; }
  .recipe-row { grid-template-columns: 1fr 1fr; grid-template-areas: "ing ing" "qty unit" "cost del"; }
  .recipe-row > *:nth-child(1) { grid-area: ing; }
  .recipe-row > *:nth-child(2) { grid-area: qty; }
  .recipe-row > *:nth-child(3) { grid-area: unit; }
  .recipe-row > *:nth-child(4) { grid-area: cost; text-align: left; align-self: center; }
  .recipe-row > *:nth-child(5) { grid-area: del; justify-self: end; }
  .recipe-totals { grid-template-columns: 1fr; }
}

/* ------------------------- Cash out ------------------------- */
.co-balance {
  font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--navy-900);
  background: var(--tint-50); border: 1px solid var(--tint-200);
  border-radius: 10px; padding: 10px 12px;
}
.co-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.co-cat {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 6px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; cursor: pointer; font-size: 11.5px; font-weight: 600;
  color: var(--muted); transition: .15s; font-family: inherit; text-align: center; line-height: 1.25;
}
.co-cat:hover { border-color: var(--blue-500); color: var(--blue-700); }
.co-cat.is-active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.co-cat-ico { font-size: 16px; line-height: 1; }
.co-note { font-size: 11.5px; color: var(--muted); }
.co-breakdown {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; margin-bottom: 14px;
}
.co-breakdown > div { background: #fff; padding: 8px 10px; display: flex; flex-direction: column; }
.co-breakdown span { font-size: 10.5px; color: var(--muted); }
.co-breakdown strong { font-size: 13px; font-weight: 700; }

@media (max-width: 560px) {
  .co-cats { grid-template-columns: 1fr; }
  .co-breakdown { grid-template-columns: 1fr; }
}
