/* ==========================================
   ADAMZ BUSINESS & ACCOUNTING SYSTEM
   Official Brand: ADAMZ | آدمز
   Luxury Espresso · Obsidian · Antique Gold
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Lalezar&family=DM+Serif+Display:ital@0;1&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Cairo:wght@300;400;600;700;800;900&display=swap');

:root {
  /* ── Official ADAMZ Executive Palette ── */
  --adamz-obsidian:     #0D0907;
  --adamz-espresso:     #16110D;
  --adamz-surface:      #1F1813;
  --adamz-surface-lift: #29201A;
  --adamz-gold:         #D4AF37;
  --adamz-gold-muted:   #C5A073;
  --adamz-gold-glow:    rgba(212, 175, 55, 0.18);
  --adamz-profit:       #22C55E;
  --adamz-expense:      #EF4444;
  --adamz-pending:      #F59E0B;
  --adamz-drawer:       #38BDF8;

  /* ── Brand Theme Variables ── */
  --brand-dark:   #1C1008;
  --brand-brown:  #2E1A0E;
  --brand-mid:    #5C3D2B;
  --brand-tan:    #A07850;
  --brand-warm:   #C9A87C;

  /* ── Ivory / Warm Surface palette ── */
  --bg-primary:          #FDFAF0;
  --bg-surface:          #FFFEF6;
  --bg-surface-elevated: #FFFEF9;
  --bg-subtle:           #F5F0DC;
  --bg-hover:            #EDE8D0;
  --bg-dark-section:     #16110D;

  --text-main:    #1C1008;
  --text-body:    #3A2A1A;
  --text-muted:   #7A6552;
  --text-light:   #AE9880;
  --text-on-dark: #FDFAF0;

  --border-light:  rgba(28,16,8,0.09);
  --border-medium: rgba(28,16,8,0.15);
  --border-dark:   rgba(28,16,8,0.30);
  --border-gold:   rgba(212,175,55,0.28);

  --shadow-sm: 0 2px 8px  rgba(28,16,8,0.05);
  --shadow-md: 0 6px 20px rgba(28,16,8,0.08);
  --shadow-lg: 0 16px 40px rgba(28,16,8,0.13);

  --radius-xs:   4px;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --radius-full: 9999px;

  --font-heading: 'Cairo', 'DM Serif Display', Georgia, serif;
  --font-sans:    'Cairo', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono-num: 'Cairo', 'SF Mono', 'Roboto Mono', monospace;
  --ease-higgs:        cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast:   0.16s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-body);
  min-height: 100vh;
  display: flex; flex-direction: column;
  overflow-x: hidden;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
  color: var(--brand-dark);
  font-weight: 400; line-height: 1.15;
}

/* ════ LAYOUT ════ */
.app-container { display: flex; min-height: 100vh; width: 100vw; position: relative; overflow-x: hidden; }

/* ════ HEADER ════ */
.app-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245,242,238,0.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-medium);
  padding: 0.65rem 1.75rem;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 1px 0 var(--border-light), var(--shadow-sm);
}

/* Logo as image with tight crop */
.brand-wrapper { display: flex; align-items: center; gap: 12px; }

.header-menu-btn {
  background: var(--bg-surface, #FFF);
  border: 1.5px solid var(--border-medium, #E6D0B3);
  border-radius: var(--radius-md, 8px);
  color: var(--brand-dark, #2A1A0E);
  padding: 6px 11px;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.header-menu-btn:hover {
  background: var(--bg-hover, #F5F0E8);
  border-color: var(--brand-accent, #C9A882);
}

.brand-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  object-position: center;
  filter: contrast(1.1);
}

.brand-subtitle {
  font-size: 0.65rem;
  color: var(--text-light);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-sans);
  display: block;
}

.header-actions { display: flex; align-items: center; gap: 9px; }

.header-clock {
  font-size: 0.8rem; color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 5px 12px; border-radius: var(--radius-full);
  font-weight: 500; display: flex; align-items: center; gap: 5px;
  letter-spacing: 0.04em;
}

/* ════ COLLAPSIBLE SIDEBAR DRAWER & FLOATING PILL DOCK (MATCHING SIDEBAR V2 REFERENCE) ════ */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 6, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1190;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.sidebar-floating-toggle {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1150;
  background: linear-gradient(135deg, #1C130D 0%, #2A1A0E 100%);
  color: #FFF;
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  border-right: none;
  border-radius: 14px 0 0 14px;
  padding: 14px 8px 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: -6px 0 24px rgba(0,0,0,0.3);
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  user-select: none;
}
.sidebar-floating-toggle:hover {
  background: linear-gradient(135deg, #2D1A0E 0%, #452814 100%);
  border-color: #D4AF37;
  box-shadow: -8px 0 28px rgba(212, 175, 55, 0.25);
}
.sidebar-floating-toggle .sidebar-toggle-arrow {
  font-size: 1.05rem;
  font-weight: 900;
  color: #D4AF37;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1;
}
.sidebar-floating-toggle .sidebar-toggle-label {
  font-size: 0.7rem;
  font-weight: 800;
  writing-mode: vertical-rl;
  letter-spacing: 0.12em;
  color: #F8E2B2;
}
.sidebar-floating-toggle.open {
  right: 285px;
}
.sidebar-floating-toggle.open .sidebar-toggle-arrow {
  transform: rotate(180deg);
}

/* ── App Sidebar Main Container (Floating Pill Dock from Reference) ── */
.app-sidebar {
  position: fixed !important;
  right: 14px !important;
  top: 14px !important;
  bottom: 14px !important;
  width: 285px !important;
  height: calc(100vh - 28px) !important;
  background: rgba(19, 21, 26, 0.94) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 28px !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 175, 55, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  z-index: 1200 !important;
  transform: translateX(calc(100% + 35px));
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 18px 14px 14px !important;
  gap: 4px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
  will-change: transform;
}
.app-sidebar::-webkit-scrollbar {
  display: none !important;
}
.app-sidebar.open {
  transform: translateX(0) !important;
}

/* ── Top Window Controls (Min, Max, Close + Pill Toggle) ── */
.sidebar-pill-top {
  display: none !important;
}
.sidebar-window-controls {
  display: none !important;
}
.sidebar-collapse-toggle-btn {
  display: none !important;
}

/* ── Brand Identity Dock (Enlarged Logo Circle + Catching) ── */
.sidebar-brand-dock {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px 18px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-brand-avatar-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #352012 0%, #150E09 100%);
  border: 2px solid rgba(212, 175, 55, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 16px rgba(212, 175, 55, 0.22), inset 0 1px 0 rgba(212, 175, 55, 0.5);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.sidebar-brand-avatar-circle:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 22px rgba(212, 175, 55, 0.35);
}
.sidebar-brand-avatar-circle img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}
.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
}
.sidebar-brand-heading {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}
.sidebar-brand-name {
  font-size: 1.25rem;
  font-weight: 900;
  color: #FFF7EE;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.sidebar-brand-kitchen {
  font-size: 0.88rem;
  font-weight: 700;
  color: #D4AF37;
  letter-spacing: 0.06em;
  font-family: var(--font-sans);
  text-transform: capitalize;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
  display: inline-block;
  line-height: 1;
}
body:not(.night-mode) .sidebar-brand-dock {
  border-bottom-color: rgba(28, 16, 8, 0.08);
}
body:not(.night-mode) .sidebar-brand-name {
  color: #1C1008;
}

/* ── Quick Search Dock ── */
.sidebar-search-dock {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 7px 11px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}
.sidebar-search-dock:focus-within {
  border-color: rgba(212, 175, 55, 0.6);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.18);
}
.sidebar-search-icon {
  color: #7A695A;
  display: inline-flex;
  align-items: center;
}
.sidebar-search-input {
  background: transparent;
  border: none;
  color: #FFF7EE;
  font-size: 0.78rem;
  width: 100%;
  outline: none;
  font-family: inherit;
}
.sidebar-search-input::placeholder {
  color: #6B5A4B;
  font-size: 0.74rem;
}

/* ── Navigation Section Labels ── */
.nav-section-label {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #7A6552;
  padding: 8px 10px 4px;
  font-weight: 800;
  font-family: var(--font-sans);
}

/* ── Navigation Items (Pill Hover & Active Glowing Ambient Dock) ── */
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 14px;
  color: #C8B49E;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  user-select: none;
  position: relative;
  background: transparent;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #FFF7EE;
  transform: translateX(-2px);
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18) 0%, rgba(139, 92, 246, 0.14) 100%);
  color: #FFF7EE;
  font-weight: 800;
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  right: -2px;
  top: 18%;
  bottom: 18%;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #D4AF37 0%, #A855F7 100%);
  box-shadow: 0 0 10px #D4AF37, 0 0 14px rgba(168, 85, 247, 0.6);
}
.nav-item-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-item .badge {
  margin-inline-start: auto;
  font-size: 0.68rem;
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.12);
  color: #FDE68A;
}
.nav-item .badge.urgent {
  background: rgba(239, 68, 68, 0.25);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* ── Sidebar Bottom Deck (Pro Action Pill + Quick Switches) ── */
.sidebar-bottom-deck {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-pro-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(28, 19, 13, 0.8) 100%);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 14px;
  padding: 9px 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.sidebar-pro-pill:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22) 0%, rgba(45, 28, 16, 0.9) 100%);
  border-color: #D4AF37;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.18);
}
.sidebar-pro-badge {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #D4AF37;
  color: #120B07;
  font-weight: 900;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}
.sidebar-pro-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.sidebar-pro-info strong {
  font-size: 0.8rem;
  color: #FFF7EE;
  font-weight: 800;
}
.sidebar-pro-info small {
  font-size: 0.66rem;
  color: #C8B49E;
}
.sidebar-pro-arrow {
  color: #D4AF37;
  font-size: 0.95rem;
  font-weight: 900;
  transition: transform 0.2s ease;
}
.sidebar-pro-pill:hover .sidebar-pro-arrow {
  transform: translateX(-3px);
}

.sidebar-bottom-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sidebar-theme-toggle-row {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  color: #C8B49E;
  font-size: 0.74rem;
  font-weight: 700;
  transition: all 0.18s ease;
}
.sidebar-theme-toggle-row:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFF;
}
.sidebar-lock-device-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  color: #FCA5A5;
  font-size: 0.74rem;
  font-weight: 700;
  transition: all 0.18s ease;
  font-family: inherit;
}
.sidebar-lock-device-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #EF4444;
  color: #FFF;
}
.nav-item .badge {
  margin-inline-start: auto; font-size: 0.68rem;
  padding: 1px 7px; border-radius: var(--radius-full); font-weight: 700;
  background: rgba(255,255,255,0.18);
}
.nav-item:not(.active) .badge { background: var(--bg-subtle); color: var(--brand-mid); }
.nav-item:not(.active) .badge.urgent { background: #FEE2E2; color: #B91C1C; }

/* ══ ADAMZ LUXURY VECTOR ICONOGRAPHY SYSTEM ══ */
.adamz-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(28, 16, 8, 0.04);
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.18s ease;
}
.nav-item:hover .nav-icon-box {
  background: rgba(212, 175, 55, 0.15);
  color: var(--adamz-gold, #D4AF37);
  transform: scale(1.05);
}
.nav-item.active .nav-icon-box {
  background: var(--adamz-gold, #D4AF37);
  color: #1C1008;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}
body.night-mode .nav-icon-box {
  background: rgba(255, 255, 255, 0.05);
  color: #C8B49E;
}
body.night-mode .nav-item.active .nav-icon-box {
  background: var(--adamz-gold, #D4AF37);
  color: #0D0907;
}

.dash-hub-btn .icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.12);
  color: var(--adamz-gold, #D4AF37);
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.dash-hub-btn.main-action .icon-box {
  background: #EA580C;
  color: #FFF;
}
.dash-hub-btn:hover .icon-box {
  transform: scale(1.08);
}
body.night-mode .dash-hub-btn .icon-box {
  background: rgba(212, 175, 55, 0.18);
  color: #F8E2B2;
}

.pos-cat-card-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  background: rgba(212, 175, 55, 0.12) !important;
  color: var(--adamz-gold, #D4AF37) !important;
  flex-shrink: 0 !important;
  transition: all 0.18s ease !important;
}
.pos-category-card.active .pos-cat-card-icon {
  background: var(--adamz-gold, #D4AF37) !important;
  color: #1C1008 !important;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.35) !important;
}
body.night-mode .pos-cat-card-icon {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #F8E2B2 !important;
}
body.night-mode .pos-category-card.active .pos-cat-card-icon {
  background: var(--adamz-gold, #D4AF37) !important;
  color: #0D0907 !important;
}

.pos-item-emoji {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 7px !important;
  background: rgba(212, 175, 55, 0.08) !important;
  color: var(--adamz-gold-muted, #C5A073) !important;
  flex-shrink: 0 !important;
  transition: all 0.18s ease !important;
}
.pos-item-card:hover .pos-item-emoji {
  background: rgba(212, 175, 55, 0.2) !important;
  color: var(--adamz-gold, #D4AF37) !important;
  transform: scale(1.08) !important;
}
body.night-mode .pos-item-emoji {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #C8B49E !important;
}
body.night-mode .pos-item-card:hover .pos-item-emoji {
  background: rgba(212, 175, 55, 0.25) !important;
  color: #F8E2B2 !important;
}

/* ════ MAIN VIEWPORT ════ */
.main-viewport {
  flex: 1 1 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 1.5rem 2rem !important;
  overflow-y: auto !important;
}

.view-section { display: none; animation: fadeSlide 0.22s ease; }
.view-section.active { display: block; }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: translateY(0); }
}

.view-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 1.75rem; flex-wrap: wrap; gap: 1rem;
  padding-bottom: 1.25rem; border-bottom: 1px solid var(--border-light);
}
.view-title-box h2 { font-size: 1.85rem; margin-bottom: 3px; }
.view-description { font-size: 0.83rem; color: var(--text-muted); }

/* ════ METRICS ════ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px,1fr));
  gap: 1.1rem; margin-bottom: 1.75rem;
}
.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 1.2rem; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 1rem;
  transition: var(--transition-fast); position: relative; overflow: hidden;
  will-change: transform;
}
.metric-card::after {
  content:''; position:absolute; top:0;left:0;right:0; height:2px;
  background: var(--brand-dark); opacity:0.1;
}
.metric-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.metric-icon-box {
  width:46px; height:46px; border-radius:var(--radius-md);
  display:flex; align-items:center; justify-content:center;
  font-size:1.25rem; flex-shrink:0;
  background:var(--bg-subtle); border:1px solid var(--border-light);
}
.metric-icon-box.rose  { background:#F9F0E8; }
.metric-icon-box.blue  { background:#EBF0EA; }
.metric-icon-box.green { background:#E8F4EC; }
.metric-icon-box.amber { background:#F7F0E2; }

.metric-info label {
  font-size:0.72rem; color:var(--text-muted); display:block;
  margin-bottom:3px; font-weight:600;
  text-transform:uppercase; letter-spacing:0.06em;
}
.metric-info .value {
  font-size:1.4rem; font-weight:700; color:var(--brand-dark);
  font-family:var(--font-sans); letter-spacing:-0.02em;
}

/* ════ CARD / PANEL ════ */
.card-panel {
  background:var(--bg-surface); border:1px solid var(--border-light);
  border-radius:var(--radius-lg); padding:1.35rem;
  box-shadow:var(--shadow-sm); margin-bottom:1.5rem;
}
.panel-header {
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:1.1rem; padding-bottom:0.9rem;
  border-bottom:1px solid var(--border-light);
}
.panel-header h3 { font-size:1.1rem; }

/* ════ TABLES ════ */
.table-responsive { width:100%; overflow-x:auto; }
.custom-table { width:100%; border-collapse:collapse; text-align:start; }
.custom-table th {
  background:var(--bg-subtle); color:var(--brand-mid);
  font-weight:700; font-size:0.7rem; text-transform:uppercase;
  letter-spacing:0.08em; padding:10px 14px;
  border-bottom:1.5px solid var(--border-medium);
  font-family:var(--font-sans); white-space:nowrap;
}
.custom-table td {
  padding:11px 14px; border-bottom:1px solid var(--border-light);
  font-size:0.86rem; color:var(--text-body); vertical-align:middle;
}
.custom-table tr:last-child td { border-bottom:none; }
.custom-table tr:hover td { background:var(--bg-surface-elevated); }

/* ════ ORDERS LOG & CLASSIFICATION (سجل الطلبات اليومية والشهرية) ════ */
.orders-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.orders-summary-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
  transition: all 0.2s ease;
}
.orders-summary-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.orders-stat-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}
.orders-stat-val {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--brand-dark);
  line-height: 1.2;
}
.orders-stat-lbl {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

.orders-filter-box {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.orders-quick-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--border-light);
}
.orders-quick-btn {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.orders-quick-btn:hover {
  background: #FFF7ED;
  border-color: #EA580C;
  color: #C2410C;
}
.orders-quick-btn.active {
  background: var(--brand-dark);
  color: #FFF7EE;
  border-color: var(--brand-dark);
  box-shadow: 0 2px 6px rgba(28, 16, 8, 0.2);
}

.orders-filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.order-shift-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 0.67rem;
  font-weight: 700;
}
.order-shift-badge.morning {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
}
.order-shift-badge.evening {
  background: #EDE9FE;
  color: #5B21B6;
  border: 1px solid #DDD6FE;
}
.order-shift-badge.late {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

.orders-day-row td {
  padding: 0 !important;
  background: transparent !important;
  border-bottom: none !important;
}
.orders-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #FDF7EE 0%, #F5EDE0 100%);
  border: 1.5px solid #E6D5BF;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  margin: 10px 4px 4px;
}
.orders-day-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}
.orders-day-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #855826;
}

