﻿:root {
  /* Dark Theme (Default) */
  --bg-color: radial-gradient(circle at top, #0b1220, #020617 55%);
  --bg-card: rgba(15, 23, 42, 0.6);
  --bg-soft: rgba(30, 41, 59, 0.4);
  --border: rgba(148, 163, 184, 0.15);
  --text-main: #f9fafb;
  --text-muted: #94a3b8;

  /* Mappings for existing rules */
  --text-color: var(--text-main);
  --card-bg: var(--bg-card);
  --card-border: var(--border);
  --input-bg: rgba(15, 23, 42, 0.8);
  --input-border: rgba(148, 163, 184, 0.3);

  --primary: #f97316;
  --primary-dark: #ea580c;
  --accent: #22c55e;

  --sidebar-bg: rgba(15, 23, 42, 0.65);
  --sidebar-border: rgba(148, 163, 184, 0.1);
  --sidebar-glass: blur(16px);

  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.3);
}

body.light-mode {
  /* Light Theme */
  --bg-color: #f3f4f6;
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-soft: #f9fafb;
  --border: #e5e7eb;
  --text-main: #0f172a;
  --text-muted: #6b7280;

  /* Mappings */
  --text-color: var(--text-main);
  --card-bg: var(--bg-card);
  --card-border: var(--border);
  --input-bg: #ffffff;
  --input-border: #e5e7eb;

  --sidebar-bg: rgba(255, 255, 255, 0.75);
  --sidebar-border: rgba(229, 231, 235, 0.6);

  --shadow-soft: 0 16px 36px rgba(15, 23, 42, 0.05);
}

/* Global */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden !important;
  /* Prevent main window scroll */
}

body {
  margin: 0;
  font-family: "Tajawal", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  transition: background 0.35s ease, color 0.25s ease;
  -webkit-font-smoothing: antialiased;
}

/* ===== Login screen ===== */

.login-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(circle at top, rgba(59, 130, 246, 0.26), transparent 55%),
    radial-gradient(circle at bottom, rgba(249, 115, 22, 0.18), transparent 50%),
    var(--bg-color);
  overflow: hidden;
  z-index: 9999;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border-radius: 22px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  padding: 22px 20px 18px;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: -80px;
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 55%);
  opacity: 0.7;
  pointer-events: none;
}

.login-brand,
.login-form,
.login-message {
  position: relative;
  z-index: 1;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.login-badge {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: conic-gradient(from 200deg, #f97316, #facc15, #fb923c, #f97316);
  padding: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.2);
}

.login-badge span,
.login-badge {
  font-weight: 800;
}

.login-badge::before {
  content: "M";
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f9fafb;
  font-size: 16px;
}

.login-brand-text {
  display: flex;
  flex-direction: column;
}

.login-brand-title {
  font-size: 16px;
  font-weight: 700;
}

.login-brand-sub {
  font-size: 12px;
  color: var(--muted-text);
}

.login-title {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 6px;
  text-align: center;
}

.login-subtitle {
  font-size: 12px;
  color: var(--muted-text);
  text-align: center;
  margin-bottom: 16px;
}

.login-form label {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
  color: var(--muted-text);
}

.login-form input {
  width: 100%;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 13px;
  margin-bottom: 10px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.login-form input:focus {
  border-color: rgba(59, 130, 246, 0.85);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.5);
}

/* Full-width primary btn (login) */

.btn-primary-full {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 9px 0;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.25);
  margin-top: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-primary-full i {
  font-size: 13px;
}

.btn-primary-full:hover {
  transform: translateY(-1px);
  opacity: 0.97;
}

.btn-primary-full:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.25);
}

.login-message {
  margin-top: 8px;
  font-size: 12px;
  color: #fca5a5;
  text-align: center;
  min-height: 16px;
}

/* ===== Layout ===== */

#app-shell {
  display: none;
  min-height: 100vh;
}

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  height: 100vh;
  /* Fixed height */
  overflow: hidden;
  /* Prevent body scroll */
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ===== Main Content ===== */

.main {
  height: 100%;
  overflow-y: auto;
  padding: 24px 32px;
  position: relative;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.main::-webkit-scrollbar {
  display: none;
}

/* ===== Sidebar ===== */

/* Sidebar Container */
.sidebar {
  width: 280px;
  background: var(--sidebar-bg);
  border-left: 1px solid var(--sidebar-border);
  /* Visible separator */
  /* RTL: border-left */
  padding: 16px;
  display: flex;
  flex-direction: column;
  height: 100%;
  /* Fill grid */
  /* position: sticky; removed */
  /* top: 0; removed */
  overflow-y: auto;
  z-index: 100;
  transition: all 0.3s ease;

  /* Hide Scrollbar */
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
  backdrop-filter: var(--sidebar-glass);
  -webkit-backdrop-filter: var(--sidebar-glass);
}

.sidebar::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari/Opera */
}

/* Main Content Scrollbar Hiding */
.main {
  height: 100%;
  overflow-y: auto;
  padding: 24px 32px;
  position: relative;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.main::-webkit-scrollbar {
  display: none;
}

/* Brand Section */
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  opacity: 0.8;
}

.subscription-status {
  margin-top: 8px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-muted);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.subscription-status.active {
  background: rgba(34, 197, 94, 0.1);
  color: var(--accent);
  border-color: rgba(34, 197, 94, 0.2);
}

.subscription-status.expiring {
  background: rgba(249, 115, 22, 0.1);
  color: var(--primary);
  border-color: rgba(249, 115, 22, 0.2);
}

.subscription-status.expired {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

/* Navigation */
.nav-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  padding-right: 12px;
  /* RTL alignment */
  opacity: 0.6;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  margin: 0;
}

.nav-item button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-main) !important;
  /* Almost Black with !important */
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}



.nav-item button i {
  font-size: 18px;
  width: 24px;
  text-align: center;
  transition: color 0.2s ease;
  color: var(--text-muted) !important;
  /* Dark gray with !important */
  opacity: 1;
}

/* Active State */
.nav-item button.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.25);
  border-color: transparent;
}

.nav-item button.active i {
  color: white;
  opacity: 1;
}

/* Sidebar Footer */
.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-bottom: 24px;
}

.logout-btn {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fecaca;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

body.dark-theme .logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
}

.page-sub {
  font-size: 14px;
  color: var(--muted-text);
}

/* Topbar actions */

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

#theme-toggle-btn {
  border: 1px solid var(--sidebar-border);
  background: var(--input-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
  transition: transform 0.12s ease, box-shadow 0.16s ease, background 0.18s ease, border-color 0.18s ease;
}

#theme-toggle-btn i {
  font-size: 15px;
}

#theme-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.15);
}

.menu-link-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 12px;
  color: var(--muted-text);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body.light-mode .menu-link-box {
  background: rgba(255, 255, 255, 0.9);
}

.menu-link-box span:first-child {
  opacity: 0.85;
}

.menu-link-box span:last-child {
  color: #38bdf8;
  cursor: pointer;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== Cards ===== */

.card {
  background: var(--card-bg);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  margin-bottom: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title i {
  color: var(--accent-blue);
  font-size: 14px;
}

.card-subtitle {
  font-size: 12px;
  color: var(--muted-text);
  margin-top: 4px;
}

.card-body {
  padding: 18px 20px 20px;
}

/* ===== Generic Buttons (used in header / modals / actions) ===== */

.primary-btn,
.secondary-btn {
  border-radius: 999px;
  padding: 7px 14px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease,
    border-color 0.18s ease;
}

.primary-btn i,
.secondary-btn i {
  font-size: 12px;
}

.primary-btn {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.35);
}

.primary-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.25);
}

.secondary-btn {
  background: var(--input-bg);
  color: var(--text-color);
  border-color: var(--input-border);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.secondary-btn:hover {
  background: rgba(148, 163, 184, 0.2);
}

/* ===== Controls Row ===== */

.controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 180px;
  position: relative;
}

.search-input i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-text);
  font-size: 13px;
}

.search-input input {
  width: 100%;
  padding: 8px 36px 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-input input::placeholder {
  color: var(--muted-text);
}

.search-input input:focus {
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.55);
}

.filter-select {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 13px;
  outline: none;
}

/* ===== Menu Status Switch ===== */

.products-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.switch-label {
  font-size: 12px;
  font-weight: 600;
  color: #22c55e;
}

.switch {
  width: 34px;
  height: 18px;
  background: #22c55e;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 0.25s ease;
}

.switch.off {
  background: #ef4444;
}

.switch-circle {
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left 0.25s ease;
}

