/* CSS Variables */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #64748b;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --border-color: #334155;
  --border-radius: 8px;
  --border-radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);

  --sidebar-width: 260px;
  --header-height: 70px;

  --transition: all 0.2s ease;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* App Layout */
.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-top: 0.25rem;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-light);
  border-left-color: var(--primary);
}

.nav-item i {
  font-size: 1.125rem;
  width: 1.5rem;
  text-align: center;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

.db-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
  animation: pulse 2s infinite;
}

.status-dot.connected {
  background: var(--success);
  animation: none;
}

.status-dot.error {
  background: var(--danger);
  animation: none;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
}

.content-header {
  height: var(--header-height);
  padding: 0 2rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.content-area {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--secondary);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
}

/* Sections */
.section {
  display: none;
}

.section.active {
  display: block;
}

.section-toolbar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0 1rem;
  flex: 1;
  max-width: 400px;
}

.search-box i {
  color: var(--text-muted);
}

.search-box input {
  flex: 1;
  padding: 0.75rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
}

.filter-group {
  display: flex;
  gap: 0.75rem;
}

.filter-group select {
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  outline: none;
}

.filter-group select:focus {
  border-color: var(--primary);
}

/* Data Grid (Products) */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.product-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.product-image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
}

.product-badge.bestseller {
  background: #f59e0b;
}

.product-badge.popular {
  background: #ec4899;
}

.product-badge.trending {
  background: #8b5cf6;
}

.product-badge.luxury {
  background: #14b8a6;
}

.product-badge.new {
  background: #22c55e;
}

.product-info {
  padding: 1.25rem;
}

.product-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 0.75rem;
}

.product-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: var(--bg-tertiary);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.meta-tag.in-stock {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.meta-tag.out-of-stock {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stars {
  color: #fbbf24;
}

.rating-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.product-actions {
  display: flex;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.product-actions .btn {
  flex: 1;
}

/* Data Table */
.data-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background: var(--bg-tertiary);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border-radius: 4px;
  font-size: 0.75rem;
}

.unverified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(100, 116, 139, 0.1);
  color: var(--text-muted);
  border-radius: 4px;
  font-size: 0.75rem;
}

/* Simple List */
.simple-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.simple-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.simple-item-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.simple-item-info code {
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
}

.simple-item-actions {
  display: flex;
  gap: 0.5rem;
}

/* Loading */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-muted);
  gap: 1rem;
}

.loading i {
  font-size: 2rem;
}

.loading-row {
  text-align: center;
  color: var(--text-muted);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-lg {
  max-width: 700px;
}

.modal-sm {
  max-width: 400px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
}

.checkbox-group label:hover {
  background: var(--secondary);
}

.checkbox-group input[type="checkbox"] {
  accent-color: var(--primary);
}

/* Images Manager */
.images-manager {
  background: var(--bg-tertiary);
  border-radius: var(--border-radius);
  padding: 1rem;
}

.image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.image-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 2px solid var(--border-color);
}

