:root {
  /* ================= WARM COFFEE & WHITE PALETTE (LOGO LOOP'S) ================= */
  --bg-primary: #150e09;        /* Deep espresso roast */
  --bg-secondary: #1d140e;      /* Rich dark mocha */
  --bg-card: #271a13;           /* Solid warm coffee card (fast render, no blur) */
  --bg-card-hover: #322118;     /* Card hover state */
  --bg-input: #110b07;          /* Form input background */
  
  --border-color: rgba(255, 255, 255, 0.12);
  --border-focus: #ffffff;

  /* Brand Accents */
  --accent-coffee: #51331b;     /* Logo background brown */
  --accent-caramel: #d4a373;    /* Warm golden caramel */
  --accent-white: #ffffff;      /* Pure crisp white */
  --accent-emerald: #10b981;    /* Success / Bayar / Mulai */
  --accent-amber: #f59e0b;      /* Warning / Stok tipis */
  --accent-rose: #ef4444;       /* Expense / Danger */
  --accent-cyan: var(--accent-caramel);

  /* High Contrast Typography */
  --text-main: #ffffff;         /* Pure white text */
  --text-muted: #dcd0c8;        /* Warm cream text */
  --text-dim: #998375;          /* Dim mocha text */

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --sidebar-w: 86px;
  --cart-w: 380px;
  --header-h: 68px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

button, [role="button"], a[href], summary, select, label[for] {
  cursor: pointer;
}

button:disabled, [disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

:focus-visible {
  outline: 2px solid var(--accent-white);
  outline-offset: 2px;
}

/* Fast-rendering solid background — zero GPU lag */
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
}

input, button, select, textarea {
  font-family: inherit;
  user-select: auto;
}

/* Scrollbar Custom */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* ================= APP LAYOUT ================= */
.app-container {
  display: flex;
  height: 100%;
  height: 100dvh;
  width: 100%;
  width: 100vw;
  overflow: hidden;
}

/* SIDEBAR NAVIGATION */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  z-index: 100;
  flex-shrink: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.hidden {
  margin-left: calc(-1 * var(--sidebar-w));
  transform: translateX(-100%);
  pointer-events: none;
}

.brand-icon {
  width: 84px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  margin-bottom: 24px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}

.brand-icon:hover {
  transform: scale(1.04);
  border-color: #ffffff;
}

.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 0 6px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  color: #ffffff;
  background: var(--bg-card);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.nav-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  background: var(--accent-rose);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
}

/* MAIN VIEWPORT */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-primary);
}

/* TOP HEADER (TRANSPARAN) */
.top-header {
  height: 56px;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  z-index: 40;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.shift-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-emerald);
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
}

.shift-pill.closed {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--accent-rose);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.lan-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 163, 115, 0.12);
  border: 1px solid rgba(212, 163, 115, 0.35);
  color: var(--accent-caramel);
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.lan-pill:hover {
  background: rgba(212, 163, 115, 0.22);
  border-color: var(--accent-caramel);
  color: #ffffff;
}

.lan-pill svg {
  flex-shrink: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.digital-clock {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-main);
  background: var(--bg-card);
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.btn-header {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.1s, opacity 0.15s;
}

.btn-header:active {
  transform: scale(0.98);
}

.btn-header-primary {
  background: #ffffff;
  color: #1a100a;
}

.btn-header-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* CONTENT CONTAINER */
.page-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: none;
}

.page-container.active {
  display: block;
}

/* ================= VIEW 1: DASHBOARD ================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s;
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.stat-card.cyan::after { background: #ffffff; }
.stat-card.emerald::after { background: var(--accent-emerald); }
.stat-card.amber::after { background: var(--accent-amber); }
.stat-card.purple::after { background: var(--accent-caramel); }

.stat-title {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
}

.stat-subtext {
  font-size: 12px;
  color: var(--text-dim);
}

/* SECTION HEADERS */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ================= VIEW 2: STASIUN RENTAL PS ================= */
.stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.station-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: border-color 0.15s;
  position: relative;
}