/* ════ FINANCE FILTERS ════ */
.finance-filters {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  padding: 12px 16px; background: var(--bg-subtle);
  border-radius: var(--radius-md); margin-bottom: 1rem;
  border: 1px solid var(--border-light);
}
.filter-group { display: flex; gap: 6px; align-items: center; }
.filter-label { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
.filter-date-input {
  padding: 6px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface); font-family: var(--font-sans);
  font-size: 0.82rem; color: var(--text-main);
}
.filter-date-input:focus { outline: none; border-color: var(--brand-dark); }
.filter-separator { width: 1px; height: 24px; background: var(--border-medium); }

/* Finance action row */
.finance-action-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ════ INVOICE CARD (in finance) ════ */
.invoice-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
  transition: var(--transition-fast);
}
.invoice-card:hover { border-color: var(--border-medium); box-shadow: var(--shadow-sm); }
.invoice-card-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  cursor: pointer; user-select: none;
}
.invoice-card-header:hover { background: var(--bg-surface-elevated); }
.invoice-card-body {
  padding: 0 14px 12px;
  border-top: 1px solid var(--border-light);
  display: none;
}
.invoice-card-body.open { display: block; }
.invoice-items-mini { font-size: 0.82rem; color: var(--text-muted); margin-top: 8px; }
.invoice-items-mini table { width: 100%; border-collapse: collapse; }
.invoice-items-mini th { font-size: 0.68rem; text-transform: uppercase; color: var(--text-light); padding: 4px 8px; border-bottom: 1px solid var(--border-light); font-weight: 700; }
.invoice-items-mini td { padding: 5px 8px; border-bottom: 1px solid var(--border-light); }
.invoice-items-mini tr:last-child td { border-bottom: none; }

/* ════ BADGE STATUS ════ */
.badge-status {
  padding: 3px 8px; border-radius: var(--radius-xs);
  font-size: 0.7rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: 3px;
  letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
}
.badge-status.pending   { background:#F5EDD8; color:#7A5220; border:1px solid #DCC98A; }
.badge-status.completed { background:#E3EFE5; color:#2D6B3A; border:1px solid #A8CCAB; }
.badge-status.scheduled { background:#E8E5DE; color:#4A3B2A; border:1px solid #BFB49E; }
.badge-status.urgent    { background:#F9E5E5; color:#8B1A1A; border:1px solid #DDAAAA; }
.badge-status.instant   { background:var(--bg-subtle); color:var(--brand-mid); border:1px solid var(--border-medium); }
.badge-status.income    { background:#E3EFE5; color:#2D6B3A; border:1px solid #A8CCAB; }
.badge-status.expense   { background:#F9E5E5; color:#8B1A1A; border:1px solid #DDAAAA; }

/* ════ BUTTONS ════ */
.btn {
  display:inline-flex; align-items:center; justify-content:center;
  gap:6px; padding:8px 18px; border-radius:var(--radius-sm);
  font-size:0.84rem; font-weight:600; cursor:pointer;
  border:1px solid transparent;
  transition:var(--transition-fast); font-family:var(--font-sans);
  white-space:nowrap; letter-spacing:0.01em;
}
.btn-primary { background:var(--brand-dark); color:#fff; border-color:var(--brand-dark); box-shadow:0 2px 6px rgba(28,16,8,0.22); }
.btn-primary:hover { background:var(--brand-brown); transform:translateY(-1px); box-shadow:0 4px 12px rgba(28,16,8,0.28); }
.btn-secondary { background:var(--bg-subtle); color:var(--brand-dark); border-color:var(--border-medium); }
.btn-secondary:hover { background:var(--bg-hover); }
.btn-outline { border-color:var(--border-medium); background:transparent; color:var(--text-muted); }
.btn-outline:hover { background:var(--bg-subtle); color:var(--brand-dark); border-color:var(--border-dark); }
.btn-sm { padding:4px 10px; font-size:0.75rem; border-radius:var(--radius-xs); }
.btn-icon { width:30px; height:30px; padding:0; border-radius:var(--radius-sm); }
.btn-success { background:#2D6B3A; color:#fff; border-color:#2D6B3A; }
.btn-success:hover { background:#1E5229; }

/* Print button */
.btn-print { background:var(--bg-subtle); color:var(--brand-mid); border:1px solid var(--border-medium); }
.btn-print:hover { background:var(--brand-dark); color:#fff; }

/* ════ MODALS ════ */
.modal-backdrop {
  position:fixed; inset:0; background:rgba(28,16,8,0.42);
  backdrop-filter:blur(5px); z-index:200;
  display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none;
  transition:var(--transition-fast); padding:1.25rem;
}
.modal-backdrop.active { opacity:1; pointer-events:auto; }
.modal-card {
  background:var(--bg-surface); border-radius:var(--radius-lg);
  width:100%; max-width:540px;
  box-shadow:var(--shadow-lg), 0 0 0 1px var(--border-medium);
  transform:translateY(16px) scale(0.98);
  transition:var(--transition-normal);
  max-height:92vh; display:flex; flex-direction:column;
}
.modal-backdrop.active .modal-card { transform:translateY(0) scale(1); }
.modal-header {
  padding:1.1rem 1.4rem; border-bottom:1px solid var(--border-light);
  display:flex; justify-content:space-between; align-items:center; flex-shrink:0;
}
.modal-header h3 { font-size:1.15rem; }
.modal-body { padding:1.35rem; overflow-y:auto; }
.modal-footer {
  padding:0.9rem 1.4rem; border-top:1px solid var(--border-light);
  display:flex; justify-content:flex-end; gap:8px;
  background:var(--bg-surface-elevated);
  border-radius:0 0 var(--radius-lg) var(--radius-lg); flex-shrink:0;
}

/* ════ FORMS ════ */
.form-group { margin-bottom:1rem; }
.form-label {
  display:block; font-size:0.76rem; font-weight:700;
  color:var(--brand-mid); margin-bottom:5px;
  text-transform:uppercase; letter-spacing:0.07em;
}
.form-control {
  width:100%; padding:9px 12px; border-radius:var(--radius-sm);
  border:1px solid var(--border-medium);
  background:var(--bg-surface-elevated);
  font-family:var(--font-sans); font-size:0.88rem; color:var(--text-main);
  transition:var(--transition-fast);
}
.form-control:focus { outline:none; border-color:var(--brand-dark); box-shadow:0 0 0 3px rgba(28,16,8,0.09); }
.form-control::placeholder { color:var(--text-light); }

/* ════ MENU GRID ════ */
.menu-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:1.1rem; }
.menu-category-label {
  grid-column:1/-1; font-size:0.68rem; font-weight:800;
  letter-spacing:0.12em; text-transform:uppercase; color:var(--brand-tan);
  padding:0.9rem 0 0.45rem; border-bottom:1px solid var(--border-light);
  margin-bottom:0.2rem;
}
.menu-card {
  background:var(--bg-surface); border:1px solid var(--border-light);
  border-radius:var(--radius-md); padding:1.15rem;
  box-shadow:var(--shadow-sm); display:flex; flex-direction:column;
  justify-content:space-between; transition:var(--transition-fast);
  position:relative; overflow:hidden; will-change:transform;
}
.menu-card:hover { transform:translateY(-2px); box-shadow:var(--shadow-md); border-color:var(--border-medium); }
.menu-card::before {
  content:''; position:absolute; bottom:0;left:0;right:0; height:2px;
  background:var(--brand-dark); transform:scaleX(0); transform-origin:left;
  transition:transform 0.22s ease;
}
.menu-card:hover::before { transform:scaleX(1); }
.menu-card-title { font-size:0.97rem; color:var(--brand-dark); margin-bottom:3px; font-family:var(--font-heading); }
.menu-card-category { font-size:0.68rem; color:var(--brand-tan); font-weight:700; text-transform:uppercase; letter-spacing:0.1em; margin-bottom:12px; }
.menu-card-price { font-size:1.2rem; font-weight:800; color:var(--brand-dark); letter-spacing:-0.02em; }

/* ════ CART ════ */
.cart-items-list {
  display:flex; flex-direction:column; gap:7px;
  max-height:190px; overflow-y:auto;
  border:1px solid var(--border-medium); border-radius:var(--radius-md);
  padding:9px; background:var(--bg-subtle);
}
.cart-item-row {
  display:flex; justify-content:space-between; align-items:center;
  background:var(--bg-surface); padding:7px 11px;
  border-radius:var(--radius-sm); border:1px solid var(--border-light);
}

/* ════ LANG BTN ════ */
.lang-btn {
  background:transparent; color:var(--brand-mid);
  border:1px solid var(--border-medium); padding:5px 12px;
  border-radius:var(--radius-sm); font-size:0.76rem; font-weight:700;
  cursor:pointer; transition:var(--transition-fast); font-family:var(--font-sans);
}
.lang-btn:hover { background:var(--brand-dark); color:#fff; border-color:var(--brand-dark); }

/* ════ SCROLLBAR ════ */
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:var(--bg-subtle); }
::-webkit-scrollbar-thumb { background:var(--border-dark); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:var(--brand-mid); }

/* ════ RTL ════ */
[dir="rtl"] .nav-item .badge { margin-inline-start:auto; margin-inline-end:unset; }

/* ════ RESPONSIVE ════ */
@media (max-width:900px) {
  .main-viewport { padding: 1rem 0.85rem !important; }
  .app-header { padding: 0.6rem 1rem; }
  .view-title-box h2 { font-size: 1.35rem; }
}

/* ════ COSTING & RECIPE ENGINE STYLES ════ */
.recipe-builder-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 14px;
}
.recipe-section-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--brand-dark);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.recipe-add-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
@media (max-width: 600px) {
  .recipe-add-row { grid-template-columns: 1fr 1fr; }
}
.recipe-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 12px;
  padding-right: 2px;
}
.recipe-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: #FFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}
.cost-summary-card {
  background: linear-gradient(135deg, #1C1008, #2E1A0E);
  color: #FFF;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  text-align: center;
  margin-top: 12px;
}
.cost-stat label {
  display: block;
  font-size: 0.68rem;
  color: #D4B28C;
  margin-bottom: 3px;
  font-weight: 600;
}
.cost-stat .cost-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #FFF;
}
.cost-stat .cost-val.profit {
  color: #4ADE80;
}
.menu-cost-pill {
  background: rgba(46, 125, 50, 0.08);
  border: 1px solid rgba(46, 125, 50, 0.25);
  border-radius: 6px;
  padding: 5px 9px;
  margin-top: 8px;
  font-size: 0.74rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.badge-profit {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #E8F5E9;
  color: #1B5E20;
  border: 1px solid #C8E6C9;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
}
.cloud-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #23150B;
  color: #FDFAF0;
  border: 1px solid #4D331D;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.cloud-pill-btn:hover {
  background: #331E10;
  border-color: #7A532E;
}
.cloud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.cloud-dot.online {
  background: #10B981;
  box-shadow: 0 0 6px #10B981;
}
.cloud-dot.offline {
  background: #9CA3AF;
}
.cloud-dot.syncing {
  background: #F59E0B;
  box-shadow: 0 0 6px #F59E0B;
}

@media print {
  .app-sidebar, .app-header, .view-header .finance-action-row,
  .finance-filters, .btn { display:none !important; }
  .main-viewport { padding:0; }
  .card-panel { box-shadow:none; border:none; }
}

/* ════ ANALYTICS, STRATEGIC ADVISOR & ADVANCED CHARTS (CLEAN & EYE-FRIENDLY) ════ */

/* ── كارت المستشار الاستراتيجي (تصميم فاتح راقي ومريح للعين) ── */
.advisor-card-clean {
  background: #FFFDF9;
  border: 1.5px solid #E2D2BE;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 18px rgba(92, 56, 30, 0.05);
}
.advisor-clean-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #EFE5DB;
}
.advisor-clean-avatar {
  width: 48px;
  height: 48px;
  background: #F7EFE4;
  border: 1.5px solid #DCC7B0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.advisor-clean-badge {
  background: #FAF2E6;
  border: 1px solid #DFC9B2;
  color: #7A4B1D;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
}
.advisor-clean-score {
  background: #FAF6EF;
  border: 1px solid #EADBCC;
  border-radius: 12px;
  padding: 10px 16px;
  min-width: 210px;
}
.score-pill-tag {
  background: #ECFDF5;
  color: #065F46;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}
.score-clean-num {
  font-family: var(--font-sans);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--brand-dark);
  line-height: 1;
}
.score-clean-track {
  width: 100%;
  height: 6px;
  background: #E8DDD0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}
.score-clean-fill {
  height: 100%;
  background: linear-gradient(90deg, #F59E0B, #10B981);
  border-radius: 999px;
  transition: width 0.8s ease;
}

.advisor-clean-body {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 860px) {
  .advisor-clean-body { grid-template-columns: 1fr; }
}
.advisor-clean-col {
  background: #FCFAF6;
  border: 1px solid #EFE6DC;
  border-radius: 10px;
  padding: 15px 16px;
}
.advisor-clean-col.golden-col {
  background: linear-gradient(135deg, #FFFDF8 0%, #FAF3E6 100%);
  border: 1.5px solid #E4CFBA;
}
.advisor-col-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.advisor-clean-bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.advisor-clean-bullet {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.81rem;
  color: #3D291A;
  line-height: 1.55;
}
.advisor-clean-bullet strong {
  color: var(--brand-dark);
}
.golden-clean-text {
  font-size: 0.84rem;
  color: #4A331E;
  line-height: 1.65;
}
.golden-clean-text strong {
  color: #7A4B1D;
}

/* ── KPI Grid ── */
.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.analytics-kpi-card {
  background: #FFF;
  border: 1px solid #EADBCC;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  transition: transform 0.18s ease;
}
.analytics-kpi-card:hover {
  transform: translateY(-2px);
  border-color: #DCC7B0;
}
.analytics-kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.analytics-kpi-info label {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 3px;
  font-weight: 600;
}
.analytics-kpi-info .val {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--brand-dark);
}

/* ── الرسم البياني التفاعلي الفاتح والراقي ── */
.chart-card {
  background: #FFF;
  border: 1px solid #EADBCC;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 22px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.chart-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-metric-switcher {
  display: flex;
  gap: 5px;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid #EADBCC;
}
.chart-metric-switcher .metric-btn {
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 12px;
  transition: all 0.2s ease;
}

.chart-stage {
  position: relative;
  width: 100%;
  background: #FFFDF9;
  border: 1px solid #EFE6DC;
  border-radius: 12px;
  padding: 16px 12px 10px;
  overflow-x: auto;
  user-select: none;
}
.chart-stage svg {
  display: block;
  width: 100%;
  min-width: 620px;
  height: 220px;
  overflow: visible;
}

/* كارت التولتيب العائم الفاتح الأنيق */
#chart-tooltip {
  position: absolute;
  z-index: 999;
  background: #FFFFFF;
  border: 1.5px solid #C48530;
  color: var(--brand-dark);
  border-radius: 10px;
  padding: 10px 14px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -115%);
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 8px 24px rgba(92, 56, 30, 0.15);
  white-space: nowrap;
  font-family: var(--font-sans);
}
#chart-tooltip.visible {
  opacity: 1;
}
#chart-tooltip .tt-hour {
  font-size: 0.78rem;
  font-weight: 800;
  color: #7A4B1D;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
#chart-tooltip .tt-badge {
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 800;
}
#chart-tooltip .tt-badge.rush {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}
#chart-tooltip .tt-badge.calm {
  background: #F3F4F6;
  color: #4B5563;
}
#chart-tooltip .tt-metric {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--brand-dark);
}
#chart-tooltip .tt-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.chart-footer-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #EFE5DB;
}
.chart-footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FAF7F2;
  border: 1px solid #EADBCC;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.74rem;
  color: var(--text-body);
  font-weight: 600;
}
.chart-footer-badge strong {
  color: var(--brand-dark);
}

