/* ============================================================
   AmoyPOS — FORGE UI  2026  (Bold · Emerald · Tangguh)
   Primary: #16A34A Green  |  Sidebar: Slate-900 dark
   ============================================================ */
:root {
  --bg: #F0FDF4;
  --surface: #FFFFFF;
  --surface-2: #F7FFF9;
  --border: #D1FAE5;
  --text: #111827;
  --text-soft: #374151;
  --muted: #6B7280;
  --primary: #16A34A;
  --primary-2: #15803D;
  --primary-soft: #DCFCE7;
  --accent: #7C3AED;
  --accent-soft: #F5F3FF;
  --success: #16A34A;
  --danger: #DC2626;
  --warning: #D97706;
  --shadow-sm: 0 1px 3px rgba(22,163,74,.07);
  --shadow: 0 8px 28px rgba(22,163,74,.10);
  --shadow-lg: 0 24px 56px rgba(22,163,74,.14);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar-w: 268px;
  --sidebar-bg: #FFFFFF;
  --sidebar-bg2: #F0FDF4;
  --sidebar-text: #111827;
  --sidebar-muted: #6B7280;
  --sidebar-border: rgba(22,163,74,.15);
  --sidebar-active: rgba(22,163,74,.1);
  --sidebar-hover: rgba(22,163,74,.07);
  --grad-a: linear-gradient(135deg,#16A34A,#22C55E);
  --grad-b: linear-gradient(135deg,#7C3AED,#6D28D9);
  --grad-c: linear-gradient(135deg,#D97706,#F59E0B);
  --grad-d: linear-gradient(135deg,#DC2626,#EF4444);
  --grad-gold: linear-gradient(135deg,#B45309,#FBBF24,#B45309);
}

[data-theme="dark"] {
  --bg: #071A0B;
  --surface: #0F1F12;
  --surface-2: #162419;
  --border: #1F3825;
  --text: #F0FDF4;
  --text-soft: #BBF7D0;
  --muted: #4ADE80;
  --primary-soft: #052E16;
  --accent-soft: #1E1535;
  --sidebar-bg: #071A0B;
  --sidebar-bg2: #0F1F12;
  --sidebar-text: #F0FDF4;
  --sidebar-muted: #6B7280;
  --sidebar-border: rgba(34,197,94,.2);
  --sidebar-active: rgba(34,197,94,.15);
  --sidebar-hover: rgba(34,197,94,.08);
  --shadow: 0 8px 28px rgba(0,0,0,.5);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.65);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}
h1,h2,h3 { font-family: 'Space Grotesk','Inter',sans-serif; font-weight: 700; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; font-size: 14px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ============ SIDEBAR ============ */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  background: linear-gradient(170deg, var(--sidebar-bg) 0%, var(--sidebar-bg2) 100%);
  border-right: 1.5px solid var(--sidebar-border);
  display: flex; flex-direction: column; padding: 22px 14px; z-index: 50;
  transition: transform .3s ease;
  box-shadow: 4px 0 24px rgba(22,163,74,.08);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 22px; border-bottom: 1.5px solid var(--sidebar-border); margin-bottom: 8px; }
.brand-logo {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(22,163,74,.35);
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: 'Space Grotesk'; font-weight: 800; font-size: 20px; letter-spacing: -.5px; color: var(--sidebar-text); }
.brand-tag { font-size: 10px; color: var(--sidebar-muted); font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; padding-right: 2px; }
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-thumb { background: #BBF7D0; border-radius: 4px; }
.nav-label { font-size: 10px; font-weight: 700; color: var(--sidebar-muted); text-transform: uppercase; letter-spacing: 1.2px; padding: 14px 12px 5px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 13px;
  border-radius: 11px; color: var(--sidebar-muted); font-weight: 500; font-size: 14px;
  transition: all .18s; text-align: left; width: 100%; position: relative;
}
.nav-item .ni-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item:hover { background: var(--sidebar-hover); color: var(--sidebar-text); }
.nav-item.active {
  background: var(--sidebar-active);
  color: #16A34A; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(22,163,74,.15), inset 0 -1px 0 rgba(22,163,74,.08);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; background: #16A34A; border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px rgba(22,163,74,.5);
}

.sidebar-footer { padding-top: 14px; border-top: 1.5px solid var(--sidebar-border); }
.user-card { display: flex; align-items: center; gap: 11px; padding: 10px 10px; border-radius: 12px; cursor: pointer; transition: background .2s; }
.user-card:hover { background: var(--sidebar-hover); }
.user-avatar {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad-a);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px;
  box-shadow: 0 4px 12px rgba(22,163,74,.3);
}
.user-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.user-name { font-weight: 700; font-size: 13.5px; color: var(--sidebar-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--sidebar-muted); }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; backdrop-filter: blur(2px); }

/* Dark theme sidebar overrides */
[data-theme="dark"] .sidebar { box-shadow: 4px 0 32px rgba(0,0,0,.4); }
[data-theme="dark"] .nav::-webkit-scrollbar-thumb { background: rgba(34,197,94,.25); }
[data-theme="dark"] .nav-item.active { color: #22C55E; }

/* ============ MAIN ============ */
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
/* .topbar/.topbar-left/.topbar-right/.page-title/.page-sub/.clock/.icon-btn/
   .menu-toggle moved to src/app/globals.css (single canonical definition,
   with the responsive padding/sizing this legacy version never had) —
   removed here to stop this legacy stylesheet (loaded after globals.css)
   from silently overriding it at every viewport width, not just desktop. */

.content { padding: 26px 28px 40px; flex: 1; }

/* ============ VIEWS ============ */
.view { display: none; animation: fade .35s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============ STATS ============ */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin-bottom: 22px; }
.stat-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 22px; display: flex; gap: 18px; align-items: center; box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-icon { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 24px; flex-shrink: 0; }
.grad-a { background: var(--grad-a); } .grad-b { background: var(--grad-b); }
.grad-c { background: var(--grad-c); } .grad-d { background: var(--grad-d); }
.stat-body { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 24px; font-family: 'Space Grotesk'; font-weight: 700; letter-spacing: -.5px; }
.stat-trend { font-size: 12px; color: var(--text-soft); }
.stat-trend.up { color: var(--success); }

/* ============ PANELS ============ */
.panel { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); margin-bottom: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel-head h3 { font-size: 16px; }
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; margin-bottom: 22px; }

.top-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.top-list li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; transition: background .2s; }
.top-list li:hover { background: var(--surface-2); }
.tl-rank { width: 28px; height: 28px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); font-weight: 700; display: grid; place-items: center; font-size: 13px; }
.tl-name { flex: 1; font-weight: 500; font-size: 14px; }
.tl-val { font-weight: 600; font-size: 13px; color: var(--text-soft); }
.tl-bar { height: 8px; border-radius: 6px; background: var(--grad-a); }
.empty-hint { color: var(--muted); font-size: 14px; text-align: center; padding: 24px; }

/* ============ TABLE ============ */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table tbody tr { transition: background .2s; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tr:last-child td { border-bottom: none; }
.ta-r { text-align: right; }
.prod-cell { display: flex; align-items: center; gap: 12px; }
.prod-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--surface-2); display: grid; place-items: center; font-size: 20px; }
.tag { display: inline-block; padding: 4px 11px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--primary-soft); color: var(--primary); }
.stock-ok { color: var(--success); font-weight: 600; }
.stock-low { color: var(--warning); font-weight: 600; }
.stock-out { color: var(--danger); font-weight: 600; }
.row-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }

