.delete-checkbox input[type="checkbox"] {
  margin: 0;
}

.order-item-form.is-deleted {
  opacity: 0.6;
  background: #fef2f2;
}

.order-item-form.is-deleted .order-item-header h4 {
  text-decoration: line-through;
  color: #b91c1c;
}
/* Modern Order Management System Styles */

:root {
  /* Modern Professional Color Palette */
  --primary-color: #6366f1; /* Indigo - modern and professional */
  --primary-dark: #4f46e5; /* Deep indigo for hover states */
  --secondary-color: #64748b; /* Slate gray - sophisticated neutral */
  --success-color: #059669; /* Emerald green - vibrant success */
  --danger-color: #dc2626; /* Modern red - clear danger */
  --warning-color: #f59e0b; /* Amber - warm warning */
  --info-color: #0ea5e9; /* Sky blue - fresh info */
  --bg-color: #fafbfc; /* Soft off-white background */
  --card-bg: #ffffff; /* Pure white cards */
  --text-primary: #0f172a; /* Deep slate for primary text */
  --text-secondary: #64748b; /* Medium slate for secondary text */
  --border-color: #e4e7eb; /* Light warm gray borders */
  --shadow:
    0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-lg:
    0 10px 15px -3px rgba(15, 23, 42, 0.1),
    0 4px 6px -2px rgba(15, 23, 42, 0.05);
  /* Space reserved under fixed top nav (min-height + padding) */
  --navbar-offset: 4.75rem;
}

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

html {
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Navigation — fixed so it stays visible while scrolling (sticky breaks with overflow-x on html/body) */
.navbar {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.97) 0%,
    rgba(30, 41, 59, 0.98) 100%
  );
  /* No backdrop-filter here: it creates a containing block for fixed children
     (mobile slide-out menu) and clips full-viewport panels. */
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.12);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  flex-shrink: 0;
}

.nav-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.45rem 1rem;
  min-height: 64px;
  height: auto;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.5rem;
  box-sizing: border-box;
}

/* Brand */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.5rem 0 0;
  margin-right: 0.65rem;
  text-decoration: none;
  color: #fff;
  letter-spacing: -0.02em;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.nav-brand:hover {
  opacity: 0.92;
}

.nav-brand:hover .nav-logo-mark {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
}

.nav-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  flex-shrink: 0;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.nav-logo-svg {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 0.5rem;
}

.nav-brand-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.0625rem;
  line-height: 1.15;
}

.nav-brand-text {
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
  color: #f8fafc;
}

.nav-brand-tagline {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  white-space: nowrap;
}

/* Legacy emoji logo (if used elsewhere) */
.nav-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  flex-shrink: 0;
}

/* .nav-drawer wraps scrollable links + tools + user; desktop: display:contents (769px+).
   Mobile: fixed slide-out panel (max-width:768px). */

/* Horizontally scrollable primary links (desktop toolbar row) */
.nav-main-scroll {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 0.15rem;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  padding: 0.1rem 0.15rem;
  margin: 0;
}

.nav-main-divider {
  width: 1px;
  height: 1.25rem;
  margin: 0 0.25rem;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 255, 255, 0.14),
    transparent
  );
  flex-shrink: 0;
  align-self: center;
}

.nav-main-divider--admin {
  margin-left: 0.35rem;
}

/* Default: boxed admin group (tablet / mobile). Desktop overrides with display:contents below. */
.nav-admin-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  padding: 0.15rem 0.3rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.5rem;
}

/* Desktop: drawer wrapper is transparent to flex — children sit in .nav-container row */
@media (min-width: 769px) {
  .nav-drawer {
    display: contents;
  }

  .nav-main-scroll {
    flex: 1 1 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.5) rgba(255, 255, 255, 0.06);
  }

  .nav-main-scroll::-webkit-scrollbar {
    height: 6px;
  }

  .nav-main-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 3px;
  }

  .nav-main-scroll::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 3px;
  }

  .nav-main-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.65);
  }

  /* Real flex item (not contents) so overflow-x: auto reliably scrolls in Chromium/Brave */
  .nav-admin-links {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.15rem;
    flex: 0 0 auto;
    min-width: min-content;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.6rem;
  min-height: 34px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border-radius: 0.45rem;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
  flex-shrink: 0;
  position: relative;
}

.nav-link:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.07);
}

.nav-link:focus-visible {
  outline: 2px solid rgba(165, 180, 252, 0.6);
  outline-offset: 2px;
}

.nav-link.active {
  color: #fff;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.35),
    rgba(139, 92, 246, 0.22)
  );
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(165, 180, 252, 0.25);
}

.nav-link.active:hover {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.42),
    rgba(139, 92, 246, 0.28)
  );
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.15rem;
  transform: translateX(-50%);
  width: 1.1rem;
  height: 2px;
  background: linear-gradient(90deg, #a5b4fc, #c4b5fd);
  border-radius: 2px;
}

.nav-link--admin {
  opacity: 0.92;
}

.nav-link--admin:hover,
.nav-link--admin.active {
  opacity: 1;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.8125rem;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.88;
  border-radius: 0.3rem;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active .nav-icon {
  background: rgba(255, 255, 255, 0.12);
}

.nav-label {
  white-space: nowrap;
}

/* Desktop: compact links + admin pills (must follow base .nav-link / .nav-icon for cascade) */
@media (min-width: 769px) {
  .nav-link {
    padding: 0.32rem 0.48rem;
    min-height: 32px;
    font-size: 0.78rem;
    gap: 0.28rem;
  }

  .nav-link--admin {
    opacity: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
  }

  .nav-link--admin:hover {
    background: rgba(99, 102, 241, 0.22);
    border-color: rgba(129, 140, 248, 0.35);
  }

  .nav-link--admin.active {
    background: linear-gradient(
      135deg,
      rgba(99, 102, 241, 0.35),
      rgba(139, 92, 246, 0.22)
    );
    border-color: rgba(165, 180, 252, 0.35);
  }

  .nav-icon {
    width: 1.2rem;
    height: 1.2rem;
    font-size: 0.75rem;
  }
}

/* Tools (icon buttons) */
.nav-tools {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0 0.5rem 0 0.65rem;
  margin: 0 0 0 0.25rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.nav-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.5rem;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition:
    color 0.2s,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
  position: relative;
  -webkit-user-select: none;
  user-select: none;
}

/* Text label for tool actions (shown in mobile drawer; icon-only on desktop) */
.nav-tool-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-tool-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.nav-tool-btn.active {
  color: #c4b5fd;
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(129, 140, 248, 0.35);
}

.nav-notification-wrap {
  display: inline-flex;
  align-items: center;
}

.nav-tool-btn .notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 16px;
  color: #fff;
  background: #ef4444;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #1e293b;
  pointer-events: none;
}