/* ── Top Sellers vs Least Sellers ── */
.performers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
@media (max-width: 768px) {
  .performers-grid { grid-template-columns: 1fr; }
}
.performers-box {
  background: #FFF;
  border: 1px solid #EADBCC;
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.performers-title {
  font-size: 0.94rem;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.performer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: #FAF7F2;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border: 1px solid #EFE5DB;
  font-size: 0.82rem;
  transition: transform 0.15s ease;
}
.performer-row:hover {
  transform: translateX(-3px);
  background: #F5EFE6;
  border-color: #DCC7B0;
}
.performer-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
  margin-left: 8px;
  flex-shrink: 0;
}
.performer-rank.top {
  background: #FEF3C7;
  color: #92400E;
}
.performer-rank.bottom {
  background: #FEE2E2;
  color: #991B1B;
}

/* ── خطة العمل وتنشيط المبيعات (تصميم فاتح راقي) ── */
.action-plan-card-clean {
  background: #FFFDF9;
  border: 1.5px solid #E2D2BE;
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: 0 4px 16px rgba(92, 56, 30, 0.04);
}
.action-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.btn-more-strategies {
  background: linear-gradient(135deg, #C48530, #A06422);
  color: #FFF;
  border: none;
  border-radius: var(--radius-full);
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 2px 10px rgba(196,133,48,0.25);
  transition: all 0.2s ease;
}
.btn-more-strategies:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}
.badge-count {
  background: #FFF;
  color: #7A4B1D;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}

.strategy-grid-clean {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}
.strategy-card-clean {
  background: #FFFFFF;
  border: 1px solid #EADBCC;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.strategy-card-clean:hover {
  border-color: #C48530;
  box-shadow: 0 4px 14px rgba(196,133,48,0.12);
  transform: translateY(-2px);
}
.strategy-card-clean h5 {
  font-size: 0.88rem;
  font-weight: 800;
  color: #7A4B1D;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}
.strategy-card-clean p {
  font-size: 0.79rem;
  line-height: 1.6;
  color: #4A3525;
  margin: 0;
}
.strategy-card-clean-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #EFE5DB;
  padding-top: 10px;
  margin-top: 4px;
}

/* ── MODAL: مستودع الاستراتيجيات الكامل ── */
.strategies-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}
.str-tab {
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-body);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}
.str-tab:hover {
  background: var(--bg-hover);
  border-color: var(--brand-tan);
}
.str-tab.active {
  background: var(--brand-dark);
  color: #FFF;
  border-color: var(--brand-dark);
}

.strategies-full-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
  max-height: 520px;
  overflow-y: auto;
  padding: 4px;
}
@media (max-width: 600px) {
  .strategies-full-grid { grid-template-columns: 1fr; }
}
.full-strategy-card {
  background: #FFF;
  border: 1.5px solid #EADBCC;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.full-strategy-card:hover {
  border-color: var(--brand-tan);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}
.full-strategy-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.full-strategy-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}
.full-strategy-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}
.strategy-badges-wrap {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.strategy-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.strategy-badge.pri-high {
  background: #FEE2E2;
  color: #991B1B;
}
.strategy-badge.pri-med {
  background: #FEF3C7;
  color: #92400E;
}
.strategy-badge.pri-fast {
  background: #ECFDF5;
  color: #065F46;
}
.strategy-badge.cat {
  background: #F5EFE6;
  color: #7A532E;
  border: 1px solid #EADBCC;
}

.full-strategy-desc {
  font-size: 0.8rem;
  line-height: 1.6;
  color: #3D291A;
}

.strategy-action-steps {
  background: #FDFBF8;
  border: 1px dashed rgba(160, 120, 80, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
}
.strategy-action-steps-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #8B5320;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 5px;
}
.strategy-action-steps ul {
  margin: 0;
  padding-right: 18px;
  font-size: 0.77rem;
  color: #4A3A2C;
  line-height: 1.55;
}
.strategy-action-steps li {
  margin-bottom: 4px;
}
.strategy-action-steps li:last-child {
  margin-bottom: 0;
}

/* ── ADMIN INBOX CARDS ── */
.admin-note-card {
  background: #FFF;
  border: 1.5px solid #EADBCC;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  transition: all 0.2s ease;
}
.admin-note-card:hover {
  border-color: var(--brand-tan);
}
.admin-note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-note-sender {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--brand-dark);
}
.admin-note-time {
  font-size: 0.72rem;
  color: var(--text-light);
}
.admin-note-subject {
  font-size: 0.88rem;
  font-weight: 800;
  color: #7A4B1D;
  margin: 2px 0;
}
.admin-note-body {
  background: #FDFBF7;
  border-right: 3px solid var(--brand-tan);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #3D291A;
}
.admin-note-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #EFE6DC;
  flex-wrap: wrap;
  gap: 6px;
}
/* ════ COSTING & CAPITAL CENTER (عمود الشركة) ════ */
.costing-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.costing-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 1.25rem;
}
.cost-metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}
.cost-metric-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-1px);
}
.cost-metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.cost-metric-icon.direct { background: #FEF3C7; color: #92400E; }
.cost-metric-icon.packaging { background: #EFF6FF; color: #1E40AF; }
.cost-metric-icon.overhead { background: #F5F3FF; color: #5B21B6; }
.cost-metric-icon.profit { background: #ECFDF5; color: #065F46; }

.cost-metric-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cost-metric-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}
.cost-metric-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand-dark);
  margin: 2px 0;
  line-height: 1.2;
}
.cost-metric-sub {
  font-size: 0.68rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.costing-subtabs-bar {
  display: flex;
  gap: 6px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 1rem;
  overflow-x: auto;
  padding-bottom: 2px;
}
.costing-tab-btn {
  padding: 8px 16px;
  border: none;
  background: none;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.18s ease;
  white-space: nowrap;
  font-family: var(--font-sans);
}
.costing-tab-btn:hover {
  color: var(--brand-dark);
  background: var(--bg-subtle);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.costing-tab-btn.active {
  color: var(--brand-dark);
  border-bottom-color: var(--brand-dark);
  font-weight: 800;
}

.overhead-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.overhead-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.overhead-card-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.overhead-card-amount {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-dark);
}
.overhead-card-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.overhead-summary-strip {
  background: linear-gradient(135deg, #1C1008, #301E10);
  color: #FFF;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}




/* ══ DYNAMIC OVERHEAD MODAL STYLES ══ */
.overhead-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}
.overhead-item-row:hover {
  border-color: var(--border-medium);
}
.overhead-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
}


/* ── Kitchen Vibe & Inspiration Banner ── */
.kitchen-vibe-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid rgba(28, 16, 8, 0.07);
  border-radius: 22px;
  padding: 18px 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.035), 0 1px 3px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease;
}
.kitchen-vibe-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
  border-color: rgba(212, 175, 55, 0.28);
}
body.night-mode .kitchen-vibe-card {
  background: #141820;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
}
body.night-mode .kitchen-vibe-card:hover {
  border-color: rgba(212, 175, 55, 0.35);
  box-shadow: 0 8px 34px rgba(0, 0, 0, 0.6);
}

.kitchen-vibe-card::before {
  display: none !important;
}

.vibe-icon-col {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #B45309;
  flex-shrink: 0;
  box-shadow: none;
  animation: none !important;
}
body.night-mode .vibe-icon-col {
  background: rgba(212, 175, 55, 0.2);
  color: #FDE68A;
}

.vibe-content-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.vibe-header-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.vibe-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.70rem;
  font-weight: 700;
  color: #8C6230;
  background: rgba(212, 175, 55, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}
body.night-mode .vibe-tag {
  color: #FDE68A;
  background: rgba(212, 175, 55, 0.18);
  border-color: rgba(212, 175, 55, 0.3);
}

.vibe-time {
  font-size: 0.68rem;
  font-weight: 600;
  color: #7A6552;
}
body.night-mode .vibe-time {
  color: #9CA3AF;
}

.vibe-quote {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1C1008;
  line-height: 1.5;
  margin-bottom: 2px;
  font-family: inherit;
}
body.night-mode .vibe-quote {
  color: #F3F4F6;
}

.vibe-author {
  font-size: 0.70rem;
  color: #7A6552;
  font-weight: 600;
}
body.night-mode .vibe-author {
  color: #9CA3AF;
}

.vibe-shuffle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #FFFFFF;
  border: 1px solid rgba(28, 16, 8, 0.12);
  color: #5C4B3D;
  font-weight: 700;
  font-size: 0.74rem;
  padding: 6px 14px;
  border-radius: 999px;
  transition: all 0.16s ease;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.vibe-shuffle-btn:hover {
  background: #FAF7F2;
  border-color: #D4AF37;
  color: #1C1008;
  transform: none;
}
body.night-mode .vibe-shuffle-btn {
  background: #1F2734;
  border-color: rgba(255, 255, 255, 0.12);
  color: #D1D5DB;
}
body.night-mode .vibe-shuffle-btn:hover {
  background: #252F3F;
  border-color: rgba(212, 175, 55, 0.4);
  color: #F3D082;
}

@media (max-width: 600px) {
  .kitchen-vibe-card {
    flex-direction: column;
    text-align: center;
    padding: 16px;
    gap: 12px;
  }
  .vibe-header-line {
    justify-content: center;
  }
}


/* 👁️ ADMIN FULL ACCESS (No hidden buttons) */
.observer-top-badge {
  display: none !important;
}

/* ═══════════════════════════════════════════════
   PREMIUM FHD & HIGH-DPI ENHANCEMENTS
   ═══════════════════════════════════════════════ */
html, body {
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
}


/* Quick WhatsApp Chat Button */
.wa-quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #FFFFFF !important;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 11px;
  text-decoration: none;
  margin-right: 6px;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
  vertical-align: middle;
}
.wa-quick-btn:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.6);
}

/* High-DPI Cards & Tables Polish */
.card, .panel, .modal-card {
  box-shadow: 0 8px 30px rgba(28, 16, 8, 0.07), 0 1px 3px rgba(28, 16, 8, 0.04) !important;
  border: 1px solid rgba(28, 16, 8, 0.08) !important;
}
.btn {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(1px);
}

/* ══════════════════════════════════════════════════════════════
   1. EXECUTIVE COMMAND CENTER DASHBOARD STYLES
   ══════════════════════════════════════════════════════════════ */
.dash-exec-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 12px;
}
.dash-exec-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.dash-live-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-dark);
  background: var(--bg-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
}
.dash-shift-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: #B45309;
  background: #FEF3C7;
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

/* Top Executive KPI Cards */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 1.25rem;
}
.dash-kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(28, 16, 8, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}
.dash-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3.5px;
}
.dash-kpi-card.highlight-green::before { background: linear-gradient(90deg, #10B981, #059669); }
.dash-kpi-card.highlight-gold::before { background: linear-gradient(90deg, #F59E0B, #D97706); }
.dash-kpi-card.highlight-blue::before { background: linear-gradient(90deg, #3B82F6, #2563EB); }
.dash-kpi-card.highlight-amber::before { background: linear-gradient(90deg, #FB923C, #EA580C); }
.dash-kpi-card.highlight-rose::before { background: linear-gradient(90deg, #F43F5E, #E11D48); }

.dash-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(28, 16, 8, 0.08);
}
.dash-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dash-kpi-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}
.dash-kpi-icon {
  font-size: 1.2rem;
}
.dash-kpi-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--brand-dark);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.dash-kpi-sub {
  font-size: 0.72rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Quick Action Command Hub */
.dash-action-hub {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 10px rgba(28, 16, 8, 0.03);
}
.dash-hub-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.dash-hub-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.dash-hub-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: right;
  transition: all 0.2s ease;
  color: var(--text-main);
}
.dash-hub-btn:hover {
  background: #FFF9F3;
  border-color: #E2B788;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(160, 120, 80, 0.12);
}
.dash-hub-btn.main-action {
  background: linear-gradient(135deg, #FFF0E6 0%, #FFE2D1 100%);
  border: 1.5px solid #EA580C;
  color: #9A3412;
}
.dash-hub-btn.main-action:hover {
  background: linear-gradient(135deg, #FFE2D1 0%, #FFD2B8 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.2);
}
.dash-hub-btn .icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.dash-hub-btn .btn-text strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
}
.dash-hub-btn .btn-text small {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* Split Grid on Dashboard */
.dash-split-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  align-items: start;
}
@media (max-width: 992px) {
  .dash-split-grid {
    grid-template-columns: 1fr;
  }
}
.dash-radar-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.radar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(28, 16, 8, 0.04);
}
.radar-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}
.radar-stat-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* ══════════════════════════════════════════════════════════════
   2. FAST POS CASHIER TERMINAL STYLES (عمل طلب ⚡)
   ══════════════════════════════════════════════════════════════ */
.takeorder-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 12px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 1360px) {
  .takeorder-container {
    grid-template-columns: minmax(0, 1fr) 375px;
    gap: 14px;
  }
}
@media (max-width: 860px) {
  .takeorder-container {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column-reverse;
  }
  .takeorder-cart-panel {
    position: sticky;
    bottom: 0;
    top: auto;
    z-index: 99;
    box-shadow: 0 -4px 20px rgba(28, 16, 8, 0.15);
  }
}

/* Menu Browser (Right 65%) */
.takeorder-menu-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  width: 100%;
}
.takeorder-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}
.takeorder-search-box {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}
.takeorder-search-box .search-icon {
  position: absolute;
  right: 10px;
  font-size: 0.88rem;
  color: var(--text-light);
  pointer-events: none;
}
.takeorder-search-box input {
  width: 100%;
  padding-right: 32px;
  padding-left: 28px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  font-size: 0.82rem;
}
.takeorder-search-box .clear-search-btn {
  position: absolute;
  left: 8px;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 0.82rem;
  padding: 3px;
}
.takeorder-quick-stat {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Category Filter Chips */
.takeorder-cats-bar {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.pos-cat-chip {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}
.pos-cat-chip:hover {
  background: #FFF7ED;
  border-color: #FB923C;
  color: #C2410C;
}
.pos-cat-chip.active {
  background: var(--brand-dark);
  color: #FDFAF0;
  border-color: var(--brand-dark);
  box-shadow: 0 4px 12px rgba(28, 16, 8, 0.18);
}

/* ════ POS Category Cards Deck (بوابات تصنيفات الأصناف) ════ */
.pos-categories-deck {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 6px 2px;
  margin-bottom: 6px;
  scrollbar-width: thin;
}
.pos-category-card {
  flex: 0 0 auto;
  min-width: 120px;
  padding: 6px 11px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  position: relative;
  text-align: right;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.pos-category-card:hover {
  transform: translateY(-2px);
  border-color: #EA580C;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.12);
}
.pos-category-card:active {
  transform: scale(0.98);
}
.pos-category-card.active {
  background: linear-gradient(135deg, #2D1E14 0%, #1A1009 100%);
  border-color: #D4AF37;
  color: #FFF8EE;
  box-shadow: 0 4px 14px rgba(28, 16, 8, 0.25);
}
.pos-cat-card-icon {
  font-size: 1.22rem;
  line-height: 1;
  flex-shrink: 0;
}
.pos-cat-card-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.pos-cat-card-ar {
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
}
.pos-cat-card-en {
  font-size: 0.63rem;
  opacity: 0.75;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.pos-category-card.active .pos-cat-card-en {
  color: #E2BD89;
  opacity: 0.95;
}
.pos-cat-card-count {
  background: rgba(0,0,0,0.06);
  color: var(--text-muted);
  font-size: 0.64rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  margin-right: auto;
}
.pos-category-card.active .pos-cat-card-count {
  background: rgba(212, 175, 55, 0.22);
  color: #F8E2B2;
}

/* Active Category Banner */
.pos-active-cat-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(90deg, rgba(234,88,12,0.08) 0%, rgba(212,175,55,0.06) 100%);
  border: 1.5px solid rgba(234,88,12,0.28);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  margin-bottom: 8px;
}
.pos-active-cat-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pos-active-cat-icon {
  font-size: 1.25rem;
  line-height: 1;
}
.pos-active-cat-title {
  margin: 0 0 1px 0;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--brand-dark);
}
.pos-active-cat-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}
.pos-active-cat-back {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.pos-active-cat-back:hover {
  border-color: #EA580C;
  color: #EA580C;
  background: #FFF7ED;
}

/* Category Section Header in 'All' view */
.pos-section-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 4px;
  margin-top: 4px;
  border-bottom: 1.5px solid var(--border-light);
}
.pos-sec-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}
.pos-sec-icon {
  font-size: 1.1rem;
}
.pos-sec-title small {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-right: 4px;
}
.pos-sec-badge {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

/* Menu Admin Filter Pills */
.menu-cats-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.menu-cat-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.menu-cat-btn:hover {
  background: #FFF7ED;
  border-color: #EA580C;
  color: #C2410C;
}
.menu-cat-btn.active {
  background: var(--brand-dark);
  color: #FDFAF0;
  border-color: var(--brand-dark);
  box-shadow: 0 2px 8px rgba(28, 16, 8, 0.2);
}


/* Product Touch Grid */
.takeorder-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 8px;
}
.pos-item-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 8px 9px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  user-select: none;
  min-height: 94px;
}
.pos-item-card:hover {
  border-color: #EA580C;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.12);
}
.pos-item-card:active {
  transform: scale(0.97);
}
.pos-item-card.in-cart {
  border-color: #EA580C;
  background: #FFFBF8;
}
.pos-item-badge-cart {
  position: absolute;
  top: -6px;
  left: -6px;
  background: #EA580C;
  color: #FFF;
  font-size: 0.68rem;
  font-weight: 900;
  border-radius: var(--radius-full);
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.4);
  padding: 0 4px;
}
.pos-item-header {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.pos-item-emoji {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}
.pos-item-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.2;
  word-break: break-word;
}
.pos-item-name-ar {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.2;
  margin-bottom: 1px;
}
.pos-item-name-en {
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.15;
  margin-bottom: 2px;
  direction: ltr;
  text-align: right;
  opacity: 0.88;
}
.pos-item-cat {
  font-size: 0.64rem;
  color: var(--text-light);
  font-weight: 500;
}
.pos-cat-en {
  font-size: 0.62rem;
  opacity: 0.8;
  margin-right: 3px;
}
.pos-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--border-light);
  padding-top: 4px;
  margin-top: 2px;
}
.pos-item-price {
  font-size: 0.86rem;
  font-weight: 900;
  color: #C2410C;
}
.pos-item-add-tag {
  font-size: 0.62rem;
  font-weight: 700;
  background: #FFF3E8;
  color: #EA580C;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
}