.switch.off .switch-circle {
  left: 18px;
}

/* ===== Table ===== */

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--table-border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
}

body.light-mode .table-wrapper {
  background: rgba(255, 255, 255, 0.98);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  background: var(--table-head-bg);
  color: var(--text-color);
  font-weight: 600;
  text-align: right;
  padding: 10px 14px;
  border-bottom: 1px solid var(--table-border);
  white-space: nowrap;
}

.table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--table-border);
  color: var(--text-color);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover td {
  background: var(--table-row-hover);
}

/* Status badge */

.badge-status {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.badge-status.on {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.badge-status.off {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Table actions */

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.table-btn {
  border: none;
  border-radius: 6px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0 10px;
  font-size: 11px;
  gap: 4px;
  font-family: inherit;
  font-weight: 500;
}

.table-btn i {
  font-size: 11px;
}

.table-btn:hover {
  transform: translateY(-1px);
}

.btn-edit {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.btn-edit:hover {
  background: rgba(59, 130, 246, 0.2);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-delete {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.btn-delete:hover {
  background: rgba(239, 68, 68, 0.2);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-options {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.btn-options:hover {
  background: rgba(139, 92, 246, 0.2);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

/* ===== Modals ===== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  /* Reverted to moderate opacity */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal {
  background: rgba(15, 23, 42, 0.92) !important;
  /* increased opacity from 0.6 to 0.92 */
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

body.light-mode .modal {
  background: rgba(255, 255, 255, 0.95) !important;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--muted-text);
  font-size: 18px;
  cursor: pointer;
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
}

.modal-row {
  margin-bottom: 14px;
}

.modal-row label {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
  color: var(--muted-text);
}

.modal-row input,
.modal-row select,
.modal-row textarea {
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.modal-row textarea {
  resize: vertical;
  min-height: 70px;
}

.modal-row input:focus,
.modal-row select:focus,
.modal-row textarea:focus {
  border-color: rgba(59, 130, 246, 0.85);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.55);
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Modifiers in Modal */

.modifiers-section {
  border-top: 1px solid var(--card-border);
  padding-top: 14px;
  margin-top: 14px;
}

.modifier-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.modifier-title-row span {
  font-size: 13px;
  font-weight: 700;
}

.modifier-title-row button {
  background: transparent;
  color: #3b82f6;
  border: none;
  font-size: 12px;
  cursor: pointer;
}

.modifier-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.modifier-name-input {
  flex: 2;
}

.modifier-price-input {
  flex: 1;
}

.modifier-remove-btn {
  background: var(--danger-soft);
  color: #f87171;
  border: none;
  border-radius: 6px;
  width: 28px;
  cursor: pointer;
}

.modifiers-hint {
  font-size: 11px;
  color: var(--muted-text);
  margin-top: 6px;
}

/* ===== Stats Cards ===== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-icon.blue {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.stat-icon.green {
  background: rgba(34, 197, 94, 0.22);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.stat-icon.orange {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.35);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 12px;
  color: var(--muted-text);
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-color);
}

/* ===== Responsive Tweaks ===== */

@media (max-width: 768px) {
  .main {
    padding: 18px 14px 24px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-bar-actions {
    align-self: stretch;
    justify-content: space-between;
  }

  .card-body {
    padding-inline: 14px;
  }

  .menu-link-box span:last-child {
    max-width: 130px;
  }
}

/* Modifier Groups */
.modifier-group-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.modifier-group-box input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text-color);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.text-danger {
  color: #ef4444;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 12px;
}

.text-primary {
  color: #f97316;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 12px;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  font-family: 'Tajawal', sans-serif;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}

.toast-notification.success {
  background-color: #10b981;
  /* Green */
}

.toast-notification.error {
  background-color: #ef4444;
  /* Red */
}

/* Settings Section Specific Styles */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.settings-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  height: 100%;
  transition: box-shadow 0.2s ease;
}

.settings-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.settings-card-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.settings-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-card-title i {
  color: var(--primary-color);
}

.settings-row {
  margin-bottom: 16px;
}

.settings-row:last-child {
  margin-bottom: 0;
}

.settings-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-text);
  margin-bottom: 6px;
}

.settings-value-box {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 14px;
  transition: border-color 0.2s;
}

.settings-input:focus {
  border-color: var(--primary-color);
  outline: none;
}

/* Image Upload Areas */
.image-upload-container {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  background: var(--bg-color);
  transition: border-color 0.2s;
  position: relative;
}

.image-upload-container:hover {
  border-color: var(--primary-color);
}

.logo-preview-area {
  width: 100px;
  height: 100px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
}

.hero-preview-area {
  width: 100%;
  height: 140px;
  margin: 0 auto 12px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
}

.preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-btn-wrapper {
  display: inline-block;
}

.remove-img-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: transform 0.2s;
}

.remove-img-btn:hover {
  transform: scale(1.1);
  background: #ef4444;
}

.qr-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background: var(--card-bg);
  /* Use theme card bg */
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
}

.qr-display:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-color: var(--primary-color);
}

.qr-img {
  width: 160px;
  /* Slightly larger */
  height: 160px;
  border-radius: 12px;
  border: 4px solid white;
  /* White border for QR contrast */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: white;
  padding: 4px;
  /* Quality buffer */
}

/* Product Modal Redesign */
.product-modal-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  margin-bottom: 20px;
}

@media (max-width: 640px) {
  .product-modal-grid {
    grid-template-columns: 1fr;
  }
}

.product-image-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-color);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  height: fit-content;
}

.product-image-preview {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 8px;
  object-fit: cover;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
}

.product-details-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

/* ===== New Modal Styles (Fixes) ===== */

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--muted-text);
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.modal-close-btn:hover {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-color);
}

.modifier-group-box {
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.modifier-group-box:hover {
  border-color: rgba(148, 163, 184, 0.5);
}

.modifier-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.modifier-group-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-color);
}

.modifier-options-wrapper {
  margin-top: 10px;
  padding-right: 10px;
  border-right: 2px solid var(--border-color);
}

.modifier-options-label {
  font-size: 11px;
  color: var(--muted-text);
  margin-bottom: 6px;
  display: block;
}

.modifier-option-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.modifier-option-row input {
  margin-bottom: 0 !important;
}

.modifier-remove-option-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.2s;
}

.modifier-remove-option-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}

.modifier-add-option-btn {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.modifier-add-option-btn:hover {
  text-decoration: underline;
}

.modifier-group-box input {
  background: var(--bg-color) !important;
  border: 1px solid var(--input-border) !important;
  color: var(--text-color) !important;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
}

.product-image-preview {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
}

.product-image-placeholder {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--input-bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-text);
  border: 1px dashed var(--border-color);
}

.product-image-remove-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.product-image-remove-btn:hover {
  transform: scale(1.1);
}


/* ===== Enhanced Product Details Design ===== */

.product-details-section {
  gap: 18px !important;
}

.modal-section-title {
  font-size: 15px !important;
  color: var(--primary) !important;
  border-bottom: 1px solid var(--border-color) !important;
  padding-bottom: 10px !important;
  margin-bottom: 16px !important;
  font-weight: 700 !important;
}

.form-group label {
  font-size: 13px !important;
  font-weight: 600 !important;
  margin-bottom: 6px !important;
  color: var(--text-color) !important;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px !important;
  font-size: 14px !important;
  border-radius: 10px !important;
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  transition: all 0.2s ease !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-soft) !important;
  transform: translateY(-1px);
}

.form-group small {
  font-size: 11px !important;
  opacity: 0.8 !important;
}


/* ===== Fix Input Text Color in Dark Mode ===== */
.form-group input,
.form-group select,
.form-group textarea {
  color: var(--text-color) !important;
}

/* Ensure placeholder is visible but distinct */
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--muted-text) !important;
  opacity: 0.7;
}


/* ===== Fix Page Title Color ===== */
.page-title {
  color: var(--text-color) !important;
  background: none !important;
  -webkit-text-fill-color: var(--text-color) !important;
}


/* ===== Product Controls Styling (Premium) ===== */
.controls-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.search-input {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input input {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.search-input input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.search-input i {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-text);
  pointer-events: none;
}

.filter-select {
  padding: 12px 32px 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  min-width: 140px;
}

.filter-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.products-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-color);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.switch-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-color);
}

/* Custom Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
  background-color: var(--success-color);
}

input:focus+.slider {
  box-shadow: 0 0 1px var(--success-color);
}

input:checked+.slider:before {
  transform: translateX(20px);
}

/* FORCE HIDE SCROLLBARS */
.sidebar::-webkit-scrollbar,
.main::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