.station-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.station-card.active {
  border-color: #ffffff;
  background: #302017;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.station-card.warning-time {
  border-color: var(--accent-rose);
}

.station-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.station-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.station-type-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.station-timer-box {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.station-timer-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.station-timer-digits {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
}

.station-timer-digits.warning {
  color: var(--accent-rose);
}

.station-session-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}

.station-actions {
  display: flex;
  gap: 8px;
}

.btn-station {
  flex: 1;
  padding: 12px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity 0.15s;
}

.btn-station:hover {
  opacity: 0.9;
}

.btn-station-start {
  background: #ffffff;
  color: #1c1109;
}

.btn-station-extend {
  background: rgba(212, 163, 115, 0.2);
  color: var(--accent-caramel);
  border: 1px solid rgba(212, 163, 115, 0.4);
}

.btn-station-stop {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* ================= VIEW 3: POS KASIR (SPLIT SCREEN) ================= */
#view-pos {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#view-pos.active {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow: hidden !important;
  padding: 0 !important;
}

.pos-layout {
  display: flex;
  flex: 1;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

/* POS Shift Lock Overlay (Ketika Shift Belum Dibuka) */
.pos-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 45;
  background: rgba(21, 14, 9, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pos-lock-card {
  max-width: 460px;
  width: 100%;
  background: linear-gradient(145deg, #1d140e, #271a13);
  border: 1px solid rgba(212, 163, 115, 0.35);
  border-radius: 16px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
}

.pos-lock-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(212, 163, 115, 0.12);
  border: 1px solid rgba(212, 163, 115, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-caramel);
}

.pos-lock-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  margin-bottom: 12px;
}

.pos-lock-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.pos-lock-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.btn-checkout.disabled,
.btn-checkout:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.5);
  pointer-events: none;
}

.pos-catalog {
  flex: 1;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 22px;
}

.pos-cart {
  width: var(--cart-w);
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.category-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.tab-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 6px;
}