/* Sticky POS Cart Panel (Left 35% - Non-scrolling & Compact) */
.takeorder-cart-panel {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  box-shadow: 0 4px 20px rgba(28, 16, 8, 0.08);
  position: sticky;
  top: 70px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.pos-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 6px;
  border-bottom: 1.5px solid var(--border-light);
}
.pos-cart-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--brand-dark);
}
.pos-order-tag {
  font-size: 0.68rem;
  font-weight: 800;
  background: #FFF7ED;
  color: #C2410C;
  border: 1px solid #FDBA74;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

/* Channel Selector */
.pos-channel-selector {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
}
.pos-channel-btn {
  padding: 5px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.18s ease;
}
.pos-channel-btn:hover {
  background: #FFF9F3;
  border-color: #E2B788;
}
.pos-channel-btn.active {
  background: var(--brand-dark);
  color: #FDFAF0;
  border-color: var(--brand-dark);
}

/* Fast Customer Row */
.pos-customer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.pos-input-sm {
  padding: 4px 8px !important;
  font-size: 0.76rem !important;
  height: 30px !important;
}

/* Cart Items Scrollable List */
.pos-cart-items-list {
  max-height: 190px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 2px;
  scrollbar-width: thin;
}
.pos-cart-row {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease;
}
.pos-cart-row:hover {
  background: #FFFDF8;
}
.pos-row-details {
  flex: 1;
  min-width: 0;
}
.pos-row-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pos-row-subname {
  font-size: 0.66rem;
  color: var(--text-light);
  direction: ltr;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pos-row-price {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 1px;
}
.pos-qty-control {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pos-qty-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--brand-dark);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  user-select: none;
  touch-action: manipulation;
}
.pos-qty-btn:hover {
  background: var(--brand-dark);
  color: #FFF;
  border-color: var(--brand-dark);
}
.pos-qty-val {
  min-width: 18px;
  text-align: center;
  font-weight: 800;
  font-size: 0.8rem;
}
.pos-row-total {
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--brand-dark);
  min-width: 44px;
  text-align: left;
}
.pos-row-del {
  background: none;
  border: none;
  color: #B91C1C;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 1px 3px;
}

/* Discount & Extras */
.pos-extras-bar {
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  border: 1px solid var(--border-light);
}
.pos-discount-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
}
.pos-disc-chips {
  display: flex;
  gap: 3px;
}
.disc-chip {
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.15s ease;
}
.disc-chip:hover {
  border-color: #EA580C;
}
.disc-chip.active {
  background: #EA580C;
  color: #FFF;
  border-color: #EA580C;
}

/* Cart Summary & Bold Total */
.pos-cart-summary {
  border-top: 1.5px solid var(--border-light);
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pos-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-muted);
}
.pos-grand-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #FFF7ED;
  border: 1.5px solid #FDBA74;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  margin-top: 2px;
}
.pos-total-label span {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: #9A3412;
}
.pos-total-label small {
  font-size: 0.65rem;
  color: var(--text-muted);
}
.pos-grand-total-val {
  font-size: 1.35rem;
  font-weight: 900;
  color: #C2410C;
  letter-spacing: -0.02em;
}

/* POS Action Buttons */
.pos-checkout-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pos-btn-instant {
  background: linear-gradient(135deg, #EA580C 0%, #C2410C 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}
.pos-btn-instant:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(234, 88, 12, 0.45);
}
.pos-btn-instant:active {
  transform: translateY(1px);
}
.pos-sub-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.pos-btn-sub {
  padding: 6px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--brand-dark);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.18s ease;
}
.pos-btn-sub.print-btn:hover {
  background: #EFF6FF;
  border-color: #3B82F6;
  color: #1D4ED8;
}
.pos-btn-sub.prep-btn:hover {
  background: #FFFBEB;
  border-color: #F59E0B;
  color: #B45309;
}

/* ══════════════════════════════════════════════════════════════
   3. ANALYTICS FLOWCHARTS & VISUAL PIPELINE STYLES
   ══════════════════════════════════════════════════════════════ */
.flowchart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(28, 16, 8, 0.05);
}
.flowchart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.flowchart-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-dark);
}
.flowchart-badge {
  font-size: 0.78rem;
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

/* Flow Diagram Container */
.flow-diagram-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  overflow-x: auto;
}
@media (max-width: 900px) {
  .flow-diagram-container {
    flex-direction: column;
    align-items: stretch;
  }
}
.flow-node {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(28, 16, 8, 0.04);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 170px;
  transition: transform 0.2s ease;
}
.flow-node:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(28, 16, 8, 0.08);
}
.flow-node.income-node {
  border-color: #3B82F6;
  background: #EFF6FF;
}
.flow-node.profit-node {
  border-color: #10B981;
  background: #ECFDF5;
}
.flow-node .node-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}
.flow-node .node-content {
  flex: 1;
}
.flow-node .node-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  display: block;
  white-space: nowrap;
}
.flow-node .node-val {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--brand-dark);
  line-height: 1.2;
}
.flow-node .node-pct {
  font-size: 0.68rem;
  color: var(--text-light);
  font-weight: 600;
}
.flow-node .node-pct.highlight {
  color: #065F46;
  font-weight: 800;
}
.node-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(28, 16, 8, 0.08);
  border-radius: 999px;
  margin: 4px 0 2px;
  overflow: hidden;
}
.node-progress-fill {
  height: 100%;
  border-radius: 999px;
}
.node-progress-fill.direct { background: #EA580C; }
.node-progress-fill.packaging { background: #D97706; }
.node-progress-fill.overhead { background: #8B5CF6; }
.node-progress-fill.profit { background: #10B981; }

.flow-cost-nodes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.flow-arrow-split, .flow-arrow-merge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.flow-arrow-tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  white-space: nowrap;
}

/* Order Lifecycle Pipeline */
.pipeline-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 10px rgba(28, 16, 8, 0.04);
}
.pipeline-header {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 12px;
}
.pipeline-steps-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.pipeline-step {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 140px;
}
.pipeline-step.completed-step {
  background: #F0FDF4;
  border-color: #86EFAC;
}
.step-badge-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-dark);
  color: #FFF;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pipeline-step.completed-step .step-badge-num {
  background: #15803D;
}
.step-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.step-info {
  display: flex;
  flex-direction: column;
}
.step-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}
.step-count {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--brand-dark);
}
.pipeline-connector {
  font-size: 1.2rem;
  color: var(--text-light);
  flex-shrink: 0;
}

/* Category Sales Breakdown Bars */
.category-bars-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 0;
}
.cat-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cat-bar-label {
  width: 140px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-bar-track {
  flex: 1;
  height: 12px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-light);
}
.cat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #C48530, #9C5E1A);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.cat-bar-val {
  min-width: 110px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-main);
}

/* ==========================================================================
   HEADER THEME TOGGLE BUTTON
   ========================================================================== */
.header-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--brand-dark);
  border: 1px solid var(--border-medium);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.22s ease;
  user-select: none;
}
.header-theme-btn:hover {
  background: var(--bg-hover);
  transform: scale(1.08);
}
body.night-mode .header-theme-btn {
  background: #251D17;
  border-color: #5C4533;
  color: #FFF7EE;
}
body.night-mode .header-theme-btn:hover {
  background: #36291F;
  border-color: #D4AF37;
}

/* ==========================================================================
   EYE-FRIENDLY NIGHT MODE (النمط الليلي المريح للعين - إضاءة ناعمة وتباين فائق)
   Zero Blue Light Glare · Warm Velvet Dark Espresso Canvas · Soft Linen Cream
   ========================================================================== */

body.night-mode {
  --brand-dark:   #FFF7EE;
  --brand-brown:  #E2BD89;
  --brand-mid:    #C8B49E;
  --brand-tan:    #D4AF37;
  --brand-warm:   #E8BA7A;

  /* Deep Warm Dark Espresso Palette (no blinding pure white, no harsh pitch black) */
  --bg-primary:          #16120F;   /* warm velvet dark espresso canvas */
  --bg-surface:          #201A15;   /* elevated warm chocolate cards */
  --bg-surface-elevated: #28211B;   /* higher elevation surfaces */
  --bg-subtle:           #1C1612;   /* recessed panels / subtle backgrounds */
  --bg-hover:            #2E241E;   /* hover state */
  --bg-dark-section:     #0D0A08;

  --text-main:    #FFF7EE;   /* warm white headings, 100% visible */
  --text-body:    #F5EBE1;   /* soft linen cream body text, zero eye fatigue */
  --text-muted:   #C8B49E;   /* warm sand text for labels and secondary data */
  --text-light:   #A89683;   /* subtle metadata */
  --text-on-dark: #FFF7EE;

  --border-light:  rgba(255,245,230,0.08);
  --border-medium: rgba(255,245,230,0.15);
  --border-dark:   rgba(255,245,230,0.28);

  --shadow-sm: 0 2px 8px  rgba(0,0,0,0.4);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.55);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.7);

  background-color: #16120F !important;
  color: #F5EBE1 !important;
}

/* Header & Navigation in Night Mode */
body.night-mode .app-header {
  background: #1B1511 !important;
  border-bottom: 1px solid rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .brand-logo-wrap .adams-img {
  filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.45)) !important;
}
body.night-mode .brand-logo-wrap .kitchen-word {
  color: #F3D082 !important;
}
body.night-mode .splash-logo-img {
  filter: drop-shadow(0 8px 24px rgba(212, 175, 55, 0.45)) !important;
}
body.night-mode .user-badge {
  background: #241D17 !important;
  border-color: rgba(255, 240, 220, 0.18) !important;
  color: #F5EBE1 !important;
}
body.night-mode .user-badge-avatar {
  background: #D4AF37 !important;
  color: #16120F !important;
}
body.night-mode .header-menu-btn {
  background: #241D17 !important;
  border-color: rgba(255, 240, 220, 0.18) !important;
  color: #F5EBE1 !important;
}

/* Drawer Sidebar in Night Mode */
body.night-mode .app-sidebar {
  background: #1B1511 !important;
  border-left: 1px solid rgba(255, 240, 220, 0.12) !important;
  box-shadow: -8px 0 32px rgba(0,0,0,0.6) !important;
}
body.night-mode .sidebar-floating-toggle {
  background: #241D17 !important;
  border-color: #D4AF37 !important;
  color: #F5EBE1 !important;
}
body.night-mode .sidebar-header {
  border-bottom-color: rgba(255, 240, 220, 0.1) !important;
}
body.night-mode .sidebar-close-btn {
  background: #241D17 !important;
  border-color: rgba(255, 240, 220, 0.15) !important;
  color: #F5EBE1 !important;
}
body.night-mode .nav-btn {
  color: #E6D8CA !important;
}
body.night-mode .nav-btn:hover {
  background: #282019 !important;
  color: #FFF7EE !important;
}
body.night-mode .nav-btn.active {
  background: #2E231B !important;
  color: #E2BD89 !important;
  border-right-color: #D4AF37 !important;
}

/* Cards, Panels and Surfaces in Night Mode */
body.night-mode .card,
body.night-mode .inventory-card,
body.night-mode .order-summary-card,
body.night-mode .analytics-chart-panel,
body.night-mode .analytics-kpi-card,
body.night-mode .pos-order-summary,
body.night-mode .pos-channel-bar,
body.night-mode .pos-search-bar,
body.night-mode .modal-box,
body.night-mode .modal-content,
body.night-mode .recipe-editor-panel {
  background-color: #201A15 !important;
  border-color: rgba(255, 240, 220, 0.12) !important;
  color: #F5EBE1 !important;
}

body.night-mode .card-header,
body.night-mode .chart-panel-header,
body.night-mode .modal-header {
  border-bottom-color: rgba(255, 240, 220, 0.12) !important;
}

