/* ==========================================================================
   CSS TOKO POS - Premium Responsive & Dynamic Styling
   ========================================================================== */

/* Color Tokens & Theme Configuration */
:root {
  --bg-app: #0b0f19;
  --bg-card: #151f32;
  --bg-card-hover: #1e2d4a;
  --bg-input: #1a263d;
  
  --primary: #6366f1; /* Premium Indigo */
  --primary-hover: #4f46e5;
  --success: #10b981; /* Premium Teal/Green */
  --success-hover: #059669;
  --danger: #ef4444; /* Soft Red */
  --danger-hover: #dc2626;
  --warning: #f59e0b; /* Amber */
  --info: #06b6d4; /* Cyan */
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: #27354f;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Elements */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

input, select, textarea, button {
  font-family: inherit;
  font-size: 1rem;
}

a {
  text-decoration: none;
  color: var(--primary);
}

/* Status Bar */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  transition: var(--transition);
  z-index: 1000;
}
.status-bar.server-mode {
  background-color: var(--success);
}
.status-bar.local-mode {
  background-color: var(--danger);
}
.status-dot {
  width: 8px;
  height: 8px;
  background-color: #fff;
  border-radius: 50%;
  box-shadow: 0 0 8px #fff;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 550;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  gap: 8px;
}
.btn-primary {
  background-color: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}
.btn-primary:disabled {
  background-color: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}
.btn-outline {
  background-color: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-main);
}
.btn-outline:hover {
  background-color: var(--border);
}
.btn-outline-danger {
  background-color: transparent;
  border: 1.5px solid var(--danger);
  color: var(--danger);
}
.btn-outline-danger:hover {
  background-color: var(--danger);
  color: #fff;
}
.btn-block {
  display: flex;
  width: 100%;
}
.btn-lg {
  padding: 14px 22px;
  font-size: 1.1rem;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}
.btn-icon-only {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.btn-icon-only:hover {
  background-color: var(--border);
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-muted);
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background-color: var(--bg-input);
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.2);
}
.radio-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}
.radio-label {
  cursor: pointer;
}
.radio-label input[type="radio"] {
  display: none;
}
.radio-custom-btn {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: var(--radius-md);
  background-color: var(--bg-input);
  border: 1.5px solid var(--border);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}
.radio-label input[type="radio"]:checked + .radio-custom-btn {
  border-color: var(--primary);
  background-color: rgba(99, 102, 241, 0.15);
  color: #fff;
}

/* Login Card styling */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90vh;
  padding: 20px;
}
.login-card {
  background-color: var(--bg-card);
  padding: 40px;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  animation: slideUp 0.4s ease-out;
}
.login-header {
  text-align: center;
  margin-bottom: 30px;
}
.logo-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}
.login-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.login-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.role-selector {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}
.role-btn {
  flex: 1;
  background-color: var(--bg-input);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  padding: 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.role-btn:hover {
  border-color: var(--primary);
  color: var(--text-main);
}
.role-btn.active {
  border-color: var(--primary);
  background-color: rgba(99, 102, 241, 0.1);
  color: var(--text-main);
}
.btn-icon {
  font-size: 1.5rem;
}
.btn-label {
  font-size: 0.9rem;
  font-weight: 600;
}
.pin-section {
  margin-bottom: 25px;
  animation: fadeIn 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* App Main Layout */
.app-layout {
  display: flex;
  min-height: calc(100vh - 32px); /* minus status bar */
}

/* Sidebar navigation */
.sidebar {
  width: 260px;
  background-color: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
  z-index: 100;
}

/* === COLLAPSED STATE === */
.sidebar.collapsed {
  width: 58px;
}

/* Sidebar Header */
.sidebar-header {
  padding: 16px 14px 14px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar.collapsed .sidebar-header {
  padding: 12px 8px;
  align-items: center;
}

/* Toggle button inside header */
.btn-sidebar-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--text-muted);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
  flex-shrink: 0;
  align-self: flex-end;
}
.btn-sidebar-toggle:hover {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.35);
  color: #fff;
}
.sidebar.collapsed .btn-sidebar-toggle {
  align-self: center;
}

/* Logo bar */
.sidebar-logo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.sidebar.collapsed .sidebar-logo-row {
  justify-content: center;
}
.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.2s ease, width 0.3s ease;
  opacity: 1;
}
.sidebar.collapsed .logo {
  opacity: 0;
  width: 0;
  pointer-events: none;
  display: none;
}
.logo-icon-only {
  font-size: 1.5rem;
  display: none;
  align-items: center;
  justify-content: center;
}
.sidebar.collapsed .logo-icon-only {
  display: flex;
}