/* ============ BUTTONS ============ */
.btn-primary {
  background: var(--grad-a); color: #fff; padding: 11px 22px; border-radius: 13px; font-weight: 700; font-size: 14px;
  transition: transform .18s, box-shadow .18s; box-shadow: 0 6px 20px rgba(22,163,74,.42);
  letter-spacing: .1px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(22,163,74,.52); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 3px 10px rgba(22,163,74,.3); }
.btn-outline {
  background: var(--surface); border: 1.5px solid var(--border); padding: 11px 20px;
  border-radius: 13px; font-weight: 600; font-size: 14px; color: var(--text); transition: all .18s;
}
.btn-outline:hover { background: var(--surface-2); border-color: var(--primary); color: var(--primary); }
.btn-ghost { color: var(--primary); font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 9px; transition: background .18s; }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-danger-ghost { color: var(--danger); font-weight: 600; font-size: 14px; padding: 11px 20px; border-radius: 13px; border: 1px solid transparent; transition: all .18s; }
.btn-danger-ghost:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.btn-sm { padding: 7px 14px; border-radius: 9px; font-size: 13px; font-weight: 600; }
.icon-action { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; background: var(--surface-2); border: 1px solid var(--border); transition: all .18s; }
.icon-action:hover { transform: translateY(-1px); }
.icon-action.edit:hover { background: var(--primary-soft); color: var(--primary); border-color: color-mix(in srgb,var(--primary) 30%,transparent); }
.icon-action.del:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); border-color: color-mix(in srgb,var(--danger) 25%,transparent); }

/* ============ SEARCH / TOOLBAR ============ */
.view-toolbar { display: flex; gap: 14px; margin-bottom: 20px; align-items: center; }
.search-box { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; height: 44px; transition: border .2s, box-shadow .2s; }
.search-box.grow { flex: 1; }
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.search-box span { color: var(--muted); }
.search-box input { border: none; outline: none; background: none; flex: 1; color: var(--text); height: 100%; }

/* ============ POS / KASIR ============ */
.pos-layout {
  display: grid; grid-template-columns: 1fr 390px;
  gap: 20px; height: calc(100vh - 148px);
}
.pos-catalog { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.catalog-toolbar { flex-shrink: 0; }

/* Category chips */
.chips {
  display: flex; gap: 6px; flex-shrink: 0;
  overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  padding: 9px 18px; border-radius: 50px;
  background: var(--surface); border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: all .22s cubic-bezier(.2,1,.3,1);
  color: var(--text-soft); cursor: pointer; user-select: none;
}
.chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.chip.active {
  background: var(--grad-a); color: #fff; border-color: transparent;
  box-shadow: 0 4px 18px rgba(22,163,74,.48);
  transform: translateY(-1px);
}

/* Product grid */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 12px; overflow-y: auto; padding: 2px 2px 6px; align-content: start; flex: 1;
}
.product-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 18px 14px 14px;
  cursor: pointer; transition: all .22s; text-align: center;
  position: relative; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; align-items: center;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(22,163,74,.2);
  border-color: var(--primary);
}
.product-card:active { transform: scale(.95); box-shadow: none; transition-duration: .08s; }
.product-card.out { opacity: .42; pointer-events: none; filter: grayscale(.5); }
.pc-ico { font-size: 44px; margin-bottom: 10px; line-height: 1; }
.pc-name { font-weight: 700; font-size: 13.5px; margin-bottom: 3px; line-height: 1.3; }
.pc-cat { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .7px; font-weight: 700; }
.pc-price {
  font-family: 'Space Grotesk'; font-weight: 800; font-size: 14.5px;
  color: var(--primary); margin-top: 10px;
  background: var(--primary-soft); border-radius: 10px;
  padding: 5px 10px; display: inline-block; width: 100%;
}
.pc-stock {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; background: var(--surface-2); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 20px; color: var(--text-soft); font-weight: 700;
}
.product-card.out .pc-stock {
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent);
}

/* Cart panel */
.pos-cart {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 22px; display: flex; flex-direction: column;
  box-shadow: var(--shadow); min-height: 0; overflow: hidden;
}
.cart-head {
  padding: 18px 20px 16px; border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 12px; flex-shrink: 0;
  background: linear-gradient(to bottom, var(--surface), var(--surface-2));
}
.cart-head-row { display: flex; align-items: center; justify-content: space-between; }
.cart-head h3 { font-size: 17px; letter-spacing: -.3px; }
.cart-badge {
  background: var(--grad-a); color: #fff;
  font-size: 11px; font-weight: 800;
  min-width: 24px; height: 24px; border-radius: 50px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 7px; transition: transform .2s;
}
.cart-badge:empty { display: none; }
.cust-select select {
  width: 100%; padding: 10px 13px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text); outline: none; font-size: 13px; font-weight: 500;
  transition: border .2s, box-shadow .2s;
}
.cust-select select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.cart-items { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.cart-empty { margin: auto; text-align: center; color: var(--muted); padding: 10px 0; }
.cart-empty-ico { font-size: 52px; opacity: .25; margin-bottom: 12px; }
.cart-empty p { font-weight: 700; color: var(--text-soft); font-size: 15px; margin-bottom: 4px; }
.cart-empty span { font-size: 13px; }

.cart-item {
  display: flex; gap: 10px; align-items: center;
  background: var(--surface-2); padding: 10px 12px;
  border-radius: 14px; animation: fade .2s;
  border: 1px solid var(--border); transition: box-shadow .2s;
}
.cart-item:hover { box-shadow: var(--shadow-sm); }
.ci-ico {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 19px; flex-shrink: 0;
}
.ci-info { flex: 1; min-width: 0; }
.ci-name { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-price { font-size: 11.5px; color: var(--muted); margin-top: 2px; font-weight: 500; }
.ci-qty { display: flex; align-items: center; gap: 5px; }
.qty-btn {
  width: 28px; height: 28px; border-radius: 9px;
  background: var(--surface); border: 1.5px solid var(--border);
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
  transition: all .15s; color: var(--text-soft);
}
.qty-btn:hover { background: var(--primary); color: #fff; border-color: transparent; }
.qty-num { font-weight: 700; min-width: 22px; text-align: center; font-size: 14px; }
.ci-remove {
  color: var(--muted); font-size: 14px; padding: 5px; border-radius: 8px;
  transition: all .15s; flex-shrink: 0;
}
.ci-remove:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }

.cart-summary { border-top: 1px solid var(--border); padding: 14px 18px 18px; flex-shrink: 0; }
.sum-row { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--text-soft); margin-bottom: 8px; }
.sum-row.total {
  font-size: 20px; font-weight: 800; color: var(--primary);
  font-family: 'Space Grotesk'; letter-spacing: -.3px;
  background: var(--primary-soft); border-radius: 14px;
  padding: 12px 16px; margin: 10px 0 0;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
}
.sum-row.total span:first-child { color: var(--text-soft); font-size: 13px; font-weight: 600; font-family: 'Inter'; }
.mini-input {
  width: 54px; padding: 5px 8px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text); outline: none; text-align: center; font-size: 13px;
  transition: border .2s;
}
.mini-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.cart-actions { display: grid; grid-template-columns: 1fr 1.8fr; gap: 10px; margin-top: 12px; }