/* POS Terminal in Night Mode */
body.night-mode .pos-product-card {
  background: #231C16 !important;
  border-color: rgba(255, 240, 220, 0.14) !important;
}
body.night-mode .pos-product-card:hover {
  border-color: #D4AF37 !important;
  background: #2C231B !important;
}
body.night-mode .pos-prod-ar {
  color: #FFF7EE !important;
}
body.night-mode .pos-prod-en {
  color: #C8B49E !important;
}
body.night-mode .pos-cat-pill {
  background: #231C16 !important;
  border-color: rgba(255, 240, 220, 0.15) !important;
  color: #E0CEBD !important;
}
body.night-mode .pos-cat-pill.active {
  background: #3B2D21 !important;
  border-color: #D4AF37 !important;
  color: #FFF7EE !important;
}
body.night-mode .pos-channel-chip {
  background: #231C16 !important;
  border-color: rgba(255, 240, 220, 0.15) !important;
  color: #E0CEBD !important;
}
body.night-mode .pos-channel-chip.active {
  background: #3B2D21 !important;
  border-color: #D4AF37 !important;
  color: #FFF7EE !important;
}
body.night-mode .pos-cart-table th {
  background: #1B1511 !important;
  color: #C8B49E !important;
  border-bottom-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .pos-cart-table td {
  border-bottom-color: rgba(255, 240, 220, 0.08) !important;
  color: #F5EBE1 !important;
}
body.night-mode .pos-cart-item-name {
  color: #FFF7EE !important;
}
body.night-mode .pos-grand-total-row,
body.night-mode .pos-total-row {
  background: #231C16 !important;
  border-color: rgba(212, 175, 55, 0.35) !important;
}
body.night-mode .pos-total-label span {
  color: #E0CEBD !important;
}
body.night-mode .pos-grand-total-val,
body.night-mode .pos-total-val {
  color: #D4AF37 !important;
}
body.night-mode .pos-qty-btn {
  background: #231C16 !important;
  color: #FFF7EE !important;
  border-color: rgba(255, 240, 220, 0.2) !important;
}
body.night-mode .pos-qty-btn:hover {
  background: #3B2D21 !important;
  color: #D4AF37 !important;
  border-color: #D4AF37 !important;
}

/* Forms, Inputs and Selects in Night Mode */
body.night-mode input[type="text"],
body.night-mode input[type="password"],
body.night-mode input[type="number"],
body.night-mode input[type="search"],
body.night-mode input[type="date"],
body.night-mode select,
body.night-mode textarea,
body.night-mode .form-control {
  background-color: #261F19 !important;
  border-color: rgba(255, 240, 220, 0.2) !important;
  color: #FFF7EE !important;
}
body.night-mode input::placeholder,
body.night-mode textarea::placeholder {
  color: #A08B77 !important;
}
body.night-mode input:focus,
body.night-mode select:focus,
body.night-mode textarea:focus {
  border-color: #D4AF37 !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2) !important;
}

/* Tables in Night Mode */
body.night-mode table th {
  background: #1B1511 !important;
  color: #C8B49E !important;
  border-bottom: 1px solid rgba(255, 240, 220, 0.15) !important;
}
body.night-mode table td {
  border-bottom: 1px solid rgba(255, 240, 220, 0.08) !important;
  color: #F5EBE1 !important;
}
body.night-mode tr:hover td {
  background: rgba(255, 240, 220, 0.03) !important;
}

/* Analytics Elements in Night Mode */
body.night-mode .analytics-kpi-card {
  background: #201A15 !important;
  border-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .analytics-kpi-card .val {
  color: #FFF7EE !important;
}
body.night-mode .performer-row {
  background: #241D17 !important;
  border-color: rgba(255, 240, 220, 0.08) !important;
}
body.night-mode .performer-row strong {
  color: #FFF7EE !important;
}
body.night-mode .waterfall-node {
  background: #241D17 !important;
  border-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .waterfall-track {
  background: #17120E !important;
}
body.night-mode .cat-bar-label {
  color: #E2BD89 !important;
}
body.night-mode .cat-bar-track {
  background: #17120E !important;
}
body.night-mode .cat-bar-val {
  color: #FFF7EE !important;
}
body.night-mode .action-plan-card-clean {
  background: #201A15 !important;
  border-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .strategy-rec-row {
  background: #241D17 !important;
  border-color: rgba(255, 240, 220, 0.08) !important;
}
body.night-mode .strategy-rec-row strong {
  color: #FFF7EE !important;
}
body.night-mode .strategy-rec-row p {
  color: #C8B49E !important;
}

/* Costing & Deficits in Night Mode */
body.night-mode .cost-card,
body.night-mode .cost-prod-card,
body.night-mode .cost-calc-panel {
  background: #201A15 !important;
  border-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .cost-subtab-pill {
  background: #241D17 !important;
  color: #C8B49E !important;
  border-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .cost-subtab-pill.active {
  background: #3B2D21 !important;
  color: #FFF7EE !important;
  border-color: #D4AF37 !important;
}

/* POS Categories Deck & Menu Filter in Night Mode */
body.night-mode .pos-category-card {
  background: #201A15 !important;
  border-color: rgba(255, 240, 220, 0.12) !important;
  color: #FFF7EE !important;
}
body.night-mode .pos-category-card:hover {
  border-color: #D4AF37 !important;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.15) !important;
}
body.night-mode .pos-category-card.active {
  background: linear-gradient(135deg, #382A1B 0%, #201710 100%) !important;
  border-color: #D4AF37 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
}
body.night-mode .pos-cat-card-count {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #C8B49E !important;
}
body.night-mode .pos-active-cat-banner {
  background: linear-gradient(90deg, rgba(212,175,55,0.12) 0%, rgba(180,120,40,0.06) 100%) !important;
  border-color: rgba(212,175,55,0.3) !important;
}
body.night-mode .pos-active-cat-title {
  color: #FFF7EE !important;
}
body.night-mode .pos-active-cat-sub {
  color: #C8B49E !important;
}
body.night-mode .pos-active-cat-back {
  background: #201A15 !important;
  border-color: rgba(255, 240, 220, 0.16) !important;
  color: #FFF7EE !important;
}
body.night-mode .pos-active-cat-back:hover {
  border-color: #D4AF37 !important;
  color: #D4AF37 !important;
}
body.night-mode .pos-section-header {
  border-bottom-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .pos-sec-title {
  color: #FFF7EE !important;
}
body.night-mode .pos-sec-title small,
body.night-mode .pos-sec-badge {
  color: #C8B49E !important;
  background: #241D17 !important;
}
body.night-mode .menu-cat-btn {
  background: #201A15 !important;
  color: #C8B49E !important;
  border-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .pos-cat-pill {
  background: #231C16 !important;
  border-color: rgba(255, 240, 220, 0.15) !important;
  color: #E0CEBD !important;
}
body.night-mode .pos-cat-pill.active {
  background: #3B2D21 !important;
  border-color: #D4AF37 !important;
  color: #FFF7EE !important;
}
body.night-mode .pos-channel-chip {
  background: #231C16 !important;
  border-color: rgba(255, 240, 220, 0.15) !important;
  color: #E0CEBD !important;
}
body.night-mode .pos-channel-chip.active {
  background: #3B2D21 !important;
  border-color: #D4AF37 !important;
  color: #FFF7EE !important;
}
body.night-mode .pos-cart-table th {
  background: #1B1511 !important;
  color: #C8B49E !important;
  border-bottom-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .pos-cart-table td {
  border-bottom-color: rgba(255, 240, 220, 0.08) !important;
  color: #F5EBE1 !important;
}
body.night-mode .pos-cart-item-name {
  color: #FFF7EE !important;
}
body.night-mode .pos-grand-total-row,
body.night-mode .pos-total-row {
  background: #231C16 !important;
  border-color: rgba(212, 175, 55, 0.35) !important;
}
body.night-mode .pos-total-label span {
  color: #E0CEBD !important;
}
body.night-mode .pos-grand-total-val,
body.night-mode .pos-total-val {
  color: #D4AF37 !important;
}
body.night-mode .pos-qty-btn {
  background: #231C16 !important;
  color: #FFF7EE !important;
  border-color: rgba(255, 240, 220, 0.2) !important;
}
body.night-mode .pos-qty-btn:hover {
  background: #3B2D21 !important;
  color: #D4AF37 !important;
  border-color: #D4AF37 !important;
}

/* Forms, Inputs and Selects in Night Mode */
body.night-mode input[type="text"],
body.night-mode input[type="password"],
body.night-mode input[type="number"],
body.night-mode input[type="search"],
body.night-mode input[type="date"],
body.night-mode select,
body.night-mode textarea,
body.night-mode .form-control {
  background-color: #261F19 !important;
  border-color: rgba(255, 240, 220, 0.2) !important;
  color: #FFF7EE !important;
}
body.night-mode input::placeholder,
body.night-mode textarea::placeholder {
  color: #A08B77 !important;
}
body.night-mode input:focus,
body.night-mode select:focus,
body.night-mode textarea:focus {
  border-color: #D4AF37 !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2) !important;
}

/* Tables in Night Mode */
body.night-mode table th {
  background: #1B1511 !important;
  color: #C8B49E !important;
  border-bottom: 1px solid rgba(255, 240, 220, 0.15) !important;
}
body.night-mode table td {
  border-bottom: 1px solid rgba(255, 240, 220, 0.08) !important;
  color: #F5EBE1 !important;
}
body.night-mode tr:hover td {
  background: rgba(255, 240, 220, 0.03) !important;
}

/* Analytics Elements in Night Mode */
body.night-mode .analytics-kpi-card {
  background: #201A15 !important;
  border-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .analytics-kpi-card .val {
  color: #FFF7EE !important;
}
body.night-mode .performer-row {
  background: #241D17 !important;
  border-color: rgba(255, 240, 220, 0.08) !important;
}
body.night-mode .performer-row strong {
  color: #FFF7EE !important;
}
body.night-mode .waterfall-node {
  background: #241D17 !important;
  border-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .waterfall-track {
  background: #17120E !important;
}
body.night-mode .cat-bar-label {
  color: #E2BD89 !important;
}
body.night-mode .cat-bar-track {
  background: #17120E !important;
}
body.night-mode .cat-bar-val {
  color: #FFF7EE !important;
}
body.night-mode .action-plan-card-clean {
  background: #201A15 !important;
  border-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .strategy-rec-row {
  background: #241D17 !important;
  border-color: rgba(255, 240, 220, 0.08) !important;
}
body.night-mode .strategy-rec-row strong {
  color: #FFF7EE !important;
}
body.night-mode .strategy-rec-row p {
  color: #C8B49E !important;
}

/* Costing & Deficits in Night Mode */
body.night-mode .cost-card,
body.night-mode .cost-prod-card,
body.night-mode .cost-calc-panel {
  background: #201A15 !important;
  border-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .cost-subtab-pill {
  background: #241D17 !important;
  color: #C8B49E !important;
  border-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .cost-subtab-pill.active {
  background: #3B2D21 !important;
  color: #FFF7EE !important;
  border-color: #D4AF37 !important;
}

/* POS Categories Deck & Menu Filter in Night Mode */
body.night-mode .pos-category-card {
  background: #201A15 !important;
  border-color: rgba(255, 240, 220, 0.12) !important;
  color: #FFF7EE !important;
}
body.night-mode .pos-category-card:hover {
  border-color: #D4AF37 !important;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.15) !important;
}
body.night-mode .pos-category-card.active {
  background: linear-gradient(135deg, #382A1B 0%, #201710 100%) !important;
  border-color: #D4AF37 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
}
body.night-mode .pos-cat-card-count {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #C8B49E !important;
}
body.night-mode .pos-active-cat-banner {
  background: linear-gradient(90deg, rgba(212,175,55,0.12) 0%, rgba(180,120,40,0.06) 100%) !important;
  border-color: rgba(212,175,55,0.3) !important;
}
body.night-mode .pos-active-cat-title {
  color: #FFF7EE !important;
}
body.night-mode .pos-active-cat-sub {
  color: #C8B49E !important;
}
body.night-mode .pos-active-cat-back {
  background: #201A15 !important;
  border-color: rgba(255, 240, 220, 0.16) !important;
  color: #FFF7EE !important;
}
body.night-mode .pos-active-cat-back:hover {
  border-color: #D4AF37 !important;
  color: #D4AF37 !important;
}
body.night-mode .pos-section-header {
  border-bottom-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .pos-sec-title {
  color: #FFF7EE !important;
}
body.night-mode .pos-sec-title small,
body.night-mode .pos-sec-badge {
  color: #C8B49E !important;
  background: #241D17 !important;
}
body.night-mode .menu-cat-btn {
  background: #201A15 !important;
  color: #C8B49E !important;
  border-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .menu-cat-btn:hover {
  background: #2C2219 !important;
  border-color: #D4AF37 !important;
  color: #FFF7EE !important;
}
body.night-mode .menu-cat-btn.active {
  background: #3B2D21 !important;
  color: #FFF7EE !important;
  border-color: #D4AF37 !important;
}

/* Orders Log & Classification in Night Mode */
body.night-mode .orders-summary-card {
  background: #201A15 !important;
  border-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .orders-stat-val {
  color: #FFF7EE !important;
}
body.night-mode .orders-stat-lbl {
  color: #C8B49E !important;
}
body.night-mode .orders-filter-box {
  background: #201A15 !important;
  border-color: rgba(255, 240, 220, 0.14) !important;
}
body.night-mode .orders-quick-chips {
  border-bottom-color: rgba(255, 240, 220, 0.1) !important;
}
body.night-mode .orders-quick-btn {
  background: #2A2119 !important;
  color: #C8B49E !important;
  border-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .orders-quick-btn:hover {
  background: #3B2D21 !important;
  border-color: #D4AF37 !important;
  color: #FFF7EE !important;
}
body.night-mode .orders-quick-btn.active {
  background: #3B2D21 !important;
  color: #FFF7EE !important;
  border-color: #D4AF37 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}
body.night-mode .order-shift-badge.morning {
  background: rgba(245, 158, 11, 0.16) !important;
  color: #FCD34D !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}
body.night-mode .order-shift-badge.evening {
  background: rgba(139, 92, 246, 0.18) !important;
  color: #DDD6FE !important;
  border-color: rgba(139, 92, 246, 0.32) !important;
}
body.night-mode .order-shift-badge.late {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #FCA5A5 !important;
  border-color: rgba(239, 68, 68, 0.32) !important;
}
body.night-mode .orders-day-header {
  background: linear-gradient(90deg, #2A2119 0%, #1E1712 100%) !important;
  border-color: rgba(212, 175, 55, 0.28) !important;
}
body.night-mode .orders-day-title {
  color: #FFF7EE !important;
}
body.night-mode .orders-day-meta {
  color: #E2BD89 !important;
}

/* ══════════════════════════════════════════════════════════════
   ✦ VISUAL SIMPLIFICATION LAYER — تبسيط بصري شامل
   تقليل الكثافة المعلوماتية مع الحفاظ على كل الوظائف
   ══════════════════════════════════════════════════════════════ */

/* ─── 1. DASHBOARD — KPI STRIP (أصغر وأخف) ─── */
.dash-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
  gap: 8px !important;
  margin-bottom: 0.9rem !important;
}
.dash-kpi-card {
  padding: 10px 13px !important;
  gap: 4px !important;
  border-radius: var(--radius-md) !important;
}
.dash-kpi-card::before {
  height: 2.5px !important;
}
.dash-kpi-val {
  font-size: 1.2rem !important;
}
.dash-kpi-sub {
  font-size: 0.67rem !important;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dash-kpi-label {
  font-size: 0.68rem !important;
}
.dash-kpi-icon {
  font-size: 1rem !important;
}

/* ─── 2. DASHBOARD — ACTION HUB (شريط أفقي compact) ─── */
.dash-action-hub {
  padding: 10px 14px !important;
  margin-bottom: 0.9rem !important;
}
.dash-hub-title {
  font-size: 0.72rem !important;
  margin-bottom: 7px !important;
}
.dash-hub-buttons {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
  gap: 7px !important;
}
.dash-hub-btn {
  padding: 7px 10px !important;
  gap: 7px !important;
  border-radius: var(--radius-sm) !important;
}
.dash-hub-btn .icon {
  font-size: 1.1rem !important;
}
.dash-hub-btn .btn-text strong {
  font-size: 0.76rem !important;
}
.dash-hub-btn .btn-text small {
  display: none !important;
}

/* ─── 3. DASHBOARD — EXEC HEADER & VIBE CARD ─── */
.dash-exec-header {
  margin-bottom: 0.85rem !important;
}
.kitchen-vibe-card {
  padding: 10px 14px !important;
  margin-bottom: 0.9rem !important;
}
.vibe-quote {
  font-size: 0.82rem !important;
}

/* ─── 4. INVENTORY/COSTING — METRICS GRID (compact strip) ─── */
.costing-metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
  gap: 8px !important;
  margin-bottom: 0.9rem !important;
}
.cost-metric-card {
  padding: 9px 12px !important;
  gap: 9px !important;
  border-radius: var(--radius-sm) !important;
}
.cost-metric-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 8px !important;
  font-size: 1rem !important;
}
.cost-metric-label {
  font-size: 0.67rem !important;
}
.cost-metric-val {
  font-size: 1rem !important;
  margin: 1px 0 !important;
}
.cost-metric-sub {
  display: none !important;
}

/* ─── 5. MISSING — KPI CARDS (compact) ─── */
.missing-metrics-grid .cost-metric-card {
  padding: 8px 10px !important;
  gap: 8px !important;
}
.missing-metrics-grid .cost-metric-icon {
  width: 30px !important;
  height: 30px !important;
  font-size: 0.9rem !important;
  border-radius: 6px !important;
}
.missing-metrics-grid .cost-metric-val {
  font-size: 0.95rem !important;
}
.missing-metrics-grid .cost-metric-sub {
  display: none !important;
}

/* ─── 6. ORDERS — SUMMARY BAR (compact) ─── */
.orders-summary-bar {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
  gap: 7px !important;
  margin-bottom: 10px !important;
}
.orders-summary-card {
  padding: 8px 11px !important;
  gap: 8px !important;
  border-radius: var(--radius-sm) !important;
}
.orders-stat-icon {
  font-size: 1.3rem !important;
}
.orders-stat-val {
  font-size: 0.95rem !important;
}
.orders-stat-lbl {
  font-size: 0.64rem !important;
}

/* ─── 7. ORDERS — FILTER BOX (أخف وأقل ازدحاماً) ─── */
.orders-filter-box {
  padding: 10px 13px !important;
  margin-bottom: 10px !important;
}
.orders-quick-chips {
  padding-bottom: 8px !important;
  margin-bottom: 8px !important;
}
.orders-quick-btn {
  padding: 4px 10px !important;
  font-size: 0.74rem !important;
}
.orders-filter-row {
  gap: 7px !important;
}

/* ─── 8. FINANCE — METRIC CARDS (compact) ─── */
.metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)) !important;
  gap: 8px !important;
  margin-bottom: 1rem !important;
}
.metric-card {
  padding: 0.85rem !important;
  gap: 0.7rem !important;
  border-radius: var(--radius-md) !important;
}
.metric-icon-box {
  width: 36px !important;
  height: 36px !important;
  font-size: 1rem !important;
}
.metric-info label {
  font-size: 0.66rem !important;
  margin-bottom: 2px !important;
}
.metric-info .value {
  font-size: 1.1rem !important;
}

/* ─── 9. ANALYTICS — KPI GRID (compact) ─── */
.analytics-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
  gap: 8px !important;
  margin-bottom: 14px !important;
}
.analytics-kpi-card {
  padding: 11px 13px !important;
  gap: 10px !important;
  border-radius: var(--radius-sm) !important;
}
.analytics-kpi-icon {
  width: 34px !important;
  height: 34px !important;
  font-size: 1rem !important;
  border-radius: 8px !important;
}
.analytics-kpi-info label {
  font-size: 0.67rem !important;
  margin-bottom: 2px !important;
}
.analytics-kpi-info .val {
  font-size: 1rem !important;
}

/* ─── 10. ANALYTICS — FLOWCHART (more compact) ─── */
.flowchart-card {
  padding: 14px 16px !important;
  margin-bottom: 14px !important;
}
.flow-diagram-container {
  gap: 10px !important;
}
.flow-node {
  padding: 10px 14px !important;
  border-radius: 10px !important;
}
.flow-cost-nodes {
  gap: 8px !important;
}
.node-val {
  font-size: 1.05rem !important;
}
.node-label {
  font-size: 0.72rem !important;
}
.node-pct {
  font-size: 0.68rem !important;
}

/* ─── 11. VIEW HEADERS (تقليل الهواء العمودي) ─── */
.view-header {
  margin-bottom: 1rem !important;
  padding-bottom: 0.75rem !important;
}
.view-header h2 {
  font-size: 1.35rem !important;
}
.view-description {
  font-size: 0.75rem !important;
}

/* ─── 12. CARD PANEL (تقليل هواء الكاردات) ─── */
.card-panel {
  padding: 1rem !important;
  margin-bottom: 1rem !important;
}
.panel-header {
  margin-bottom: 0.85rem !important;
  padding-bottom: 0.65rem !important;
}
.panel-header h3 {
  font-size: 0.95rem !important;
}

/* ─── 13. COSTING SUBTABS (أصغر) ─── */
.costing-tab-btn {
  padding: 6px 12px !important;
  font-size: 0.78rem !important;
}

/* ─── 14. TABLE (أقل هواء) ─── */
.custom-table th {
  padding: 8px 11px !important;
  font-size: 0.67rem !important;
}
.custom-table td {
  padding: 8px 11px !important;
  font-size: 0.82rem !important;
}

/* ─── 15. ORDERS ADVANCED FILTERS — collapsible ─── */
.orders-filter-row-collapsible {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease, margin-top 0.25s ease;
  margin-top: 0;
}
.orders-filter-row-collapsible.expanded {
  max-height: 200px;
  opacity: 1;
  margin-top: 10px;
}
.orders-filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 6px;
}
.orders-filter-toggle-btn:hover {
  background: var(--bg-hover);
  color: var(--brand-dark);
}
.orders-filter-toggle-btn .toggle-arrow {
  transition: transform 0.25s ease;
  display: inline-block;
}
.orders-filter-toggle-btn.expanded .toggle-arrow {
  transform: rotate(180deg);
}

/* ─── 16. FINANCE ARCHIVE — collapsible ─── */
.archive-collapsible {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.28s ease;
}
.archive-collapsible.expanded {
  max-height: 2000px;
  opacity: 1;
}
.archive-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 4px;
}
.archive-toggle-btn:hover {
  background: var(--bg-hover);
  color: var(--brand-dark);
}
.archive-toggle-btn .toggle-arrow {
  transition: transform 0.25s ease;
}
.archive-toggle-btn.expanded .toggle-arrow {
  transform: rotate(180deg);
}

/* ─── Night mode compat ─── */
body.night-mode .orders-filter-toggle-btn,
body.night-mode .archive-toggle-btn {
  background: rgba(255,240,210,0.07);
  border-color: rgba(255,240,210,0.15);
  color: #C8B49E;
}
body.night-mode .orders-filter-toggle-btn:hover,
body.night-mode .archive-toggle-btn:hover {
  background: rgba(255,240,210,0.12);
  color: #FFF7EE;
}

/* ═══════════════════════════════════════════
   MILESTONE 2: POS PAYMENT, CASH CALCULATOR & SHIFT MANAGEMENT
═══════════════════════════════════════════ */
.pos-payment-module {
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pos-pay-methods-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.pos-pay-method-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}
.pos-pay-method-btn:hover {
  border-color: var(--brand-mid);
  background: #FFF9F3;
}
.pos-pay-method-btn.active {
  background: var(--brand-dark);
  color: #FDFAF0;
  border-color: var(--brand-dark);
}
.pos-cash-calc-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}
.pos-calc-input-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pos-calc-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
}
.pos-input-tendered {
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  color: var(--brand-dark) !important;
  text-align: center;
  height: 34px !important;
}
.pos-quick-denominations {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.quick-denom-btn {
  padding: 6px 12px;
  min-height: 38px;
  min-width: 55px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.quick-denom-btn:hover {
  background: var(--brand-mid);
  color: #fff;
  border-color: var(--brand-mid);
}
.pos-change-display-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
}
.pos-change-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}
.pos-change-amount {
  font-weight: 900;
  font-size: 0.95rem;
  color: var(--brand-dark);
}
.pos-change-amount.positive {
  color: #15803D;
}
.pos-change-amount.negative {
  color: #B45309;
}
.pos-split-calc-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}
.pos-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.split-input-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}
.pos-split-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  padding-top: 4px;
  border-top: 1px dashed var(--border-medium);
}
.header-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(197, 160, 115, 0.18);
  border: 1px solid rgba(197, 160, 115, 0.4);
  color: var(--brand-dark);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
}
.header-pill-btn:hover {
  background: rgba(197, 160, 115, 0.32);
}
body.night-mode .pos-payment-module,
body.night-mode .pos-change-display-row,
body.night-mode .pos-pay-method-btn {
  background: #241A13;
  border-color: #3D2D20;
  color: #E6D7C8;
}
body.night-mode .pos-pay-method-btn.active {
  background: #C5A073;
  color: #1A110B;
}
body.night-mode .header-pill-btn {
  background: rgba(197, 160, 115, 0.12);
  border-color: rgba(197, 160, 115, 0.3);
  color: #E2B788;
}

/* ==========================================================================
   ADAMZ BENTO PRO DESIGN SYSTEM (EXECUTIVE DASHBOARD & MODERN SHELL)
   Bento Grid Pro Layout · Layered Elevation · Micro-Interactions · Dark Mode
   ========================================================================== */

/* ── Global Smoothness & Sleek Scrollbars ── */
html {
  scroll-behavior: smooth;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(160, 120, 80, 0.25);
  border-radius: 999px;
  transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(160, 120, 80, 0.45);
}
body.night-mode ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
}
body.night-mode ::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.4);
}

/* ── App Header Styling ── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 246, 242, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(28, 16, 8, 0.08);
  padding: 0.7rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: background 0.25s ease, border-color 0.25s ease;
}
body.night-mode .app-header {
  background: rgba(14, 17, 22, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Central Search Pill */
.header-search-container {
  flex: 1;
  max-width: 440px;
  position: relative;
  display: flex;
  align-items: center;
}
.header-search-icon {
  position: absolute;
  right: 14px;
  color: #9C8975;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.header-search-input {
  width: 100%;
  height: 40px;
  background: #FFFFFF;
  border: 1.5px solid rgba(28, 16, 8, 0.1);
  border-radius: 999px;
  padding: 0 42px 0 16px;
  font-size: 0.84rem;
  font-family: var(--font-sans);
  color: var(--text-main);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.header-search-input::placeholder {
  color: #A08C79;
  font-size: 0.8rem;
}
.header-search-input:focus {
  outline: none;
  border-color: #D4AF37;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15), 0 2px 8px rgba(0, 0, 0, 0.04);
}
body.night-mode .header-search-input {
  background: #181D24;
  border-color: rgba(255, 255, 255, 0.12);
  color: #F3F4F6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
body.night-mode .header-search-input::placeholder {
  color: #7B8494;
}
body.night-mode .header-search-input:focus {
  border-color: #D4AF37;
  background: #1E242D;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.22);
}
body.night-mode .header-search-icon {
  color: #7B8494;
}

/* Header Action Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #1C1008;
  color: #FFFDF9;
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(28, 16, 8, 0.18);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.header-create-btn:hover {
  background: #2E1A0E;
  border-color: #D4AF37;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(28, 16, 8, 0.28);
}
.header-create-btn:active {
  transform: scale(0.97);
}
body.night-mode .header-create-btn {
  background: #D4AF37;
  color: #0E1116;
  border-color: #F59E0B;
  box-shadow: 0 2px 12px rgba(212, 175, 55, 0.25);
}
body.night-mode .header-create-btn:hover {
  background: #E5BE48;
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.4);
}

.header-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1.5px solid rgba(28, 16, 8, 0.1);
  color: #3A2A1A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}
.header-circle-btn:hover {
  background: #F8F5EE;
  border-color: #D4AF37;
  color: #1C1008;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
}
.header-circle-btn:active {
  transform: scale(0.95);
}
body.night-mode .header-circle-btn {
  background: #181D24;
  border-color: rgba(255, 255, 255, 0.1);
  color: #D1D5DB;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
body.night-mode .header-circle-btn:hover {
  background: #222933;
  border-color: #D4AF37;
  color: #FFF7EE;
}

.cloud-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1.5px solid rgba(28, 16, 8, 0.1);
  font-size: 0.78rem;
  font-weight: 700;
  color: #3A2A1A;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.cloud-pill-btn:hover {
  background: #F8F5EE;
  border-color: #D4AF37;
  transform: translateY(-1px);
}
body.night-mode .cloud-pill-btn {
  background: #181D24;
  border-color: rgba(255, 255, 255, 0.1);
  color: #D1D5DB;
}

.cloud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: #22C55E;
}
.cloud-dot.offline {
  background: #9CA3AF;
}

/* User Badge */
.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1.5px solid rgba(28, 16, 8, 0.1);
  border-radius: 999px;
  padding: 4px 12px 4px 6px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-dark);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.user-badge:hover {
  border-color: #D4AF37;
  background: #FAF7F2;
  transform: translateY(-1px);
}
body.night-mode .user-badge {
  background: #181D24;
  border-color: rgba(255, 255, 255, 0.1);
  color: #F3F4F6;
}
.user-badge-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1C1008 0%, #3A2312 100%);
  color: #D4AF37;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid rgba(212, 175, 55, 0.5);
}

/* ── Refined Sidebar with Pill States & Bottom Deck ── */
.app-sidebar {
  background: #FAF9F6 !important;
  border-left: 1.5px solid rgba(28, 16, 8, 0.08) !important;
}
body.night-mode .app-sidebar {
  background: #11141A !important;
  border-left: 1.5px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5) !important;
}
.nav-item {
  border-radius: 12px !important;
  padding: 9px 12px !important;
  font-weight: 600 !important;
  transition: all 0.24s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
.nav-item:hover {
  background: rgba(212, 175, 55, 0.08) !important;
  color: #1C1008 !important;
  transform: translateX(-3px);
}
body.night-mode .nav-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #FFF !important;
  transform: translateX(-3px);
}
.nav-item.active {
  background: #1C1008 !important;
  color: #FFFFFF !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 14px rgba(28, 16, 8, 0.18) !important;
}
body.night-mode .nav-item.active {
  background: #1F2630 !important;
  color: #F9FAFB !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(212, 175, 55, 0.35) !important;
}
.sidebar-bottom-deck {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(28, 16, 8, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body.night-mode .sidebar-bottom-deck {
  border-top-color: rgba(255, 255, 255, 0.08);
}
.sidebar-theme-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(28, 16, 8, 0.04);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-body);
  transition: all 0.16s ease;
}
.sidebar-theme-toggle-row:hover {
  background: rgba(212, 175, 55, 0.14);
}
body.night-mode .sidebar-theme-toggle-row {
  background: rgba(255, 255, 255, 0.05);
  color: #E5E7EB;
}
.sidebar-lock-device-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FECACA;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
}
.sidebar-lock-device-btn:hover {
  background: #FCA5A5;
}
body.night-mode .sidebar-lock-device-btn {
  background: #3B1219;
  border-color: #5C1D24;
  color: #FCA5A5;
}

/* ── Main Viewport Background ── */
.main-viewport {
  background: #F4F5F6;
  min-height: calc(100vh - 60px);
}
body.night-mode .main-viewport {
  background: #0E1116;
}

/* ── Dashboard Executive Header ── */
.dash-exec-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.dash-hero-title {
  font-size: 1.65rem;
  font-weight: 900;
  color: #1C1008;
  letter-spacing: -0.02em;
  margin: 0;
  display: inline-block;
}
body.night-mode .dash-hero-title {
  color: #F9FAFB;
}
.bento-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}
body.night-mode .bento-live-badge {
  background: #064E3B;
  border-color: #059669;
  color: #A7F3D0;
}
.bento-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: pulseLiveDot 2s infinite ease-in-out;
}
.dash-exec-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dash-live-date, .dash-shift-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid rgba(28, 16, 8, 0.08);
  font-size: 0.76rem;
  font-weight: 700;
  color: #5C4B3D;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
body.night-mode .dash-live-date, body.night-mode .dash-shift-tag {
  background: #181D24;
  border-color: rgba(255, 255, 255, 0.08);
  color: #9CA3AF;
}
.dash-shift-tag {
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.35);
  color: #8C6230;
}
body.night-mode .dash-shift-tag {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.35);
  color: #FCD34D;
}