/* User info row */
.user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}
.sidebar.collapsed .user-info {
  justify-content: center;
}
.role-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}
.sidebar.collapsed .role-badge {
  display: none;
}
.sidebar.collapsed #btn-logout {
  display: none;
}
.role-badge.staff {
  background-color: rgba(99, 102, 241, 0.15);
  color: var(--primary);
}
.role-badge.owner {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

/* Nav Menu */
.nav-menu {
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow: hidden;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  font-weight: 500;
  transition: var(--transition);
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.nav-item:hover, .nav-item.active {
  color: var(--text-main);
  background-color: var(--bg-input);
}
.nav-item.active {
  color: #fff;
  background-color: var(--primary);
}
.nav-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
}
.nav-text {
  transition: opacity 0.2s ease;
  opacity: 1;
  font-size: 0.9rem;
}

/* Collapsed: icon only + tooltip */
.sidebar.collapsed .nav-item {
  padding: 11px;
  justify-content: center;
  gap: 0;
}
.sidebar.collapsed .nav-text {
  display: none;
}
.sidebar.collapsed .nav-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #1e2a48;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.sidebar.collapsed .nav-item:hover::after {
  opacity: 1;
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 18px 24px;
  overflow-y: auto;
  min-height: 0;
}
.app-view {
  animation: fadeIn 0.25s ease-out;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}
#view-pos {
  max-width: 100%;
  height: 100%;
}

/* POS Layout (Kasir) */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 20px;
  height: calc(100vh - 78px);
  min-height: 0;
  max-height: calc(100vh - 78px);
}
.pos-catalog-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Toolbar Top (Search Bar) */
.pos-toolbar-top {
  margin-bottom: 10px;
  flex-shrink: 0;
}
.search-bar-container {
  display: flex;
  align-items: center;
  background-color: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px 12px;
  transition: var(--transition);
}
.search-bar-container:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}
.search-bar-icon {
  font-size: 1.05rem;
  margin-right: 8px;
  opacity: 0.7;
}
.search-bar-container input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  padding: 8px 4px;
  font-size: 0.92rem;
  outline: none;
}
.search-bar-container input::placeholder {
  color: var(--text-muted);
}
.btn-clear {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 1rem;
  border-radius: 4px;
  transition: var(--transition);
}
.btn-clear:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Filter Toolbar */
.pos-filter-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.pos-filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.filter-chip {
  background-color: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  white-space: nowrap;
}
.filter-chip:hover {
  border-color: var(--primary);
  color: var(--text-main);
  background-color: var(--bg-card-hover);
}
.filter-chip.active {
  background-color: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.chip-count {
  background-color: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
}
.filter-chip.active .chip-count {
  background-color: var(--primary);
  color: #fff;
}

.pos-filter-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sort-select-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sort-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}
.pos-select-sm {
  background-color: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}
.pos-select-sm:focus {
  border-color: var(--primary);
}

.view-mode-toggle {
  display: flex;
  background-color: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.btn-mode {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}
.btn-mode:hover {
  color: var(--text-main);
}
.btn-mode.active {
  background-color: var(--primary);
  color: #fff;
}

/* Meta Bar */
.pos-items-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.78rem;
  flex-shrink: 0;
}
.meta-info-text {
  color: var(--text-muted);
  font-weight: 500;
}
.meta-hint-text {
  color: var(--info);
  font-size: 0.74rem;
}

/* Dedicated Scroll Container */
.pos-items-scroll-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--bg-input);
}

/* Table View in POS */
.pos-table-wrapper {
  width: 100%;
}
.pos-data-table {
  width: 100%;
  border-collapse: collapse;
}
.pos-data-table thead {
  position: sticky;
  top: 0;
  z-index: 5;
  background-color: var(--bg-card);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}