.subnav-pills {
  width: 100%;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

.tab-pill {
  padding: 8px 16px;
  border-radius: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tab-pill:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.tab-pill.active {
  background: #ffffff;
  color: #1a100a;
  border-color: #ffffff;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}

.product-card:hover {
  border-color: #ffffff;
  background: var(--bg-card-hover);
}

.product-card.out-of-stock {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.product-category-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

.product-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 4px;
}

.product-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-price {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.product-stock-tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.product-stock-tag.low {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  font-weight: 700;
}

/* CART PANEL */
.cart-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.cart-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
}

.btn-clear-cart {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
}

.btn-clear-cart:hover {
  color: #ffffff;
}

.cart-items-container {
  flex: 1 1 auto;
  min-height: 80px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-dim);
  gap: 8px;
  font-size: 13px;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 9px 12px;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
  margin-right: 10px;
}

.cart-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 12px;
  color: var(--text-muted);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.qty-text {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  width: 20px;
  text-align: center;
}

/* CART FOOTER & CHECKOUT */
.cart-footer {
  padding: 12px 18px 14px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  margin-top: auto;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.calc-row.total {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  padding-top: 6px;
}

.payment-methods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.pay-method-btn {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.pay-method-btn.active {
  background: #ffffff;
  border-color: #ffffff;
  color: #1a100a;
}

.btn-checkout {
  width: 100%;
  padding: 12px 14px;
  min-height: 46px;
  border-radius: 10px;
  background: #ffffff;
  color: #1a100a;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.btn-checkout:hover {
  opacity: 0.92;
}

/* Multi-Cart: Customer row + Cart Dropdown */
.cart-customer-row {
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(0, 0, 0, 0.1);
}

.cart-dropdown-wrap {
  flex-shrink: 0;
  max-width: 155px;
}

.cart-slot-dropdown {
  padding: 6px 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  background: var(--bg-card) !important;
  color: var(--accent-caramel) !important;
  border: 1px solid rgba(212, 163, 115, 0.4) !important;
  border-radius: 8px !important;
  cursor: pointer;
  outline: none;
  width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.cart-slot-dropdown:hover,
.cart-slot-dropdown:focus {
  border-color: var(--accent-caramel) !important;
  background: #2a1c14 !important;
}

.cart-slot-dropdown option {
  background: #1d140e;
  color: #ffffff;
  font-size: 12px;
  padding: 6px;
}

/* Multi-Cart: Checkout Actions Row (Tombol Keranjang Tahan + Selesaikan) */
.checkout-actions-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

.btn-cart-hold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  min-height: 46px;
  border-radius: 10px;
  background: rgba(212, 163, 115, 0.12);
  border: 1px solid rgba(212, 163, 115, 0.4);
  color: var(--accent-caramel);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: all 0.15s ease;
}

.btn-cart-hold:hover {
  background: rgba(212, 163, 115, 0.24);
  border-color: var(--accent-caramel);
  color: #ffffff;
}

.btn-cart-hold:active {
  transform: scale(0.96);
}

.btn-cart-hold.disabled,
.btn-cart-hold:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ================= VIEW 4: BUKU KAS & INVENTARIS ================= */
.data-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.custom-table th {
  background: rgba(0, 0, 0, 0.2);
  padding: 14px 18px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.custom-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.badge-expense {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-income {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-att-masuk {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.35);
  display: inline-flex;
  align-items: center;
}

.badge-att-pulang {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(59, 130, 246, 0.35);
  display: inline-flex;
  align-items: center;
}

.badge-att-izin {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: inline-flex;
  align-items: center;
}

.badge-att-sakit {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(244, 63, 94, 0.35);
  display: inline-flex;
  align-items: center;
}

/* ================= WHATSAPP PREVIEW CARD ================= */
.wa-mock-container {
  max-width: 650px;
  margin: 0 auto;
  background: #111b21;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
}

.wa-header {
  background: #202c33;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.wa-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #00a884;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.wa-title-box {
  flex: 1;
}

.wa-group-name {
  font-size: 15px;
  font-weight: 600;
  color: #e9edef;
}

.wa-group-members {
  font-size: 12px;
  color: #8696a0;
}

.wa-body {
  padding: 20px;
  background-color: #0b141a;
  min-height: 400px;
}

.wa-bubble {
  background: #005c4b;
  color: #e9edef;
  border-radius: 10px 0 10px 10px;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 90%;
  margin-left: auto;
}

/* ================= MODAL BASE ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  padding: 16px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input, .form-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
}

.form-input:focus, .form-select:focus {
  border-color: #ffffff;
}

/* ================= STRUK THERMAL SIMULASI ================= */
.thermal-receipt {
  background: #ffffff;
  color: #000000;
  font-family: var(--font-mono);
  padding: 20px;
  max-width: 340px;
  margin: 0 auto;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.receipt-center {
  text-align: center;
}

.receipt-dashed {
  border-top: 1px dashed #000000;
  margin: 8px 0;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
}

/* PRINT MEDIA */
@media print {
  body * {
    visibility: hidden;
  }
  #thermalReceiptArea, #thermalReceiptArea * {
    visibility: visible;
  }
  #thermalReceiptArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 58mm;
  }
}

/* ================= RESPONSIVE MOBILE / SMALL TABLET ================= */
@media (max-width: 900px) {
  .app-container {
    flex-direction: column-reverse;
    height: 100dvh;
    height: 100%;
    width: 100%;
  }
  .sidebar {
    width: 100%;
    height: 64px;
    border-right: none;
    border-top: 1px solid var(--border-color);
    flex-direction: row;
    padding: 0 4px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
    z-index: 50;
    transition: transform 0.25s ease, height 0.25s ease;
  }
  .sidebar.hidden {
    margin-left: 0;
    transform: translateY(100%);
    height: 0;
    padding: 0;
    border: none;
    overflow: hidden;
  }
  .brand-icon {
    display: none;
  }
  .nav-menu {
    flex-direction: row;
    width: max-content;
    min-width: 100%;
    justify-content: flex-start;
    padding: 0 4px;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .nav-item {
    font-size: 10px;
    padding: 6px 8px;
    min-width: 58px;
    flex-shrink: 0;
    justify-content: center;
    border-radius: 8px;
  }
  .nav-item span {
    font-size: 9px;
  }
  .main-wrapper {
    flex: 1;
    height: calc(100% - 64px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .floating-header-controls {
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    gap: 6px;
  }
  .floating-header-controls .digital-clock {
    display: none;
  }
  .page-container {
    padding: 14px 12px;
    padding-top: 52px;
    -webkit-overflow-scrolling: touch;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  #view-pos.active {
    height: 100% !important;
    overflow-y: auto !important;
  }
  .pos-layout {
    flex-direction: column;
    height: auto;
    min-height: 100%;
    overflow-y: auto;
    padding-top: 50px;
  }
  .pos-catalog {
    padding: 12px;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .pos-cart {
    width: 100%;
    height: auto;
    min-height: auto;
    max-height: none;
    overflow: visible;
    border-left: none;
    border-top: 1px solid var(--border-color);
  }
  .cart-items-container {
    max-height: 280px;
  }
}

/* ================= INVENTORY EDIT BUTTON ================= */
.btn-inv-edit {
  padding: 4px 10px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-inv-edit:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #ffffff;
}

/* Varian Indomie: stepper telur & toggle double mie */
#btn-egg-dec:disabled,
#btn-egg-inc:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
#btn-egg-dec:active:not(:disabled),
#btn-egg-inc:active:not(:disabled),
#btn-toggle-double-mie:active {
  transform: scale(0.95);
}
#btn-egg-dec:focus-visible,
#btn-egg-inc:focus-visible,
#btn-toggle-double-mie:focus-visible {
  outline: 2px solid #d4a373;
  outline-offset: 2px;
}
#btn-toggle-double-mie {
  min-height: 48px;
}
#btn-egg-dec,
#btn-egg-inc {
  width: 48px !important;
  height: 48px !important;
}

/* ================= ANALITIK DASHBOARD, RESEP, OPNAME, & BACKUP ================= */
.dash-insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
}

.insight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.insight-card-wide {
  grid-column: 1 / -1;
}

.insight-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.insight-card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.insight-card-sub {
  font-size: 11px;
  color: var(--text-dim);
}

.insight-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.insight-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-size: 13px;
}

.insight-rank {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  color: var(--accent-caramel);
  min-width: 24px;
}

.hourly-chart {
  display: grid;
  grid-template-columns: repeat(16, minmax(36px, 1fr));
  gap: 6px;
  align-items: end;
  min-height: 130px;
  padding-top: 12px;
  overflow-x: auto;
}

.hourly-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hourly-bar-track {
  width: 100%;
  height: 88px;
  background: var(--bg-secondary);
  border-radius: 6px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hourly-bar-fill {
  width: 100%;
  background: var(--accent-caramel);
  border-radius: 5px 5px 0 0;
  min-height: 2px;
  transition: height 0.2s;
}

.hourly-bar-fill.peak {
  background: var(--accent-emerald);
}

.hourly-bar-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

.hourly-bar-val {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.backup-export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.recipe-row,
.purchase-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr auto;
  gap: 8px;
  align-items: center;
  background: var(--bg-secondary);
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.purchase-row {
  grid-template-columns: 1.5fr 0.8fr 1fr auto;
}

/* ================= INLINE SVG ICON SYSTEM ================= */
.ico {
  display: inline-block;
  width: 15px;
  height: 15px;
  vertical-align: -2.5px;
  margin-right: 5px;
  flex-shrink: 0;
}

.ico-only {
  margin-right: 0;
}

.section-title .ico,
.modal-title .ico,
.insight-card-title .ico {
  width: 17px;
  height: 17px;
  vertical-align: -3px;
  margin-right: 6px;
  color: var(--accent-caramel);
}

