/* ==========================================
   ADAM'S KITCHEN — STYLESHEET
   Minimal · Espresso Brown · Off-White
   ========================================== */

@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;900&display=swap');

:root {
  --brand-dark:   #1C1008;
  --brand-brown:  #2E1A0E;
  --brand-mid:    #5C3D2B;
  --brand-tan:    #A07850;
  --brand-warm:   #C9A87C;

  /* ── Ivory (سن الفيل) palette ── */
  --bg-primary:          #FDFAF0;   /* ivory — warm white with a hint of yellow */
  --bg-surface:          #FFFEF6;   /* slightly brighter ivory for cards */
  --bg-surface-elevated: #FFFEF9;   /* near-white ivory */
  --bg-subtle:           #F5F0DC;   /* deeper ivory / aged parchment */
  --bg-hover:            #EDE8D0;   /* hover: warm tan */
  --bg-dark-section:     #1C1008;

  --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);

  --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:   3px;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-full: 9999px;

  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-sans:    'Plus Jakarta Sans', 'Cairo', system-ui, sans-serif;
  --transition-fast:   0.16s cubic-bezier(0.4,0,0.2,1);
  --transition-normal: 0.26s cubic-bezier(0.4,0,0.2,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;
  -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 ARROW TOGGLE ════ */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 16, 10, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1190;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.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, #2A1A0E 0%, #452B18 100%);
  color: #FFF;
  border: 1.5px solid #C9A882;
  border-right: none;
  border-radius: 12px 0 0 12px;
  padding: 12px 7px 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: -4px 0 20px rgba(0,0,0,0.25);
  transition: right 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s ease, background 0.2s ease;
  user-select: none;
}
.sidebar-floating-toggle:hover {
  background: linear-gradient(135deg, #3D2614 0%, #5E3C22 100%);
  box-shadow: -6px 0 24px rgba(0,0,0,0.35);
}
.sidebar-floating-toggle .sidebar-toggle-arrow {
  font-size: 1.05rem;
  font-weight: 900;
  color: #F59E0B;
  transition: transform 0.28s ease;
  line-height: 1;
}
.sidebar-floating-toggle .sidebar-toggle-label {
  font-size: 0.68rem;
  font-weight: 700;
  writing-mode: vertical-rl;
  letter-spacing: 0.08em;
  color: #FDFAF0;
}
.sidebar-floating-toggle.open {
  right: 285px;
}
.sidebar-floating-toggle.open .sidebar-toggle-arrow {
  transform: rotate(180deg);
}

.sidebar-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.5rem 0.75rem;
  border-bottom: 1.5px solid var(--border-light, #F0E6D8);
  margin-bottom: 0.5rem;
}
.sidebar-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--brand-dark, #2A1A0E);
}
.sidebar-close-btn {
  background: var(--bg-subtle, #F5F0E8);
  border: 1px solid var(--border-light, #E6D0B3);
  color: var(--text-muted, #7C6853);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.18s ease;
}
.sidebar-close-btn:hover {
  background: #FEE2E2;
  color: #B91C1C;
  border-color: #FCA5A5;
}

.app-sidebar {
  position: fixed !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 285px !important;
  height: 100vh !important;
  background: #FFFDF9 !important;
  border-left: 1.5px solid var(--border-medium, #E6D0B3) !important;
  border-inline-end: none !important;
  box-shadow: -8px 0 32px rgba(42, 26, 14, 0.16) !important;
  z-index: 1200 !important;
  transform: translateX(105%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 1rem 0.85rem !important;
  gap: 4px !important;
  overflow-y: auto !important;
}
.app-sidebar.open {
  transform: translateX(0) !important;
}

.nav-section-label {
  font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--text-light);
  padding: 0.9rem 0.6rem 0.35rem;
  font-weight: 700; font-family: var(--font-sans);
  border-top: 1px solid var(--border-light);
  margin-top: 3px;
}
.nav-section-label:first-child { border-top: none; margin-top: 0; padding-top: 0; }

.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 11px; border-radius: var(--radius-md);
  color: var(--text-muted); text-decoration: none;
  font-size: 0.855rem; font-weight: 500; cursor: pointer;
  transition: var(--transition-fast); border: 1px solid transparent;
  user-select: none;
}
.nav-item:hover { background: var(--bg-hover); color: var(--brand-dark); }
.nav-item.active {
  background: var(--brand-dark); color: var(--text-on-dark);
  font-weight: 600;
  box-shadow: 0 3px 12px rgba(28,16,8,0.2);
}
.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; }

/* ════ 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: linear-gradient(135deg, #FFFDF9 0%, #FAF4EB 100%);
  border: 1.5px solid #E6D5C3;
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(92, 56, 30, 0.05);
  position: relative;
  overflow: hidden;
}

.kitchen-vibe-card::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(to bottom, var(--brand-brown), var(--brand-tan));
  border-radius: 0 4px 4px 0;
}

.vibe-icon-col {
  font-size: 2.2rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFF;
  border-radius: 50%;
  box-shadow: 0 3px 12px rgba(92, 56, 30, 0.1);
  flex-shrink: 0;
  animation: vibeFloat 3s ease-in-out infinite;
}

@keyframes vibeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.vibe-content-col {
  flex: 1;
  min-width: 0;
}

.vibe-header-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.vibe-tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--brand-brown);
  background: rgba(92, 56, 30, 0.08);
  padding: 2px 9px;
  border-radius: 20px;
}

.vibe-time {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
}

.vibe-quote {
  font-size: 0.95rem;
  font-weight: 700;
  color: #2C180C;
  line-height: 1.5;
  margin-bottom: 2px;
}

.vibe-author {
  font-size: 0.75rem;
  color: var(--brand-tan);
  font-weight: 600;
}

.vibe-shuffle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #FFF;
  border-color: #DCC7B0;
  color: #5C381E;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 20px;
  transition: all 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
}

.vibe-shuffle-btn:hover {
  background: #5C381E;
  color: #FFF;
  border-color: #5C381E;
  transform: scale(1.04);
}

@media (max-width: 600px) {
  .kitchen-vibe-card {
    flex-direction: column;
    text-align: center;
    padding: 14px;
    gap: 10px;
  }
  .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;
}

/* Pulsing Online Orders Header Alert */
.btn-online-pulse {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #1E40AF 0%, #2563EB 100%);
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.btn-online-pulse:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.55);
  background: linear-gradient(135deg, #1D4ED8 0%, #3B82F6 100%);
}
.btn-online-pulse:active {
  transform: translateY(1px);
}
.online-pulse-dot {
  width: 8px;
  height: 8px;
  background: #60A5FA;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.7);
  animation: pulse-ring-glow 1.5s infinite;
}
@keyframes pulse-ring-glow {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.8);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(96, 165, 250, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0);
  }
}

/* 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;
  }
}

/* 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: 3px;
}
.pos-qty-btn {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--brand-dark);
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.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: brightness(0) invert(1) drop-shadow(0 2px 10px rgba(226, 189, 137, 0.35)) !important;
}
body.night-mode .brand-logo-wrap .kitchen-word {
  color: #D4AF37 !important;
}
body.night-mode .splash-logo-img {
  filter: brightness(0) invert(1) drop-shadow(0 4px 22px rgba(226, 189, 137, 0.4)) !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-total-row {
  background: #1B1511 !important;
  border-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .pos-total-val {
  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;
}
  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-total-row {
  background: #1B1511 !important;
  border-color: rgba(255, 240, 220, 0.12) !important;
}
body.night-mode .pos-total-val {
  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;
}
