/* ═══════════════════════════════════════════════════
   ClaPos — Restaurant POS Design System
   Warm Gourmet Amber & Dark Espresso Bistro Palette
   ═══════════════════════════════════════════════════ */

/* ── CSS Custom Properties ─────────────────────── */
:root {
  /* Primary palette - Warm Gourmet Terracotta / Amber */
  --primary:        #E05A2B;
  --primary-light:  #EA6C40;
  --primary-dark:   #C44315;
  --primary-50:     #FFF3ED;
  --primary-100:    #FFE4D6;
  --primary-200:    #FFC9B3;

  /* ClaPos Restaurant Accents */
  --accent-green:       #10B981;
  --accent-green-hover: #059669;
  --accent-green-light: #D1FAE5;
  --accent-amber:       #F59E0B;
  --accent-cream:       #FFFDF9;

  /* Sidebar - Dark Espresso Bistro */
  --sidebar-bg:     #1A1412;
  --sidebar-hover:  #2D231F;
  --sidebar-active: #E05A2B;
  --sidebar-text:   #DCD2CC;
  --sidebar-width:  255px;

  /* Semantic */
  --success:    #10B981;
  --success-bg: #D1FAE5;
  --warning:    #F59E0B;
  --warning-bg: #FEF3C7;
  --danger:     #EF4444;
  --danger-bg:  #FEE2E2;
  --info:       #3B82F6;
  --info-bg:    #DBEAFE;

  /* Surfaces - Warm Bistro Alabaster */
  --bg:           #F7F5F0;
  --surface:      #FFFFFF;
  --border:       #E8E2D8;
  --border-light: #F2ECE4;

  /* Text */
  --text:           #1C1714;
  --text-secondary: #70625B;
  --text-light:     #A0928B;

  /* Misc */
  --radius:     12px;
  --radius-sm:  8px;
  --radius-xs:  6px;
  --shadow:     0 1px 3px rgba(35,25,20,.05), 0 1px 2px rgba(35,25,20,.03);
  --shadow-md:  0 4px 6px -1px rgba(35,25,20,.06), 0 2px 4px -2px rgba(35,25,20,.04);
  --shadow-lg:  0 10px 15px -3px rgba(35,25,20,.07), 0 4px 6px -4px rgba(35,25,20,.04);
  --transition: .2s cubic-bezier(.4,0,.2,1);

  /* Header */
  --header-h:   64px;
}

/* ── Reset & Base ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { 
  font-size: 14px; 
  -webkit-font-smoothing: antialiased; 
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  height: 100%;
  overflow: hidden;
}

a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* ══════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0; top: 0;
  z-index: 100;
  transition: transform var(--transition), width var(--transition);
  overflow: hidden;
}

.sidebar.collapsed { transform: translateX(-100%); }

.sidebar-header {
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

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

.logo-icon { font-size: 28px; }

.logo-text {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

/* Nav items */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 22px;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.nav-item.active {
  background: rgba(124,58,237,.2);
  color: #fff;
  border-left-color: var(--sidebar-active);
}

.nav-icon { 
  width: 22px; 
  height: 22px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  flex-shrink: 0; 
}
.nav-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.nav-text { white-space: nowrap; }

/* Nav group */
.nav-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 22px;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.nav-group-header:hover { background: var(--sidebar-hover); color: #fff; }

.nav-arrow {
  margin-left: auto;
  font-size: 12px;
  transition: transform var(--transition);
}

.nav-group-header.open .nav-arrow { transform: rotate(90deg); }

.nav-group-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}

.nav-group-items.open { max-height: 500px; }

.sub-item { padding-left: 56px; font-size: 13px; }

.nav-divider {
  height: 1px;
  background: rgba(255,255,255,.08);
  margin: 12px 20px;
}

/* ══════════════════════════════════════════════════
   MAIN WRAPPER
   ══════════════════════════════════════════════════ */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  transition: margin-left var(--transition);
}