/* Mobile cart toggle */
.cart-toggle-btn {
  display: none; position: fixed; bottom: 22px; right: 22px;
  width: 60px; height: 60px; border-radius: 18px;
  background: var(--grad-a); color: #fff; font-size: 24px;
  box-shadow: 0 8px 26px rgba(22,163,74,.55);
  z-index: 62; cursor: pointer; transition: transform .2s, box-shadow .2s;
  align-items: center; justify-content: center;
}
.cart-toggle-btn:hover { transform: scale(1.08); box-shadow: 0 14px 32px rgba(22,163,74,.65); }
.cart-count-pill {
  position: absolute; top: -6px; right: -6px;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; border: 2px solid var(--bg);
}
.cart-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(10,15,25,.5); backdrop-filter: blur(4px); z-index: 60;
}
.cart-overlay.open { display: block; animation: fade .2s; }

/* ============ MODAL ============ */
.modal {
  position: fixed; inset: 0;
  background: rgba(10,15,25,.6);
  backdrop-filter: blur(8px);
  display: none; place-items: center;
  z-index: 100; padding: 20px;
}
.modal.open { display: grid; animation: fade .2s; }
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: min(480px, calc(100vw - 32px));
  box-shadow: var(--shadow-lg);
  animation: pop .3s cubic-bezier(.2,1.2,.3,1);
  max-height: 92vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
@keyframes pop { from { transform: scale(.92) translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  position: relative;
}
.modal-head::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad-a);
}
.modal-head h3 { font-size: 17px; letter-spacing: -.3px; }
.modal-head .icon-btn {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 13px; color: var(--muted);
}
.modal-head .icon-btn:hover {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 28%, transparent);
  transform: none;
  box-shadow: none;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex; flex-direction: column;
  gap: 14px;
}

.modal-foot {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end;
  gap: 10px;
  background: var(--surface-2);
}