.image-item.primary {
  border-color: var(--primary);
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-item-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-item-primary {
  position: absolute;
  bottom: 2px;
  left: 2px;
  padding: 1px 4px;
  background: var(--primary);
  color: white;
  font-size: 0.625rem;
  border-radius: 2px;
}

.add-image-row {
  display: flex;
  gap: 0.5rem;
}

.add-image-row input {
  flex: 1;
  padding: 0.625rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 2000;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
  min-width: 300px;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.warning {
  border-left: 4px solid var(--warning);
}

.toast-icon {
  font-size: 1.25rem;
}

.toast.success .toast-icon {
  color: var(--success);
}

.toast.error .toast-icon {
  color: var(--danger);
}

.toast.warning .toast-icon {
  color: var(--warning);
}

.toast-message {
  flex: 1;
  font-size: 0.875rem;
}

.delete-message {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    width: 70px;
  }

  .sidebar-header {
    padding: 1rem;
    text-align: center;
  }

  .logo {
    font-size: 1.5rem;
  }

  .logo-subtitle {
    display: none;
  }

  .nav-item span {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 1rem;
  }

  .nav-item i {
    font-size: 1.25rem;
  }

  .db-status span:not(.status-dot) {
    display: none;
  }

  .main-content {
    margin-left: 70px;
  }
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .section-toolbar {
    flex-direction: column;
  }

  .search-box {
    max-width: none;
  }

  .filter-group {
    width: 100%;
  }

  .filter-group select {
    flex: 1;
  }
}

/* ========================================= */
/*       ENHANCED MODAL DESIGN V2.0          */
/* ========================================= */

/* 1. Enhanced Modal Container & Overlay */
.modal-overlay {
  background: rgba(15, 23, 42, 0.65);
  /* Darker, slightly blue-tinted dark */
  backdrop-filter: blur(8px);
  /* Blur effect for modern feel */
}

.modal-content {
  background: #1e293b;
  /* Ensure solid background for content */
  border: 1px solid rgba(148, 163, 184, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  /* Deep shadow */
  border-radius: 16px;
  /* Softer corners */
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  padding: 1.5rem 2rem;
  background: linear-gradient(to right, rgba(99, 102, 241, 0.05), transparent);
  /* Subtle gradient */
}

.modal-title {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding: 1.5rem 2rem;
  background: #1e293b;
  /* Keep consistent */
}

/* 2. Enhanced Form Inputs */
.form-group label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 0.6rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: #0f172a;
  /* Darker than card bg */
  border: 1px solid #334155;
  color: #f8fafc;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: #475569;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  background: #0f172a;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
  /* Nice focus ring */
  outline: none;
}

/* 3. Modern Chips (Occasions & Payment Modes) */
.chip-checkbox {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.chip-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  /* Hide default checkbox */
  width: 0;
  height: 0;
}

.chip-content {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1rem;
  background: #334155;
  /* Default inactive state */
  color: #cbd5e1;
  border-radius: 999px;
  /* Pill shape */
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chip-checkbox:hover .chip-content {
  background: #475569;
  transform: translateY(-1px);
}

.chip-checkbox input[type="checkbox"]:checked+.chip-content {
  background: #4f46e5;
  /* Primary color */
  color: white;
  border-color: #818cf8;
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

/* 4. Enhanced Image Manager */
.images-manager {
  background: #0f172a;
  border: 2px dashed #334155;
  padding: 1.5rem;
  border-radius: 12px;
}

.image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
}

.image-item {
  width: 100%;
  height: 100px;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
}

.image-item:hover {
  transform: scale(1.05);
  z-index: 2;
}

.image-item.primary {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.image-item-primary {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(99, 102, 241, 0.9);
  color: white;
  font-size: 0.65rem;
  text-align: center;
  padding: 2px 0;
  text-transform: uppercase;
  font-weight: bold;
}

.add-image-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.add-image-row input {
  flex: 1;
}

/* 5. Custom Scrollbar for Modal Body */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: #1e293b;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Fix for conflict with existing .checkbox-group label styles */
.checkbox-group .chip-checkbox {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  display: inline-block !important;
  /* Reset flex if needed, though relative is fine */
}

/* ========================================= */
/*       SPLIT MODAL LAYOUT v3.0             */
/* ========================================= */

.modal-lg {
  max-width: 1000px;
  /* Wider for 2 columns */
}

.modal-split {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2rem;
  align-items: start;
}

.modal-col-left {
  /* Left column styling if needed */
}

.modal-col-right {
  background: #162032;
  /* Slightly darker/different shade */
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 1.5rem;
  height: 100%;
}

/* Settings Groups (Right Column) */
.settings-group {
  margin-bottom: 2rem;
}

.settings-group:last-child {
  margin-bottom: 0;
}

.settings-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 1rem;
  font-weight: 600;
  border-bottom: 1px solid #334155;
  padding-bottom: 0.5rem;
}

.settings-header i {
  color: #6366f1;
}

/* ========================================= */
/*       NEW "MODERN TAG" DESIGN             */
/* ========================================= */

/* Grid container for tags */
.checkbox-grid {
  display: flex;
  /* Flex wrap is better for variable width tags */
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Reset any previous label styling conflcits */
.checkbox-grid .chip-checkbox {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  width: auto !important;
  margin: 0 !important;
}

/* The Tag Content Itself */
.chip-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.85rem;
  background: transparent;
  color: #cbd5e1;
  border: 1px solid #475569;
  /* Outline style */
  border-radius: 6px;
  /* Slightly squared, modern tech look */
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* Hover State */
.checkbox-grid .chip-checkbox:hover .chip-content {
  border-color: #94a3b8;
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-1px);
}

/* Selected State */
.checkbox-grid .chip-checkbox input:checked+.chip-content {
  background: #6366f1;
  /* Solid primary fill */
  border-color: #6366f1;
  color: white;
  box-shadow: 0 4px 12px -2px rgba(99, 102, 241, 0.5);
  /* Strong glow */
  transform: translateY(-1px);
}

/* Active/Press State */
.checkbox-grid .chip-checkbox:active .chip-content {
  transform: translateY(0);
}

/* Optional: Add a subtle checkmark for selected state using spacing */
.checkbox-grid .chip-checkbox input:checked+.chip-content::before {
  content: "\f00c";
  /* FontAwesome check */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: 6px;
  font-size: 0.7rem;
}

/* Responsive adjustment for smaller screens */
@media (max-width: 768px) {
  .modal-split {
    grid-template-columns: 1fr;
  }

  .modal-col-right {
    padding: 1rem;
    background: transparent;
    border: none;
    border-top: 1px solid #334155;
    border-radius: 0;
  }
}

/* ========================================= */
/*           ORDER MODAL STYLES              */
/* ========================================= */

.status-update-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.status-update-bar label {
  font-weight: 600;
  color: var(--primary-light);
}

.status-update-bar select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--bg-card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' 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");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding: 0.6rem 1rem;
  padding-right: 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  min-width: 180px;
  transition: all 0.2s ease;
}

.status-update-bar select:hover {
  border-color: var(--primary-light);
  background-color: var(--bg-tertiary);
}

.status-update-bar select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.status-update-bar select option {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  padding: 10px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.info-card:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

.info-card p {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.notes-card {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.2);
}

.order-items-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.order-item-cell {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.order-item-img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-tertiary);
}

.product-name-sm {
  font-weight: 500;
  color: var(--text-primary);
}

.product-sku-sm {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

tfoot td {
  border-top: 2px solid var(--border-color);
  padding-top: 1rem;
  background: var(--bg-tertiary);
}

.total-row td {
  font-size: 1.1rem;
  color: var(--primary-light);
  border-top: none;
  padding-top: 0.5rem;
}