.main-wrapper.expanded { margin-left: 0; }

/* ── Top Header ────────────────────────────────── */
.top-header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}

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

.menu-toggle {
  width: 36px; height: 36px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.menu-toggle:hover { background: var(--border); }
.menu-toggle span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 1px; }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.bc-sep { color: var(--text-light); }
.bc-active { color: var(--text); font-weight: 600; }

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

.header-date {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Main Content ──────────────────────────────── */
.main-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ══════════════════════════════════════════════════
   PAGE HEADER
   ══════════════════════════════════════════════════ */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 22px 28px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(91,33,182,.25);
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-subtitle {
  font-size: 13px;
  opacity: .85;
  margin-top: 2px;
}

.page-actions { display: flex; gap: 10px; }

/* ══════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body { padding: 20px; }

/* ── Stats Cards ───────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  min-width: 0;
  box-sizing: border-box;
}

.stat-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}

.stat-card.blue::before   { background: var(--info); }
.stat-card.green::before  { background: var(--success); }
.stat-card.orange::before { background: var(--warning); }
.stat-card.red::before    { background: var(--danger); }
.stat-card.purple::before { background: var(--primary); }
.stat-card.teal::before   { background: #0D9488; }

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-card.blue .stat-icon   { background: var(--info-bg); }
.stat-card.green .stat-icon  { background: var(--success-bg); }
.stat-card.orange .stat-icon { background: var(--warning-bg); }
.stat-card.red .stat-icon    { background: var(--danger-bg); }
.stat-card.purple .stat-icon { background: var(--primary-50); }
.stat-card.teal .stat-icon   { background: #CCFBF1; }

.stat-info { flex: 1; min-width: 0; }

.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-sub {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(91,33,182,.3);
}
.btn-primary:hover { box-shadow: 0 4px 14px rgba(91,33,182,.4); transform: translateY(-1px); }

.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, #10B981 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(5,150,105,.3);
}
.btn-success:hover { box-shadow: 0 4px 14px rgba(5,150,105,.4); transform: translateY(-1px); }

.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #EF4444 100%);
  color: #fff;
}
.btn-danger:hover { transform: translateY(-1px); }

.btn-warning {
  background: linear-gradient(135deg, var(--warning) 0%, #F59E0B 100%);
  color: #fff;
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; width: 36px; height: 36px; }

/* ══════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════ */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-50);
}

.form-input::placeholder { color: var(--text-light); }

.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.form-textarea { min-height: 80px; resize: vertical; }