.pos-data-table th {
  padding: 10px 12px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1.5px solid var(--border);
  background-color: var(--bg-card);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pos-data-table td {
  padding: 9px 12px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}
.pos-item-row {
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.pos-item-row:hover {
  background-color: rgba(99, 102, 241, 0.1);
}
.pos-item-row:hover .btn-add-pos-item {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}
.pos-item-row.out-of-stock {
  opacity: 0.55;
  cursor: not-allowed;
}
.pos-item-row.out-of-stock:hover {
  background-color: transparent;
}

.pos-table-thumb {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto;
}
.pos-table-thumb-placeholder {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(6, 182, 212, 0.25));
  color: var(--primary);
  font-weight: 700;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  text-transform: uppercase;
  margin: 0 auto;
}

.pos-barcode-badge {
  font-family: monospace;
  font-size: 0.75rem;
  background-color: rgba(255, 255, 255, 0.06);
  padding: 3px 6px;
  border-radius: 4px;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: inline-block;
}
.pos-item-title {
  font-weight: 600;
  color: #fff;
}
.pos-price-retail {
  font-weight: 700;
  color: #fff;
}
.pos-price-wholesale {
  color: var(--info);
  font-weight: 600;
}
.pos-wholesale-min {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Stock Badges in POS Table */
.stock-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.74rem;
  font-weight: 700;
}
.stock-pill.in-stock {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.stock-pill.low-stock {
  background-color: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.stock-pill.out-stock {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-add-pos-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-add-pos-item:hover {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-add-pos-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background-color: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}

/* Custom Scrollbar for inner containers */
.custom-scrollbar::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.18);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Grid within container */
.pos-items-scroll-container .catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
  padding: 14px;
  align-content: start;
}

/* Catalog Card Product */
.product-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.product-card-img-wrapper {
  width: 100%;
  height: 110px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 10px;
  background-color: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid var(--border);
}
.product-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card-img-placeholder {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.1));
  letter-spacing: 0.05em;
  text-align: center;
  padding: 4px;
}
.image-upload-preview-wrapper {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.image-upload-preview {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  background-color: var(--bg-card-hover);
}
.product-card.out-of-stock {
  opacity: 0.5;
  cursor: not-allowed;
}
.product-card.out-of-stock:hover {
  transform: none;
  border-color: var(--border);
}
.product-badge-grosir {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(6, 182, 212, 0.2);
  color: var(--info);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.product-name {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: #fff;
  word-break: break-word;
}
.product-code {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.product-prices {
  margin-bottom: 12px;
}
.price-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 2px;
}
.price-label {
  color: var(--text-muted);
}
.price-val {
  font-weight: 600;
  color: #fff;
}
.price-val.wholesale {
  color: var(--info);
}
.product-stock {
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  color: var(--text-muted);
}
.stock-num {
  font-weight: 700;
  color: var(--success);
}
.out-of-stock .stock-num {
  color: var(--danger);
}

/* ==========================================================================
   POS CART PANEL - Distinct, Harmonious & High Contrast Theme
   ========================================================================== */
.pos-cart-panel {
  /* Deep indigo-purple - clearly distinct from catalog's neutral dark-slate */
  background:
    radial-gradient(ellipse at 110% -10%, rgba(99, 102, 241, 0.25) 0%, transparent 55%),
    radial-gradient(ellipse at -10% 110%, rgba(16, 185, 129, 0.14) 0%, transparent 50%),
    linear-gradient(160deg, #1e1b40 0%, #141230 50%, #0e1228 100%);
  border: 1.5px solid rgba(99, 102, 241, 0.45);
  border-top: 4px solid #6366f1;
  border-left: 1.5px solid rgba(99, 102, 241, 0.55);
  border-radius: var(--radius-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  box-shadow:
    0 20px 50px -12px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(99, 102, 241, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  overflow: hidden;
  position: relative;
}

/* Cart Header Ribbon */
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Full-bleed indigo-emerald ribbon header */
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.30) 0%, rgba(16, 185, 129, 0.14) 100%);
  padding: 13px 18px;
  border-bottom: 2px solid rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
  position: relative;
}
.cart-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, #6366f1, transparent 70%);
  opacity: 0.5;
}
.cart-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cart-title-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(16, 185, 129, 0.25));
  border: 1px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}
.cart-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}
.cart-count-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.25);
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 1px 7px;
  border-radius: 10px;
  margin-top: 2px;
}
.btn-clear-cart {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}
.btn-clear-cart:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.45);
}

/* Cart Items Recessed Well List */
.cart-items-list {
  flex: 1;
  min-height: 60px;
  overflow-y: auto;
  padding: 10px;
  margin: 10px 14px 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Much darker recessed well so item cards pop */
  background: rgba(7, 9, 18, 0.65);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: var(--radius-md);
  box-shadow:
    inset 0 3px 10px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

/* Friendly Empty State */
.empty-cart-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  height: 100%;
  min-height: 180px;
  text-align: center;
  gap: 10px;
  padding: 24px 14px;
}
.empty-cart-icon-circle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(16, 185, 129, 0.18));
  border: 1.5px dashed rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  animation: floatCart 3s ease-in-out infinite;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}