.sidebar,
.main {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

body.dark-theme .sidebar {
  border-left: 1px solid #374151;
  /* Dark mode separator */
}


/* Table Separators */
.table tr:not(:last-child) td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Dark mode adjustment */
body.dark-mode .table tr:not(:last-child) td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}


/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  margin: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: var(--primary-color);
}

input:focus+.slider {
  box-shadow: 0 0 1px var(--primary-color);
}

input:checked+.slider:before {
  transform: translateX(16px);
}


/* Select Input Styling */
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  /* RTL support */
  background-size: 10px;
  padding-left: 30px;
  /* Space for arrow */

  background-color: var(--input-bg);
  color: var(--text-color);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
}

/* Dark mode specific for select options */
body.dark-mode select option {
  background-color: #1f2937;
  /* Dark background for options */
  color: #f3f4f6;
}

/* Fix for specific category filter if needed */
#category-filter {
  min-width: 150px;
}


/* Ensure primary button text is white */
.primary-btn,
#confirm-modal-btn {
  color: #ffffff !important;
}


/* Dark mode table separator override (Forced) */
body.dark-mode .table tr:not(:last-child) td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}


/* AGGRESSIVE VISUAL FIXES */

/* 1. Category Filter Fix */
#category-filter,
.filter-select {
  background-color: var(--input-bg) !important;
  color: var(--text-color) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: 8px !important;
  padding: 8px 30px 8px 12px !important;
  /* Extra padding for arrow */
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: left 12px center !important;
  background-size: 10px !important;
  min-width: 150px !important;
}

/* Dark mode option fix */
option {
  background-color: var(--bg-card) !important;
  color: var(--text-color) !important;
}

/* 2. Delete Button Text Fix */
#confirm-modal-btn,
.primary-btn {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  /* Force for WebKit */
}

/* 3. Table Separators Fix (Universal) */
/* Use var(--border) which adapts to theme automatically */
.table tr:not(:last-child) td {
  border-bottom: 1px solid var(--border) !important;
}

/* Remove the bad dark-mode rule if it exists (by overriding it) */
body.dark-mode .table tr:not(:last-child) td {
  border-bottom: 1px solid var(--border) !important;
}


/* Table Header Separator */
.table thead th {
  border-bottom: 1px solid var(--border) !important;
}

/* Fix Add Product Button Style */
.primary-btn {
  border-radius: 12px !important;
  /* Fix oval shape to rounded rectangle */
  padding: 10px 20px;
  background: var(--primary);
  color: white !important;
  border: none;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}

.primary-btn:hover {
  background: var(--primary-dark);
}

/* FINAL FIX: Add Product Button */
button.primary-btn {
  border-radius: 12px !important;
  padding: 10px 20px;
  background: var(--primary);
  color: white !important;
  border: none;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}

/* FINAL FIX: Modal Backdrop */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  /* Hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 2000;
  /* Ensure high z-index */
  pointer-events: auto !important;
  /* Force clickable */
}

/* NUCLEAR OPTION: Force Button Style */
#add-product-btn-main {
  border-radius: 12px !important;
  padding: 10px 20px !important;
  background: var(--primary) !important;
  color: white !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: auto !important;
  height: auto !important;
}

/* NUCLEAR OPTION: Force Backdrop Clickable */
.modal-backdrop {
  pointer-events: auto !important;
  cursor: pointer;
}

.modal {
  cursor: default;
  /* Prevent click-through from modal to backdrop */
}

/* Mobile adjustments for Add Product Button */
@media (max-width: 900px) {
  #add-product-btn-main {
    padding: 8px 14px !important;
    font-size: 13px !important;
    gap: 6px !important;
  }

  #add-product-btn-main i {
    font-size: 12px !important;
  }
}

/* FINAL FIX: Delete Button Color */
#confirm-modal-btn {
  background-color: #ef4444 !important;
  /* Red-500 */
  border-color: #ef4444 !important;
  color: white !important;
}

#confirm-modal-btn:hover {
  background-color: #dc2626 !important;
  /* Red-600 */
}

/* Hide Mobile Info on Desktop */
@media (min-width: 901px) {
  .mobile-restaurant-info {
    display: none !important;
  }
}

/* Desktop Styles for Product Table (New Structure) */
.prod-cell-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.prod-img-box img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}

.prod-name-box {
  font-weight: 600;
  color: var(--text-main);
}

/* =========================================
   RESTORED MODIFIERS DESIGN (v105) - FIXED
   ========================================= */
.modifiers-section {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 14px;
  width: 100%;
}

.modifier-group {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.group-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mod-group-name {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-main) !important;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  width: 100%;
  box-sizing: border-box;
}

.group-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.options-list {
  margin-top: 8px;
  padding-right: 10px;
  border-right: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modifier-option-row {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.modifier-option-row input {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-main) !important;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  height: 40px;
  box-sizing: border-box;
}

.mod-opt-name {
  flex: 2;
}

.mod-opt-price {
  flex: 1;
}

/* Buttons */
.modifier-group .btn-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.modifier-group .btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--border);
  color: var(--primary);
  font-size: 13px;
  padding: 8px;
  border-radius: 8px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  cursor: pointer;
}

.modifier-group .btn-secondary:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary);
}

/* Fix Add Group Button in Header */
.modifiers-section .secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* FINAL v155: FIX FILTER & SEARCH STYLING (Emergency Append) */

/* 1. Fix Category Filter Design */
#category-filter {
  background-color: var(--input-bg) !important;
  color: var(--text-color) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: 12px !important;
  /* Rounded corners */
  padding: 10px 36px 10px 12px !important;
  /* Extra padding for arrow */
  font-size: 14px !important;
  height: 42px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: left 10px center !important;
  /* Arrow on left for RTL */
  background-size: 16px !important;
  cursor: pointer !important;
  min-width: 160px;
}

#category-filter:focus {
  border-color: var(--primary) !important;
  outline: none !important;
}

/* 2. Fix Search Box Shape (Remove Oval) */
.search-input {
  border-radius: 12px !important;
  /* Match other inputs */
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
}

.search-input input {
  border-radius: 12px !important;
  background: transparent !important;
  border: none !important;
  color: var(--text-color) !important;
}

/* FINAL v157: STYLE FILTER DROPDOWN OPTIONS (Emergency Append) */
#category-filter option {
  background-color: #1e293b !important;
  /* Dark background */
  color: #f8fafc !important;
  /* Light text */
  padding: 12px !important;
  font-size: 14px;
}

/* FINAL v158: RESIZE ADD BUTTONS ON MOBILE (Emergency Append) */
@media (max-width: 900px) {

  /* Target Add Category & Add Zone buttons explicitly */
  #section-categories .card-header .primary-btn,
  #section-zones .card-header .primary-btn {
    padding: 8px 14px !important;
    font-size: 13px !important;
    gap: 6px !important;
    height: auto !important;
    /* Ensure height adjusts */
  }
}

.prod-name-box {
  font-weight: 600;
  color: var(--text-main);
}

/* =========================================
   RESTORED MODIFIERS DESIGN (v105) - FIXED
   ========================================= */
.modifiers-section {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 14px;
  width: 100%;
}

.modifier-group {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.group-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mod-group-name {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-main) !important;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  width: 100%;
  box-sizing: border-box;
}

.group-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.options-list {
  margin-top: 8px;
  padding-right: 10px;
  border-right: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modifier-option-row {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.modifier-option-row input {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-main) !important;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  height: 40px;
  box-sizing: border-box;
}

.mod-opt-name {
  flex: 2;
}

.mod-opt-price {
  flex: 1;
}

/* Buttons */
.modifier-group .btn-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.modifier-group .btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--border);
  color: var(--primary);
  font-size: 13px;
  padding: 8px;
  border-radius: 8px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  cursor: pointer;
}

.modifier-group .btn-secondary:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary);
}

/* Fix Add Group Button in Header */
.modifiers-section .secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* FINAL v155: FIX FILTER & SEARCH STYLING (Emergency Append) */

/* 1. Fix Category Filter Design */
#category-filter {
  background-color: var(--input-bg) !important;
  color: var(--text-color) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: 12px !important;
  /* Rounded corners */
  padding: 10px 36px 10px 12px !important;
  /* Extra padding for arrow */
  font-size: 14px !important;
  height: 42px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: left 10px center !important;
  /* Arrow on left for RTL */
  background-size: 16px !important;
  cursor: pointer !important;
  min-width: 160px;
}

#category-filter:focus {
  border-color: var(--primary) !important;
  outline: none !important;
}