/* Fields */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span {
  font-size: 11.5px; font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase; letter-spacing: .65px;
}
.field input, .field select {
  padding: 12px 15px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text); outline: none;
  font-size: 14px;
  transition: border .2s, box-shadow .2s;
}
.field input:hover, .field select:hover { border-color: var(--muted); }
.field input:focus, .field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
[data-theme="dark"] .field input,
[data-theme="dark"] .field select { background: var(--surface-2); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
/* inside modal always wrap when modal itself is narrow */
.modal-body .form-row,
.modal-body .form-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.settings-panel { max-width: 720px; }
.settings-actions { display: flex; justify-content: space-between; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }

/* Payment */
.pay-kasir-info {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12.5px;
}
.pay-kasir-name { font-weight: 700; color: var(--text); }
.pay-kasir-name::before { content: '🧑‍💼 '; }
.pay-shift-id { font-size: 11px; color: var(--muted); font-family: monospace; }

.pay-total {
  text-align: center; padding: 20px 16px;
  background: var(--primary-soft); border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
}
.pay-total span {
  display: block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px; color: var(--muted); margin-bottom: 6px;
}
.pay-total strong { font-size: 32px; font-family: 'Space Grotesk'; color: var(--primary); font-weight: 800; letter-spacing: -.5px; }

.pay-methods { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.pay-method {
  padding: 13px 8px; border-radius: 14px;
  border: 1.5px solid var(--border); background: var(--surface-2);
  font-weight: 600; font-size: 13px; transition: all .2s;
}
.pay-method:hover { border-color: var(--primary); background: var(--surface); color: var(--primary); }
.pay-method.active {
  background: var(--primary-soft); border-color: var(--primary); color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.quick-cash { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-cash button {
  padding: 9px 14px; border-radius: 11px;
  background: var(--surface-2); border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 600; transition: all .2s; color: var(--text);
}
.quick-cash button:hover { background: var(--primary); color: #fff; border-color: transparent; }

.pay-change {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; background: var(--surface-2); border-radius: 14px;
  border: 1px solid var(--border);
}
.pay-change span { color: var(--text-soft); font-weight: 500; font-size: 13px; }
.pay-change strong { font-size: 22px; font-family: 'Space Grotesk'; color: var(--success); font-weight: 800; }

/* Receipt */
.receipt-card { max-width: 380px; }
.receipt { font-family: 'Space Mono','Courier New',monospace; font-size: 13px; background: var(--surface-2); padding: 22px; border-radius: 12px; color: var(--text); }
.receipt-hr { border: none; border-top: 1px dashed var(--muted); margin: 12px 0; }
.receipt-center { text-align: center; }
.receipt-store { font-size: 18px; font-weight: 700; font-family: 'Space Grotesk'; }
.receipt-row { display: flex; justify-content: space-between; margin: 3px 0; }
.receipt-item { margin: 6px 0; }
.receipt-item .ri-top { display: flex; justify-content: space-between; font-weight: 600; }
.receipt-item .ri-sub { color: var(--text-soft); font-size: 12px; }
.receipt-total { font-weight: 700; font-size: 15px; }

/* ============ STOCK / HPP / EXPENSE ============ */
.margin-hint {
  font-size: 13px; color: var(--text-soft);
  background: var(--surface-2); border-radius: 12px;
  padding: 12px 16px; font-weight: 500;
  border: 1px solid var(--border);
  border-left: 3px solid var(--success);
}
.margin-hint b { color: var(--success); }
.margin-hint:has(.margin-neg) { border-left-color: var(--danger); }

.stock-current {
  background: var(--surface-2); border-radius: 14px;
  padding: 14px 18px; display: flex; flex-direction: column; gap: 5px;
  border: 1px solid var(--border);
}
.stock-current span { font-weight: 700; font-size: 15px; }
.stock-current strong { font-weight: 500; font-size: 13px; color: var(--text-soft); }

.stock-result {
  text-align: center; padding: 14px 16px;
  background: var(--primary-soft); border-radius: 14px;
  color: var(--text-soft); font-size: 13px; font-weight: 500;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
}
.stock-result strong {
  color: var(--primary); font-family: 'Space Grotesk'; font-size: 22px; font-weight: 800;
  display: block; margin-top: 3px;
}
.move-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.move-in { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.move-out { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.move-adjust { background: color-mix(in srgb, var(--warning) 18%, transparent); color: var(--warning); }
.stock-io { display: inline-flex; gap: 6px; justify-content: flex-end; }
.btn-stock { padding: 6px 12px; border-radius: 9px; font-size: 12px; font-weight: 600; border: 1px solid var(--border); background: var(--surface-2); transition: all .2s; }
.btn-stock.in:hover  { background: var(--success); color: #fff; border-color: transparent; }
.btn-stock.out:hover { background: var(--danger); color: #fff; border-color: transparent; }

.margin-pos { color: var(--success); font-weight: 600; }
.margin-neg { color: var(--danger); font-weight: 600; }

.profit-formula { display: flex; align-items: stretch; gap: 16px; }
.pf-step { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 4px; }
.pf-step span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.pf-step b { font-family: 'Space Grotesk'; font-size: 15px; }
.pf-step small { color: var(--text-soft); font-size: 13px; }
.pf-arrow { display: grid; place-items: center; font-size: 22px; color: var(--muted); }
@media (max-width: 640px) { .profit-formula { flex-direction: column; } .pf-arrow { transform: rotate(90deg); } }

.expense-total { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border); }
.expense-total span { color: var(--text-soft); font-weight: 500; }
.expense-total strong { font-size: 18px; font-family: 'Space Grotesk'; color: var(--danger); }

/* ============ TOAST ============ */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(120px); background: var(--text); color: var(--bg); padding: 14px 24px; border-radius: 14px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); z-index: 200; transition: transform .35s cubic-bezier(.2,1.2,.3,1); display: flex; align-items: center; gap: 10px; }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }

/* ============ RESPONSIVE ============ */
@media (min-width: 768px) and (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 1100px) {
  .pos-layout { grid-template-columns: 1fr; height: auto; }
  .pos-cart { max-height: 52vh; }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .lap-grid-2 { grid-template-columns: 1fr; }
  .lap-chart-wrap { height: 220px; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .panel { padding: 20px; }
  .stat-card { padding: 18px; gap: 14px; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sidebar.open ~ .sidebar-overlay { display: block; }
  .main { margin-left: 0; }
  .content { padding: 18px; }
  .form-grid, .form-row { grid-template-columns: 1fr; }
  .view-toolbar { flex-wrap: wrap; }

  /* Cart as bottom sheet on mobile */
  .cart-toggle-btn { display: flex; }
  .pos-cart {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 78vh; max-height: 78vh;
    border-radius: 24px 24px 0 0; border-bottom: none;
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.2,1.2,.3,1);
    z-index: 61;
  }
  .pos-cart.open { transform: translateY(0); }
  .pos-cart::before {
    content: ''; display: block; width: 40px; height: 4px;
    background: var(--border); border-radius: 4px;
    margin: 12px auto 0; flex-shrink: 0;
  }
}
/* ============ RESPONSIVE TABLES — card layout on mobile ============ */
@media (max-width: 640px) {
  .table-wrap { overflow-x: visible; }

  .data-table { display: block; }
  .data-table thead { display: none; }
  .data-table tbody { display: flex; flex-direction: column; gap: 10px; }
  .data-table tbody tr {
    display: block;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 4px 14px 10px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s;
  }
  .data-table tbody tr:hover { box-shadow: var(--shadow); }

  .data-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    text-align: right;
    gap: 10px;
  }
  .data-table td:last-child { border-bottom: none; }
  .data-table tr:last-child td { border-bottom: none; }
  .data-table td.ta-r { text-align: right; }

  .data-table td[data-label]::before {
    content: attr(data-label);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--muted);
    text-align: left;
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* First data-label cell = "title row" of card */
  .data-table td:first-child {
    padding-top: 14px;
    font-weight: 600;
  }

  /* prod-cell inside td — constrain width so label fits */
  .data-table .prod-cell { max-width: 65%; flex-wrap: nowrap; }
  .data-table .prod-ico { width: 32px; height: 32px; font-size: 16px; border-radius: 9px; }

  /* action cells */
  .row-actions { justify-content: flex-end; }
  .stock-io { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .move-badge { font-size: 11px; padding: 3px 9px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 16px; gap: 12px; }
  .panel { padding: 18px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .chip { padding: 8px 14px; font-size: 12px; }
  .buka-shift-header { grid-template-columns: 1fr; }
  .quick-modal-grid  { grid-template-columns: repeat(3, 1fr); }
  .rekon-shift-grid  { grid-template-columns: 1fr 1fr; }
  .rekon-sales-grid  { grid-template-columns: 1fr; }
  .cashier-grid      { grid-template-columns: repeat(2, 1fr); }
}

/* Print */
@media print {
  body * { visibility: hidden; }
  #receiptContent, #receiptContent * { visibility: visible; }
  #receiptContent { position: fixed; inset: 0; background: #fff; color: #000; padding: 20px; }
  .receipt-hr { border-top: 1px dashed #000; }
}

/* ============ LOGIN OVERLAY ============ */
.login-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.login-overlay.active { opacity: 1; pointer-events: all; }
.login-card {
  width: min(440px, 92vw);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 28px;
  padding: 40px 32px 36px;
  backdrop-filter: blur(20px);
  text-align: center;
  color: #f1f5f9;
}
.login-logo { font-size: 52px; margin-bottom: 12px; line-height: 1; }
.login-title { font-size: 22px; font-weight: 700; margin: 0 0 6px; color: #f8fafc; }
.login-sub   { font-size: 14px; color: #94a3b8; margin: 0 0 28px; }

/* cashier grid */
.cashier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 8px; }
.cashier-card {
  background: rgba(255,255,255,.07);
  border: 1.5px solid rgba(255,255,255,.14);
  border-radius: 18px; padding: 18px 10px 14px;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: background .2s, transform .15s, border-color .2s;
  color: #f1f5f9;
}
.cashier-card:hover { background: rgba(255,255,255,.14); border-color: var(--primary); transform: translateY(-2px); }
.cashier-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 22px; color: #fff;
  flex-shrink: 0;
}
.cashier-avatar.sm { width: 36px; height: 36px; font-size: 15px; }
.cashier-name { font-size: 13px; font-weight: 600; }
.cashier-role { font-size: 11px; color: #94a3b8; }

/* pin dots */
.pin-dots { display: flex; justify-content: center; gap: 14px; margin-bottom: 28px; }
.pin-dots span {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  background: transparent;
  transition: background .15s, border-color .15s, transform .15s;
}
.pin-dots span.filled { background: var(--primary); border-color: var(--primary); transform: scale(1.15); }

/* pin pad */
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pin-key {
  background: rgba(255,255,255,.09);
  border: 1.5px solid rgba(255,255,255,.13);
  border-radius: 14px; padding: 18px 10px;
  font-size: 22px; font-weight: 600; color: #f1f5f9;
  cursor: pointer; transition: background .15s, transform .1s;
}
.pin-key:hover  { background: rgba(255,255,255,.18); }
.pin-key:active { transform: scale(.93); }
.pin-back   { font-size: 20px; }
.pin-cancel { font-size: 16px; color: #f87171; border-color: rgba(248,113,113,.3); }

/* ============ STORE STATUS ============ */
.store-status-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  transition: all .3s;
}
.store-status-chip.open  { background: color-mix(in srgb, var(--success) 12%, transparent); border-color: var(--success); color: var(--success); }
.store-status-chip.closed{ background: color-mix(in srgb, var(--danger)  10%, transparent); border-color: var(--danger);  color: var(--danger);  }
.store-status-chip .dot  { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.store-status-chip.open .dot { animation: pulse 1.5s ease-in-out infinite; }

.toko-status-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 10px;
  font-size: 12px; font-weight: 600;
  background: var(--surface-2); margin-bottom: 8px;
  color: var(--text-2);
}
.toko-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); transition: background .3s; }
.toko-dot.open { background: var(--success); animation: pulse 1.5s ease-in-out infinite; }

.logout-btn { color: var(--muted); }
.logout-btn:hover { color: var(--danger); }

/* ============ TOKO / SHIFT VIEW ============ */
.toko-closed-wrap {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 55vh; text-align: center; gap: 12px;
  color: var(--text-2);
}
.toko-empty-ico { font-size: 72px; line-height: 1; margin-bottom: 8px; }
.toko-closed-wrap h2 { font-size: 22px; font-weight: 700; color: var(--text); margin: 0; }
.toko-closed-wrap p  { font-size: 14px; margin: 0 0 8px; }

.shift-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 20px;
}
.shift-banner-left { display: flex; align-items: center; gap: 14px; }
.shift-open-dot {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 20%, transparent);
  animation: pulse 1.5s ease-in-out infinite;
}
.shift-title { font-size: 16px; font-weight: 700; color: var(--text); }
.shift-meta  { font-size: 12px; color: var(--text-2); margin-top: 2px; }

.shift-open-badge, .shift-closed-badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .4px;
}
.shift-open-badge   { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.shift-closed-badge { background: color-mix(in srgb, var(--muted) 14%, transparent);   color: var(--muted);   }

/* ============ MODAL SUB TITLE ============ */
.modal-sub { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.modal-card-wide { max-width: 560px; width: min(560px, calc(100vw - 32px)); }
.btn-lg-pad { padding: 12px 28px; }

/* ============ BUKA TOKO MODAL ============ */
.buka-shift-header {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.buka-shift-item {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px;
}
.bsh-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.bsh-val   { font-size: 13px; font-weight: 600; color: var(--text); }

.buka-last-shift {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: color-mix(in srgb, var(--success) 10%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--success) 25%, transparent);
  border-radius: 12px; padding: 10px 14px;
  font-size: 13px;
}
.bls-label { color: var(--text-2); flex: 1; min-width: 120px; }
.bls-val   { font-weight: 700; color: var(--success); }
.bls-use-btn {
  font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 8px;
  background: var(--success); color: #fff; border: none; cursor: pointer;
  transition: opacity .2s;
}
.bls-use-btn:hover { opacity: .85; }

.modal-awal-input-wrap {
  display: flex; align-items: center; gap: 0;
  border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden;
  transition: border-color .2s;
}
.modal-awal-input-wrap:focus-within { border-color: var(--primary); }
.maw-prefix {
  padding: 0 12px; font-size: 14px; font-weight: 700; color: var(--muted);
  background: var(--surface-2); border-right: 1.5px solid var(--border);
  height: 44px; display: flex; align-items: center;
}
.modal-awal-input-wrap input {
  border: none !important; border-radius: 0 !important; flex: 1;
  padding: 0 14px; height: 44px; font-size: 18px; font-weight: 700;
  background: transparent; outline: none;
}

.quick-modal-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.qm-btn {
  padding: 9px 0; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: var(--surface-2); border: 1.5px solid var(--border);
  cursor: pointer; transition: all .15s; color: var(--text);
}
.qm-btn:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.qm-btn:active { transform: scale(.95); }

.buka-preview {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--primary) 22%, transparent);
  font-size: 13px; font-weight: 500; color: var(--text-2);
}
.buka-preview strong { font-size: 17px; font-weight: 800; color: var(--primary); }

/* ============ TUTUP TOKO / REKONSILIASI ============ */
.rekon-section {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.rekon-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .7px; color: var(--muted);
}

/* Shift summary grid */
.rekon-shift-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.rsgi {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--surface); border-radius: 10px; padding: 9px 12px;
  border: 1px solid var(--border);
}
.rsgi span { font-size: 10.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.rsgi strong { font-size: 13.5px; font-weight: 700; color: var(--text); }

/* Rekonsiliasi calc */
.rekon-calc-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px 0; overflow: hidden;
}
.rcalc-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; gap: 10px;
}
.rcalc-row + .rcalc-row { border-top: 1px solid var(--border); }
.rcalc-left { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.rcalc-icon { font-size: 14px; }
.rcalc-val  { font-size: 13.5px; font-weight: 600; color: var(--text); }
.rcalc-row.rcalc-plus .rcalc-left { color: var(--success); }
.rcalc-row.rcalc-plus .rcalc-val  { color: var(--success); }
.rcalc-divider { border-top: 2px dashed var(--border); }
.rcalc-row.rcalc-est { background: color-mix(in srgb, var(--primary) 7%, transparent); }
.rcalc-row.rcalc-est .rcalc-left { font-weight: 700; color: var(--primary); }
.rcalc-row.rcalc-est .rcalc-val  { font-weight: 800; font-size: 15px; color: var(--primary); }

.rekon-input-field { margin-top: 0; }

.rekon-status-box {
  border-radius: 12px; overflow: hidden;
  border: 1.5px solid var(--border);
}
.rsb-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: var(--surface);
  font-size: 13.5px; font-weight: 600;
}
.rsb-selisih { font-size: 17px; font-weight: 800; }
.rsb-badge-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.rsb-badge {
  padding: 4px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.badge-sesuai { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.badge-lebih  { background: color-mix(in srgb, var(--warning, #f59e0b) 15%, transparent); color: var(--warning, #f59e0b); }
.badge-kurang { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.rsb-desc { font-size: 12px; color: var(--text-2); }

/* Ringkasan penjualan */
.rekon-sales-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.rsg-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 8px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); text-align: center;
}
.rsg-icon  { font-size: 20px; }
.rsg-label { font-size: 10.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.rsg-val   { font-size: 13px; font-weight: 700; color: var(--text); }
.rsg-tunai { border-color: color-mix(in srgb, var(--success) 28%, transparent); }
.rsg-qris  { border-color: color-mix(in srgb, var(--primary) 28%, transparent); }
.rsg-kartu { border-color: color-mix(in srgb, var(--muted) 40%, transparent); }

.rekon-total-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-radius: 10px;
  background: var(--surface); border: 1.5px solid var(--border);
  font-weight: 700; font-size: 14px;
}

/* legacy (keep for backward compat) */
.rekonsiliasi-wrap { background: var(--surface-2); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.rekap-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 4px 0; }
.rekap-row.rekap-est { font-weight: 700; font-size: 14px; }
.rekap-hr { border: none; border-top: 1.5px dashed var(--border); margin: 6px 0; }
.rekap-selisih { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--primary) 8%, transparent); border: 1.5px solid var(--border); font-weight: 700; font-size: 15px; margin-top: 4px; }

/* ============ BUKA MODAL INFO (legacy) ============ */
.buka-info { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.buka-info-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 3px 0; }
.buka-info-row span:last-child { font-weight: 600; }

/* ============ MISC BADGES ============ */
.badge-active   { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge-inactive { background: color-mix(in srgb, var(--muted)   14%, transparent); color: var(--muted);   padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }

.text-danger  { color: var(--danger)  !important; }
.text-success { color: var(--success) !important; }

.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 14px; }
.btn-danger-outline {
  background: transparent;
  border: 1.5px solid var(--danger);
  color: var(--danger);
  padding: 9px 20px; border-radius: 10px;
  font-weight: 600; font-size: 13.5px; cursor: pointer;
  transition: background .2s;
}
.btn-danger-outline:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }

.field-checkbox label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; font-size: 14px; }
.field-checkbox input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }

/* ============ ANGGOTA VIEW TOOLBAR ============ */
.view-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.view-toolbar .grow { flex: 1; min-width: 180px; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .45; }
}