/* Section headers (colored banners inside forms) */
.section-header {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-header.purple { background: linear-gradient(135deg, #7C3AED, #A855F7); }
.section-header.yellow { background: linear-gradient(135deg, #D97706, #F59E0B); }
.section-header.green  { background: linear-gradient(135deg, #059669, #10B981); }
.section-header.blue   { background: linear-gradient(135deg, #2563EB, #3B82F6); }
.section-header.red    { background: linear-gradient(135deg, #DC2626, #EF4444); }

/* ══════════════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════════════ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  background: var(--bg);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .5px;
  color: var(--text-secondary);
  padding: 12px 14px;
  text-align: left;
  position: sticky;
  top: 0;
  white-space: nowrap;
  border-bottom: 2px solid var(--border);
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:hover { background: #F8FAFC; }

.data-table .text-right { text-align: right; }
.data-table .text-center { text-align: center; }

.data-table .total-row {
  background: var(--warning-bg) !important;
  font-weight: 700;
}

.data-table .total-row td { border-bottom: none; }

/* ══════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger);  }
.badge-info    { background: var(--info-bg);    color: var(--info);    }
.badge-primary { background: var(--primary-50); color: var(--primary); }

.badge-label {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ══════════════════════════════════════════════════
   SEARCH & FILTER BAR
   ══════════════════════════════════════════════════ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  background: var(--surface);
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}

.search-box input:focus { border-color: var(--primary-light); }

.search-box::before {
  content: '🔍';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
}

/* ══════════════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all .25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(.97);
  transition: transform .25s ease;
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 { font-size: 17px; font-weight: 700; }

.modal-close {
  width: 32px; height: 32px;
  border: none;
  background: var(--bg);
  border-radius: 50%;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
}

.modal-close:hover { background: var(--danger-bg); color: var(--danger); }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ══════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════ */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  transform: translateX(120%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow-lg);
}

.toast.show { transform: translateX(0); }

.toast-icon { font-size: 18px; }

.toast-success { background: linear-gradient(135deg, #059669, #10B981); }
.toast-error   { background: linear-gradient(135deg, #DC2626, #EF4444); }
.toast-info    { background: linear-gradient(135deg, #2563EB, #3B82F6); }
.toast-warning { background: linear-gradient(135deg, #D97706, #F59E0B); }

/* ══════════════════════════════════════════════════
   UTILITY CLASSES
   ══════════════════════════════════════════════════ */
.text-right   { text-align: right; }
.text-center  { text-align: center; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted   { color: var(--text-secondary); }
.text-sm      { font-size: 12px; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.flex     { display: flex; }
.flex-col { flex-direction: column; }
.gap-1    { gap: 8px; }
.gap-2    { gap: 16px; }
.gap-3    { gap: 24px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1   { flex: 1; }

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

/* ── Divider text ──────────────────────────────── */
.divider-text {
  display: flex;
  align-items: center;
  color: var(--text-light);
  font-size: 12px;
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider-text span { padding: 0 12px; }

/* ── Empty state ───────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state .empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: .5;
}

.empty-state h3 {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state p { font-size: 14px; }

/* ── Loading splash ────────────────────────────── */
.loading-splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 60vh;
  gap: 16px;
  color: var(--text-secondary);
}

.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

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

/* ── Pagination ────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
}

.pagination button {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}

.pagination button:hover { background: var(--bg); border-color: var(--primary-light); }
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* ══════════════════════════════════════════════════
   NEW ORDER SPECIFIC
   ══════════════════════════════════════════════════ */
.order-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 20px;
  align-items: start;
}

.order-summary,
.order-summary-column {
  position: sticky;
  top: 15px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-summary .summary-header,
.order-summary-card .summary-header {
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--radius) var(--radius) 0 0;
  font-weight: 700;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.order-summary .summary-body,
.order-summary-card .summary-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 16px 18px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.summary-row.total {
  border-top: 2px dashed var(--border);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  align-items: center;
}

.summary-row.total .summary-val {
  color: #2563eb;
  font-size: 21px;
  font-weight: 800;
}

.summary-val { font-weight: 600; color: var(--text); }

/* ── Payment Information Card (Down Order Summary) ── */
.payment-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.payment-info-card .payment-header {
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  font-weight: 700;
  font-size: 14px;
  color: #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.payment-info-card .payment-body {
  padding: 16px 18px;
}

/* Payment Method Button Grid */
.pay-methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 7px;
  margin-bottom: 12px;
}

.btn-pay-method {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px 6px 4px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  user-select: none;
  min-height: 56px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.btn-pay-method:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  transform: translateY(-1px);
}

.btn-pay-method.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1e40af;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
  font-weight: 700;
}

.btn-pay-method .pay-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  margin-bottom: 3px;
}

.btn-pay-method .pay-name {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Quick Cash Chips */
.quick-cash-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.btn-cash-chip {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-cash-chip:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
}

/* Cart items */
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.cart-item:last-child { border-bottom: none; }

.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; font-size: 14px; }
.cart-item-variant { font-size: 12px; color: var(--text-secondary); }
.cart-item-price { font-size: 13px; color: var(--text-secondary); }

.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.qty-control button {
  width: 32px; height: 32px;
  border: none;
  background: var(--bg);
  font-size: 16px;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-control button:hover { background: var(--border); }

.qty-control input {
  width: 40px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  padding: 6px 0;
}

/* Payment split rows */
.payment-row {
  display: flex;
  gap: 12px;
  align-items: end;
  margin-bottom: 10px;
}

.payment-row .form-group { flex: 1; margin-bottom: 0; }

.btn-remove-payment {
  width: 36px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--danger-bg);
  color: var(--danger);
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 18px;
  transition: all var(--transition);
  flex-shrink: 0;
}

.btn-remove-payment:hover { background: var(--danger); color: #fff; }

/* ── Product search dropdown ───────────────────── */
.product-search-wrap { position: relative; }

.product-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  max-height: 260px;
  overflow-y: auto;
  z-index: 80;
  box-shadow: var(--shadow-lg);
  display: none;
}

.product-results.open { display: block; }

.product-result-item {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border-light);
}

.product-result-item:hover { background: var(--primary-50); }

.product-result-item .pr-name { font-weight: 600; font-size: 13px; }
.product-result-item .pr-sku  { font-size: 11px; color: var(--text-light); }
.product-result-item .pr-price { font-weight: 700; color: var(--primary); }
.product-result-item .pr-stock { font-size: 11px; color: var(--text-light); }

/* ══════════════════════════════════════════════════
   SALES RETURN SPECIFIC
   ══════════════════════════════════════════════════ */
.selected-sale-card {
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 20px;
  position: relative;
}

.selected-sale-card h4 {
  color: var(--warning);
  font-size: 15px;
  margin-bottom: 6px;
}

.selected-sale-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 2px 0;
}

.selected-sale-card .close-sale {
  position: absolute;
  right: 16px; top: 16px;
  width: 28px; height: 28px;
  border: none;
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ══════════════════════════════════════════════════
   CUSTOMER SPECIFIC
   ══════════════════════════════════════════════════ */
.customer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition);
  position: relative;
}

.customer-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.customer-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.customer-top { display: flex; align-items: center; gap: 14px; }

.customer-name {
  font-size: 16px;
  font-weight: 700;
}

.customer-phone {
  font-size: 13px;
  color: var(--text-secondary);
}

.customer-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}

.customer-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.customer-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* ══════════════════════════════════════════════════
   PRODUCT CARDS
   ══════════════════════════════════════════════════ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.product-card-img {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: linear-gradient(135deg, var(--primary-50), #EDE9FE);
}

.product-card-body { padding: 16px; }

.product-card-name {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}

.product-card-sku {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 10px;
}

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

.product-card-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.product-card-stock {
  font-size: 12px;
  font-weight: 600;
}

.product-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

/* ══════════════════════════════════════════════════
   CHARTS
   ══════════════════════════════════════════════════ */
.chart-container {
  position: relative;
  width: 100%;
  max-height: 300px;
}

/* ══════════════════════════════════════════════════
   VARIATION BUILDER
   ══════════════════════════════════════════════════ */
.variation-row {
  display: grid;
  grid-template-columns: 1fr 100px 120px 120px auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 8px;
}

.variation-row .form-group { margin-bottom: 0; }

/* ══════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.fade-in { animation: fadeIn .3s ease-out; }
.slide-in { animation: slideInRight .3s ease-out; }

/* ══════════════════════════════════════════════════
   PRINT
   ══════════════════════════════════════════════════ */
@media print {
  .sidebar, .top-header, .page-actions, .filter-bar, .menu-toggle { display: none !important; }
  .main-wrapper { margin-left: 0 !important; }
  .main-content { padding: 10px !important; height: auto !important; overflow: visible !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ══════════════════════════════════════════════════
   COLUMN FILTERS & FLOATING BAR
   ══════════════════════════════════════════════════ */
.btn-col-filter {
  background: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
}

.btn-col-filter:hover {
  background: #f1f5f9;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-col-filter.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.col-filter-popover {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1050;
  margin-top: 4px;
}

#sales-clear-filter-popup {
  animation: fadeIn 0.2s ease-out;
}

#btn-clear-floating-filters:hover {
  background: #dc2626 !important;
}

/* ── Bulk Scan & Dashboard Modern Styles ───────── */
.payment-channel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px -2px rgba(0, 0, 0, 0.08) !important;
  border-color: #cbd5e1 !important;
}

#bulk-suggest-dropdown::-webkit-scrollbar {
  width: 6px;
}

#bulk-suggest-dropdown::-webkit-scrollbar-track {
  background: #f8fafc;
}

#bulk-suggest-dropdown::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

#bulk-suggest-dropdown::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ══════════════════════════════════════════════════
   EXECUTIVE DASHBOARD CHARTS (PROFESSIONAL UI)
   ══════════════════════════════════════════════════ */
.modern-chart-card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02) !important;
  background: #ffffff !important;
  transition: all 0.25s ease !important;
  overflow: hidden;
}

.modern-chart-card:hover {
  box-shadow: 0 8px 28px -4px rgba(15, 23, 42, 0.09) !important;
  border-color: #cbd5e1 !important;
}

.chart-header-modern {
  border-bottom: 1px solid #f1f5f9;
  padding: 15px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: #ffffff;
}

.chart-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chart-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chart-title-text {
  font-weight: 700;
  font-size: 14.5px;
  color: #0f172a;
  line-height: 1.2;
}

.chart-subtitle-text {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.chart-header-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  white-space: nowrap;
}

/* Category Chart Split Layout */
.category-chart-layout {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 250px;
}

.category-chart-canvas-wrap {
  position: relative;
  width: 210px;
  height: 210px;
  flex-shrink: 0;
  margin: 0 auto;
}

.chart-donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  width: 110px;
}

.chart-donut-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.6px;
  line-height: 1;
}

.chart-donut-val {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 3px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-legend-scroll {
  flex: 1;
  min-width: 0;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-legend-scroll::-webkit-scrollbar {
  width: 5px;
}
.category-legend-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.cat-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  transition: all 0.15s ease;
}

.cat-legend-row:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.cat-legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.cat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cat-name {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-legend-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-align: right;
}

.cat-amount {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.cat-pct-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: #475569;
  background: #e2e8f0;
  padding: 1px 6px;
  border-radius: 6px;
  min-width: 38px;
  text-align: center;
}

@media (max-width: 768px) {
  .category-chart-layout {
    flex-direction: column;
  }
  .category-legend-scroll {
    width: 100%;
    max-height: 180px;
  }
}

/* ═══════════════════════════════════════════════════
   ClaPos Restaurant POS Tablet Interface (Demo Screen)
   ═══════════════════════════════════════════════════ */

.clapos-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-h) - 32px);
  min-height: 600px;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px -2px rgba(35,25,20,0.06);
  overflow: hidden;
}

/* ── Top Bar ────────────────────────────────────────── */
.clapos-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  gap: 16px;
  flex-shrink: 0;
}

.clapos-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clapos-brand-logo {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
  box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}

.clapos-brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #1c1714;
}

.clapos-brand-title span {
  color: #10B981;
}

.clapos-search-wrap {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.clapos-search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  pointer-events: none;
}

.clapos-search-input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 40px;
  background: #F8F7F4;
  border: 1px solid #E5E0D8;
  border-radius: 20px;
  font-size: 13.5px;
  color: #1E293B;
  transition: all 0.2s ease;
  outline: none;
}

.clapos-search-input:focus {
  background: #ffffff;
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}

.clapos-top-status {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: #64748B;
  font-weight: 600;
}

.clapos-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #F1F5F9;
  padding: 4px 10px;
  border-radius: 20px;
}

/* ── POS Main Layout (Rail + Grid + Cart) ────────────── */
.clapos-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* 1. Category Vertical Rail (Left) */
.clapos-category-rail {
  width: 86px;
  background: #FFFFFF;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 12px 6px;
  gap: 6px;
  overflow-y: auto;
  flex-shrink: 0;
}

.clapos-cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748B;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  text-align: center;
}

.clapos-cat-btn:hover {
  background: #F8F6F2;
  color: #1E293B;
}

.clapos-cat-btn.active {
  background: #F0FDF4;
  color: #059669;
  font-weight: 700;
  border-color: #DCFCE7;
}

.clapos-cat-btn.active::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 14px;
  bottom: 14px;
  width: 3.5px;
  background: #10B981;
  border-radius: 0 3px 3px 0;
}