/* 2. Fix Search Box Shape (Remove Oval) */
.search-input {
  border-radius: 12px !important;
  /* Match other inputs */
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
}

.search-input input {
  border-radius: 12px !important;
  background: transparent !important;
  border: none !important;
  color: var(--text-color) !important;
}

/* FINAL v157: STYLE FILTER DROPDOWN OPTIONS (Emergency Append) */
#category-filter option {
  background-color: #1e293b !important;
  /* Dark background */
  color: #f8fafc !important;
  /* Light text */
  padding: 12px !important;
  font-size: 14px;
}

/* FINAL v158: RESIZE ADD BUTTONS ON MOBILE (Emergency Append) */
@media (max-width: 900px) {

  /* Target Add Category & Add Zone buttons explicitly */
  #section-categories .card-header .primary-btn,
  #section-zones .card-header .primary-btn {
    padding: 8px 14px !important;
    font-size: 13px !important;
    gap: 6px !important;
    height: auto !important;
    /* Ensure height adjusts */
  }

  #section-categories .card-header .primary-btn i,
  #section-zones .card-header .primary-btn i {
    font-size: 12px !important;
  }
}

/* Update Order Status Select to look actionable */
#order-status-select {
  appearance: none;
  -webkit-appearance: none;
  /* Chevron Down Icon (Base64) - Color: #3b82f6 */
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiMzYjgyZjYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cG9seWxpbmUgcG9pbnRzPSI2IDkgMTIgMTUgMTggOSI+PC9wb2x5bGluZT48L3N2Zz4=");
  background-repeat: no-repeat;
  background-position: left 0.7rem center;
  background-size: 1.2rem auto;
  padding-left: 2.5rem !important;
  /* Space for arrow in RTL */
  padding-right: 1rem;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid #cbd5e1;
  /* Visible border color (Slate 300) */
  border-radius: 8px;
  background-color: var(--card-bg);
  color: var(--text-main);
  width: 100%;
}

#order-status-select:hover,
#order-status-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
}

/* Fix View Button Styling */
.table-btn.btn-view {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.table-btn.btn-view:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
}

/* ==========================================================
   TIME INPUT DARK MODE FIX (Universal - CSS SVG Method) v185
   ========================================================== */
/* Define the white icon (Clock SVG) */
/* SVG: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="white"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" /></svg> */

/* Rule 1: Class-based Selectors */
body.dark-theme input[type="time"]::-webkit-calendar-picker-indicator,
body.dark-mode input[type="time"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator {
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlPSJ3aGl0ZSI+PHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjIiIGQ9Ik0xMiA4djRsMyAzbTYtM2E5IDkgMCAxMS0xOCAwIDkgOSAwIDAxMTggMHoiIC8+PC9zdmc+');
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  width: 20px;
  height: 20px;
  opacity: 1 !important;
  filter: none !important;
}

/* Rule 2: Media Query Selector */
@media (prefers-color-scheme: dark) {
  input[type="time"]::-webkit-calendar-picker-indicator {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlPSJ3aGl0ZSI+PHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjIiIGQ9Ik0xMiA4djRsMyAzbTYtM2E5IDkgMCAxMS0xOCAwIDkgOSAwIDAxMTggMHoiIC8+PC9zdmc+');
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    width: 20px;
    height: 20px;
    opacity: 1 !important;
    filter: none !important;
  }
}

/* Rule 3: Fallback Color Scheme (Class-based) */
body.dark-theme input[type="time"],
body.dark-mode input[type="time"],
[data-theme="dark"] input[type="time"] {
  color-scheme: dark;
}

/* Rule 4: Fallback Color Scheme (Media Query) */
@media (prefers-color-scheme: dark) {
  input[type="time"] {
    color-scheme: dark;
  }
}

/* Appearance Settings */
.color-palette-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s;
  background-clip: padding-box;
  /* Fix for border overlap */
}

.color-swatch:hover {
  transform: scale(1.1);
}

.color-swatch.active {
  border-color: var(--bg-color);
  box-shadow: 0 0 0 2px var(--primary-color);
  transform: scale(1.1);
}

/* Compact Row for Appearance */
.settings-row.compact-row {
  margin-bottom: 12px;
}

.settings-row.compact-row .settings-label {
  margin-bottom: 4px;
  font-size: 0.9em;
}

/* Modern Dialog Modal */
#custom-dialog-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
  backdrop-filter: blur(4px);
}

#custom-dialog-modal.open {
  opacity: 1;
  visibility: visible;
}

#custom-dialog-modal .modal-content {
  background: var(--card-bg, #1e293b);
  border: 1px solid var(--card-border, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  padding: 24px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: scale(0.95);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

#custom-dialog-modal.open .modal-content {
  transform: scale(1);
}

#dialog-icon {
  width: 48px;
  height: 48px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  font-size: 24px;
}

#dialog-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main, #fff);
}

#dialog-message {
  font-size: 14px;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 24px;
  line-height: 1.5;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Reusing button styles but ensuring they work */