@keyframes floatCart {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}
.empty-cart-title {
  font-size: 0.96rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}
.empty-cart-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 230px;
  line-height: 1.4;
}

/* Cart Item Card - elevated blue-navy, pops from dark well background */
.cart-item {
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #222848 0%, #1b2340 100%);
  border: 1px solid rgba(99, 102, 241, 0.30);
  border-left: 3.5px solid #6366f1;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  gap: 8px;
  animation: fadeIn 0.2s ease-out;
  transition: var(--transition);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.cart-item:hover {
  background: linear-gradient(135deg, #2a3258 0%, #222a4e 100%);
  border-color: rgba(99, 102, 241, 0.55);
  border-left-color: #818cf8;
  box-shadow:
    0 5px 16px rgba(0, 0, 0, 0.4),
    0 0 12px rgba(99, 102, 241, 0.15);
  transform: translateY(-1px);
}
.cart-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cart-item-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}
.cart-item-barcode {
  font-family: monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
}
.btn-remove-item {
  color: var(--text-muted);
  cursor: pointer;
  background: transparent;
  border: none;
  font-size: 0.95rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: var(--transition);
}
.btn-remove-item:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.18);
}
.cart-item-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.qty-controller {
  display: flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.qty-btn {
  background: transparent;
  border: none;
  color: #fff;
  width: 26px;
  height: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.85rem;
  transition: var(--transition);
}
.qty-btn:hover {
  background-color: var(--primary);
  color: #fff;
}
.qty-val {
  width: 28px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}
.price-toggle-group {
  display: flex;
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 2px;
  border: 1px solid var(--border);
}
.price-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  transition: var(--transition);
}
.price-toggle-btn.active {
  background-color: #6366f1;
  color: #fff;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.35);
}
.cart-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 6px;
}
.cart-item-unit-price {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.badge-type-pill {
  font-size: 0.64rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}
.badge-type-pill.wholesale {
  background: rgba(6, 182, 212, 0.2);
  color: #06b6d4;
}
.badge-type-pill.retail {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
}
.cart-item-subtotal {
  font-weight: 750;
  font-size: 0.92rem;
  color: #34d399;
}

/* Cart Footer & Payment Controls */
.cart-footer {
  /* Emerald-tinted separator */
  border-top: 2px solid rgba(16, 185, 129, 0.22);
  background: linear-gradient(0deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

/* Friendly Invoice Card: Grand Total Highlight */
.cart-summary-card {
  background: linear-gradient(135deg,
    rgba(99, 102, 241, 0.18) 0%,
    rgba(99, 102, 241, 0.10) 50%,
    rgba(16, 185, 129, 0.14) 100%);
  border: 1.5px solid rgba(99, 102, 241, 0.30);
  border-bottom: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 12px rgba(99, 102, 241, 0.08);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.summary-val-qty {
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.74rem;
}
.summary-row.grand-total {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 6px;
  margin-top: 2px;
}
.grand-total-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}
.grand-total-amount {
  font-size: 1.45rem;
  font-weight: 800;
  color: #34d399;
  text-shadow: 0 0 16px rgba(52, 211, 153, 0.35);
  letter-spacing: -0.02em;
  transition: transform 0.15s ease;
}

/* Payment Method Selection */
.payment-method-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.payment-section-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.payment-method-radios {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.payment-method-chip {
  cursor: pointer;
}
.payment-method-chip input[type="radio"] {
  display: none;
}
.payment-chip-btn {
  display: block;
  text-align: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
}
.payment-method-chip input[type="radio"]:checked + .chip-cash {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.28);
}
.payment-method-chip input[type="radio"]:checked + .chip-qris {
  border-color: #06b6d4;
  background: rgba(6, 182, 212, 0.2);
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.28);
}

/* Cash Payment Input & Buttons */
.payment-form {
  margin-top: 2px;
}
.payment-input-group input {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background-color: var(--bg-input);
  color: #fff;
  font-weight: bold;
  font-size: 1.05rem;
  outline: none;
  margin-bottom: 6px;
  transition: var(--transition);
}
.payment-input-group input:focus {
  border-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

/* Colorful Indonesian Rupiah Banknote Buttons */
.quick-cash-buttons {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.quick-cash-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}
.quick-cash-btn.cash-10k {
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.3);
}
.quick-cash-btn.cash-20k {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.3);
}
.quick-cash-btn.cash-50k {
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.3);
}
.quick-cash-btn.cash-100k {
  color: #f472b6;
  border-color: rgba(244, 114, 182, 0.3);
}
.quick-cash-btn.cash-exact {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.15);
  font-weight: 700;
}
.quick-cash-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.quick-cash-btn.cash-exact:hover {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
}