/* User section */
.nav-user {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding-left: 0.75rem;
  flex-shrink: 0;
}

.nav-user-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.65rem 0.3rem 0.35rem;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  transition:
    color 0.2s,
    background 0.2s ease,
    border-color 0.2s ease;
}

.nav-user-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.nav-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.65),
    rgba(139, 92, 246, 0.55)
  );
  font-size: 0.6875rem;
  font-weight: 700;
  color: #fff;
}

.nav-user-link img.nav-avatar {
  display: block;
}

.nav-username {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
}

.nav-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  color: #fecaca;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 0.5rem;
  border: 1px solid rgba(248, 113, 113, 0.2);
  background: rgba(239, 68, 68, 0.08);
  transition:
    color 0.2s,
    background 0.2s ease,
    border-color 0.2s ease;
}

.nav-logout:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.28);
  border-color: rgba(248, 113, 113, 0.4);
}

/* Mobile menu (hidden on desktop) */
.nav-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0 0 0 0.35rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.nav-mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.nav-mobile-toggle:focus-visible {
  outline: 2px solid rgba(165, 180, 252, 0.7);
  outline-offset: 2px;
}

.nav-mobile-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 1px;
  background: #f1f5f9;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-container.nav-open .nav-mobile-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-container.nav-open .nav-mobile-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-container.nav-open .nav-mobile-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.nav-backdrop[hidden] {
  display: none !important;
}

/* Legacy – user-info if used elsewhere */
.user-info {
  color: #e2e8f0;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4375rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  white-space: nowrap;
  height: auto;
  line-height: 1;
  box-sizing: border-box;
}

.user-info::before {
  content: "👤";
  font-size: 1rem;
}

/* Notification Modal */
.notification-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
  overflow: auto;
}

.notification-modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
}

.notification-modal-content {
  background-color: #ffffff;
  margin: auto;
  border-radius: 0.75rem;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  animation: slideDown 0.3s ease;
  overflow: hidden;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.notification-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
}

.notification-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.notification-header-actions .btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.notification-header-actions .btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.notification-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.notification-modal-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: #f8fafc;
}

.notification-tab {
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.notification-tab:hover {
  color: var(--primary-color);
}

.notification-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background: rgba(99, 102, 241, 0.05);
}

.notification-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 300;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.notification-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.notification-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.notification-loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

.notification-empty {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.notification-empty::before {
  content: "✅";
  display: block;
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Notification Items */
.notification-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.notification-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.notification-item.notification-read {
  opacity: 0.7;
  background: #f8fafc;
}

.notification-item.notification-priority-urgent {
  border-left: 4px solid #ef4444;
}

.notification-item.notification-priority-high {
  border-left: 4px solid #f59e0b;
}

.notification-item.notification-priority-medium {
  border-left: 4px solid #6366f1;
}

.notification-item.notification-priority-low {
  border-left: 4px solid #64748b;
}

.notification-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border-radius: 0.5rem;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.notification-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.notification-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.notification-action-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
  line-height: 1;
}

.notification-action-btn:hover {
  background: #f1f5f9;
  color: var(--primary-color);
}

.notification-message {
  margin: 0 0 0.75rem 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.notification-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.notification-time {
  color: var(--text-secondary);
}

.notification-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.notification-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.reminder-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.reminder-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.reminder-item.urgent {
  border-left: 4px solid #ef4444;
}

.reminder-item.warning {
  border-left: 4px solid #f59e0b;
}

.reminder-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.reminder-customer {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.reminder-order-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.reminder-order-link:hover {
  text-decoration: underline;
}

.reminder-days {
  background: #fee2e2;
  color: #991b1b;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.reminder-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.reminder-detail-item {
  display: flex;
  flex-direction: column;
}

.reminder-detail-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.reminder-detail-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.reminder-detail-value.amount {
  color: var(--primary-color);
  font-size: 1.125rem;
}

/* Main Content */
.main-content {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 0;
}

/* Offset page content when the fixed navbar is present (login / logged-out pages have no .navbar) */
body:has(.navbar) .main-content {
  padding-top: calc(2rem + var(--navbar-offset));
}

/* Messages */
.messages {
  margin-bottom: 1rem;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
}

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
  border-left: 4px solid var(--success-color);
}

.text-warning {
  color: #f59e0b;
  font-weight: 500;
}

.alert-error {
  background-color: #fee2e2;
  color: #991b1b;
  border-left: 4px solid var(--danger-color);
}

.alert-info {
  background-color: #dbeafe;
  color: #312e81;
  border-left: 4px solid var(--info-color);
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
}

.close-btn:hover {
  opacity: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  min-height: 42px;
  box-sizing: border-box;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
  box-shadow: 0 1px 3px rgba(100, 116, 139, 0.2);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(100, 116, 139, 0.25);
}

.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-success {
  background-color: var(--success-color);
  color: white;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.2);
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-success:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.btn-success:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.2);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-danger:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.btn-danger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Button Classes for Functional Consistency */
/* Edit buttons - Amber/Warning color for modification actions */
.btn-edit {
  background-color: var(--warning-color);
  color: white;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.2);
}

.btn-edit:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-edit:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

.btn-edit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Back/Cancel buttons - Secondary/Gray color for navigation actions */
.btn-back {
  background-color: var(--secondary-color);
  color: white;
  box-shadow: 0 1px 3px rgba(100, 116, 139, 0.2);
}

.btn-back:hover {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.btn-back:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(100, 116, 139, 0.25);
}

.btn-back:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  min-height: 32px;
  gap: 0.375rem;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Login Page */
/* Login Page */
.login-container {
  min-height: 100vh;
  height: 100vh;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  padding: 2rem;
  margin: 0;
  box-sizing: border-box;
}

