/* ==========================================================================
   ترند ماركت فارم – لوحة التحكم الإدارية الاحترافية (Admin Design System RTL)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@300;400;500;600;700;800&display=swap');

:root {
  --admin-primary: #0e382b;
  --admin-primary-dark: #071f18;
  --admin-accent: #278e38;
  --admin-accent-hover: #1e752d;
  --admin-accent-soft: #eaf7ed;
  --admin-amber: #d97706;
  --admin-amber-soft: #fef3c7;
  --admin-danger: #dc2626;
  --admin-danger-soft: #fee2e2;
  --admin-info: #0284c7;
  --admin-info-soft: #e0f2fe;
  
  --admin-bg: #f8fafc;
  --admin-surface: #ffffff;
  --admin-surface-muted: #f1f5f9;
  --admin-border: #e2e8f0;
  --admin-border-focus: #278e38;
  
  --admin-text: #0f172a;
  --admin-text-muted: #64748b;
  --admin-text-light: #94a3b8;
  
  --admin-sidebar-bg: #09261d;
  --admin-sidebar-hover: rgba(255, 255, 255, 0.08);
  --admin-sidebar-active: #278e38;
  --admin-sidebar-text: #cbd5e1;
  
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  direction: rtl;
  font-family: 'Alexandria', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--admin-bg);
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Icon & Utility Sizing
   ========================================================================== */
.w-3 { width: 12px !important; min-width: 12px; }
.h-3 { height: 12px !important; min-height: 12px; }
.w-3\.5 { width: 14px !important; min-width: 14px; }
.h-3\.5 { height: 14px !important; min-height: 14px; }
.w-4 { width: 16px !important; min-width: 16px; }
.h-4 { height: 16px !important; min-height: 16px; }
.w-5 { width: 20px !important; min-width: 20px; }
.h-5 { height: 20px !important; min-height: 20px; }
.w-6 { width: 24px !important; min-width: 24px; }
.h-6 { height: 24px !important; min-height: 24px; }
.w-7 { width: 28px !important; min-width: 28px; }
.h-7 { height: 28px !important; min-height: 28px; }
.w-8 { width: 32px !important; min-width: 32px; }
.h-8 { height: 32px !important; min-height: 32px; }
.w-10 { width: 40px !important; min-width: 40px; }
.h-10 { height: 40px !important; min-height: 40px; }
.w-12 { width: 48px !important; min-width: 48px; }
.h-12 { height: 48px !important; min-height: 48px; }

.sidebar-link svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  flex-shrink: 0;
  color: #64748b;
  transition: color var(--transition-fast);
}

.btn-sidebar-logout svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  flex-shrink: 0;
}

.dropdown-item svg {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  flex-shrink: 0;
}

.btn-table-action svg {
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  max-width: 15px !important;
  max-height: 15px !important;
  flex-shrink: 0;
}

/* ==========================================================================
   Layout Structure
   ========================================================================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar */
.admin-sidebar {
  width: 270px;
  background: var(--admin-sidebar-bg);
  color: var(--admin-sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  transition: transform var(--transition-normal);
}

.sidebar-header {
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sidebar-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.sidebar-brand-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.sidebar-badge {
  font-size: 0.65rem;
  background: var(--admin-accent);
  color: #ffffff;
  padding: 0.12rem 0.5rem;
  border-radius: var(--radius-full);
  display: inline-block;
  font-weight: 600;
}

.sidebar-nav {
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.nav-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
  padding: 0.85rem 0.75rem 0.25rem;
  letter-spacing: 0.5px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.86rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.sidebar-link svg {
  flex-shrink: 0;
  color: #64748b;
  transition: color var(--transition-fast);
}

.sidebar-link:hover {
  background: var(--admin-sidebar-hover);
  color: #ffffff;
}

.sidebar-link:hover svg {
  color: #ffffff;
}

.sidebar-link.active {
  background: var(--admin-sidebar-active);
  color: #ffffff;
  font-weight: 700;
}

.sidebar-link.active svg {
  color: #ffffff;
}

.sidebar-badge-counter {
  margin-right: auto;
  font-size: 0.7rem;
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
  margin-top: auto;
}

.btn-sidebar-logout {
  width: 100%;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #fca5a5;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.btn-sidebar-logout:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

/* Main Area */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--admin-bg);
}

.admin-topbar {
  background: var(--admin-surface);
  border-bottom: 1px solid var(--admin-border);
  padding: 0.75rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: var(--shadow-xs);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-store-view {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--admin-primary);
  background: var(--admin-accent-soft);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(39, 142, 56, 0.2);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-store-view:hover {
  background: #d4edd9;
}

/* User Dropdown */
.user-menu-container {
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.user-menu-btn:hover {
  background: var(--admin-surface-muted);
}

.user-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--admin-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.user-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 50;
  overflow: hidden;
}

.user-dropdown-menu.show {
  display: block;
}

.dropdown-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-bg);
}

.dropdown-header-name {
  font-weight: 700;
  color: var(--admin-text);
  font-size: 0.88rem;
}

.dropdown-header-role {
  font-size: 0.72rem;
  color: var(--admin-text-muted);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  color: var(--admin-text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--admin-surface-muted);
  color: var(--admin-primary);
}

.dropdown-divider {
  height: 1px;
  background: var(--admin-border);
  margin: 0.25rem 0;
}

.admin-container {
  padding: 1.75rem;
  flex: 1;
}

/* ==========================================================================
   Cards & Stats
   ========================================================================== */
.admin-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.admin-card-header {
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--admin-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-card-subtitle {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
  font-weight: 400;
}

.admin-card-body {
  padding: 1.5rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  gap: 1.15rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.stat-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrap.green { background: var(--admin-accent-soft); color: var(--admin-accent); }
.stat-icon-wrap.blue { background: var(--admin-info-soft); color: var(--admin-info); }
.stat-icon-wrap.amber { background: var(--admin-amber-soft); color: var(--admin-amber); }
.stat-icon-wrap.red { background: var(--admin-danger-soft); color: var(--admin-danger); }
.stat-icon-wrap.purple { background: #fae8ff; color: #a21caf; }

.stat-label {
  font-size: 0.78rem;
  color: var(--admin-text-muted);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--admin-text);
  line-height: 1.2;
}

.stat-desc {
  font-size: 0.72rem;
  color: var(--admin-text-light);
  margin-top: 0.25rem;
}

/* ==========================================================================
   Buttons & Form Controls
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
}

.btn-primary {
  background: var(--admin-accent);
  color: #ffffff;
  border-color: var(--admin-accent);
}

.btn-primary:hover {
  background: var(--admin-accent-hover);
  border-color: var(--admin-accent-hover);
  color: #ffffff;
}

.btn-secondary {
  background: var(--admin-surface-muted);
  color: var(--admin-text);
  border-color: var(--admin-border);
}

.btn-secondary:hover {
  background: #e2e8f0;
  color: var(--admin-text);
}

.btn-outline {
  background: transparent;
  color: var(--admin-text);
  border-color: var(--admin-border);
}

.btn-outline:hover {
  background: var(--admin-surface-muted);
  color: var(--admin-primary);
  border-color: var(--admin-primary);
}

.btn-danger {
  background: var(--admin-danger);
  color: #ffffff;
  border-color: var(--admin-danger);
}

.btn-danger:hover {
  background: #b91c1c;
  color: #ffffff;
}

.btn-whatsapp {
  background: #25D366;
  color: #ffffff;
  border-color: #25D366;
}

.btn-whatsapp:hover {
  background: #1eb857;
  color: #ffffff;
}

/* Form inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--admin-text);
  margin-bottom: 0.4rem;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--admin-text-muted);
  margin-top: 0.25rem;
}

.form-control {
  width: 100%;
  height: 42px;
  padding: 0.55rem 0.9rem;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--admin-text);
  background: #ffffff;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  border-color: var(--admin-border-focus);
  box-shadow: 0 0 0 3px rgba(39, 142, 56, 0.15);
}

textarea.form-control {
  height: auto;
  min-height: 90px;
  resize: vertical;
}

/* Toggle Switch */
.switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.switch-input {
  display: none;
}

.switch-slider {
  width: 44px;
  height: 24px;
  background: #cbd5e1;
  border-radius: var(--radius-full);
  position: relative;
  transition: background var(--transition-fast);
}

.switch-slider::before {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: var(--radius-full);
  transition: transform var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.switch-input:checked + .switch-slider {
  background: var(--admin-accent);
}

.switch-input:checked + .switch-slider::before {
  transform: translateX(-20px);
}

/* ==========================================================================
   Data Tables
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: right;
}

.admin-table th {
  background: #f8fafc;
  padding: 0.85rem 1.15rem;
  font-weight: 700;
  color: var(--admin-text-muted);
  border-bottom: 1.5px solid var(--admin-border);
  white-space: nowrap;
}

.admin-table td {
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--admin-border);
  vertical-align: middle;
}

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

.admin-table tbody tr:hover {
  background: #f8fafc;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-success { background: var(--admin-accent-soft); color: var(--admin-accent); }
.badge-warning { background: var(--admin-amber-soft); color: var(--admin-amber); }
.badge-danger { background: var(--admin-danger-soft); color: var(--admin-danger); }
.badge-info { background: var(--admin-info-soft); color: var(--admin-info); }
.badge-default { background: var(--admin-surface-muted); color: var(--admin-text-muted); }

.badge-new { background: #dbeafe; color: #1e40af; }
.badge-confirmed { background: #e0e7ff; color: #3730a3; }
.badge-processing { background: #fef3c7; color: #92400e; }
.badge-shipping { background: #fae8ff; color: #86198f; }
.badge-delivered { background: #dcfce7; color: #166534; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-returned { background: #f1f5f9; color: #475569; }

/* Table action buttons */
.table-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--admin-surface-muted);
  border: 1px solid var(--admin-border);
  color: var(--admin-text);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-table-action:hover {
  background: var(--admin-accent);
  color: #ffffff;
  border-color: var(--admin-accent);
}

.btn-table-action.danger:hover {
  background: var(--admin-danger);
  border-color: var(--admin-danger);
}

/* ==========================================================================
   Tabs System
   ========================================================================== */
.admin-tabs-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--admin-border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  white-space: nowrap;
}

.tab-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--admin-text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-nav-item:hover {
  color: var(--admin-text);
}

.tab-nav-item.active {
  color: var(--admin-accent);
  border-bottom-color: var(--admin-accent);
  font-weight: 700;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* ==========================================================================
   POS Interface
   ========================================================================== */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  height: calc(100vh - 85px);
}

.pos-products-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.pos-search-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pos-categories-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.pos-category-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--admin-text);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pos-category-btn.active, .pos-category-btn:hover {
  background: var(--admin-accent);
  color: #ffffff;
  border-color: var(--admin-accent);
}

.pos-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.65rem;
  overflow-y: auto;
  padding: 0.35rem;
  flex: 1;
  align-content: start;
  align-items: start;
}