.clapos-cat-icon {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #F8FAFC;
  transition: all 0.2s;
}

.clapos-cat-btn.active .clapos-cat-icon {
  background: #DCFCE7;
  color: #059669;
}

.clapos-cat-name {
  font-size: 11px;
  line-height: 1.15;
  white-space: normal;
  max-width: 72px;
}

/* 2. Center Products Grid */
.clapos-products-area {
  flex: 1;
  background: #F8F6F2;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.clapos-grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.clapos-grid-title {
  font-size: 15px;
  font-weight: 700;
  color: #1F1916;
  display: flex;
  align-items: center;
  gap: 8px;
}

.clapos-item-count-badge {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  background: #EAE5DC;
  padding: 2px 8px;
  border-radius: 12px;
}

.clapos-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
  align-content: start;
}

/* Product Card */
.clapos-card {
  background: #FFFFFF;
  border-radius: 14px;
  border: 1px solid #EAE4D9;
  padding: 12px;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(35,25,20,0.03);
  user-select: none;
}

.clapos-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px -2px rgba(35,25,20,0.08);
  border-color: #D6CEC3;
}

.clapos-card.in-cart {
  border-color: #10B981;
  box-shadow: 0 4px 12px rgba(16,185,129,0.12);
  background: #FAFCF9;
}