body:has(.login-container) {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body:has(.login-container) .main-content {
  padding: 0;
  margin: 0;
  max-width: 100%;
}

.login-container::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.12) 0%,
    transparent 70%
  );
  animation: pulse 8s ease-in-out infinite;
}

.login-container::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.1) 0%,
    transparent 70%
  );
  animation: pulse 10s ease-in-out infinite reverse;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.login-card {
  background: rgba(255, 255, 255, 0.98);
  padding: 3rem 2.5rem;
  border-radius: 1.25rem;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
  text-align: center;
  background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.login-subtitle {
  color: #64748b;
  text-align: center;
  margin-bottom: 2rem;
  font-size: 0.9375rem;
  font-weight: 400;
}

.login-form {
  margin-top: 0;
}

.login-form .form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.login-form .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #334155;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.login-form .form-group:focus-within label {
  color: #2563eb;
}

.login-form .form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
  background: #ffffff;
  color: #1e293b;
}

.login-form .form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  transform: translateY(-1px);
}

.login-form .form-control::placeholder {
  color: #94a3b8;
}

.login-form .btn-primary {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.625rem;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  margin-top: 0.5rem;
  position: relative;
  overflow: hidden;
}

.login-form .btn-primary::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.login-form .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.login-form .btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.login-form .btn-primary:active {
  transform: translateY(0);
}

.login-form .error-message {
  margin-top: 0.5rem;
  color: #ef4444;
  font-size: 0.8125rem;
  padding: 0.5rem;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 0.375rem;
  border-left: 3px solid #ef4444;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* Forms */
.form-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.form-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.form-header h1 {
  font-size: 1.5rem;
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.form-control {
  width: 100%;
  padding: 0.625rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  color: #000;
  background-color: #fff;
  min-height: 38px;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  color: #000;
  background-color: #fff;
}

/* Select dropdowns - Colorful styling */
select.form-control,
select {
  color: #1e293b;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #e2e8f0;
  appearance: auto;
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
  z-index: 1;
  position: relative;
  transition: all 0.3s ease;
  font-weight: 500;
}

select.form-control:hover,
select:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
}

select.form-control:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  background: #ffffff;
}

/* Status dropdowns - Blue theme */
select[name*="status"]:not([name*="payment"]):not([name*="delivery"]),
select#id_status {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: var(--info-color);
  color: #0c4a6e;
}

select[name*="status"]:not([name*="payment"]):not([name*="delivery"]):hover,
select#id_status:hover {
  background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
  border-color: var(--primary-color);
}

/* Payment status dropdowns - Emerald theme */
select[name*="payment_status"],
select#id_payment_status {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-color: var(--success-color);
  color: #064e3b;
}

select[name*="payment_status"]:hover,
select#id_payment_status:hover {
  background: linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 100%);
  border-color: #047857;
}

/* Delivery status dropdowns - Purple theme */
select[name*="delivery_status"],
select[name*="delivery"]:not([name*="date"]):not([name*="person"]),
select#id_delivery_status {
  background: linear-gradient(135deg, #e9d5ff 0%, #d8b4fe 100%);
  border-color: #a855f7;
  color: #6b21a8;
}

select[name*="delivery_status"]:hover,
select[name*="delivery"]:not([name*="date"]):not([name*="person"]):hover,
select#id_delivery_status:hover {
  background: linear-gradient(135deg, #d8b4fe 0%, #c084fc 100%);
  border-color: #9333ea;
}

/* State dropdowns - Orange theme */
select[name*="state"],
select#id_state,
select[name="filter-state"] {
  background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
  border-color: #f59e0b;
  color: #92400e;
}

select[name*="state"]:hover,
select#id_state:hover,
select[name="filter-state"]:hover {
  background: linear-gradient(135deg, #fdba74 0%, #fb923c 100%);
  border-color: #d97706;
}

/* District dropdowns - Teal theme */
select[name*="district"],
select#id_district,
select[name="filter-district"] {
  background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
  border-color: #14b8a6;
  color: #0f766e;
}

select[name*="district"]:hover,
select#id_district:hover,
select[name="filter-district"]:hover {
  background: linear-gradient(135deg, #99f6e4 0%, #5eead4 100%);
  border-color: #0d9488;
}

/* Customer dropdowns - Indigo theme */
select[name*="customer"],
select#id_customer,
select[name="filter-customer"] {
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  border-color: #6366f1;
  color: #312e81;
}

select[name*="customer"]:hover,
select#id_customer:hover,
select[name="filter-customer"]:hover {
  background: linear-gradient(135deg, #c7d2fe 0%, #a5b4fc 100%);
  border-color: #4f46e5;
}

/* Employee/User assignment dropdowns - Pink theme */
select[name*="employee"],
select[name*="assigned"],
select#id_assigned_employee,
select[name*="created_by"] {
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
  border-color: #ec4899;
  color: #831843;
}

select[name*="employee"]:hover,
select[name*="assigned"]:hover,
select#id_assigned_employee:hover,
select[name*="created_by"]:hover {
  background: linear-gradient(135deg, #fbcfe8 0%, #f9a8d4 100%);
  border-color: #db2777;
}

/* Sort/Filter dropdowns - Gray theme */
select[name*="sort"],
select[name*="filter"]:not([name*="state"]):not([name*="district"]):not(
    [name*="customer"]
  ):not([name*="status"]):not([name*="payment"]):not([name*="delivery"]) {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-color: #64748b;
  color: #334155;
}

select[name*="sort"]:hover,
select[name*="filter"]:not([name*="state"]):not([name*="district"]):not(
    [name*="customer"]
  ):not([name*="status"]):not([name*="payment"]):not([name*="delivery"]):hover {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  border-color: #475569;
}

/* Dropdown options - Colorful styling */
select.form-control option,
select option {
  color: #1e293b;
  background-color: #ffffff;
  padding: 0.5rem;
  display: block;
  font-weight: 400;
}

/* Status options */
select[name*="status"]:not([name*="payment"]):not([name*="delivery"]) option,
select#id_status option {
  background-color: #e0e7ff;
}

select[name*="status"]:not([name*="payment"]):not([name*="delivery"])
  option[value="delivery_pending"],
select#id_status option[value="delivery_pending"] {
  background-color: #fef3c7;
  color: #92400e;
}

select[name*="status"]:not([name*="payment"]):not([name*="delivery"])
  option[value="delivered"],
select#id_status option[value="delivered"] {
  background-color: #d1fae5;
  color: #065f46;
}

select[name*="status"]:not([name*="payment"]):not([name*="delivery"])
  option[value="cancelled"],
select#id_status option[value="cancelled"] {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Payment status options */
select[name*="payment_status"] option,
select#id_payment_status option {
  background-color: #f0fdf4;
}