/* ── Master Bento Grid Layout (Matching Visual Reference) ── */
.dash-bento-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(320px, 1fr);
  gap: 20px;
  align-items: start;
}
.dash-bento-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.dash-bento-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Bento Card Primitive (Generous 22px Rounded Corners, Layered Depth) */
.bento-card {
  background: #FFFFFF;
  border-radius: 22px;
  border: 1px solid rgba(28, 16, 8, 0.07);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.035), 0 1px 3px rgba(0, 0, 0, 0.02);
  padding: 24px;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease;
  position: relative;
  overflow: hidden;
}
.bento-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
  border-color: rgba(212, 175, 55, 0.28);
}
body.night-mode .bento-card {
  background: #141820;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
}
body.night-mode .bento-card:hover {
  border-color: rgba(212, 175, 55, 0.35);
  box-shadow: 0 8px 34px rgba(0, 0, 0, 0.6);
}

.bento-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 12px;
}
.bento-card-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bento-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1C1008;
  margin: 0;
  letter-spacing: -0.01em;
}
body.night-mode .bento-card-title {
  color: #F9FAFB;
}
.bento-card-subtitle {
  font-size: 0.74rem;
  color: #7A6552;
}
body.night-mode .bento-card-subtitle {
  color: #9CA3AF;
}