/* [v3.3.21.721] Dynamic Dialog Buttons */
.dialog-btn-primary {
  background: var(--primary) !important;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

.dialog-btn-danger {
  background: #ef4444 !important;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

#dialog-btn-cancel {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main, #fff);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

/* =========================================
   Global Modifiers (Added v511)
   ========================================= */

/* Modifier Buttons */
.text-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.text-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.text-primary {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: #93c5fd;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.text-primary:hover {
  background: rgba(59, 130, 246, 0.2);
}

/* Modifier Group Box */
.modifier-group-box {
  border: 1px solid rgba(55, 65, 81, 0.8);
  background: rgba(30, 41, 59, 0.3);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.modifier-group-box input {
  background: #020617;
  border: 1px solid rgba(30, 64, 175, 0.8);
  color: #e5e7eb;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  width: 100%;
  margin-bottom: 6px;
}

.modifier-group-box input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}

.modifier-option-row {
  display: flex;
  gap: 5px;
  margin-bottom: 5px;
  align-items: center;
}

.btn-icon.danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-icon.danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* =========================================
   Mobile Redesign (App-like Experience)
   ========================================= */

/* Default: Hide Bottom Nav on Desktop */
.bottom-nav {
  display: none;
}

@media (max-width: 900px) {

  /* Enable Pull-to-Refresh */
  html,
  body {
    overflow: auto !important;
    position: relative !important;
  }

  /* Utility: Hide on Mobile */
  .hide-on-mobile {
    display: none !important;
  }

  /* 1. Layout & Sidebar */
  .layout {
    display: block;
    height: 100vh;
    position: relative !important;
    inset: auto !important;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 16px 16px 80px 16px;
    height: calc(100vh - 65px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* 2. Bottom Navigation Bar */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: var(--card-bg);
    /* Adaptive Background */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
  }

  /* FIX: Hide Bottom Nav when App Shell is hidden (Login Screen) */
  #app-shell[style*="display: none"] .bottom-nav,
  #app-shell[style*="display:none"] .bottom-nav {
    display: none !important;
  }

  /* FIX: Hide Bottom Nav by default, only show when logged in */
  body:not(.is-logged-in) .bottom-nav {
    display: none !important;
  }

  .bottom-nav .nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 10px;
    padding: 8px;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
    position: relative;
    z-index: 1001;
  }

  .bottom-nav .nav-item i {
    font-size: 18px;
    margin-bottom: 2px;
    color: inherit;
  }

  .bottom-nav .nav-item.active {
    color: var(--primary);
    background: transparent;
    box-shadow: none;
  }

  .bottom-nav .nav-item.active i {
    transform: translateY(-2px);
  }

  /* 3. Topbar Adjustments */
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 8px;
  }

  /* Mobile Restaurant Info - Redesigned */
  .mobile-restaurant-info {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-bottom: 4px;
    padding: 12px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
  }

  .mobile-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .mobile-rest-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary) !important;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-id-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }

  .mobile-rest-id {
    font-size: 11px;
    font-family: monospace;
    background: var(--border);
    padding: 3px 8px;
    border-radius: 6px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
  }

  .mobile-logout-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
  }

  .mobile-logout-btn:active {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(0.95);
  }

  .mobile-sub-status {
    font-size: 13px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid currentColor;
    display: inline-block;
    width: fit-content;
    margin-top: 4px;
    background: transparent;
  }

  .mobile-sub-status.active {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
  }

  .mobile-sub-status.expiring {
    color: #f59e0b;
    background: rgba(249, 115, 22, 0.05);
  }

  .mobile-sub-status.expired {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
  }

  .top-bar-actions {
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .menu-link-box {
    flex: 1;
    justify-content: center;
  }

  .menu-link-box span:last-child {
    max-width: 120px;
  }

  /* 4. Stats Grid */
  .stats-grid {
    grid-template-columns: 1fr;
  }

  /* 5. Tables as Cards (The Magic) */
  .table-wrapper {
    background: transparent;
    border: none;
    overflow: visible;
  }

  .table thead {
    display: none;
  }

  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    margin-bottom: 12px;
    padding: 12px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    text-align: right;
  }

  .table td:last-child {
    border-bottom: none;
    justify-content: flex-end;
    padding-top: 12px;
    gap: 8px;
  }

  .table td img {
    width: 40px;
    height: 40px;
  }

  /* 6. Modals (Bottom Sheet) */
  .modal {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0;
    margin: 0;
    position: absolute;
    bottom: 0;
    max-height: 85vh;
    animation: slideUp 0.3s ease-out;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
    }

    to {
      transform: translateY(0);
    }
  }

  /* 7. Controls Row */
  .controls-row {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input {
    width: 100%;
  }

  .filter-select {
    width: 100%;
  }

  /* FIXED: Menu Toggle Styling */
  .products-toggle {
    width: 100%;
    background: none !important;
    border: none !important;
    justify-content: flex-end !important;
    /* Align to left in RTL */
    padding: 0 !important;
    margin-top: 8px;
  }

  /* Product Card Specific Improvements (Compact Grid Layout) */
  #products-table-body tr {
    display: grid;
    grid-template-columns: auto 1fr auto;
    /* Image, Content, End */
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "image name price"
      "image category toggle"
      "actions actions actions";
    gap: 4px 12px;
    /* Row gap 4px, Col gap 12px */
    padding: 12px;
    position: relative;
    overflow: visible;
  }

  /* 1. Image & Name Wrapper (Flattened) */
  #products-table-body td:nth-child(1),
  #products-table-body td:nth-child(1)>div {
    display: contents;
  }

  /* Image */
  #products-table-body td:nth-child(1) img {
    grid-area: image;
    width: 56px !important;
    height: 56px !important;
    border-radius: 10px !important;
    object-fit: cover;
    align-self: start;
  }

  /* Name */
  #products-table-body td:nth-child(1) span {
    grid-area: name;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    align-self: end;
    /* Align with bottom of image top half */
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-bottom: 2px;
  }

  /* 2. Price */
  #products-table-body td:nth-child(2) {
    grid-area: price;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    padding: 0;
    border: none;
    background: none;
    align-self: end;
    justify-self: end;
    padding-bottom: 2px;
  }

  #products-table-body td:nth-child(2)::before {
    content: '';
    display: none;
  }

  /* 3. Category */
  #products-table-body td:nth-child(3) {
    grid-area: category;
    font-size: 12px;
    color: var(--text-muted);
    padding: 0;
    border: none;
    background: none;
    align-self: start;
    /* Align with top of image bottom half */
  }

  #products-table-body td:nth-child(3)::before {
    content: '';
    display: none;
  }

  /* 4. Toggle */
  #products-table-body td:nth-child(4) {
    grid-area: toggle;
    padding: 0;
    border: none;
    background: none;
    align-self: start;
    justify-self: end;
    transform: scale(0.9);
    /* Slightly smaller toggle */
    transform-origin: right top;
  }

  #products-table-body td:nth-child(4)::before {
    content: '';
    display: none;
  }

  /* 5. Actions */
  #products-table-body td:nth-child(5) {
    grid-area: actions;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    background: none;
    width: 100%;
    position: relative !important;
    z-index: 100 !important;
    pointer-events: auto !important;
  }

  #products-table-body td:nth-child(5) .table-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  #products-table-body td:nth-child(5) button {
    width: 100%;
    justify-content: center;
    padding: 8px;
    font-size: 13px;
    height: 36px;
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 101 !important;
    position: relative !important;
  }

  /* 8. Fix Modal Overflow */
  .product-modal-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    overflow-x: hidden;
  }

  .product-image-section,
  .product-details-section {
    width: 100%;
    min-width: 0;
    /* Prevent flex item overflow */
  }

  .form-row-2 {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .modal-body {
    padding: 16px;
    overflow-x: hidden;
  }

  /* 9. Fix Modifier Modal Issues */
  .modifier-option-row {
    display: flex;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .modifier-option-row input {
    min-width: 0;
    /* Allow shrinking */
    width: auto !important;
    /* Override 100% width from generic rule */
  }

  /* Fix Add Group Button Style */
  .modifiers-section .modal-section-title .secondary-btn {
    border-radius: 8px !important;
    /* Fix oval shape */
    padding: 6px 12px !important;
    height: auto !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
  }

  /* 10. Fix Modal Visibility & Z-Index */
  .modal-backdrop {
    z-index: 2000 !important;
    /* Above bottom nav (1000) */
  }

  .modal {
    z-index: 2001 !important;
    padding-bottom: env(safe-area-inset-bottom);
    /* Handle iPhone home bar */
  }

  .modal-footer {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    background: var(--card-bg);
    /* Ensure background covers content behind */
    position: sticky;
    bottom: 0;
  }
}

/* FINAL v112: FIXED GRID ITEM HANDLING */
@media (max-width: 900px) {
  #products-table-body tr {
    display: grid !important;
    /* Columns: Image (Right) | Content (Middle) | Actions (Left) */
    grid-template-columns: 80px 1fr 75px !important;
    grid-template-rows: auto auto auto !important;
    grid-template-areas:
      "image  name  actions"
      "toggle cat   actions"
      "toggle price actions" !important;
    gap: 6px 12px !important;
    padding: 16px !important;
    height: auto !important;
    align-items: center !important;
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }

  /* Reset default table cell styles */
  #products-table-body td {
    border: none !important;
    padding: 0 !important;
    background: none !important;
  }

  /* 1. Product Wrapper (Image + Name) -> Unwrap to let children be grid items */
  .td-product,
  .prod-cell-wrapper {
    display: contents !important;
  }

  /* Image Box */
  .prod-img-box {
    grid-area: image;
    width: 70px !important;
    height: 70px !important;
    justify-self: end;
    align-self: start;
  }

  .prod-img-box img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 12px !important;
    object-fit: cover;
  }

  /* Name Box */
  .prod-name-box {
    grid-area: name;
    text-align: right !important;
    align-self: center;
    padding-right: 0 !important;
  }

  .prod-name-box span {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
    line-height: 1.3 !important;
    display: block;
  }

  /* 2. Other Cells -> Make them Grid Items (Flex/Block) */

  /* Category */
  .td-cat {
    grid-area: cat;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    /* Right aligned in RTL */
    font-size: 13px !important;
    color: var(--text-muted) !important;
  }

  /* Price */
  .td-price {
    grid-area: price;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    /* Right aligned in RTL */
    font-weight: 700 !important;
    color: var(--primary) !important;
    font-size: 15px !important;
  }

  /* Toggle */
  .td-toggle {
    grid-area: toggle;
    display: flex !important;
    align-items: flex-start;
    justify-content: center;
    margin-top: 4px !important;
  }

  /* Actions */
  .td-actions {
    grid-area: actions;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    /* Left aligned in RTL */
    height: 100%;
  }

  .td-actions .table-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100%;
  }

  .td-actions .table-btn {
    width: 100% !important;
    height: 32px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* CATEGORIES TABLE MOBILE LAYOUT */
  #categories-table-body tr {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 16px !important;
    gap: 12px !important;
    flex-direction: row !important;
    /* Force row */
  }

  /* 1. Name (First Column) */
  #categories-table-body td:nth-child(1) {
    border: none !important;
    padding: 0 !important;
    width: auto !important;
    flex: 1 !important;
    justify-content: flex-start !important;
    text-align: right !important;
  }

  #categories-table-body td:nth-child(1) span {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    line-height: 1.4;
  }

  /* 2. Product Count (Second Column) - HIDE */
  #categories-table-body td:nth-child(2) {
    display: none !important;
  }

  /* 3. Actions (Third Column) */
  #categories-table-body td:nth-child(3) {
    border: none !important;
    padding: 0 !important;
    width: auto !important;
    justify-content: flex-end !important;
    border-top: none !important;
    /* Override default card style */
    margin-top: 0 !important;
  }

  #categories-table-body td:nth-child(3) .table-actions {
    display: flex !important;
    flex-direction: row !important;
    /* Horizontal buttons */
    gap: 8px !important;
    width: auto !important;
  }

  #categories-table-body td:nth-child(3) .table-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* FIX: Force Product Actions Clickability */
  #products-table-body td:nth-child(5) {
    position: relative !important;
    z-index: 100 !important;
    pointer-events: auto !important;
  }

  #products-table-body td:nth-child(5) button {
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 101 !important;
    position: relative !important;
  }
}