select[name*="payment_status"] option[value="pending"],
select#id_payment_status option[value="pending"] {
  background-color: #fef3c7;
  color: #92400e;
}

select[name*="payment_status"] option[value="online"],
select#id_payment_status option[value="online"] {
  background-color: #dbeafe;
  color: #312e81;
}

select[name*="payment_status"] option[value="cash"],
select#id_payment_status option[value="cash"] {
  background-color: #d1fae5;
  color: #065f46;
}

/* Delivery status options */
select[name*="delivery_status"] option,
select#id_delivery_status option {
  background-color: #faf5ff;
}

select[name*="delivery_status"] option[value="scheduled"],
select#id_delivery_status option[value="scheduled"] {
  background-color: #e0e7ff;
  color: #312e81;
}

select[name*="delivery_status"] option[value="in_transit"],
select#id_delivery_status option[value="in_transit"] {
  background-color: #ddd6fe;
  color: #5b21b6;
}

select[name*="delivery_status"] option[value="delivered"],
select#id_delivery_status option[value="delivered"] {
  background-color: #d1fae5;
  color: #065f46;
}

select[name*="delivery_status"] option[value="failed_returned"],
select#id_delivery_status option[value="failed_returned"] {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Hover and selected states for options */
select.form-control option:hover,
select option:hover,
select.form-control option:checked,
select option:checked,
select.form-control option:focus,
select option:focus {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
  font-weight: 600;
}

/* Textarea styling */
textarea.form-control,
textarea {
  color: #000;
  background-color: #fff;
  resize: vertical;
  min-height: 80px;
}

textarea.form-control:focus,
textarea:focus {
  color: #000;
  background-color: #fff;
}

/* Ensure dropdowns are visible when opened */
select.form-control:active,
select:active,
select.form-control:focus,
select:focus {
  z-index: 9999;
  position: relative;
  transform: scale(1.02);
}

/* For long dropdowns, add scrolling */
select.form-control[size],
select[size] {
  max-height: 300px;
  overflow-y: auto;
}

/* Additional colorful styling for specific filter dropdowns */
select[name="filter-status"] {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: var(--info-color);
  color: #0c4a6e;
}

select[name="filter-status"]:hover {
  background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
  border-color: var(--primary-color);
}

/* Compact filter dropdowns in delivery form */
.compact-filter-item select,
.compact-filter select {
  font-size: 0.875rem;
  padding: 0.5rem;
}

/* Role dropdown styling */
select[name*="role"] {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #f59e0b;
  color: #92400e;
}

select[name*="role"]:hover {
  background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
  border-color: #d97706;
}

/* Ensure all form inputs have black text */
input.form-control,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  color: #000;
  background-color: #fff;
}

input.form-control:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus {
  color: #000;
  background-color: #fff;
}