/* ============================================================
   NEW FEATURES — Majoo-comparable enhancements
   ============================================================ */

/* ---- Parkir Bon / Hold & Retrieve ---- */
.parked-item { display:flex; align-items:center; justify-content:space-between; padding:10px 0; border-bottom:1px solid var(--border); }
.parked-item:last-child { border-bottom:none; }
.parked-label { font-weight:600; font-size:14px; }
.parked-meta  { font-size:12px; color:var(--muted); margin-top:2px; }
.parked-actions { display:flex; align-items:center; gap:8px; }
.cart-head-actions { display:flex; gap:8px; margin-top:4px; }
.btn-sm { padding:5px 12px; font-size:12px; border-radius:8px; cursor:pointer; font-weight:600; }

/* ---- Loyalty Badge ---- */
.cust-loyalty-badge { font-size:12px; font-weight:600; padding:4px 10px; border-radius:8px; background:var(--surface-2); border:1px solid var(--border); margin-top:4px; color:var(--text-soft); }
.loyalty-badge { display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:700; }
.tier-bronze { background:rgba(205,127,50,.15); color:#cd7f32; }
.tier-silver { background:rgba(148,163,184,.15); color:#94a3b8; }
.tier-gold   { background:rgba(245,158,11,.15); color:#f59e0b; }
.points-earned { color:var(--success); font-weight:700; font-size:12px; }

/* ---- Per-item discount ---- */
.ci-disc-row { display:flex; align-items:center; gap:6px; margin-top:4px; }
.ci-disc-input { width:52px; padding:3px 6px; border:1.5px solid var(--border); border-radius:7px; font-size:12px; background:var(--surface); color:var(--text); text-align:center; }
.ci-disc-input:focus { border-color:var(--primary); outline:none; }
.ci-disc-label { font-size:11px; color:var(--muted); }

/* ---- Split Payment ---- */
.split-section { margin-top:12px; }
.split-section-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.split-line { display:grid; grid-template-columns:1fr 1fr auto; gap:8px; align-items:center; margin-bottom:8px; }
.split-method { padding:8px 10px; border-radius:8px; border:1.5px solid var(--border); background:var(--surface-2); font-size:13px; color:var(--text); }
.split-amount { padding:8px 12px; border-radius:8px; border:1.5px solid var(--border); font-size:14px; font-weight:600; width:100%; background:var(--surface); color:var(--text); }
.split-amount:focus { border-color:var(--primary); outline:none; }
.split-remaining { text-align:center; font-weight:700; font-size:14px; padding:10px; border-radius:10px; background:var(--surface-2); margin-top:10px; border:1px solid var(--border); }
.text-danger  { color:var(--danger); }
.text-success { color:var(--success); }

/* ---- Purchase Order ---- */
.modal-card-wide { max-width:680px; width:95vw; }
.modal-sub { font-size:12px; color:var(--muted); margin-top:2px; }
.po-items-section { background:var(--surface-2); border-radius:12px; padding:14px; margin-top:10px; }
.po-items-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; font-weight:600; font-size:14px; }
.po-item-line { display:grid; grid-template-columns:2fr 1fr 1fr auto; gap:8px; align-items:center; margin-bottom:8px; }
.po-item-line select, .po-item-line input { padding:8px 10px; border-radius:8px; border:1.5px solid var(--border); background:var(--surface); color:var(--text); font-size:13px; }
.po-item-line select:focus, .po-item-line input:focus { border-color:var(--primary); outline:none; }
.po-total-row { display:flex; justify-content:space-between; align-items:center; padding:12px 16px; background:color-mix(in srgb,var(--primary) 8%,transparent); border-radius:10px; font-weight:700; font-size:16px; border:1.5px solid color-mix(in srgb,var(--primary) 20%,transparent); margin-top:12px; }
.po-status-draft     { background:rgba(148,163,184,.15); color:var(--muted); padding:3px 10px; border-radius:20px; font-size:11px; font-weight:700; display:inline-block; }
.po-status-confirmed { background:rgba(109,94,252,.15); color:var(--primary); padding:3px 10px; border-radius:20px; font-size:11px; font-weight:700; display:inline-block; }
.po-status-received  { background:rgba(16,185,129,.15); color:var(--success); padding:3px 10px; border-radius:20px; font-size:11px; font-weight:700; display:inline-block; }

/* ---- Stock Opname ---- */
.stok-tabs { display:flex; gap:8px; margin-bottom:16px; border-bottom:2px solid var(--border); padding-bottom:8px; }
.stok-tab-btn { padding:8px 18px; border-radius:10px 10px 0 0; font-weight:600; font-size:13px; color:var(--text-soft); border:1.5px solid transparent; border-bottom:none; cursor:pointer; transition:all .2s; }
.stok-tab-btn:hover { color:var(--primary); background:var(--primary-soft); }
.stok-tab-btn.active { background:var(--primary-soft); color:var(--primary); border-color:var(--border); border-bottom:2px solid var(--surface); margin-bottom:-2px; }
.opname-input { border:1.5px solid var(--border); border-radius:8px; padding:5px 8px; background:var(--surface); font-size:13px; color:var(--text); width:80px; text-align:center; }
.opname-input:focus { border-color:var(--primary); outline:none; }
.opname-diff.text-danger  { color:var(--danger); font-weight:700; }
.opname-diff.text-success { color:var(--success); font-weight:700; }

/* ---- Modal field label ---- */
.field { display:flex; flex-direction:column; gap:5px; margin-bottom:10px; }
.field label { font-size:12px; font-weight:600; color:var(--text-soft); text-transform:uppercase; letter-spacing:.4px; }
.field input, .field select, .field textarea { padding:10px 13px; border-radius:10px; border:1.5px solid var(--border); background:var(--surface); color:var(--text); font-size:14px; transition:border .2s, box-shadow .2s; font-family:inherit; }
.field input:focus, .field select:focus, .field textarea:focus { border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft); outline:none; }
.field textarea { resize:vertical; }

/* ========= DISC TOGGLE ========= */
.disc-toggle-btn { padding:2px 8px; border-radius:6px; border:1.5px solid var(--border); background:var(--surface-2); cursor:pointer; font-weight:700; font-size:12px; }
.disc-toggle-btn:hover { border-color:var(--primary); color:var(--primary); }

/* ========= VOUCHER INPUT ========= */
.voucher-row { display:flex; gap:8px; margin-top:8px; }
.voucher-input { flex:1; padding:8px 12px; border-radius:8px; border:1.5px solid var(--border); background:var(--surface-2); text-transform:uppercase; font-size:13px; color:var(--text); }
.voucher-input:focus { border-color:var(--primary); outline:none; }
.voucher-applied { background:color-mix(in srgb,var(--success) 12%,transparent); color:var(--success); border-radius:8px; padding:6px 12px; font-weight:600; font-size:13px; margin-top:4px; }

/* ========= POINTS REDEEM ========= */
.points-redeem-section { background:var(--surface-2); border-radius:10px; padding:12px 14px; border:1.5px solid var(--border); margin-bottom:12px; }
.points-redeem-header { display:flex; justify-content:space-between; align-items:center; }
.pts-check-label { display:flex; align-items:center; gap:8px; cursor:pointer; font-weight:600; font-size:13px; }
.pts-available { font-size:12px; color:var(--primary); font-weight:700; }
.pts-detail { display:flex; align-items:center; gap:8px; margin-top:10px; }
.pts-input { flex:1; padding:8px 10px; border-radius:8px; border:1.5px solid var(--border); background:var(--surface); color:var(--text); font-family:inherit; }
.pts-value { font-size:13px; font-weight:700; color:var(--success); }

/* ========= SPLIT SECTION ========= */
.split-section { background:var(--surface-2); border-radius:10px; padding:12px 14px; border:1.5px solid var(--border); margin-top:10px; }
.split-section-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }

/* ========= VARIAN PRODUK ========= */
.variant-options { display:flex; flex-wrap:wrap; gap:10px; padding:4px 0; }
.btn-variant { padding:10px 20px; border-radius:10px; border:2px solid var(--border); background:var(--surface); cursor:pointer; font-weight:600; display:flex; flex-direction:column; align-items:center; gap:4px; transition:all .15s; }
.btn-variant:hover { border-color:var(--primary); background:color-mix(in srgb,var(--primary) 10%,transparent); }
.variant-price { font-size:12px; color:var(--primary); font-weight:700; }
.variant-edit-row { display:grid; grid-template-columns:1fr 120px auto; gap:8px; margin-bottom:8px; align-items:center; }
.vi-name, .vi-price { padding:7px 10px; border-radius:8px; border:1.5px solid var(--border); background:var(--surface-2); color:var(--text); font-family:inherit; }

/* ========= KDS ========= */
.kds-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:20px; }
.kds-title { margin:0; font-size:1.4rem; font-weight:700; }
.kds-filters { display:flex; gap:8px; flex-wrap:wrap; }
.kds-filter-btn { padding:6px 16px; border-radius:20px; border:1.5px solid var(--border); background:var(--surface); cursor:pointer; font-size:13px; font-weight:600; color:var(--text); }
.kds-filter-btn.active { background:var(--primary); color:#fff; border-color:var(--primary); }
.kds-refresh { font-size:11px; color:var(--muted); }
.kds-orders { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:16px; }
.kds-empty { grid-column:1/-1; text-align:center; padding:60px 20px; color:var(--muted); font-size:1.1rem; }
.kds-card { background:var(--surface); border-radius:14px; padding:16px; border:2px solid var(--border); box-shadow:var(--shadow); }
.kds-card.pending { border-color:#f59e0b; background:color-mix(in srgb,#f59e0b 5%,var(--surface)); }
.kds-card.cooking { border-color:#ef4444; background:color-mix(in srgb,#ef4444 7%,var(--surface)); animation:kds-pulse 1.5s ease-in-out infinite; }
.kds-card.done { border-color:#22c55e; background:color-mix(in srgb,#22c55e 6%,var(--surface)); opacity:.75; }
@keyframes kds-pulse { 0%,100%{opacity:1} 50%{opacity:.7} }
.kds-card-head { display:flex; justify-content:space-between; margin-bottom:8px; }
.kds-order-id { font-weight:700; font-size:13px; color:var(--primary); }
.kds-time { font-size:12px; color:var(--muted); }
.kds-cust { font-size:12px; color:var(--muted); margin-bottom:10px; }
.kds-items { border-top:1px solid var(--border); padding-top:10px; margin-bottom:10px; }
.kds-item { display:flex; justify-content:space-between; font-size:13px; padding:3px 0; }
.kds-qty { font-weight:700; color:var(--primary); }
.kds-actions { display:flex; gap:8px; }
.kds-btn { flex:1; padding:7px; border-radius:8px; border:none; cursor:pointer; font-weight:700; font-size:12px; }
.kds-btn.cooking { background:#fef3c7; color:#d97706; }
.kds-btn.done { background:#dcfce7; color:#16a34a; }
.kds-done-badge { color:#16a34a; font-weight:700; font-size:13px; }

/* ========= BOM / RESEP ========= */
.bom-items-head { display:flex; justify-content:space-between; align-items:center; margin:14px 0 10px; font-weight:600; }
.bom-item-line { display:grid; grid-template-columns:2fr 80px 80px auto; gap:8px; align-items:center; margin-bottom:8px; }
.bom-item-line select, .bom-item-line input { padding:7px 10px; border-radius:8px; border:1.5px solid var(--border); background:var(--surface-2); font-size:13px; color:var(--text); font-family:inherit; }

/* ========= RETUR PO ========= */
.retur-item-row { display:grid; grid-template-columns:2fr 1fr 100px; gap:10px; align-items:center; padding:8px 0; border-bottom:1px solid var(--border); font-size:13px; }
.retur-qty-input { padding:6px 10px; border-radius:8px; border:1.5px solid var(--border); background:var(--surface-2); text-align:center; color:var(--text); font-family:inherit; }

/* ========= LAPORAN TABS ========= */
.laporan-tab-panel { display:none; }
.laporan-tab-panel.active { display:block; }
.export-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:16px; margin-top:16px; }
.export-card { background:var(--surface); border:1.5px solid var(--border); border-radius:14px; padding:24px; text-align:center; cursor:pointer; transition:all .15s; }
.export-card:hover { border-color:var(--primary); transform:translateY(-2px); box-shadow:var(--shadow); }
.export-card-icon { font-size:32px; margin-bottom:8px; }
.export-card-title { font-weight:700; margin-bottom:4px; }
.export-card-sub { font-size:12px; color:var(--muted); }

/* ========= ANGGOTA TABS ========= */
.anggota-tab-panel { }

/* ========= MODAL CARD WIDE ========= */
.modal-card-wide { max-width:680px; }

/* ========= BADGE STYLES (if not already defined) ========= */
.badge-active   { background:color-mix(in srgb,var(--success) 15%,transparent); color:var(--success); padding:3px 10px; border-radius:20px; font-size:12px; font-weight:600; }
.badge-inactive { background:color-mix(in srgb,var(--muted) 20%,transparent);   color:var(--muted);   padding:3px 10px; border-radius:20px; font-size:12px; font-weight:600; }

/* ========= FIELD CHECKBOX ========= */
.field-checkbox { flex-direction:row !important; align-items:center; gap:10px; padding-top:24px; }
.field-checkbox input[type="checkbox"] { width:18px; height:18px; accent-color:var(--primary); cursor:pointer; }

/* ========= AKUNTANSI TABS ========= */
.akun-tabs, .hrm-tabs { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:20px; }
.akun-tab-btn, .hrm-tab-btn { padding:8px 18px; border-radius:20px; border:1.5px solid var(--border); background:var(--surface); cursor:pointer; font-size:13px; font-weight:600; transition:all .15s; color:var(--text); }
.akun-tab-btn.active, .hrm-tab-btn.active { background:var(--primary); color:#fff; border-color:var(--primary); }
.akun-tab-panel { }

/* ========= NERACA ========= */
.neraca-table td { padding:8px 12px; }
.neraca-section td { background:color-mix(in srgb,var(--primary) 8%,var(--surface)); font-weight:700; padding:10px 12px; }
.neraca-total td { border-top:2px solid var(--border); padding:10px 12px; }
.neraca-grand td { border-top:3px double var(--border); font-size:15px; padding:12px; }
.neraca-balance-tag { padding:4px 14px; border-radius:20px; font-weight:700; font-size:13px; }

/* ========= ARUS KAS ========= */
.rekons-row { display:flex; justify-content:space-between; padding:10px 16px; border-bottom:1px solid var(--border); align-items:center; }
.rekons-row.income { background:color-mix(in srgb,var(--success) 6%,transparent); }
.rekons-row.expense { background:color-mix(in srgb,var(--danger) 6%,transparent); }
.rekons-row.total { background:color-mix(in srgb,var(--primary) 8%,transparent); font-weight:700; }
.rekons-input { padding:6px 10px; border-radius:8px; border:1.5px solid var(--border); background:var(--surface); width:140px; text-align:right; color:var(--text); font-family:inherit; }

/* ========= TARGET BAR ========= */
.target-bar-wrap { height:8px; background:var(--border); border-radius:4px; margin-bottom:4px; overflow:hidden; }
.target-bar-fill { height:100%; background:var(--primary); border-radius:4px; transition:width .4s; }

/* ========= JADWAL ========= */
.jadwal-sel { padding:4px 6px; border-radius:6px; border:1.5px solid var(--border); background:var(--surface-2); font-size:12px; width:70px; color:var(--text); font-family:inherit; }

/* ========= SELFIE ========= */
#selfieVideo, #selfieCanvas { max-height:260px; object-fit:cover; }

/* ========= HRM TABS ========= */
.hrm-tab-panel { }

/* ========= PAYROLL ========= */

/* ========= PELANGGAN TABS ========= */
.pelanggan-tabs { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:20px; }
.plg-tab-btn { padding:8px 18px; border-radius:20px; border:1.5px solid var(--border); background:var(--surface); cursor:pointer; font-size:13px; font-weight:600; transition:all .15s; color:var(--text); }
.plg-tab-btn.active { background:var(--primary); color:#fff; border-color:var(--primary); }

/* ========= RFM ========= */
.rfm-score { display:inline-block; width:24px; height:24px; border-radius:50%; background:var(--primary); color:#fff; font-size:12px; font-weight:700; text-align:center; line-height:24px; }
.rfm-legend-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:8px; padding:8px 0; }
.rfm-seg { padding:8px 14px; border-radius:10px; font-size:13px; font-weight:600; }
.rfm-seg.champions  { background:#fef3c7; color:#92400e; }
.rfm-seg.loyal      { background:#ede9fe; color:#5b21b6; }
.rfm-seg.potential  { background:#d1fae5; color:#065f46; }
.rfm-seg.new        { background:#dbeafe; color:#1e40af; }
.rfm-seg.atrisk     { background:#fee2e2; color:#991b1b; }
.rfm-seg.lost       { background:var(--surface-2); color:var(--muted); }

/* ========= BIRTHDAY ========= */
.bday-list { display:flex; flex-direction:column; gap:8px; }
.bday-card { display:flex; align-items:center; gap:14px; padding:12px 16px; border-radius:12px; border:1.5px solid var(--border); background:var(--surface-2); }
.bday-card.bday-today { border-color:var(--primary); background:color-mix(in srgb,var(--primary) 6%,var(--surface)); }
.bday-avatar { width:40px; height:40px; border-radius:50%; background:var(--grad-b); color:#fff; display:flex; align-items:center; justify-content:center; font-size:18px; font-weight:700; flex-shrink:0; }
.bday-info { flex:1; }
.bday-tier { flex-shrink:0; }


/* ========= MEJA ========= */
.meja-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:14px; }
.meja-card { border-radius:14px; border:2px solid var(--border); background:var(--surface-2); padding:16px; text-align:center; transition:box-shadow .2s; }
.meja-card:hover { box-shadow:0 4px 20px rgba(0,0,0,.12); }
.meja-avail { border-color:#22c55e; }
.meja-occupied { border-color:#ef4444; background:color-mix(in srgb,#ef4444 6%,var(--surface)); }
.meja-reserved { border-color:#f59e0b; background:color-mix(in srgb,#f59e0b 6%,var(--surface)); }
.meja-number { font-size:28px; font-weight:800; margin-bottom:4px; }
.meja-area { font-size:11px; color:var(--muted); margin-bottom:4px; }
.meja-cap { font-size:12px; }
.meja-status { font-size:12px; font-weight:600; margin-top:6px; }
.meja-note { font-size:11px; color:var(--muted); margin-top:4px; font-style:italic; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.meja-dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:4px; }
.meja-dot-avail { background:#22c55e; }
.meja-dot-occupied { background:#ef4444; }
.meja-dot-reserved { background:#f59e0b; }

/* ========= VOID / TAG-DANGER ========= */
.tag-danger { display:inline-block; padding:2px 8px; border-radius:8px; font-size:11px; font-weight:700; background:#fee2e2; color:#991b1b; }

/* ========= NEGO PRICE ========= */
.ci-nego-btn { background:none; border:none; cursor:pointer; font-size:14px; padding:0 2px; opacity:.7; }
.ci-nego-btn:hover { opacity:1; }
.nego-label { font-size:10px; background:#fef3c7; color:#92400e; border-radius:6px; padding:1px 5px; font-weight:600; }

/* ========= DATA HUB ========= */
.hub-card { background:var(--surface-2); border:1.5px solid var(--border); border-radius:14px; padding:20px; }
.hub-card h4 { margin:0 0 4px; font-size:15px; }
.hub-actions { display:flex; gap:10px; margin-top:14px; flex-wrap:wrap; }
.hub-panel { animation: fadeIn .15s; }

/* ========= STORE CARD ========= */
.store-card { display:flex; align-items:center; gap:12px; padding:14px 16px; border-radius:12px; border:1.5px solid var(--border); background:var(--surface-2); margin-bottom:10px; }
.store-card.store-active { border-color:var(--primary); background:color-mix(in srgb,var(--primary) 5%,var(--surface)); }
.store-info { flex:1; }

/* .tab-bar/.tab-btn moved to src/app/globals.css (single canonical
   definition shared by every page) — removed here to stop this legacy
   stylesheet (loaded after globals.css) from silently overriding it. */

/* ============================================================
   License & nav-lock styles
   ============================================================ */
.nav-locked {
  opacity: 0.45;
  pointer-events: none;
  position: relative;
}
.nav-lock-badge {
  font-size: 10px;
  position: absolute;
  top: 4px;
  right: 6px;
  line-height: 1;
}
.lic-status {
  border-radius: 12px;
  padding: 16px;
  border: 1.5px solid var(--border);
}
.lic-status.lic-active  { border-color: var(--success); background: color-mix(in srgb, var(--success) 8%, var(--surface)); }
.lic-status.lic-trial   { border-color: var(--warning); background: color-mix(in srgb, var(--warning) 8%, var(--surface)); }
.lic-status.lic-expired { border-color: var(--danger);  background: color-mix(in srgb, var(--danger)  8%, var(--surface)); }
.lic-plan-name  { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.lic-plan-badge { font-size: 24px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.lic-exp, .lic-meta { font-size: 12px; color: var(--muted); }
.lic-top-grid { grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) {
  .lic-top-grid { grid-template-columns: 1fr !important; }
}