/* FINAL v152: USER REQUESTED LAYOUT (Emergency Append) */
@media (max-width: 900px) {
  #products-table-body tr {
    display: grid !important;
    /* Columns: Image (Auto) | Name (1fr) | Actions (Auto) */
    grid-template-columns: auto 1fr auto !important;
    grid-template-rows: auto auto !important;
    grid-template-areas:
      "image name actions"
      "toggle toggle toggle" !important;
    gap: 12px !important;
    padding: 16px !important;
    align-items: center !important;
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }

  /* Reset default table cell styles */
  #products-table-body td {
    border: none !important;
    padding: 0 !important;
    background: none !important;
  }

  /* 1. Unwrap Main Cell to let Image/Name be grid items */
  .td-main,
  .prod-cell-wrapper {
    display: contents !important;
  }

  /* Image */
  .prod-img-box {
    grid-area: image;
    width: 60px !important;
    height: 60px !important;
  }

  .prod-img-box img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px !important;
    object-fit: cover;
  }

  /* Name */
  .prod-name-box {
    grid-area: name;
    padding: 0 12px !important;
    display: flex;
    align-items: center;
  }

  .prod-name-box span {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
  }

  /* Actions */
  .td-actions {
    grid-area: actions;
    display: flex !important;
    align-items: center;
  }

  .td-actions .table-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
  }

  .td-actions .table-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Toggle (Centered below) */
  .td-toggle {
    grid-area: toggle;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-top: 8px !important;
    width: 100% !important;
  }

  /* Hide Price & Category */
  .td-price,
  .td-cat {
    display: none !important;
  }
}

/* FINAL v153: FIX SPACING & CARD STYLE (Emergency Append) */
@media (max-width: 900px) {
  #products-table-body tr {
    display: grid !important;
    /* Columns: Image (Auto) | Name (1fr) | Actions (Auto) */
    grid-template-columns: auto 1fr auto !important;
    grid-template-rows: auto auto !important;
    grid-template-areas:
      "image name actions"
      "toggle toggle toggle" !important;
    gap: 12px !important;
    padding: 16px !important;
    align-items: center !important;
    background: var(--bg-card) !important;

    /* SPACING FIXES */
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    /* Rounded corners */
    margin-bottom: 12px !important;
    /* Space between cards */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* Subtle shadow */
  }

  /* Reset default table cell styles */
  #products-table-body td {
    border: none !important;
    padding: 0 !important;
    background: none !important;
  }

  /* 1. Unwrap Main Cell to let Image/Name be grid items */
  .td-main,
  .prod-cell-wrapper {
    display: contents !important;
  }

  /* Image */
  .prod-img-box {
    grid-area: image;
    width: 60px !important;
    height: 60px !important;
  }

  .prod-img-box img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px !important;
    object-fit: cover;
  }

  /* Name */
  .prod-name-box {
    grid-area: name;
    padding: 0 12px !important;
    display: flex;
    align-items: center;
  }

  .prod-name-box span {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
  }

  /* Actions */
  .td-actions {
    grid-area: actions;
    display: flex !important;
    align-items: center;
  }

  .td-actions .table-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
  }

  .td-actions .table-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Toggle (Centered below) */
  .td-toggle {
    grid-area: toggle;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-top: 8px !important;
    width: 100% !important;
    border-top: 1px solid var(--border);
    /* Separator line */
    padding-top: 12px !important;
  }

  /* Hide Price & Category */
  .td-price,
  .td-cat {
    display: none !important;
  }
}

/* FINAL v154: SWAP ACTIONS & TOGGLE (Emergency Append) */
@media (max-width: 900px) {
  #products-table-body tr {
    display: grid !important;
    /* Columns: Image (Auto) | Name (1fr) | Toggle (Auto) */
    grid-template-columns: auto 1fr auto !important;
    grid-template-rows: auto auto !important;
    grid-template-areas:
      "image name toggle"
      "actions actions actions" !important;
    gap: 12px !important;
    padding: 16px !important;
    align-items: center !important;
    background: var(--bg-card) !important;

    /* SPACING FIXES */
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }

  /* Reset default table cell styles */
  #products-table-body td {
    border: none !important;
    padding: 0 !important;
    background: none !important;
  }

  /* 1. Unwrap Main Cell */
  .td-main,
  .prod-cell-wrapper {
    display: contents !important;
  }

  /* Image */
  .prod-img-box {
    grid-area: image;
    width: 60px !important;
    height: 60px !important;
  }

  .prod-img-box img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px !important;
    object-fit: cover;
  }

  /* Name */
  .prod-name-box {
    grid-area: name;
    padding: 0 12px !important;
    display: flex;
    align-items: center;
  }

  .prod-name-box span {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
  }

  /* Toggle (Now Top Right/Left) */
  .td-toggle {
    grid-area: toggle;
    display: flex !important;
    justify-content: flex-end !important;
    /* Align to edge */
    align-items: center !important;
    margin-top: 0 !important;
    width: auto !important;
    border-top: none !important;
    padding-top: 0 !important;
  }

  /* Actions (Now Bottom Row) */
  .td-actions {
    grid-area: actions;
    display: flex !important;
    align-items: center;
    justify-content: center;
    /* Center buttons */
    width: 100%;
    border-top: 1px solid var(--border);
    /* Separator above actions */
    padding-top: 12px !important;
    margin-top: 4px;
  }

  .td-actions .table-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    /* More space between buttons */
    width: 100%;
    justify-content: center;
  }

  .td-actions .table-btn {
    width: 45% !important;
    /* Wider buttons */
    height: 36px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Hide Price & Category */
  .td-price,
  .td-cat {
    display: none !important;
  }
}

/* FINAL v159: RESIZE ADD BUTTONS ON MOBILE (Fixed Location) */
@media (max-width: 900px) {

  /* Target Add Category & Add Zone buttons explicitly */
  #section-categories .card-header .primary-btn,
  #section-zones .card-header .primary-btn {
    padding: 8px 14px !important;
    font-size: 13px !important;
    gap: 6px !important;
    height: auto !important;
    width: auto !important;
    /* Ensure they don't stretch */
  }

  #section-categories .card-header .primary-btn i,
  #section-zones .card-header .primary-btn i {
    font-size: 12px !important;
  }
}

/* FINAL v160: REDESIGN MOBILE ZONES (Card Style) */
@media (max-width: 900px) {
  #zones-table-body tr {
    display: grid !important;
    /* Columns: Name (1fr) | Fee (Auto) | Actions (1fr) */
    /* Note: Actions needs to be own column to align left */
    grid-template-columns: 1fr auto 1fr !important;
    grid-template-areas: "name fee actions" !important;
    align-items: center !important;
    gap: 8px !important;

    /* Card Styling */
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }

  #zones-table-body td {
    border: none !important;
    padding: 0 !important;
    background: none !important;
  }

  /* 1. Name (Right) */
  #zones-table-body td:nth-child(1) {
    grid-area: name;
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
    text-align: right;
  }

  /* 2. Fee (Center) */
  #zones-table-body td:nth-child(2) {
    grid-area: fee;
    text-align: center;
    font-weight: 600;
    color: var(--text-muted) !important;
    font-size: 14px;
    /* Add label/currency if needed, but keeping it clean as requested */
  }

  /* Add 'د.أ' suffix via CSS if not in HTML? HTML has raw number. */
  #zones-table-body td:nth-child(2):after {
    content: " د.أ";
    font-size: 12px;
    color: var(--text-muted);
  }


  /* 3. Min Order (Hide on Mobile) */
  #zones-table-body td:nth-child(3) {
    display: none !important;
  }

  /* 4. Actions (Left) */
  #zones-table-body td:nth-child(4) {
    grid-area: actions;
    display: flex;
    justify-content: flex-end;
    /* Left in RTL context implies end of container? No, flex-end aligns to left in RTL? Verify. */
    /* width: 100%; */
  }

  /* Start/End in RTL:
       justify-content: flex-end -> Left side.
       justify-content: flex-start -> Right side.
    */

  #zones-table-body .table-actions {
    display: flex !important;
    gap: 8px !important;
  }

  #zones-table-body .table-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