.clapos-card-img-wrap {
  width: 100%;
  height: 105px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #F1ECE4;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.clapos-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.clapos-card:hover .clapos-card-img {
  transform: scale(1.04);
}

.clapos-card-name {
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
  line-height: 1.25;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
}

.clapos-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 4px;
}

.clapos-card-price {
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
}

/* Inline Quantity Control in Card */
.clapos-qty-pill {
  display: flex;
  align-items: center;
  background: #10B981;
  color: #FFFFFF;
  border-radius: 20px;
  padding: 2px 6px;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(16,185,129,0.3);
  font-size: 12px;
  font-weight: 700;
}

.clapos-qty-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  border: none;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.clapos-qty-btn:hover {
  background: rgba(255,255,255,0.45);
}

.clapos-card-add-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.clapos-card-add-btn:hover {
  background: #10B981;
  color: #ffffff;
  border-color: #10B981;
}

/* 3. Right Order Details Panel */
.clapos-order-panel {
  width: 360px;
  background: #FFFFFF;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

/* Top Quick Action Buttons */
.clapos-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #F1ECE4;
  background: #FAF8F5;
}

.clapos-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 10px;
  border: 1px solid #E8E2D8;
  background: #FFFFFF;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.clapos-action-btn:hover {
  border-color: #10B981;
  color: #059669;
  background: #F0FDF4;
}