.form-help {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.error-message {
  color: var(--danger-color);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Page Container */
.page-container {
  width: 100%;
  max-width: 100%;
  background: var(--card-bg);
  padding: 1.25rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  box-sizing: border-box;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  font-size: 1.5rem;
  color: var(--text-primary);
}

.welcome-text {
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.header-actions .btn {
  padding: 0.625rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  min-height: 42px;
}

/* Dashboard */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

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

.stat-card.revenue-card {
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  border: 2px solid rgba(99, 102, 241, 0.3);
}

.stat-card.revenue-card:hover {
  background: linear-gradient(135deg, #c7d2fe 0%, #a5b4fc 100%);
  border-color: rgba(99, 102, 241, 0.5);
}

.stat-icon {
  font-size: 2rem;
}

.stat-content h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.stat-content p {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.dashboard-section {
  background: var(--card-bg);
  padding: 1.25rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-header h2 {
  font-size: 1.25rem;
  color: var(--text-primary);
}

/* Revenue Analytics */
.revenue-analytics {
  margin-top: 1.5rem;
}

.chart-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.chart-controls .form-control {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  min-width: 150px;
  border: 2px solid var(--border-color);
  border-radius: 0.375rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  transition: all 0.3s ease;
}

.chart-controls .form-control:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.chart-controls .form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  background: #ffffff;
}

.chart-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 400px;
  min-height: 400px;
  max-height: 400px;
  margin: 1.5rem 0;
  padding: 1rem;
  background: linear-gradient(135deg, #fafbfc 0%, #f1f5f9 100%);
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  box-sizing: border-box;
  overflow: hidden;
}

.chart-container canvas {
  max-width: 100% !important;
  max-height: 100% !important;
  width: 100% !important;
  height: 100% !important;
}

.chart-stats {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  border-radius: 0.5rem;
  border: 1px solid rgba(99, 102, 241, 0.3);
  flex-wrap: wrap;
}

.chart-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 0.375rem;
  min-width: 150px;
  transition: all 0.2s ease;
}

.chart-stat-item:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.chart-stat-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chart-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .chart-container {
    height: 300px;
    padding: 0.5rem;
  }

  .chart-controls {
    flex-direction: column;
    width: 100%;
  }

  .chart-controls .form-control {
    width: 100%;
  }

  .chart-stats {
    flex-direction: column;
  }

  .chart-stat-item {
    width: 100%;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Analytics Grid */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.analytics-card {
  display: flex;
  flex-direction: column;
  min-height: 500px;
  height: auto;
  box-sizing: border-box;
  overflow: visible;
}

.analytics-card .section-header {
  flex-shrink: 0;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.analytics-card .section-header h2 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.analytics-card .chart-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.analytics-card .chart-controls .form-control {
  min-width: 120px;
  font-size: 0.8125rem;
  padding: 0.375rem 0.5rem;
}

.chart-container-small {
  position: relative;
  width: 100%;
  height: 280px;
  min-height: 280px;
  max-height: 280px;
  margin: 0.75rem 0;
  padding: 0.75rem;
  background: linear-gradient(135deg, #fafbfc 0%, #f1f5f9 100%);
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  box-sizing: border-box;
  overflow: hidden;
}

.chart-container-small canvas {
  max-width: 100% !important;
  max-height: 100% !important;
  width: 100% !important;
  height: 100% !important;
}

.chart-container-medium {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 400px;
  min-height: 400px;
  max-height: 400px;
  margin: 1.5rem 0;
  padding: 1rem;
  background: linear-gradient(135deg, #fafbfc 0%, #f1f5f9 100%);
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  box-sizing: border-box;
  overflow: hidden;
}

.chart-container-medium canvas {
  max-width: 100% !important;
  max-height: 100% !important;
  width: 100% !important;
  height: 100% !important;
}

.chart-stats-small {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  border-radius: 0.5rem;
  border: 1px solid rgba(99, 102, 241, 0.3);
  flex-wrap: nowrap;
  flex-shrink: 0;
  margin-top: auto;
}

.chart-stat-item-small {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 0.375rem;
  min-width: 120px;
  flex: 1;
  transition: all 0.2s ease;
}

.chart-stat-item-small:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.chart-stat-label-small {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chart-stat-value-small {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Top Customers List */
.top-customers-list {
  margin-top: 1rem;
}

.top-customers-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.top-customer-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  min-height: 80px;
}

.top-customer-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.top-customer-rank {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary-color);
  min-width: 32px;
  width: 32px;
  height: 32px;
  text-align: center;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  border-radius: 0.375rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.top-customer-info {
  flex: 1;
  min-width: 0;
}

.top-customer-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-customer-details {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.top-customer-details span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Employee Performance List */
.employee-performance-list {
  margin-top: 1rem;
}

.employee-performance-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.employee-performance-item {
  padding: 0.75rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  min-height: 140px;
}

.employee-performance-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.employee-info {
  margin-bottom: 0.625rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.employee-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.employee-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.employee-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.employee-stat {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 0.375rem;
  border: 1px solid var(--border-color);
  min-width: 0;
}

.employee-stat .stat-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.employee-stat .stat-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive adjustments for analytics */
@media (max-width: 1600px) {
  .top-customers-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .employee-performance-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1400px) {
  .analytics-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .top-customers-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .employee-performance-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1200px) {
  .analytics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .analytics-card {
    min-height: 480px;
  }

  .chart-container-small {
    height: 260px;
    min-height: 260px;
    max-height: 260px;
  }

  .top-customers-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .employee-performance-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .analytics-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .analytics-card {
    min-height: 450px;
  }

  .chart-container-small {
    height: 300px;
    min-height: 300px;
    max-height: 300px;
  }

  .top-customers-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .top-customer-item {
    padding: 0.625rem;
    gap: 0.5rem;
  }

  .top-customer-rank {
    min-width: 28px;
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }

  .top-customer-name {
    font-size: 0.8125rem;
  }

  .top-customer-details {
    font-size: 0.6875rem;
  }

  .employee-performance-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .employee-performance-item {
    padding: 0.625rem;
  }

  .employee-info {
    margin-bottom: 0.5rem;
    padding-bottom: 0.375rem;
  }

  .employee-name {
    font-size: 0.875rem;
  }

  .employee-role {
    font-size: 0.6875rem;
  }

  .employee-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.375rem;
  }

  .employee-stat {
    padding: 0.375rem;
  }

  .employee-stat .stat-label {
    font-size: 0.625rem;
  }

  .employee-stat .stat-value {
    font-size: 0.8125rem;
  }
}

@media (max-width: 768px) {
  .analytics-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .analytics-card {
    min-height: 400px;
  }

  .chart-container-small {
    height: 250px;
    min-height: 250px;
    max-height: 250px;
    padding: 0.5rem;
  }

  .chart-container-medium {
    height: 300px;
    min-height: 300px;
    max-height: 300px;
  }

  .top-customers-grid {
    grid-template-columns: 1fr;
  }

  .employee-performance-grid {
    grid-template-columns: 1fr;
  }

  .employee-stats {
    grid-template-columns: 1fr;
  }
}

/* Tables */
.table-container {
  margin-top: 1rem;
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 600px;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
}

/* Ensure sticky header works with scrolling */
.table-container .data-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--card-bg);
}

.table-container .data-table thead th {
  background-color: var(--card-bg);
  position: sticky;
  top: 0;
  box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

.table-container .data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  display: table;
  table-layout: auto;
}

.table-container .data-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--card-bg);
}

.table-container .data-table thead th {
  background-color: var(--card-bg);
  position: sticky;
  top: 0;
  box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

.table-container .data-table tbody {
  display: table-row-group;
}

.table-container .data-table tbody tr {
  display: table-row;
}

/* Ensure column widths match between thead and tbody */
.table-container .data-table thead th,
.table-container .data-table tbody td {
  display: table-cell;
  vertical-align: middle;
  text-align: left;
  padding: 0.75rem;
}

/* Align numeric columns (Orders Count, Total Amount) to the right */
.delivery-section-completed .table-container .data-table th:nth-child(3),
.delivery-section-completed .table-container .data-table th:nth-child(4),
.delivery-section-completed .table-container .data-table td:nth-child(3),
.delivery-section-completed .table-container .data-table td:nth-child(4) {
  text-align: right;
}

.delivery-section-upcoming .table-container .data-table th:nth-child(4),
.delivery-section-upcoming .table-container .data-table th:nth-child(5),
.delivery-section-upcoming .table-container .data-table td:nth-child(4),
.delivery-section-upcoming .table-container .data-table td:nth-child(5) {
  text-align: right;
}

/* Actions column alignment */
.delivery-section-completed .table-container .data-table th:last-child,
.delivery-section-completed .table-container .data-table td:last-child,
.delivery-section-upcoming .table-container .data-table th:last-child,
.delivery-section-upcoming .table-container .data-table td:last-child {
  text-align: center;
  white-space: nowrap;
}

/* Order actions alignment in delivery detail table */
.table-container .data-table td.order-actions {
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
}

.table-container .data-table td.order-actions .btn {
  display: inline-block;
  vertical-align: middle;
  margin: 0 0.25rem;
  line-height: 1.5;
}

/* Delivery detail table column alignment */
.detail-section .table-container .data-table th:nth-child(1),
.detail-section .table-container .data-table td:nth-child(1) {
  text-align: center;
  width: 40px;
}

.detail-section .table-container .data-table th:nth-child(7),
.detail-section .table-container .data-table th:nth-child(8),
.detail-section .table-container .data-table th:nth-child(9),
.detail-section .table-container .data-table td:nth-child(7),
.detail-section .table-container .data-table td:nth-child(8),
.detail-section .table-container .data-table td:nth-child(9) {
  text-align: right;
}

.detail-section .table-container .data-table th:nth-child(10),
.detail-section .table-container .data-table td:nth-child(10) {
  text-align: center;
}

.detail-section .table-container .data-table th:nth-child(2),
.detail-section .table-container .data-table th:nth-child(3),
.detail-section .table-container .data-table th:nth-child(4),
.detail-section .table-container .data-table th:nth-child(5),
.detail-section .table-container .data-table th:nth-child(6),
.detail-section .table-container .data-table td:nth-child(2),
.detail-section .table-container .data-table td:nth-child(3),
.detail-section .table-container .data-table td:nth-child(4),
.detail-section .table-container .data-table td:nth-child(5),
.detail-section .table-container .data-table td:nth-child(6) {
  text-align: left;
}

/* Scrollbar styling for better visibility */
.table-container::-webkit-scrollbar,
.delivery-section-completed .table-container::-webkit-scrollbar,
.delivery-section-upcoming .table-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-container::-webkit-scrollbar-track,
.delivery-section-completed .table-container::-webkit-scrollbar-track,
.delivery-section-upcoming .table-container::-webkit-scrollbar-track {
  background: var(--border-color);
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb,
.delivery-section-completed .table-container::-webkit-scrollbar-thumb,
.delivery-section-upcoming .table-container::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover,
.delivery-section-completed .table-container::-webkit-scrollbar-thumb:hover,
.delivery-section-upcoming .table-container::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Horizontal scrollbar */
.table-container::-webkit-scrollbar:horizontal {
  height: 8px;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card-bg);
  table-layout: auto;
}

/* Default table display (for tables outside .table-container) */
.data-table:not(.table-container .data-table) {
  display: table;
}

.data-table thead {
  background-color: var(--bg-color);
}

.data-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
  background-color: var(--bg-color);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Expandable table rows */
.expandable-row {
  cursor: pointer;
  transition: background-color 0.2s;
}

.expandable-row:hover {
  background-color: #e0e7ff;
}

.expandable-row.expanded {
  background-color: #dbeafe;
}

.expand-icon {
  display: inline-block;
  font-size: 0.75rem;
  transition: transform 0.2s;
  user-select: none;
  cursor: pointer;
  padding: 0.25rem;
}

.expandable-row.expanded .expand-icon {
  transform: rotate(0deg);
}

.expandable-details {
  background-color: var(--bg-color);
  display: none;
}

.expandable-details td {
  padding: 0 !important;
  border-top: 2px solid var(--border-color);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure expandable grid aligns properly */
.expandable-details .expandable-grid {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
}

.expandable-details[style*="table-row"] {
  display: table-row !important;
}

.expandable-details .full-width {
  grid-column: 1 / -1;
}

.data-table tfoot {
  background-color: var(--bg-color);
  font-weight: 600;
}

.data-table tfoot td {
  border-top: 2px solid var(--border-color);
  padding: 0.75rem;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.status-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

/* Order Status Badges */
.status-delivery_pending {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid #f59e0b;
}

.status-delivered {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border: 1px solid #10b981;
}

.status-cancelled {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border: 1px solid #ef4444;
}

/* Delivery Status Badges */
.status-scheduled {
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  color: #312e81;
  border: 1px solid #6366f1;
}

.status-in_transit {
  background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
  color: #5b21b6;
  border: 1px solid #8b5cf6;
}

.status-failed_returned {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border: 1px solid #ef4444;
}

/* Payment Status Badges */
.status-pending {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid #f59e0b;
}

.status-completed {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border: 1px solid #10b981;
}

.status-online {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #312e81;
  border: 1px solid #3b82f6;
}

.status-cash {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border: 1px solid #10b981;
}

/* Payment Type Badges */
.status-advance {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid #f59e0b;
}

.status-remaining {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  border: 1px solid #3b82f6;
}

/* Location Badge */
.location-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: #e0e7ff;
  color: #3730a3;
}

.location-link {
  color: var(--primary-color);
  text-decoration: none;
  cursor: pointer;
}

.location-link:hover {
  text-decoration: underline;
}

/* Search Section */
.search-section {
  background: var(--card-bg);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  margin-bottom: 1rem;
  border: 1px solid #e2e8f0;
}

.search-header {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.search-section h3,
.search-section h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 600;
}

.search-form {
  margin-top: 0;
}

.search-form .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.625rem;
  align-items: end;
  margin-bottom: 0.625rem;
}

.search-form .form-row:last-child {
  margin-bottom: 0;
}

.search-form .form-group {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.search-form .form-group label {
  margin-bottom: 0.25rem;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.75rem;
  line-height: 1.2;
}

.search-form .form-group.search-actions {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.5rem;
  justify-content: flex-start;
  min-width: fit-content;
  padding-top: 0;
}

.search-form .form-group.search-actions label {
  display: none;
}

.search-form .form-group input,
.search-form .form-group select {
  padding: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  min-height: 34px;
  width: 100%;
  box-sizing: border-box;
}

.search-form .form-group button,
.search-form .form-group a.btn {
  margin: 0;
  padding: 0.4375rem 0.875rem;
  font-size: 0.8125rem;
  min-height: 34px;
  white-space: nowrap;
  flex-shrink: 0;
  height: fit-content;
  align-self: flex-end;
}

/* Responsive adjustments for search form */
@media (max-width: 1200px) {
  .search-form .form-row {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
  }
}

@media (max-width: 768px) {
  .search-form .form-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-form .form-group.search-actions {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

/* Detail Sections */
.detail-section {
  margin-bottom: 1.25rem;
}

/* Delivery sections with separate styling */
.delivery-section-upcoming {
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: #eff6ff;
  border-radius: 0.5rem;
  border-left: 4px solid var(--primary-color);
}

.delivery-section-completed {
  margin-bottom: 1.25rem;
  padding: 1.25rem;
  background: #ecfdf5;
  border-radius: 0.5rem;
  border-left: 4px solid var(--success-color);
}

.delivery-section-completed .table-container .data-table {
  display: table;
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
}

.delivery-section-completed .table-container .data-table thead {
  display: table-header-group;
  width: 100%;
  background-color: var(--bg-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.delivery-section-completed .table-container .data-table thead th {
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
  vertical-align: middle;
  background-color: var(--bg-color);
  position: sticky;
  top: 0;
  box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

.delivery-section-completed .table-container .data-table tbody {
  display: table-row-group;
  width: 100%;
}

.delivery-section-completed .table-container .data-table tbody tr {
  display: table-row;
  width: 100%;
  border-bottom: 1px solid var(--border-color);
}

.delivery-section-completed .table-container .data-table tbody tr:hover {
  background-color: #f1f5f9;
}

.delivery-section-completed .table-container .data-table tbody td {
  padding: 0.75rem;
  vertical-align: middle;
  text-align: left;
}

.delivery-section-upcoming .table-container .data-table {
  display: table;
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
}

.delivery-section-upcoming .table-container .data-table thead {
  display: table-header-group;
  width: 100%;
  background-color: #f0f8ff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.delivery-section-upcoming .table-container .data-table thead th {
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
  background-color: #f0f8ff;
  position: sticky;
  top: 0;
  box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

.delivery-section-upcoming .table-container .data-table tbody {
  display: table-row-group;
  width: 100%;
}

.delivery-section-upcoming .table-container .data-table tbody tr {
  display: table-row;
  width: 100%;
  border-bottom: 1px solid var(--border-color);
}

.delivery-section-upcoming .table-container .data-table tbody tr:hover {
  background-color: #e0f2fe;
}

.delivery-section-upcoming .table-container .data-table tbody td {
  padding: 0.75rem;
  vertical-align: middle;
}

.info-card {
  background: var(--card-bg);
  padding: 1.25rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.info-card h2 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--border-color);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.info-item.full-width {
  grid-column: 1 / -1;
}

.info-item label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-item span {
  color: var(--text-primary);
  font-size: 1rem;
}

.description-text {
  color: var(--text-primary);
  line-height: 1.8;
  white-space: pre-wrap;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

.empty-state p {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

/* Quick Actions */
.quick-actions {
  background: var(--card-bg);
  padding: 1.25rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.quick-actions h2 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Delete Warning */
.delete-warning {
  background-color: #fee2e2;
  border-left: 4px solid var(--danger-color);
  padding: 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1.25rem;
}

.delete-warning p {
  margin-bottom: 0.5rem;
}

.delete-warning p:last-child {
  margin-bottom: 0;
}

/* Customer History */
.customer-history {
  margin-top: 1.25rem;
}

.order-history-list {
  list-style: none;
  padding: 0;
}

.order-history-list li {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--bg-color);
  border-radius: 0.375rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Calendar Page */
.calendar-page {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.calendar-container {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    /* Single-row top bar + slide-out menu */
    --navbar-offset: 4.75rem;
  }

  body.nav-menu-open {
    overflow: hidden;
    touch-action: none;
  }

  .nav-mobile-toggle {
    display: inline-flex;
  }

  .nav-container {
    flex-wrap: nowrap;
    align-items: center;
    height: auto;
    min-height: 56px;
    padding: 0.5rem max(0.75rem, env(safe-area-inset-right, 0px)) 0.5rem
      max(0.75rem, env(safe-area-inset-left, 0px));
    gap: 0.5rem;
  }

  .nav-brand {
    margin-right: auto;
    min-width: 0;
  }

  .nav-brand-tagline {
    display: none;
  }

  .nav-brand-text {
    font-size: 0.875rem;
  }

  .nav-logo-mark,
  .nav-logo-svg {
    width: 32px;
    height: 32px;
  }

  /* Slide-out panel: all nav links, tools, profile, sign out */
  .nav-drawer {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    width: min(100%, 22rem);
    max-width: 100%;
    margin: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 4.25rem) 1rem
      max(1rem, env(safe-area-inset-bottom, 0px))
      max(1rem, env(safe-area-inset-left, 0px));
    overflow: hidden;
    background: linear-gradient(
      180deg,
      rgba(15, 23, 42, 0.99) 0%,
      rgba(30, 41, 59, 0.99) 100%
    );
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
    transform: translateX(-105%);
    visibility: hidden;
    transition:
      transform 0.28s ease,
      visibility 0.28s ease;
  }

  .nav-container.nav-open .nav-drawer {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-main-scroll {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.15rem;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    margin: 0;
  }

  .nav-main-divider {
    display: none;
  }

  .nav-admin-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    flex-wrap: nowrap;
    margin: 0.35rem 0 0;
    padding: 0.5rem;
    gap: 0.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.5rem;
  }

  .nav-link {
    font-size: 0.9375rem;
    padding: 0.65rem 0.75rem;
    min-height: 44px;
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
    border-radius: 0.5rem;
  }

  .nav-link.active::after {
    display: none;
  }

  .nav-drawer .nav-tools {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    margin: 0.65rem 0 0;
    padding: 0.75rem 0 0;
    border-left: none;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-drawer .nav-notification-wrap {
    display: block;
    width: 100%;
  }

  .nav-drawer .nav-tool-btn {
    display: flex;
    width: 100%;
    height: auto;
    min-height: 44px;
    justify-content: flex-start;
    align-items: center;
    padding: 0.65rem 0.75rem;
    box-sizing: border-box;
    font-size: 0.9375rem;
    text-align: left;
  }

  .nav-drawer .nav-tool-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 0 0.5rem;
    padding: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    border: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #e2e8f0;
    flex: 1;
  }

  .nav-drawer .nav-tool-btn .notification-badge {
    position: static;
    margin-left: auto;
    flex-shrink: 0;
  }

  .nav-drawer .nav-user {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.75rem 0 0;
    margin-top: 0.65rem;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 0;
  }

  .nav-drawer .nav-user-link {
    width: 100%;
    justify-content: flex-start;
    box-sizing: border-box;
    min-height: 44px;
  }

  .nav-drawer .nav-username {
    max-width: none;
    flex: 1;
    min-width: 0;
  }

  .nav-drawer .nav-logout {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    min-height: 44px;
  }

  .nav-logout span:first-child {
    display: none;
  }

  .main-content {
    padding: 0.75rem max(0.75rem, env(safe-area-inset-right, 0px)) 0.75rem
      max(0.75rem, env(safe-area-inset-left, 0px));
  }

  body:has(.navbar) .main-content {
    padding-top: calc(0.75rem + var(--navbar-offset));
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .header-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .form-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Prevent iOS Safari zooming inputs on focus */
  input.form-control,
  textarea.form-control,
  select.form-control,
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="tel"],
  input[type="date"],
  input[type="time"],
  input[type="search"] {
    font-size: 16px;
  }

  .notification-modal-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 0.35rem;
    padding: 0.65rem 1rem;
    scrollbar-width: thin;
  }

  .notification-modal-tabs .notification-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .notification-modal-header {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
  }

  .notification-modal-header h2 {
    font-size: 1.2rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Pagination Styles */
.pagination-container {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination-link {
  padding: 0.5rem 1rem;
  background-color: var(--card-bg);
  color: var(--primary-color);
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-block;
}

.pagination-link:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.pagination-link:active {
  transform: translateY(0);
}

.pagination-info {
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  .pagination {
    gap: 0.25rem;
  }

  .pagination-link {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
  }

  .pagination-info {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
  }
}

/* Order form: searchable product catalog + unit price */
.of-product-wrap {
  position: relative;
  width: 100%;
}
.of-product-wrap.is-open .of-product-search {
  border-color: #818cf8 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
  background: #fff !important;
}
.of-product-ac {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.04),
    0 4px 6px -2px rgba(15, 23, 42, 0.05),
    0 12px 24px -4px rgba(15, 23, 42, 0.12);
  max-height: min(280px, 55vh);
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.of-product-ac::-webkit-scrollbar {
  width: 6px;
}
.of-product-ac::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}
.of-product-ac[hidden] {
  display: none !important;
}
.of-product-ac-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem 0.45rem;
  margin: 0;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
  pointer-events: none;
  cursor: default;
}
.of-ac-hdr-price {
  text-align: right;
  min-width: 5.5rem;
}
.of-product-ac-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem 0.55rem 0.5rem;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition:
    background 0.12s ease,
    box-shadow 0.12s ease;
}
.of-product-ac-option:last-child {
  border-bottom: none;
}
.of-ac-option-main {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  min-width: 0;
  flex: 1;
}
.of-ac-option-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 0.4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #a5b4fc, #6366f1);
  opacity: 0.85;
}
.of-product-ac .of-ac-name {
  color: #0f172a;
  font-weight: 500;
  word-break: break-word;
}
.of-ac-price-wrap {
  flex-shrink: 0;
}
.of-product-ac .of-ac-price {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: #3730a3;
  background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
  border: 1px solid #c7d2fe;
  white-space: nowrap;
}
.of-product-ac-option:hover {
  background: #f8fafc;
}
.of-product-ac-option:hover .of-ac-option-dot {
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}
.of-product-ac-option[aria-selected="true"] {
  background: linear-gradient(90deg, rgba(238, 242, 255, 0.95) 0%, #f5f3ff 100%);
  box-shadow: inset 3px 0 0 #6366f1;
}
.of-product-ac-option[aria-selected="true"] .of-ac-name {
  color: #312e81;
}
.of-product-ac-option[aria-selected="true"] .of-ac-price {
  background: #fff;
  border-color: #a5b4fc;
  color: #4f46e5;
}
.of-product-ac-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.35rem 1rem;
  text-align: center;
  cursor: default;
  border: none;
}
.of-ac-empty-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background:
    linear-gradient(145deg, #eef2ff, #e0e7ff)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%234f46e5' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-4.35-4.35M11 18a7 7 0 100-14 7 7 0 000 14z'/%3E%3C/svg%3E")
    center/20px no-repeat;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.of-ac-empty-text {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
  max-width: 14rem;
  line-height: 1.45;
}

/* Order form: searchable customer combobox */
.of-customer-wrap {
  position: relative;
  width: 100%;
}
.of-customer-wrap select.of-customer-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.of-customer-wrap.is-open .of-customer-search {
  border-color: #818cf8 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
  background: #fff !important;
}
.of-customer-wrap .of-customer-search {
  padding-right: 2.5rem !important;
}
.of-customer-wrap .select-arrow {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
}
.of-customer-ac {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.04),
    0 4px 6px -2px rgba(15, 23, 42, 0.05),
    0 12px 24px -4px rgba(15, 23, 42, 0.12);
  max-height: min(280px, 55vh);
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.of-customer-ac::-webkit-scrollbar {
  width: 6px;
}
.of-customer-ac::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}
.of-customer-ac[hidden] {
  display: none !important;
}
.of-customer-ac-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem 0.45rem;
  margin: 0;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
  pointer-events: none;
  cursor: default;
}
.of-ac-hdr-meta {
  text-align: right;
  min-width: 5.5rem;
}
.of-customer-ac-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem 0.55rem 0.5rem;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition:
    background 0.12s ease,
    box-shadow 0.12s ease;
}
.of-customer-ac-option:last-child {
  border-bottom: none;
}
.of-customer-ac .of-ac-customer-phone {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #475569;
  max-width: 11rem;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.of-customer-ac-option:hover {
  background: #f8fafc;
}
.of-customer-ac-option:hover .of-ac-option-dot {
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}
.of-customer-ac-option[aria-selected="true"] {
  background: linear-gradient(90deg, rgba(238, 242, 255, 0.95) 0%, #f5f3ff 100%);
  box-shadow: inset 3px 0 0 #6366f1;
}
.of-customer-ac-option[aria-selected="true"] .of-ac-name {
  color: #312e81;
}
.of-customer-ac-option[aria-selected="true"] .of-ac-customer-phone {
  color: #1e3a8a;
}
.of-customer-ac-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.35rem 1rem;
  text-align: center;
  cursor: default;
  border: none;
}