/* FINAL v161: MOBILE ORDERS CARD LAYOUT */
@media (max-width: 900px) {
  #orders-table-body tr {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "id      status"
      "date    date"
      "cust    cust"
      "addr    addr"
      "total   action" !important;
    gap: 8px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    align-items: center;
  }

  /* Reset TDs */
  #orders-table-body td {
    border: none !important;
    padding: 0 !important;
    background: none !important;
  }

  /* 1. ID */
  #orders-table-body td:nth-child(1) {
    grid-area: id;
    font-weight: 800;
    font-size: 16px;
    color: var(--text-main);
  }

  #orders-table-body td:nth-child(1)::before {
    content: '#';
    color: var(--primary);
  }

  /* 2. Date */
  #orders-table-body td:nth-child(2) {
    grid-area: date;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
  }

  #orders-table-body td:nth-child(2) span {
    display: inline-block !important;
    /* Ensure ltr span works */
  }

  /* 3. Customer */
  #orders-table-body td:nth-child(3) {
    grid-area: cust;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
  }

  #orders-table-body td:nth-child(3)::before {
    content: '\f007';
    /* FontAwesome User Icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 12px;
    color: var(--text-muted);
  }

  /* 4. Address */
  #orders-table-body td:nth-child(4) {
    grid-area: addr;
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  #orders-table-body td:nth-child(4)::before {
    content: '\f3c5';
    /* FontAwesome Map Marker */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 12px;
    color: var(--text-muted);
  }

  /* 5. Total */
  #orders-table-body td:nth-child(5) {
    grid-area: total;
    font-weight: 800;
    font-size: 18px;
    color: var(--primary);
    align-self: end;
  }

  /* Suffix ' JOD' */
  #orders-table-body td:nth-child(5)::after {
    content: ' د.أ';
    font-size: 12px;
    font-weight: normal;
    color: var(--text-muted);
  }

  /* 6. Status */
  #orders-table-body td:nth-child(6) {
    grid-area: status;
    justify-self: end;
  }

  #orders-table-body td:nth-child(6) .status-badge {
    font-size: 12px;
    padding: 4px 10px;
  }

  /* 7. Action */
  #orders-table-body td:nth-child(7) {
    grid-area: action;
    justify-self: end;
    width: auto;
  }

  #orders-table-body td:nth-child(7) button {
    width: 40px !important;
    height: 40px !important;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
  }

  #orders-table-body td:nth-child(7) button:hover {
    background: var(--primary);
    color: #fff;
  }
}

/* FINAL v201: REFINED MOBILE ORDERS CARD (Compact & Clean) */
@media (max-width: 900px) {
  #orders-table-body tr {
    display: grid !important;
    /* 
       Row 1: Order # (Left) | Status (Right)
       Row 2: Date (Full)
       Row 3: Customer (Full)
       Row 4: Address (Full)
       Row 5: Total (Left) | Action (Right)
    */
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "id      status"
      "date    date"
      "cust    cust"
      "addr    addr"
      "total   action" !important;
    gap: 8px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px !important;
    padding: 16px !important;
    margin-bottom: 16px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
    align-items: center !important;
  }

  /* Reset TDs */
  #orders-table-body td {
    border: none !important;
    padding: 0 !important;
    background: none !important;
  }

  /* 1. ID (#999999) */
  #orders-table-body td:nth-child(1) {
    grid-area: id;
    font-weight: 800 !important;
    font-size: 18px !important;
    color: var(--text-main) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    /* In RTL, this puts it on the Right, wait. User wants ID on Right? Actually in RTL 'flex-start' is Right. Correct. */
  }

  /* 6. Status Badge */
  #orders-table-body td:nth-child(6) {
    grid-area: status;
    justify-self: end !important;
    /* Left in RTL */
  }

  #orders-table-body td:nth-child(6) .status-badge {
    font-size: 11px !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
  }

  /* 2. Date */
  #orders-table-body td:nth-child(2) {
    grid-area: date;
    font-size: 12px !important;
    color: var(--text-muted) !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    opacity: 0.8 !important;
    margin-top: -4px !important;
    /* Bring closer to title */
  }

  /* 3. Customer */
  #orders-table-body td:nth-child(3) {
    grid-area: cust;
    font-weight: 600 !important;
    font-size: 14px !important;
    color: var(--text-main) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 8px !important;
    padding-top: 8px !important;
    border-top: 1px solid var(--border) !important;
  }

  #orders-table-body td:nth-child(3)::before {
    content: '\f007';
    /* User Ico */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--text-muted);
    font-size: 12px;
  }

  /* 4. Address */
  #orders-table-body td:nth-child(4) {
    grid-area: addr;
    font-size: 13px !important;
    color: var(--text-muted) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  #orders-table-body td:nth-child(4)::before {
    content: '\f3c5';
    /* Map Ico */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--text-muted);
    font-size: 12px;
  }

  /* 5. Total */
  #orders-table-body td:nth-child(5) {
    grid-area: total;
    font-weight: 800 !important;
    font-size: 20px !important;
    color: var(--primary) !important;
    margin-top: 12px !important;
  }

  #orders-table-body td:nth-child(5)::after {
    content: ' د.أ';
    font-size: 12px;
    font-weight: normal;
    color: var(--text-muted);
  }

  /* 7. Action Button */
  #orders-table-body td:nth-child(7) {
    grid-area: action;
    justify-self: end !important;
    margin-top: 12px !important;
  }

  #orders-table-body td:nth-child(7) button {
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
    /* Consistent with other buttons */
    background: var(--input-bg) !important;
    border: 1px solid var(--primary) !important;
    color: var(--primary) !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #orders-table-body td:nth-child(7) button i {
    font-size: 18px !important;
  }
/* Removed extra braces to keep block open */

/* 4. Address */
#orders-table-body td:nth-child(4) {
  grid-area: addr;
  font-size: 13px !important;
  color: var(--text-muted) !important;
  max-width: 100%;
  margin-bottom: 8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  justify-content: flex-start !important;
  /* Right in RTL */
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#orders-table-body td:nth-child(4)::before {
  content: '\f3c5';
  /* FontAwesome Map Marker */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 12px;
  color: var(--text-muted);
  min-width: 16px;
  text-align: center;
}

/* 5. Total */
#orders-table-body td:nth-child(5) {
  grid-area: total;
  font-weight: 800 !important;
  font-size: 16px !important;
  color: var(--primary) !important;
  align-self: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  /* Right in RTL */
  gap: 4px !important;
}

#orders-table-body td:nth-child(5)::after {
  content: ' د.أ' !important;
  font-size: 12px;
  font-weight: normal;
  color: var(--text-muted);
}

/* 6. Status */
#orders-table-body td:nth-child(6) {
  grid-area: status;
  justify-self: end !important;
  /* Left in RTL */
}

#orders-table-body td:nth-child(6) .status-badge {
  font-size: 11px;
  padding: 4px 10px;
}

/* 7. Action */
#orders-table-body td:nth-child(7) {
  grid-area: action;
  justify-self: end !important;
  width: auto !important;
}

#orders-table-body td:nth-child(7) button {
  width: 36px !important;
  height: 36px !important;
  background: rgba(37, 99, 235, 0.1) !important;
  border: 1px solid rgba(37, 99, 235, 0.2) !important;
  color: var(--primary) !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
}

/* Mobile Header Redesign v1 */

/* Default: Hide Mobile Header on Desktop */
.mobile-restaurant-info {
  display: none;
}

@media (max-width: 900px) {
  .mobile-restaurant-info {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-bottom: 0px;
    padding: 10px 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  /* Hide Desktop Header Elements on Mobile */
  .topbar>*:not(.mobile-restaurant-info) {
    display: none !important;
  }

  .topbar {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .mobile-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .mobile-rest-name {
    font-size: 18px;
    /* Larger */
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
  }

  .mobile-logout-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
  }

  .mobile-logout-btn:active {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(0.95);
  }

  .mobile-header-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border-top: 1px solid var(--border);
    /* Divider for neatness */
    padding-top: 12px;
  }

  .mobile-sub-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
  }

  /* Status Colors */
  .mobile-sub-status.active {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
  }

  .mobile-sub-status.expiring {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
  }

  .mobile-sub-status.expired {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
  }

  .mobile-rest-id {
    font-size: 11px;
    font-family: 'Courier New', monospace;
    /* Tech feel */
    color: var(--text-muted);
    background: var(--bg-main);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
  }
}

/* ===== Start of Toggle Switch Fix ===== */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background: transparent !important;
  /* Reset old bg */
  border-radius: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ef4444;
  transition: .25s;
  border-radius: 999px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .25s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch input:checked+.slider {
  background-color: #22c55e;
}