.bento-card-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #F4F5F6;
  border: 1px solid rgba(28, 16, 8, 0.06);
  font-size: 0.74rem;
  font-weight: 700;
  color: #5C4B3D;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
}
.bento-card-filter-pill:hover {
  background: #EAEBED;
  color: #1C1008;
}
body.night-mode .bento-card-filter-pill {
  background: #1C222C;
  border-color: rgba(255, 255, 255, 0.08);
  color: #D1D5DB;
}
body.night-mode .bento-card-filter-pill:hover {
  background: #252D3A;
  color: #FFF;
}

/* ── Top Two Major KPI Sub-Cards Side by Side ── */
.bento-kpi-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
.bento-kpi-subcard {
  background: #FAF9F7;
  border: 1px solid rgba(28, 16, 8, 0.06);
  border-radius: 18px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.bento-kpi-subcard:hover {
  background: #FFFFFF;
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}
body.night-mode .bento-kpi-subcard {
  background: #1A202A;
  border-color: rgba(255, 255, 255, 0.07);
}
body.night-mode .bento-kpi-subcard:hover {
  background: #1F2734;
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.bento-kpi-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bento-kpi-icon-pill {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bento-kpi-icon-pill.icon-blue {
  background: #EFF6FF;
  color: #2563EB;
}
.bento-kpi-icon-pill.icon-gold {
  background: #FEF3C7;
  color: #D97706;
}
body.night-mode .bento-kpi-icon-pill.icon-blue {
  background: #1E3A8A;
  color: #93C5FD;
}
body.night-mode .bento-kpi-icon-pill.icon-gold {
  background: #78350F;
  color: #FDE68A;
}
.bento-kpi-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #6B5B4D;
}
body.night-mode .bento-kpi-label {
  color: #9CA3AF;
}

.bento-kpi-val {
  font-size: 2.2rem;
  font-weight: 900;
  color: #1C1008;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-family: var(--font-sans);
}
body.night-mode .bento-kpi-val {
  color: #F9FAFB;
}

.bento-kpi-sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.bento-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
}
.bento-chip-green {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #86EFAC;
}
.bento-chip-gold {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FCD34D;
}
body.night-mode .bento-chip-green {
  background: #052E16;
  color: #86EFAC;
  border-color: #166534;
}
body.night-mode .bento-chip-gold {
  background: #451A03;
  color: #FDE68A;
  border-color: #B45309;
}
.bento-kpi-sub-text {
  font-size: 0.73rem;
  color: #7A6552;
}
body.night-mode .bento-kpi-sub-text {
  color: #9CA3AF;
}

/* ── Secondary Metrics Trio Strip ── */
.bento-metrics-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 0;
  padding-top: 14px;
  border-top: 1px dashed rgba(28, 16, 8, 0.1);
}
body.night-mode .bento-metrics-trio {
  border-top-color: rgba(255, 255, 255, 0.1);
}
.bento-metric-mini {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bento-mini-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #7A6552;
}
body.night-mode .bento-mini-label {
  color: #9CA3AF;
}
.bento-mini-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1C1008;
  letter-spacing: -0.01em;
}
body.night-mode .bento-mini-val {
  color: #F3F4F6;
}
.bento-mini-sub {
  font-size: 0.68rem;
  color: #9C8975;
}
body.night-mode .bento-mini-sub {
  color: #6B7280;
}

/* ── Product View & Liquidity Minimalist Bar Chart (Matching Reference) ── */
.bento-chart-display-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 22px;
  padding: 16px 20px;
  background: #FAF9F7;
  border-radius: 18px;
  border: 1px solid rgba(28, 16, 8, 0.06);
}
body.night-mode .bento-chart-display-row {
  background: #1A202A;
  border-color: rgba(255, 255, 255, 0.07);
}
.bento-chart-headline {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bento-chart-amount-prefix {
  font-size: 0.78rem;
  font-weight: 700;
  color: #7A6552;
}
body.night-mode .bento-chart-amount-prefix {
  color: #9CA3AF;
}
.bento-chart-amount-val {
  font-size: 2.2rem;
  font-weight: 900;
  color: #1C1008;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-family: var(--font-sans);
}
body.night-mode .bento-chart-amount-val {
  color: #F9FAFB;
}
.bento-chart-amount-sub {
  font-size: 0.72rem;
  color: #9C8975;
}
body.night-mode .bento-chart-amount-sub {
  color: #6B7280;
}

/* Minimalist CSS Bar Chart Graphic */
.bento-bars-graphic {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 110px;
  padding-bottom: 6px;
}
.bento-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 28px;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}
.bento-bar-fill {
  width: 100%;
  height: 100%;
  background: #E5E7EB;
  border-radius: 6px;
  transition: all 0.25s ease;
}
.bento-bar-col:hover .bento-bar-fill {
  background: #D1D5DB;
}
body.night-mode .bento-bar-fill {
  background: #252D3A;
}
body.night-mode .bento-bar-col:hover .bento-bar-fill {
  background: #374151;
}

.bento-bar-col.active .bento-bar-fill.active-gradient {
  background: linear-gradient(180deg, #34D399 0%, #10B981 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
body.night-mode .bento-bar-col.active .bento-bar-fill.active-gradient {
  background: linear-gradient(180deg, #10B981 0%, #059669 100%);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
}

/* Selected Bar Interactive Highlight (Green Ring & Elevation) */
.bento-bar-col.selected-point .bento-bar-fill {
  background: linear-gradient(180deg, #22C55E 0%, #16A34A 100%) !important;
  box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #16A34A, 0 6px 18px rgba(22, 163, 74, 0.5) !important;
  transform: scaleY(1.04);
  transform-origin: bottom;
}
body.night-mode .bento-bar-col.selected-point .bento-bar-fill {
  box-shadow: 0 0 0 2px #11141A, 0 0 0 4px #22C55E, 0 6px 20px rgba(34, 197, 94, 0.55) !important;
}

/* Highlighted Table Row in Green (Bidirectional Synchronization) */
tr.row-selected-green {
  background: rgba(34, 197, 94, 0.14) !important;
  outline: 2px solid #16A34A !important;
  outline-offset: -2px;
  position: relative;
  transition: background 0.25s ease, outline-color 0.25s ease;
}
tr.row-selected-green td {
  color: #14532D !important;
  font-weight: 700 !important;
}
body.night-mode tr.row-selected-green {
  background: rgba(34, 197, 94, 0.22) !important;
  outline: 2px solid #22C55E !important;
}
body.night-mode tr.row-selected-green td {
  color: #DCFCE7 !important;
}

.bento-bar-day {
  font-size: 0.68rem;
  font-weight: 600;
  color: #9C8975;
}
body.night-mode .bento-bar-day {
  color: #6B7280;
}
.bento-bar-day.font-bold {
  font-weight: 800;
  color: #1C1008;
}
body.night-mode .bento-bar-day.font-bold {
  color: #F9FAFB;
}

/* Tooltip on Active Bar */
.bento-bar-tooltip {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: #1C1008;
  color: #FFFDF9;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  gap: 3px;
  z-index: 5;
}
body.night-mode .bento-bar-tooltip {
  background: #D4AF37;
  color: #0E1116;
}
.tooltip-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #22C55E;
}

/* ── Command Hub Quick Action Bento Buttons ── */
.bento-action-pills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.bento-action-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #FAF9F7;
  border: 1px solid rgba(28, 16, 8, 0.08);
  border-radius: 14px;
  cursor: pointer;
  text-align: right;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.bento-action-pill:hover {
  background: #FFFFFF;
  border-color: #D4AF37;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}
.bento-action-pill:active {
  transform: scale(0.98);
}
body.night-mode .bento-action-pill {
  background: #1A202A;
  border-color: rgba(255, 255, 255, 0.07);
}
body.night-mode .bento-action-pill:hover {
  background: #1F2734;
  border-color: #D4AF37;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.bento-action-pill.main-pill {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(255, 255, 255, 0.8) 100%);
  border-color: rgba(212, 175, 55, 0.4);
}
body.night-mode .bento-action-pill.main-pill {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, #1A202A 100%);
  border-color: rgba(212, 175, 55, 0.45);
}
.action-pill-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid rgba(28, 16, 8, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8C6230;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.bento-action-pill:hover .action-pill-icon {
  transform: scale(1.08);
  color: #D4AF37;
}
body.night-mode .action-pill-icon {
  background: #141820;
  border-color: rgba(255, 255, 255, 0.1);
  color: #FDE68A;
}
.action-pill-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.action-pill-text strong {
  font-size: 0.84rem;
  font-weight: 800;
  color: #1C1008;
}
body.night-mode .action-pill-text strong {
  color: #F3F4F6;
}
.action-pill-text small {
  font-size: 0.68rem;
  color: #7A6552;
}
body.night-mode .action-pill-text small {
  color: #9CA3AF;
}

/* ── Kitchen Vibe Inspiration Banner ── */
.bento-vibe-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid rgba(28, 16, 8, 0.07);
  border-radius: 22px;
  padding: 18px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.035), 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease;
}
.bento-vibe-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
  border-color: rgba(212, 175, 55, 0.28);
}
body.night-mode .bento-vibe-card {
  background: #141820;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
}
body.night-mode .bento-vibe-card:hover {
  border-color: rgba(212, 175, 55, 0.35);
  box-shadow: 0 8px 34px rgba(0, 0, 0, 0.6);
}
.vibe-icon-col {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #B45309;
  flex-shrink: 0;
  animation: none !important;
  box-shadow: none;
}
body.night-mode .vibe-icon-col {
  background: rgba(212, 175, 55, 0.2);
  color: #FDE68A;
}
.vibe-content-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.vibe-header-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}
.vibe-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.70rem;
  font-weight: 700;
  color: #8C6230;
  background: rgba(212, 175, 55, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}
body.night-mode .vibe-tag {
  color: #FDE68A;
  background: rgba(212, 175, 55, 0.18);
  border-color: rgba(212, 175, 55, 0.3);
}
.vibe-time {
  font-size: 0.68rem;
  font-weight: 600;
  color: #7A6552;
}
body.night-mode .vibe-time {
  color: #9CA3AF;
}
.vibe-quote {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1C1008;
  line-height: 1.5;
  margin-bottom: 2px;
  font-family: inherit;
}
body.night-mode .vibe-quote {
  color: #F3F4F6;
}
.vibe-author {
  font-size: 0.70rem;
  color: #7A6552;
  font-weight: 600;
}
body.night-mode .vibe-author {
  color: #9CA3AF;
}
.vibe-shuffle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #FFFFFF;
  border: 1px solid rgba(28, 16, 8, 0.12);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #5C4B3D;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
  user-select: none;
}
.vibe-shuffle-btn:hover {
  background: #FAF7F2;
  border-color: #D4AF37;
  color: #1C1008;
}
body.night-mode .vibe-shuffle-btn {
  background: #1F2734;
  border-color: rgba(255, 255, 255, 0.12);
  color: #D1D5DB;
}
body.night-mode .vibe-shuffle-btn:hover {
  background: #252F3F;
  border-color: rgba(212, 175, 55, 0.4);
  color: #F3D082;
}