.clapos-action-btn.active {
  background: #10B981;
  color: #ffffff;
  border-color: #10B981;
}

.clapos-action-icon {
  font-size: 15px;
}

/* Order Details Header & Mode Switcher */
.clapos-order-header {
  padding: 12px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clapos-order-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.clapos-order-title {
  font-size: 15px;
  font-weight: 800;
  color: #1E293B;
}

.clapos-table-badge {
  font-size: 11px;
  font-weight: 700;
  background: #FEF3C7;
  color: #92400E;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid #FDE68A;
}

/* Dine In / Take Away Segmented Control */
.clapos-mode-toggle {
  display: flex;
  background: #F1ECE4;
  border-radius: 10px;
  padding: 3px;
  gap: 4px;
}

.clapos-mode-btn {
  flex: 1;
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #64748B;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.clapos-mode-btn.active {
  background: #FFFFFF;
  color: #0F172A;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Cart Items Scrollable List */
.clapos-cart-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clapos-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #94A3B8;
  gap: 8px;
  font-size: 13px;
  padding: 30px 10px;
  text-align: center;
}

.clapos-cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  background: #FAF9F6;
  border: 1px solid #EDE8DF;
  gap: 10px;
  transition: all 0.15s;
}

.clapos-cart-item:hover {
  background: #F4F0E8;
}