.switch input:checked+.slider:before {
  transform: translateX(20px);
}

/* ===== End of Toggle Switch Fix ===== */
/* FINAL v162: MOBILE DRAG HANDLE FIX (Forced Override) */
@media (max-width: 900px) {
  #products-table-body tr {
    grid-template-columns: auto auto 1fr auto !important;
    grid-template-areas:
      'handle image name toggle'
      'actions actions actions actions' !important;
  }

  .grab-handle {
    grid-area: handle;
    font-size: 18px;
    color: var(--text-muted);
    padding-right: 8px;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* FIX v2.06: Minimal Truncation Fix (Wrapper Aware) */
@media (max-width: 900px) {

  /* Assign the wrapper to the existing 'name' grid area */
  .prod-name-box {
    grid-area: name !important;

    /* Truncation Logic */
    display: block;
    /* Contain content */
    min-width: 0;
    /* Allow shrinking below content size */
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    /* Alignment */
    align-self: center;
    justify-self: stretch;
  }

  /* Pass ellipsis down to the text span */
  .prod-name-box span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}



/* Button Full Width Utilities */
.btn-primary-full {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s;
}

.btn-primary-full:hover {
  opacity: 0.9;
}

.btn-danger-full {
  width: 100%;
  padding: 12px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s;
}
/* Removed extra brace and duplicate code block */

/* ===== Start of Toggle Switch Fix ===== */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background: transparent !important;
  /* Reset old bg */
  border-radius: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ef4444;
  transition: .25s;
  border-radius: 999px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .25s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch input:checked+.slider {
  background-color: #22c55e;
}

.switch input:checked+.slider:before {
  transform: translateX(20px);
}

/* ===== End of Toggle Switch Fix ===== */
/* FINAL v162: MOBILE DRAG HANDLE FIX (Forced Override) */
@media (max-width: 900px) {
  #products-table-body tr {
    grid-template-columns: auto auto 1fr auto !important;
    grid-template-areas:
      'handle image name toggle'
      'actions actions actions actions' !important;
  }

  .grab-handle {
    grid-area: handle;
    font-size: 18px;
    color: var(--text-muted);
    padding-right: 8px;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* FIX v2.06: Minimal Truncation Fix (Wrapper Aware) */
@media (max-width: 900px) {

  /* Assign the wrapper to the existing 'name' grid area */
  .prod-name-box {
    grid-area: name !important;

    /* Truncation Logic */
    display: block;
    /* Contain content */
    min-width: 0;
    /* Allow shrinking below content size */
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    /* Alignment */
    align-self: center;
    justify-self: stretch;
  }

  /* Pass ellipsis down to the text span */
  .prod-name-box span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}



/* Button Full Width Utilities */
.btn-primary-full {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s;
}

.btn-primary-full:hover {
  opacity: 0.9;
}

.btn-danger-full {
  width: 100%;
  padding: 12px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s;
}

.btn-danger-full:hover {
  opacity: 0.9;
}

/* Date Input Dark Mode Fix */
/* Fix Active Tab Visibility */
.tab-btn.active {
  background-color: var(--primary) !important;
  color: white !important;
  font-weight: 700;
}

#orders-date-filter {
  color-scheme: dark;
}

#orders-date-filter::-webkit-calendar-picker-indicator {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="15" viewBox="0 0 24 24"><path fill="white" d="M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"/></svg>');
  cursor: pointer;
  display: block !important;
  opacity: 1;
}

/* ========================================= */
/* FINAL DESKTOP TABLE FIXES (v3.3.10)      */
/* ========================================= */

.data-table {
  width: 100% !important;
  border-collapse: collapse;
  table-layout: fixed;
  /* Fix column widths */
}

.table-wrapper {
  width: 100% !important;
  overflow-x: auto;
  display: block;
}

/* Column Widths (Desktop) */
.data-table th:nth-child(1) {
  width: 100px;
}

/* ID */
.data-table th:nth-child(2) {
  width: 140px;
}

/* Date */
.data-table th:nth-child(3) {
  width: 160px;
}

/* Customer */
.data-table th:nth-child(4) {
  width: auto;
}

/* Address */
.data-table th:nth-child(5) {
  width: 120px;
}

/* Total */
.data-table th:nth-child(6) {
  width: 110px;
}

/* Status */
.data-table th:nth-child(7) {
  width: 90px;
}

/* Action */

.data-table th,
.data-table td {
  padding: 14px 12px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================= */
/* FINAL MOBILE CARD STYLES (v3.3.10)       */
/* ========================================= */

@media (max-width: 900px) {

  .order-mobile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* Header */
  .omc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }

  .omc-id {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
  }

  /* Status Badges */
  .omc-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
  }

  .omc-status.warning {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
  }

  .omc-status.info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
  }

  .omc-status.primary {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
  }

  .omc-status.success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
  }

  .omc-status.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
  }

  .omc-status.secondary {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
  }

  /* Body */
  .omc-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .omc-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-main);
  }

  .omc-row i {
    width: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
  }

  .omc-row.date {
    color: var(--text-muted);
    font-size: 13px;
  }

  .omc-row.user {
    font-weight: 600;
  }

  .omc-row.addr {
    font-size: 13px;
    line-height: 1.4;
  }

  /* Footer */
  .omc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }

  .omc-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
  }

  .omc-btn {
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--input-bg);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
  }

  .omc-btn:hover {
    background: var(--primary);
    color: white;
  }
}

/* ========================================= */
/* VISIBILITY HELPERS (v3.3.10)             */
/* ========================================= */

.mobile-only {
  display: none !important;
}

.desktop-only {
  display: block !important;
}

@media (max-width: 900px) {
  .mobile-only {
    display: flex !important;
  }

  .desktop-only {
    display: none !important;
  }
}

/* ========================================= */
/* FINAL FONT OPTIMIZATIONS (v3.3.14)       */
/* ========================================= */

/* 1. ORDERS TABLE (Match Zones Table style) */
.data-table {
  font-size: 13px !important;
}

.data-table th {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--text-color) !important;
  background: var(--table-head-bg) !important;
  padding: 10px 14px !important;
}

.data-table td {
  font-size: 13px !important;
  font-weight: 400 !important;
  padding: 10px 14px !important;
}

/* Allow bold only for IDs and Totals */
.data-table td:nth-child(1) {
  font-weight: 700 !important;
  /* Order Number */
  font-family: 'Courier New', monospace;
  /* Tech feel */
}

.data-table td:nth-child(5) {
  font-weight: 700 !important;
  /* Price */
}


/* 2. UNIFIED MENU (Lighter Aesthetic) */
/* Category Header */
.cat-header {
  padding: 12px 16px !important;
}

.cat-name {
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.4;
}

.cat-badge {
  font-size: 11px !important;
  font-weight: 500 !important;
  padding: 2px 8px !important;
}

/* Product Item */
.menu-product-item {
  padding: 10px 12px !important;
}

.prod-name {
  font-size: 14px !important;
  font-weight: 600 !important;
}

.prod-desc {
  font-size: 12px !important;
  font-weight: 400 !important;
  color: var(--muted-text) !important;
}

.prod-pricing {
  font-size: 14px !important;
  font-weight: 700 !important;
}


/* Save Button in Card Header */
.card-save-btn {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: auto;
  /* Push to far left in RTL */
}

.card-save-btn:hover {
  background: #16a34a;
  color: white;
  transform: scale(1.05);
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.2);
}

.settings-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}


/* Password Toggle Wrapper */
.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  padding-right: 40px !important;
  /* Make room for icon in RTL if needed, or left? */
  padding-left: 40px !important;
}

/* Adjust for RTL: Button on the Left */
.toggle-password-btn {
  position: absolute;
  top: 50%;
  left: 10px;
  /* Left side for RTL input */
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  z-index: 2;
}

.toggle-password-btn:hover {
  color: var(--primary-color);
}
 / *   E n s u r e   h e l p   b u t t o n   i s   A L W A Y S   v i s i b l e   o n   m o b i l e   t o p b a r   * / 
 @ m e d i a   ( m a x - w i d t h :   9 0 0 p x )   { 
     . t o p - b a r - a c t i o n s   # b t n - h e l p - t o u r   { 
         d i s p l a y :   f l e x   ! i m p o r t a n t ; 
         v i s i b i l i t y :   v i s i b l e   ! i m p o r t a n t ; 
         o p a c i t y :   1   ! i m p o r t a n t ; 
         z - i n d e x :   9 9   ! i m p o r t a n t ; 
     } 
 } 
  
 