/* Friendly Change Info (Kembalian) */
.change-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-top: 6px;
  transition: var(--transition);
}
.change-info.change-sufficient {
  background: rgba(16, 185, 129, 0.12);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}
.change-info.change-sufficient strong {
  color: #34d399;
  font-size: 1.15rem;
  font-weight: 800;
}
.change-info.change-insufficient {
  background: rgba(239, 68, 68, 0.12);
  border: 1.5px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}
.change-info.change-insufficient strong {
  color: #f87171;
  font-size: 1.15rem;
  font-weight: 800;
}

/* QRIS Promo Box */
.qris-promo-box {
  background: rgba(6, 182, 212, 0.1);
  border: 1.5px dashed #06b6d4;
  padding: 10px;
  border-radius: var(--radius-sm);
  text-align: center;
  margin-top: 4px;
}
.qris-box-title {
  font-size: 0.82rem;
  color: #38bdf8;
  font-weight: 700;
  display: block;
  margin-bottom: 3px;
}
.qris-box-subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.35;
}

/* Checkout Button */
.btn-checkout-action {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 11px 16px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: var(--transition);
  margin-top: 2px;
}
.btn-checkout-action:hover:not(:disabled) {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
}
.btn-checkout-action:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Card General Box */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.card-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}
.card-body {
  padding: 24px;
}
.card-info {
  background-color: #1e263c;
  border-color: rgba(99, 102, 241, 0.25);
}
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Katalog Barang Panel & Table */
#view-items {
  max-width: 100%;
  height: 100%;
}
.katalog-panel {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 78px);
  max-height: calc(100vh - 78px);
  min-height: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.katalog-header {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.katalog-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.katalog-table-scroll-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--bg-input);
}
.katalog-data-table {
  width: 100%;
  border-collapse: collapse;
}
.katalog-data-table thead {
  position: sticky;
  top: 0;
  z-index: 5;
  background-color: var(--bg-card);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}
.katalog-data-table th {
  padding: 10px 14px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1.5px solid var(--border);
  background-color: var(--bg-card);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.katalog-data-table td {
  padding: 9px 14px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}
.katalog-data-table tr:hover {
  background-color: rgba(99, 102, 241, 0.08);
}
.katalog-data-table tr:hover .btn-outline {
  border-color: var(--primary);
  color: #fff;
  background-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.35);
}

/* Data Table Styling */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}
.data-table th, .data-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  background-color: rgba(0, 0, 0, 0.25);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.data-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}
.data-table td {
  color: #fff;
}
.data-table td .muted {
  color: var(--text-muted);
}
.data-table td strong {
  font-weight: 600;
}
.badge-mutation {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-mutation.GR {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--success);
}
.badge-mutation.GI {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}
.badge-mutation.OPN {
  background-color: rgba(6, 182, 212, 0.15);
  color: var(--info);
}

/* Adjust Stock Layout */
.adjust-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}
.info-current-stock {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.guide-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.guide-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.guide-list li strong {
  color: #fff;
}

/* Owner Report Tabs & Panels */
.report-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 10px;
}
.report-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.report-tab-btn:hover {
  color: var(--text-main);
  background-color: var(--bg-card);
}
.report-tab-btn.active {
  color: #fff;
  background-color: var(--primary);
}
.report-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.report-filter-bar .filters {
  display: flex;
  gap: 10px;
  align-items: center;
}
.report-filter-bar .filters select, .report-filter-bar .filters input {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--bg-input);
  color: #fff;
}
.report-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding: 24px;
  background-color: rgba(0,0,0,0.15);
  border-bottom: 1px solid var(--border);
}
.summary-card {
  background-color: var(--bg-input);
  border: 1.5px solid var(--border);
  padding: 20px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.summary-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}
.summary-val {
  font-size: 1.75rem;
  font-weight: 750;
  color: #fff;
}
.valuation-card {
  border-color: rgba(16, 185, 129, 0.25);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), transparent);
}
.valuation-card .summary-val {
  color: var(--success);
}
.valuation-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.report-item-list-inline {
  font-size: 0.85rem;
  color: var(--text-muted);
  list-style: none;
}
.report-item-list-inline li {
  margin-bottom: 4px;
}
.hidden {
  display: none !important;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.2s ease-out;
}
.modal {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 500px;
  max-height: 90vh; /* Fixed height overflow */
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  font-weight: 600;
  color: #fff;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
}
.modal-close:hover {
  color: #fff;
}
.modal-body {
  padding: 24px;
  overflow-y: auto; /* Enable scrolling */
}
.modal-footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & TOUCH OPTIMIZATION
   ========================================================================== */