.clapos-cart-item-info {
  flex: 1;
  min-width: 0;
}

.clapos-cart-item-name {
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clapos-cart-item-unit {
  font-size: 11px;
  color: #64748B;
}

.clapos-cart-item-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clapos-cart-item-price {
  font-size: 13.5px;
  font-weight: 800;
  color: #0F172A;
  white-space: nowrap;
}

.clapos-cart-item-remove {
  background: transparent;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.clapos-cart-item-remove:hover {
  color: #EF4444;
  background: #FEE2E2;
}

/* Clear All Order link */
.clapos-clear-btn {
  background: transparent;
  border: none;
  color: #EF4444;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  text-align: right;
  cursor: pointer;
  margin-top: auto;
}

.clapos-clear-btn:hover {
  text-decoration: underline;
}

/* Bottom Totals & Transaction Button */
.clapos-order-footer {
  border-top: 1px solid var(--border);
  background: #FAF8F5;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.clapos-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: #64748B;
}

.clapos-summary-row.total-row {
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
  padding-top: 6px;
  border-top: 1px dashed #CBD5E1;
  margin-top: 2px;
}

.clapos-grand-total {
  font-size: 20px;
  font-weight: 900;
  color: #0F172A;
}

/* Green "Process Transaction" Checkout Button */
.clapos-process-btn {
  width: 100%;
  height: 48px;
  background: #10B981;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(16,185,129,0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 4px;
}

.clapos-process-btn:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16,185,129,0.45);
}

.clapos-process-btn:active {
  transform: translateY(0);
}

.clapos-process-btn:disabled {
  background: #94A3B8;
  cursor: not-allowed;
  box-shadow: none;
}

/* ── Modal Popups for Table, Discount, Transaction ── */
.table-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 10px 0;
}

.table-card {
  padding: 14px 8px;
  border-radius: 12px;
  border: 1.5px solid #E2E8F0;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.table-card:hover {
  border-color: #10B981;
  background: #F0FDF4;
}

.table-card.selected {
  border-color: #10B981;
  background: #DCFCE7;
  color: #065F46;
  font-weight: 700;
}

/* ── Ingredient Costs Styles ────────────────────────── */
.ingredient-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  display: inline-block;
}

.ingredient-status-pill.paid {
  background: #D1FAE5;
  color: #065F46;
}

.ingredient-status-pill.partial {
  background: #FEF3C7;
  color: #92400E;
}

.ingredient-status-pill.unpaid {
  background: #FEE2E2;
  color: #991B1B;
}

/* ── Responsive Refinements ─────────────────────────── */
@media (max-width: 1024px) {
  .clapos-order-panel {
    width: 320px;
  }
}

@media (max-width: 860px) {
  .clapos-body {
    flex-direction: column;
    overflow-y: auto;
  }
  .clapos-category-rail {
    width: 100%;
    flex-direction: row;
    height: 70px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .clapos-cat-btn.active::before {
    display: none;
  }
  .clapos-order-panel {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

/* ── Reports Period Filter Buttons ── */
.rep-period-btn {
  background: #FFFFFF;
  color: #475569;
  border: 1px solid #CBD5E1;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}
.rep-period-btn:hover {
  background: #F1F5F9;
  color: #0F172A;
  border-color: #94A3B8;
}
.rep-period-btn.active {
  background: #10B981 !important;
  color: #FFFFFF !important;
  border-color: #10B981 !important;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}