/* ── Popular Products Filter Tabs & Badges ── */
.dash-popular-filter-group {
  display: inline-flex;
  align-items: center;
  background: #F4F5F6;
  border: 1px solid rgba(28, 16, 8, 0.06);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
}
body.night-mode .dash-popular-filter-group {
  background: #1C222C;
  border-color: rgba(255, 255, 255, 0.08);
}
.dash-filter-btn {
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #7A6552;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
  font-family: inherit;
}
.dash-filter-btn:hover {
  color: #1C1008;
}
.dash-filter-btn.active {
  background: #FFFFFF;
  color: #1C1008;
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
body.night-mode .dash-filter-btn {
  color: #9CA3AF;
}
body.night-mode .dash-filter-btn:hover {
  color: #F3F4F6;
}
body.night-mode .dash-filter-btn.active {
  background: #252D3A;
  color: #F3D082;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

/* ── Category Classification Filter Pills Bar ── */
.dash-category-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin-bottom: 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.dash-category-filter-bar::-webkit-scrollbar {
  display: none;
}
.dash-cat-pill {
  flex-shrink: 0;
  background: #F4F5F6;
  border: 1px solid rgba(28, 16, 8, 0.08);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #7A6552;
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  white-space: nowrap;
}
.dash-cat-pill:hover {
  background: #EAECEE;
  color: #1C1008;
  transform: translateY(-1px);
}
.dash-cat-pill.active {
  background: linear-gradient(135deg, #1C1008 0%, #2D1A0E 100%);
  color: #F3D082;
  border-color: #D4AF37;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(28, 16, 8, 0.18);
}
body.night-mode .dash-cat-pill {
  background: #1C222C;
  border-color: rgba(255, 255, 255, 0.08);
  color: #9CA3AF;
}
body.night-mode .dash-cat-pill:hover {
  background: #252D3A;
  color: #F3F4F6;
}
body.night-mode .dash-cat-pill.active {
  background: linear-gradient(135deg, #D4AF37 0%, #B89628 100%);
  color: #120B07;
  border-color: #FDE68A;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}
.bento-prod-qty-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.14);
  color: #8C6230;
  border: 1px solid rgba(212, 175, 55, 0.28);
}
body.night-mode .bento-prod-qty-badge {
  background: rgba(212, 175, 55, 0.2);
  color: #FDE68A;
  border-color: rgba(212, 175, 55, 0.35);
}
.bento-rank-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #1C1008;
  color: #D4AF37;
  font-size: 0.58rem;
  font-weight: 900;
  border-radius: 999px;
  padding: 1px 4px;
  line-height: 1;
  border: 1px solid rgba(212, 175, 55, 0.4);
}
body.night-mode .bento-rank-badge {
  background: #000000;
  color: #FDE68A;
  border-color: rgba(212, 175, 55, 0.6);
}
.bento-prod-thumb {
  position: relative;
}

/* ── Popular Products Card (Matching Visual Reference Top-Right) ── */
.bento-popular-card {
  padding: 22px;
}
.bento-products-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.bento-product-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #FAF9F7;
  border: 1px solid rgba(28, 16, 8, 0.05);
  transition: all 0.16s ease;
}
.bento-product-item:hover {
  background: #FFFFFF;
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
body.night-mode .bento-product-item {
  background: #1A202A;
  border-color: rgba(255, 255, 255, 0.06);
}
body.night-mode .bento-product-item:hover {
  background: #1F2734;
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.bento-prod-thumb {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.bento-prod-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.bento-prod-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: #1C1008;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.night-mode .bento-prod-name {
  color: #F3F4F6;
}
.bento-prod-cat {
  font-size: 0.68rem;
  color: #8C6230;
}
body.night-mode .bento-prod-cat {
  color: #9CA3AF;
}
.bento-prod-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.bento-prod-price {
  font-size: 0.84rem;
  font-weight: 800;
  color: #1C1008;
  font-family: var(--font-sans);
}
body.night-mode .bento-prod-price {
  color: #F3F4F6;
}
.bento-status-pill {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  text-transform: uppercase;
}
.bento-status-pill.green {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #86EFAC;
}
body.night-mode .bento-status-pill.green {
  background: #052E16;
  color: #86EFAC;
  border-color: #166534;
}

.bento-full-pill-btn {
  width: 100%;
  padding: 10px;
  border-radius: 999px;
  background: #1C1008;
  color: #FFFFFF;
  border: none;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.bento-full-pill-btn:hover {
  background: #2E1A0E;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(28, 16, 8, 0.2);
}
body.night-mode .bento-full-pill-btn {
  background: #D4AF37;
  color: #0E1116;
}
body.night-mode .bento-full-pill-btn:hover {
  background: #E5BE48;
}

/* ── Stock Shortage & Financial Summary Radar Cards ── */
.bento-radar-card, .bento-summary-card {
  padding: 20px;
}
.bento-radar-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #FEF3C7;
  color: #B45309;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
body.night-mode .bento-radar-icon {
  background: #451A03;
  color: #FDE68A;
}
.radar-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.radar-stat-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.82rem;
  color: #5C4B3D;
  border-bottom: 1px dashed rgba(28, 16, 8, 0.07);
}
body.night-mode .radar-stat-line {
  color: #9CA3AF;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.radar-stat-line.total-line {
  border-bottom: none;
  padding-top: 10px;
  font-weight: 800;
  color: #1C1008;
}
body.night-mode .radar-stat-line.total-line {
  color: #F3F4F6;
}

/* ── Recent Transactions Table (Matching Visual Reference Bottom-Right List) ── */
.bento-orders-card {
  padding: 22px;
}
.bento-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8rem;
}
.bento-table th {
  background: #FAF9F7;
  color: #7A6552;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 10px 12px;
  border-bottom: 1.5px solid rgba(28, 16, 8, 0.08);
  text-align: right;
}
body.night-mode .bento-table th {
  background: #1A202A;
  color: #9CA3AF;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.bento-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(28, 16, 8, 0.06);
  color: #2E1A0E;
  vertical-align: middle;
}
body.night-mode .bento-table td {
  border-bottom-color: rgba(255, 255, 255, 0.06);
  color: #E5E7EB;
}
.bento-table tbody tr:hover td {
  background: #FAF9F7;
}
body.night-mode .bento-table tbody tr:hover td {
  background: #1A202A;
}

/* ── Responsive Breakpoints for Bento Grid ── */
@media (max-width: 1200px) {
  .dash-bento-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .app-header {
    padding: 0.6rem 1rem;
    gap: 0.75rem;
  }
  .header-search-container {
    max-width: 220px;
  }
  .bento-kpi-pair {
    grid-template-columns: 1fr;
  }
  .bento-metrics-trio {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .bento-avatars-deck {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-chart-display-row {
    flex-direction: column;
    align-items: stretch;
  }
  .bento-bars-graphic {
    width: 100%;
    justify-content: space-between;
  }
  .bento-action-pills-grid {
    grid-template-columns: 1fr;
  }
  .dash-exec-header {
    flex-direction: column;
  }
}
@media (max-width: 480px) {
  .header-search-container {
    display: none;
  }
  .header-create-btn span {
    display: none;
  }
  .bento-card {
    padding: 16px;
    border-radius: 18px;
  }
  .bento-kpi-val {
    font-size: 1.8rem;
  }
  .bento-chart-amount-val {
    font-size: 1.8rem;
  }
  .bento-avatars-deck {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════════
   FINANCIAL CONTROL, DAILY CLOSING & CASHIER DISCOUNT STYLES
   ══════════════════════════════════════════════════════════════ */

/* ── Financial Period Control Bar ── */
.fin-period-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--bg-subtle, #F8FAFC);
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-light, #E2E8F0);
  margin-top: 14px;
  margin-bottom: 18px;
}

.fin-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.04);
  padding: 4px;
  border-radius: 10px;
}
body.dark-mode .fin-tabs {
  background: rgba(255, 255, 255, 0.06);
}

.fin-tab-btn {
  background: transparent;
  border: none;
  outline: none;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted, #64748B);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}
.fin-tab-btn:hover {
  color: var(--text-dark, #0F172A);
  background: rgba(0, 0, 0, 0.03);
}
.fin-tab-btn.active {
  background: #FFF;
  color: var(--brand-dark, #1E293B);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
body.dark-mode .fin-tab-btn.active {
  background: #1E293B;
  color: #F8FAFC;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.fin-date-stepper-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.fin-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #FFF;
  border: 1px solid var(--border-light, #CBD5E1);
  color: var(--text-dark, #334155);
  cursor: pointer;
  transition: all 0.15s ease;
}
.fin-nav-btn:hover {
  background: var(--bg-hover, #F1F5F9);
  border-color: var(--border-medium, #94A3B8);
}
body.dark-mode .fin-nav-btn {
  background: #1E293B;
  border-color: #334155;
  color: #F1F5F9;
}

.fin-date-input {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-light, #CBD5E1);
  background: #FFF;
  color: var(--text-dark, #0F172A);
  outline: none;
  min-width: 140px;
  text-align: center;
  height: 32px;
}
body.dark-mode .fin-date-input {
  background: #1E293B;
  border-color: #334155;
  color: #F1F5F9;
}

.fin-now-btn {
  background: #FFF;
  border: 1px solid var(--border-light, #CBD5E1);
  color: var(--text-dark, #334155);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  height: 32px;
}
.fin-now-btn:hover {
  background: var(--bg-hover, #F1F5F9);
}
body.dark-mode .fin-now-btn {
  background: #1E293B;
  border-color: #334155;
  color: #F1F5F9;
}

.fin-range-pill {
  font-size: 0.78rem;
  font-weight: 800;
  color: #2563EB;
  background: rgba(37, 99, 235, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

/* ── Closing Badge States ── */
.badge-closing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  transition: all 0.2s ease;
}
.badge-closing .badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.badge-closing.open {
  background: rgba(22, 163, 74, 0.1);
  color: #16A34A;
  border: 1px solid rgba(22, 163, 74, 0.25);
}
.badge-closing.open .badge-dot {
  background: #16A34A;
  box-shadow: 0 0 6px #16A34A;
}
.badge-closing.closed {
  background: rgba(100, 116, 139, 0.1);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.25);
}
.badge-closing.closed .badge-dot {
  background: #475569;
}
.badge-closing.reconciliation_required {
  background: rgba(217, 119, 6, 0.12);
  color: #D97706;
  border: 1px solid rgba(217, 119, 6, 0.35);
}
.badge-closing.reconciliation_required .badge-dot {
  background: #D97706;
  box-shadow: 0 0 6px #D97706;
}
.badge-closing.adjusted {
  background: rgba(124, 58, 237, 0.1);
  color: #7C3AED;
  border: 1px solid rgba(124, 58, 237, 0.25);
}
.badge-closing.adjusted .badge-dot {
  background: #7C3AED;
}

/* ── 9 Authoritative Financial Metrics Grid ── */
.fin-nine-kpis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
@media (max-width: 900px) {
  .fin-nine-kpis-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .fin-nine-kpis-grid {
    grid-template-columns: 1fr;
  }
}

.fin-kpi-box {
  background: #FFF;
  border: 1px solid var(--border-light, #E2E8F0);
  border-radius: 14px;
  padding: 14px 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.fin-kpi-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}
body.dark-mode .fin-kpi-box {
  background: #1E293B;
  border-color: #334155;
}
.fin-kpi-box.highlight-box {
  border: 1.5px solid #10B981;
  background: rgba(16, 185, 129, 0.03);
}
.fin-kpi-box.highlight-result-box {
  border: 1.5px solid #22C55E;
  background: rgba(34, 197, 94, 0.04);
}

.fin-kpi-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.fin-kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.fin-kpi-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted, #64748B);
}
.fin-kpi-val {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text-dark, #0F172A);
  line-height: 1.2;
  margin-bottom: 4px;
}
body.dark-mode .fin-kpi-val {
  color: #F8FAFC;
}
.fin-kpi-sub {
  font-size: 0.7rem;
  color: var(--text-light, #94A3B8);
}

/* ── Payment Methods Breakdown Card & Grid ── */
.bento-payment-breakdown-card {
  margin-top: 20px;
}
.payment-methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.pay-method-card {
  background: #FFF;
  border: 1px solid var(--border-light, #E2E8F0);
  border-radius: 14px;
  padding: 14px 16px;
  transition: all 0.2s ease;
}
.pay-method-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}
body.dark-mode .pay-method-card {
  background: #1E293B;
  border-color: #334155;
}

.pay-method-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.pay-method-name {
  font-size: 0.8rem;
  font-weight: 800;
}
.pay-method-pct {
  font-size: 0.82rem;
  font-weight: 900;
}
.pay-method-amount {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-dark, #0F172A);
  margin-bottom: 8px;
}
body.dark-mode .pay-method-amount {
  color: #F8FAFC;
}
.pay-method-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
body.dark-mode .pay-method-bar {
  background: rgba(255, 255, 255, 0.08);
}
.pay-method-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.pay-method-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted, #64748B);
}

/* ── Cashier Discount Chips (>20% Manager Req) ── */
.pos-disc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.disc-chip.manager-req {
  position: relative;
  border-color: rgba(217, 119, 6, 0.35);
}
.disc-chip.manager-req:hover {
  border-color: #D97706;
}
.disc-chip.manager-req.active {
  background: #D97706 !important;
  color: #FFF !important;
  border-color: #D97706 !important;
}
.disc-chip .lock-dot {
  font-size: 0.65rem;
  margin-right: 2px;
  opacity: 0.85;
}

/* ══════════════════════════════════════════════════════════════
   UNIFIED DASHBOARD STYLING ACROSS ALL PAGES (ONE COHESIVE SYSTEM)
   ══════════════════════════════════════════════════════════════ */

/* ── 1. Unified Card Panels matching Bento Style ── */
.card-panel {
  background: var(--bg-surface, #FFFFFF) !important;
  border: 1px solid rgba(28, 16, 8, 0.07) !important;
  border-radius: 22px !important;
  padding: 22px 24px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.035), 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease !important;
  margin-bottom: 20px !important;
  position: relative !important;
  overflow: hidden !important;
}
.card-panel:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(212, 175, 55, 0.28) !important;
}
body.night-mode .card-panel {
  background: #141820 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}
body.night-mode .card-panel:hover {
  border-color: rgba(212, 175, 55, 0.35) !important;
  box-shadow: 0 8px 34px rgba(0, 0, 0, 0.6) !important;
}

.panel-header {
  border-bottom: 1px solid rgba(28, 16, 8, 0.06) !important;
  padding-bottom: 14px !important;
  margin-bottom: 16px !important;
}
body.night-mode .panel-header {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}
.panel-header h3 {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #1C1008 !important;
  letter-spacing: -0.01em !important;
}
body.night-mode .panel-header h3 {
  color: #F9FAFB !important;
}

/* ── 2. Unified Page Headers across all views ── */
.view-header {
  border-bottom: 1px solid rgba(28, 16, 8, 0.07) !important;
  padding-bottom: 18px !important;
  margin-bottom: 22px !important;
}
body.night-mode .view-header {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}
.view-title-box h2 {
  font-size: 1.6rem !important;
  font-weight: 900 !important;
  color: #1C1008 !important;
  letter-spacing: -0.02em !important;
}
body.night-mode .view-title-box h2 {
  color: #F9FAFB !important;
}
.view-description {
  font-size: 0.8rem !important;
  color: #7A6552 !important;
  margin-top: 4px !important;
}
body.night-mode .view-description {
  color: #9CA3AF !important;
}

/* ── 3. Unified Metric Cards across all views (Orders, Costing, Missing, Finance) ── */
.cost-metric-card,
.orders-summary-card,
.analytics-kpi-card,
.metric-card {
  background: var(--bg-surface, #FFFFFF) !important;
  border: 1px solid rgba(28, 16, 8, 0.07) !important;
  border-radius: 18px !important;
  padding: 16px 18px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.cost-metric-card:hover,
.orders-summary-card:hover,
.analytics-kpi-card:hover,
.metric-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06) !important;
  border-color: rgba(212, 175, 55, 0.3) !important;
}
body.night-mode .cost-metric-card,
body.night-mode .orders-summary-card,
body.night-mode .analytics-kpi-card,
body.night-mode .metric-card {
  background: #141820 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4) !important;
}
body.night-mode .cost-metric-card:hover,
body.night-mode .orders-summary-card:hover,
body.night-mode .analytics-kpi-card:hover,
body.night-mode .metric-card:hover {
  border-color: rgba(212, 175, 55, 0.35) !important;
}

/* ── 4. Unified Tables with subtle rounded borders & hover rows ── */
.custom-table {
  border-radius: 14px !important;
  overflow: hidden !important;
}
.custom-table th {
  background: #FAF9F7 !important;
  color: #6B5B4D !important;
  font-weight: 800 !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.05em !important;
  padding: 12px 16px !important;
  border-bottom: 1.5px solid rgba(28, 16, 8, 0.07) !important;
}
body.night-mode .custom-table th {
  background: #1A202A !important;
  color: #9CA3AF !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}
.custom-table td {
  padding: 13px 16px !important;
  border-bottom: 1px solid rgba(28, 16, 8, 0.05) !important;
  font-size: 0.86rem !important;
  color: #1C1008 !important;
}
body.night-mode .custom-table td {
  border-bottom-color: rgba(255, 255, 255, 0.05) !important;
  color: #F3F4F6 !important;
}
.custom-table tr:hover td {
  background: #FAF9F7 !important;
}
body.night-mode .custom-table tr:hover td {
  background: #1F2734 !important;
}

/* ── 5. Unified Filter Bars & Pill Buttons ── */
.orders-filter-box,
.menu-cats-filter-bar,
.pos-categories-deck,
.fin-filter-bar {
  background: var(--bg-surface, #FFFFFF) !important;
  border: 1px solid rgba(28, 16, 8, 0.07) !important;
  border-radius: 18px !important;
  padding: 14px 18px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.025) !important;
}
body.night-mode .orders-filter-box,
body.night-mode .menu-cats-filter-bar,
body.night-mode .pos-categories-deck,
body.night-mode .fin-filter-bar {
  background: #141820 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ── 6. Form Controls Matching Bento Input Aesthetic ── */
.form-control {
  border-radius: 12px !important;
  border: 1.2px solid rgba(28, 16, 8, 0.1) !important;
  background: #FAF9F7 !important;
  padding: 9px 13px !important;
  font-size: 0.85rem !important;
  transition: all 0.18s ease !important;
}
.form-control:focus {
  border-color: #D4AF37 !important;
  background: #FFFFFF !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15) !important;
  outline: none !important;
}
body.night-mode .form-control {
  background: #1A202A !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #F9FAFB !important;
}
body.night-mode .form-control:focus {
  background: #1F2734 !important;
  border-color: #D4AF37 !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25) !important;
}

/* ── 7. Unified Action Buttons (Pill-shaped, modern) ── */
.btn {
  border-radius: 12px !important;
  font-weight: 700 !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.btn:hover {
  transform: translateY(-1px) !important;
}
.btn:active {
  transform: scale(0.98) !important;
}
.btn-primary {
  background: linear-gradient(135deg, #1C1008 0%, #2D1A0E 100%) !important;
  color: #F3D082 !important;
  border: 1px solid #D4AF37 !important;
  box-shadow: 0 2px 8px rgba(28, 16, 8, 0.2) !important;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #2D1A0E 0%, #452814 100%) !important;
  color: #FFF !important;
  box-shadow: 0 4px 14px rgba(28, 16, 8, 0.3) !important;
}
body.night-mode .btn-primary {
  background: linear-gradient(135deg, #D4AF37 0%, #B89628 100%) !important;
  color: #120B07 !important;
  border-color: #FDE68A !important;
}
body.night-mode .btn-primary:hover {
  background: linear-gradient(135deg, #E2BD89 0%, #C49B24 100%) !important;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4) !important;
}