.pos-product-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 175px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  position: relative;
  overflow: hidden;
  user-select: none;
}

.pos-product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--admin-accent);
}

.pos-product-img {
  width: 100%;
  height: 75px;
  object-fit: contain;
  margin-bottom: 0.35rem;
  border-radius: var(--radius-xs);
  background: #f8fafc;
}

.pos-product-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--admin-text);
  line-height: 1.25;
  height: 2.5em;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pos-product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 0.25rem;
  border-top: 1px dashed var(--admin-border);
}

.pos-product-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--admin-accent);
}

.pos-product-stock {
  font-size: 0.68rem;
  color: var(--admin-text-muted);
  font-weight: 600;
}

/* Cart Panel */
.pos-cart-panel {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.pos-cart-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-bg);
}

.pos-cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}

.pos-cart-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--admin-border);
  align-items: center;
}

.pos-cart-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--admin-border);
  background: var(--admin-bg);
}

.pos-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--admin-text-muted);
  margin-bottom: 0.4rem;
}

.pos-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--admin-primary);
  margin: 0.75rem 0 1rem;
  padding-top: 0.65rem;
  border-top: 2px dashed var(--admin-border);
}

/* ==========================================================================
   Modals & Popups
   ========================================================================== */
.admin-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.admin-modal-backdrop.show {
  display: flex;
}

.admin-modal-box {
  background: var(--admin-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header-clean {
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body-clean {
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-footer-clean {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--admin-border);
  background: var(--admin-bg);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .admin-sidebar {
    position: fixed;
    transform: translateX(100%);
  }
  .admin-sidebar.mobile-open {
    transform: translateX(0);
  }
  .pos-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .admin-container {
    padding: 1rem;
  }
}