@media (max-width: 991px) {
  /* POS Layout stacks on tablets/mobile */
  .pos-layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow-y: visible;
  }
  .pos-catalog-panel {
    height: auto;
  }
  .catalog-grid {
    overflow-y: visible;
    grid-template-columns: repeat(auto-fill, 150px);
    align-content: start;
  }
  .pos-cart-panel {
    height: auto;
    margin-top: 24px;
  }
  
  /* Split layout adjusts on mobile */
  .adjust-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  /* App container switches to bottom nav layout for mobile phone ergonomics */
  .app-layout {
    flex-direction: column;
    padding-bottom: 70px; /* Safe space for bottom navigation bar */
  }
  
  .sidebar {
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1500;
    border-right: none;
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 20px rgba(0,0,0,0.5);
  }
  
  .sidebar-header {
    display: none; /* Hide header panel on bottom navigation */
  }
  
  .nav-menu {
    flex-direction: row;
    padding: 6px 12px;
    justify-content: space-around;
  }
  
  .nav-item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    font-size: 0.7rem;
    flex: 1;
    text-align: center;
  }
  
  .nav-icon {
    font-size: 1.3rem;
  }
  
  .nav-text {
    font-size: 0.65rem;
  }
  
  .main-content {
    padding: 16px;
  }
  
  .table-responsive {
    border-radius: var(--radius-md);
  }
  
  /* Touch target sizes */
  .qty-btn {
    width: 36px;
    height: 36px;
  }
  .qty-val {
    font-size: 1.05rem;
  }
  .price-toggle-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
  .product-card {
    padding: 12px;
  }
}

/* ==========================================================================
   PRINT LAYOUT - THERMAL PRINTER STRUKS ONLY
   ========================================================================== */

/* Area struk disembunyikan total di screen */
.receipt-print-only {
  display: none;
}

@media print {
  /* Sembunyikan semua elemen UI utama */
  body * {
    visibility: hidden;
  }
  
  /* Hanya tampilkan area struk print */
  #print-receipt-area, #print-receipt-area * {
    visibility: visible;
  }
  
  #print-receipt-area {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 58mm; /* Standar thermal printer kasir */
    color: #000;
    background-color: #fff;
    padding: 2mm;
    font-family: 'Courier New', Courier, monospace;
    font-size: 10pt;
    line-height: 1.3;
  }
  
  /* Reset background warna untuk print */
  body {
    background-color: #fff !important;
    color: #000 !important;
  }
  
  .receipt-print-wrapper {
    width: 100%;
  }
  
  .receipt-header {
    text-align: center;
    margin-bottom: 4mm;
  }
  .receipt-header h2 {
    font-size: 12pt;
    font-weight: bold;
    margin-bottom: 1mm;
  }
  .receipt-header p {
    font-size: 8pt;
    margin: 0;
  }
  
  .receipt-meta {
    font-size: 8pt;
    margin-bottom: 3mm;
  }
  .receipt-meta p {
    display: flex;
    justify-content: space-between;
    margin: 0;
  }
  
  .divider-dashed {
    border-top: 1px dashed #000;
    margin: 2mm 0;
  }
  
  .receipt-items {
    font-size: 8pt;
  }
  .receipt-item-row {
    margin-bottom: 2mm;
  }
  .receipt-item-row .item-title {
    font-weight: bold;
    display: block;
  }
  .receipt-item-row .item-calc {
    display: flex;
    justify-content: space-between;
  }
  
  .receipt-totals {
    font-size: 8pt;
  }
  .receipt-total-row {
    display: flex;
    justify-content: space-between;
    margin: 0;
  }
  .receipt-total-row:first-child {
    font-weight: bold;
  }
  
  .receipt-footer {
    text-align: center;
    font-size: 7pt;
    margin-top: 4mm;
  }
  .receipt-footer p {
    margin: 0;
  }
}

/* Dynamic QRIS Pulse Animation */
.pulse-indicator.pulse-animation {
  animation: pulse-qris 1.5s infinite ease-in-out;
}

@keyframes pulse-qris {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}
