/* Business OS Purple Theme - Bootstrap 5 Overrides and Custom Styles */

/* CSS Custom Properties for Theme Colors */
:root {
  /* Bootstrap Color Overrides */
  --bs-primary: #5b3fd0;
  --bs-primary-rgb: 91, 63, 208;
  --bs-success: #1bb874;
  --bs-success-rgb: 27, 184, 116;
  --bs-warning: #ffa726;
  --bs-warning-rgb: 255, 167, 38;
  --bs-danger: #e53e3e;
  --bs-danger-rgb: 229, 62, 62;
  --bs-info: #3182ce;
  --bs-info-rgb: 49, 130, 206;

  /* Custom Theme Colors */
  --theme-primary: #5b3fd0;
  --theme-primary-hover: #4a32b8;
  --theme-primary-active: #3d2a9f;
  --theme-primary-light: #e8e4f8;
  --theme-primary-dark: #2d1f67;

  --theme-success: #1bb874;
  --theme-success-hover: #16a065;
  --theme-success-light: #d4f4e2;

  --theme-warning: #ffa726;
  --theme-warning-hover: #ff9800;
  --theme-warning-light: #fff3e0;

  --theme-error: #e53e3e;
  --theme-error-hover: #c53030;
  --theme-error-light: #fed7d7;

  --theme-info: #3182ce;
  --theme-info-hover: #2c5aa0;
  --theme-info-light: #e6f3ff;

  /* Background and Surface Colors */
  --theme-background: #f5f5f8;
  --theme-surface: #ffffff;
  --theme-surface-hover: #f8f9fa;
  --theme-surface-active: #f1f3f4;

  /* Text Colors */
  --theme-text-primary: #2d3748;
  --theme-text-secondary: #718096;
  --theme-text-muted: #a0aec0;
  --theme-text-inverse: #ffffff;

  /* Border and Divider Colors */
  --theme-border: #e2e8f0;
  --theme-border-light: #f7fafc;
  --theme-border-dark: #cbd5e0;
  --theme-divider: #edf2f7;

  /* Shadow and Elevation */
  --theme-shadow-sm:
    0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --theme-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
  --theme-shadow-lg:
    0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --theme-shadow-xl:
    0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);

  /* Typography */
  --theme-font-family:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", sans-serif;
  --theme-font-size-xs: 0.75rem;
  --theme-font-size-sm: 0.875rem;
  --theme-font-size-base: 0.875rem; /* 14px - Compact for power users */
  --theme-font-size-lg: 1rem;
  --theme-font-size-xl: 1.125rem;
  --theme-font-size-2xl: 1.25rem;
  --theme-font-size-3xl: 1.5rem;

  --theme-font-weight-normal: 400;
  --theme-font-weight-medium: 500;
  --theme-font-weight-semibold: 600;
  --theme-font-weight-bold: 700;

  --theme-line-height-tight: 1.25;
  --theme-line-height-base: 1.5;
  --theme-line-height-relaxed: 1.75;

  /* Spacing - Compact design for power users */
  --theme-spacing-xs: 0.25rem; /* 4px */
  --theme-spacing-sm: 0.5rem; /* 8px */
  --theme-spacing-base: 0.75rem; /* 12px */
  --theme-spacing-md: 1rem; /* 16px */
  --theme-spacing-lg: 1.5rem; /* 24px */
  --theme-spacing-xl: 2rem; /* 32px */
  --theme-spacing-2xl: 3rem; /* 48px */

  /* Border Radius */
  --theme-border-radius-sm: 0.25rem; /* 4px */
  --theme-border-radius: 0.5rem; /* 8px */
  --theme-border-radius-lg: 0.75rem; /* 12px */
  --theme-border-radius-xl: 1rem; /* 16px */

  /* Transitions */
  --theme-transition-fast: 150ms ease-in-out;
  --theme-transition-base: 200ms ease-in-out;
  --theme-transition-slow: 300ms ease-in-out;
}

/* Global Styles */
html,
body {
  font-family: var(--theme-font-family);
  font-size: var(--theme-font-size-base);
  line-height: var(--theme-line-height-base);
  color: var(--theme-text-primary);
  background-color: var(--theme-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Bootstrap Component Overrides */

/* Buttons */
.btn {
  font-weight: var(--theme-font-weight-medium);
  border-radius: var(--theme-border-radius);
  padding: var(--theme-spacing-sm) var(--theme-spacing-base);
  font-size: var(--theme-font-size-base);
  transition: all var(--theme-transition-fast);
  border-width: 1px;
  position: relative;
  overflow: hidden;
  text-decoration: none !important;
}

a {
  text-decoration: none !important;
}

.btn-primary {
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
  color: var(--theme-text-inverse);
}

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

.btn-primary:active {
  background-color: var(--theme-primary-active);
  border-color: var(--theme-primary-active);
  transform: translateY(0);
}

.btn-success {
  background-color: var(--theme-success);
  border-color: var(--theme-success);
}

.btn-success:hover {
  background-color: var(--theme-success-hover);
  border-color: var(--theme-success-hover);
}

.btn-warning {
  background-color: var(--theme-warning);
  border-color: var(--theme-warning);
  color: var(--theme-text-primary);
}

.btn-warning:hover {
  background-color: var(--theme-warning-hover);
  border-color: var(--theme-warning-hover);
}

.btn-outline-primary {
  color: var(--theme-primary);
  border-color: var(--theme-primary);
  background-color: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--theme-primary-hover);
  border-color: var(--theme-primary-hover);
  color: var(--theme-text-inverse);
}

/* Cards */
.card {
  background-color: var(--theme-surface);
  border: 1px solid var(--theme-border);
  box-shadow: var(--theme-shadow-sm);
  transition: all var(--theme-transition-base);
}

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

.card-header {
  background-color: var(--theme-surface);
  border-bottom: 1px solid var(--theme-border);
  padding: var(--theme-spacing-base) var(--theme-spacing-md);
  font-weight: var(--theme-font-weight-semibold);
  color: var(--theme-text-primary);
}

.card-body {
  padding: var(--theme-spacing-md);
}

.card-footer {
  background-color: var(--theme-surface-hover);
  border-top: 1px solid var(--theme-border);
  padding: var(--theme-spacing-base) var(--theme-spacing-md);
}

/* Forms */
.form-control {
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-border-radius);
  padding: var(--theme-spacing-sm) var(--theme-spacing-base);
  font-size: var(--theme-font-size-base);
  transition: all var(--theme-transition-fast);
  background-color: var(--theme-surface);
  color: var(--theme-text-primary);
}

.form-control:focus {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 0.2rem rgba(91, 63, 208, 0.25);
  outline: none;
}

.form-control::placeholder {
  color: var(--theme-text-muted);
}

.form-label {
  font-weight: var(--theme-font-weight-medium);
  color: var(--theme-text-primary);
  margin-bottom: var(--theme-spacing-xs);
}

.invalid-feedback {
  color: var(--theme-error);
  font-size: var(--theme-font-size-sm);
}

.valid-feedback {
  color: var(--theme-success);
  font-size: var(--theme-font-size-sm);
}

/* Navigation */
.navbar {
  background-color: var(--theme-surface);
  border-bottom: 1px solid var(--theme-border);
  box-shadow: var(--theme-shadow-sm);
}

.navbar-brand {
  font-weight: var(--theme-font-weight-bold);
  color: var(--theme-primary);
}

.nav-link {
  color: var(--theme-text-secondary);
  font-weight: var(--theme-font-weight-medium);
  transition: color var(--theme-transition-fast);
}

.nav-link:hover {
  color: var(--theme-primary);
}

.nav-link.active {
  color: var(--theme-primary);
  font-weight: var(--theme-font-weight-semibold);
}

/* Badges */
.badge {
  font-weight: var(--theme-font-weight-medium);
  border-radius: var(--theme-border-radius);
  padding: 0.25em 0.5em;
  font-size: 0.75em;
}

.badge.bg-primary {
  background-color: var(--theme-primary) !important;
}

.badge.bg-success {
  background-color: var(--theme-success) !important;
}

.badge.bg-warning {
  background-color: var(--theme-warning) !important;
  color: var(--theme-text-primary) !important;
}

.badge.bg-danger {
  background-color: var(--theme-error) !important;
}

/* Alerts */
.alert {
  border-radius: var(--theme-border-radius);
  border: none;
  padding: var(--theme-spacing-base) var(--theme-spacing-md);
}

.alert-primary {
  background-color: var(--theme-primary-light);
  color: var(--theme-primary-dark);
}

.alert-success {
  background-color: var(--theme-success-light);
  color: var(--theme-success-hover);
}

.alert-warning {
  background-color: var(--theme-warning-light);
  color: var(--theme-warning-hover);
}

.alert-danger {
  background-color: var(--theme-error-light);
  color: var(--theme-error-hover);
}

/* Tables */
.table {
  color: var(--theme-text-primary);
  font-size: var(--theme-font-size-base);
}

.table th {
  font-weight: var(--theme-font-weight-semibold);
  color: var(--theme-text-primary);
  border-bottom: 2px solid var(--theme-border);
  padding: var(--theme-spacing-base);
}

.table td {
  padding: var(--theme-spacing-base);
  border-bottom: 1px solid var(--theme-border-light);
}

.table-hover tbody tr:hover {
  background-color: var(--theme-surface-hover);
}

/* Modals */
.modal-content {
  border: none;
  border-radius: var(--theme-border-radius-lg);
  box-shadow: var(--theme-shadow-xl);
}

.modal-header {
  border-bottom: 1px solid var(--theme-border);
  padding: var(--theme-spacing-md);
}

.modal-body {
  padding: var(--theme-spacing-md);
}

.modal-footer {
  border-top: 1px solid var(--theme-border);
  padding: var(--theme-spacing-base) var(--theme-spacing-md);
}

/* Utility Classes */

/* Spacing Utilities */
.p-compact {
  padding: var(--theme-spacing-sm) !important;
}
.p-comfortable {
  padding: var(--theme-spacing-lg) !important;
}
.m-compact {
  margin: var(--theme-spacing-sm) !important;
}
.m-comfortable {
  margin: var(--theme-spacing-lg) !important;
}

/* Text Utilities */
.text-primary-theme {
  color: var(--theme-primary) !important;
}
.text-secondary-theme {
  color: var(--theme-text-secondary) !important;
}
.text-muted-theme {
  color: var(--theme-text-muted) !important;
}

/* Background Utilities */
.bg-surface {
  background-color: var(--theme-surface) !important;
}
.bg-background {
  background-color: var(--theme-background) !important;
}

/* Border Utilities */
.border-theme {
  border-color: var(--theme-border) !important;
}
.border-primary-theme {
  border-color: var(--theme-primary) !important;
}

/* Shadow Utilities */
.shadow-sm-theme {
  box-shadow: var(--theme-shadow-sm) !important;
}
.shadow-theme {
  box-shadow: var(--theme-shadow) !important;
}
.shadow-lg-theme {
  box-shadow: var(--theme-shadow-lg) !important;
}

/* Rounded Utilities */
.rounded-theme {
  border-radius: var(--theme-border-radius) !important;
}
.rounded-lg-theme {
  border-radius: var(--theme-border-radius-lg) !important;
}

/* Layout Utilities */
.compact-layout {
  --bs-gutter-x: var(--theme-spacing-base);
  --bs-gutter-y: var(--theme-spacing-base);
}

.comfortable-layout {
  --bs-gutter-x: var(--theme-spacing-lg);
  --bs-gutter-y: var(--theme-spacing-lg);
}

/* Focus States */
.focus-primary:focus {
  outline: 2px solid var(--theme-primary);
  outline-offset: 2px;
}

/* Loading States */
.loading-overlay {
  position: relative;
  overflow: hidden;
}

.loading-overlay::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Responsive Design Helpers */
@media (max-width: 767.98px) {
  .btn {
    padding: var(--theme-spacing-base) var(--theme-spacing-md);
    font-size: var(--theme-font-size-base);
  }

  .card-body {
    padding: var(--theme-spacing-base);
  }

  .compact-layout {
    --bs-gutter-x: var(--theme-spacing-sm);
    --bs-gutter-y: var(--theme-spacing-sm);
  }
}

/* Print Styles */
@media print {
  .btn,
  .badge {
    color: var(--theme-text-primary) !important;
    background: transparent !important;
    border: 1px solid var(--theme-border) !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid var(--theme-border) !important;
  }
}

/* Custom Badge Styles */
.badge-outline {
  background-color: transparent !important;
  border: 1px solid currentColor;
}

.badge-soft {
  background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
  color: var(--bs-primary) !important;
}

.badge-soft.text-success {
  background-color: rgba(var(--bs-success-rgb), 0.1) !important;
  color: var(--bs-success) !important;
}

.badge-soft.text-warning {
  background-color: rgba(var(--bs-warning-rgb), 0.1) !important;
  color: var(--bs-warning) !important;
}

.badge-soft.text-danger {
  background-color: rgba(var(--bs-danger-rgb), 0.1) !important;
  color: var(--bs-danger) !important;
}

.badge-soft.text-info {
  background-color: rgba(var(--bs-info-rgb), 0.1) !important;
  color: var(--bs-info) !important;
}

.badge-soft.text-secondary {
  background-color: rgba(108, 117, 125, 0.1) !important;
  color: #6c757d !important;
}

/* Badge Sizes */
.badge-xs {
  font-size: 0.625rem;
  padding: 0.125rem 0.375rem;
}

.badge-sm {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.badge-md {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
}

.badge-lg {
  font-size: 1rem;
  padding: 0.5rem 1rem;
}

/* Badge with Dot */
.badge-with-dot {
  display: inline-flex;
  align-items: center;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
  display: inline-block;
}

/* Card Size Variants */
.card-sm .card-body {
  padding: var(--theme-spacing-sm);
}

.card-sm .card-header,
.card-sm .card-footer {
  padding: var(--theme-spacing-xs) var(--theme-spacing-sm);
}

.card-lg .card-body {
  padding: var(--theme-spacing-lg);
}

.card-lg .card-header,
.card-lg .card-footer {
  padding: var(--theme-spacing-base) var(--theme-spacing-lg);
}

/* Cursor Pointer Utility */
.cursor-pointer {
  cursor: pointer;
}

/* Additional Button Loading State */
.btn.loading {
  position: relative;
  pointer-events: none;
}

/* Layout Styles */

/* Public Layout */
.public-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.public-main {
  flex: 1;
}

.public-footer {
  margin-top: auto;
}

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

.public-nav-actions .btn {
  white-space: nowrap;
}

@media (max-width: 1199.98px) {
  .public-nav-actions {
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    align-items: stretch;
  }

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

@media (min-width: 1200px) {
  .public-nav-actions {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    width: auto;
  }

  .public-nav-actions .btn {
    width: auto;
  }
}

/* PWA Status Bar Spacer - Only visible when installed as PWA */
.pwa-status-bar-spacer {
  display: none;
  height: 0;
  background-color: var(--theme-primary, #5b3fd0);
  flex-shrink: 0;
}

/* Show spacer in PWA standalone mode (detected by JS) */
body.pwa-standalone .pwa-status-bar-spacer {
  display: block;
  height: env(safe-area-inset-top, 0px);
  min-height: 0;
}

/* For Android PWA which doesn't support env() well, use fixed height on mobile */
@media (max-width: 991.98px) {
  body.pwa-standalone.is-mobile .pwa-status-bar-spacer {
    /* Android PWA title bar is typically hidden, but we need some breathing room */
    min-height: 0;
  }
}

/* App Layout */
.app-layout {
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height for mobile */
  overflow: hidden;
  /* Remove the padding-top, we use spacer instead */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Sidebar */
.app-sidebar {
  min-width: 280px;
  background-color: var(--theme-surface);
  border-right: 1px solid var(--theme-border);
  display: flex;
  flex-direction: column;
  transition: all var(--theme-transition-base);
  position: relative;
  z-index: 1000;
}

.app-sidebar.sidebar-collapsed {
  width: 64px;
  min-width: 64px;
}

.sidebar-header {
  flex-shrink: 0;
}

.sidebar-brand {
  font-size: 1.125rem;
  transition: opacity var(--theme-transition-fast);
}

.sidebar-nav {
  padding: var(--theme-spacing-base) 0;
}

.nav-section {
  margin-bottom: var(--theme-spacing-base);
}

.nav-section-title {
  font-size: var(--theme-font-size-xs);
  font-weight: var(--theme-font-weight-semibold);
  color: var(--theme-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--theme-spacing-xs) var(--theme-spacing-base);
  margin-bottom: var(--theme-spacing-xs);
}

/* Clickable collapsible section title */
button.nav-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}
button.nav-section-toggle:hover {
  color: var(--theme-primary);
}
.nav-section-chevron {
  font-size: 0.6rem;
  opacity: 0.6;
  flex-shrink: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: var(--theme-spacing-sm) var(--theme-spacing-base);
  color: var(--theme-text-secondary);
  text-decoration: none;
  transition: all var(--theme-transition-fast);
  border-radius: 0;
  margin: 0 var(--theme-spacing-xs);
  border-radius: var(--theme-border-radius);
}

.nav-item:hover {
  background-color: var(--theme-surface-hover);
  color: var(--theme-primary);
  text-decoration: none;
}

.nav-item.active {
  background-color: var(--theme-primary-light);
  color: var(--theme-primary);
  font-weight: var(--theme-font-weight-medium);
}

.nav-icon {
  width: 20px;
  text-align: center;
  margin-right: var(--theme-spacing-base);
  font-size: 1rem;
}

.nav-text {
  transition: opacity var(--theme-transition-fast);
}

.sidebar-footer {
  flex-shrink: 0;
  margin-top: auto;
}

/* Top Bar */
.app-topbar {
  flex-shrink: 0;
  min-height: 56px;
  display: flex;
  align-items: stretch;
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--theme-surface);
}

.search-box .input-group {
  width: 300px;
}

.search-box .form-control:focus {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 0.2rem rgba(91, 63, 208, 0.25);
}

.avatar-sm {
  width: 32px;
  height: 32px;
}

/* Main Content */
.app-main {
  min-width: 0; /* Prevent flex item from overflowing */
}

.app-content {
  background-color: var(--theme-background);
}

/* Breadcrumb */
.breadcrumb {
  background: none;
  padding: 0;
  margin: 0;
}

.breadcrumb-item {
  font-size: var(--theme-font-size-sm);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: var(--theme-text-muted);
}

.breadcrumb-item a {
  color: var(--theme-text-secondary);
}

.breadcrumb-item a:hover {
  color: var(--theme-primary);
}

.breadcrumb-item.active {
  color: var(--theme-text-primary);
  font-weight: var(--theme-font-weight-medium);
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
  .app-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    height: 100vh;
    height: 100dvh;
    z-index: 1050;
    transition: left var(--theme-transition-base);
    padding-top: env(safe-area-inset-top);
    /* Ensure footer isn't obscured by mobile safe-area (home indicator) */
    padding-bottom: env(safe-area-inset-bottom);
    box-sizing: border-box;
  }

  .app-sidebar.sidebar-open {
    left: 0;
  }

  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
  }

  .app-main {
    width: 100%;
  }

  .search-box .input-group {
    width: 200px;
  }

  /* Mobile app-like topbar - auto height for two-row layout */
  .app-topbar {
    min-height: auto;
    padding: 0;
  }

  /* Compact breadcrumb on mobile */
  .breadcrumb {
    font-size: 0.8125rem;
  }

  .breadcrumb-item + .breadcrumb-item {
    padding-left: 0.35rem;
  }

  .breadcrumb-item + .breadcrumb-item::before {
    padding-right: 0.35rem;
  }
}

@media (max-width: 767.98px) {
  .search-box {
    display: none !important;
  }

  .app-topbar .d-none.d-md-inline {
    display: none !important;
  }

  /* Mobile topbar stays auto-height */
  .app-topbar {
    min-height: auto;
  }

  /* Smaller buttons on small screens */
  .app-topbar .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
  }

  /* Compact gap */
  .app-topbar .gap-2 {
    gap: 0.35rem !important;
  }

  /* Prevent topbar right side from overflowing on small screens */
  .app-topbar .d-flex.align-items-center.gap-2 {
    flex-shrink: 0;
    min-width: 0;
  }

  /* Business selector compact on mobile */
  .app-topbar .dropdown-toggle {
    max-width: 44px;
    overflow: hidden;
  }
}

/* PWA Standalone Mode - When installed as app */
@media (display-mode: standalone) {
  .app-layout {
    /* Extra padding for PWA title bar */
    padding-top: env(safe-area-inset-top, 0px);
  }

  .app-topbar {
    /* Ensure topbar doesn't overlap with PWA chrome */
    position: relative;
  }

  .app-sidebar {
    padding-top: env(safe-area-inset-top, 0px);
  }
}

/* iOS PWA specific fixes */
@supports (-webkit-touch-callout: none) {
  .app-layout {
    /* iOS safe area */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  @media (display-mode: standalone) {
    .app-main {
      /* Prevent content from going under iOS home indicator */
      padding-bottom: env(safe-area-inset-bottom);
    }
  }
}

/* PWA Standalone Mode - JS-detected class (more reliable than media query) */
html.pwa-standalone,
body.pwa-standalone {
  /* Ensure safe area is respected */
  --pwa-top-offset: max(env(safe-area-inset-top, 0px), 0px);
}

body.pwa-standalone .app-layout {
  padding-top: 0; /* Remove the general padding, handle in topbar */
}

body.pwa-standalone .app-topbar {
  /* Add a safe spacer for PWA title bar */
  margin-top: var(--pwa-top-offset, 0);
  background: var(--theme-surface);
}

body.pwa-standalone .app-sidebar {
  top: var(--pwa-top-offset, 0);
  height: calc(100dvh - var(--pwa-top-offset, 0px));
}

/* Mobile PWA - most aggressive fix */
body.pwa-standalone.is-mobile .app-layout {
  padding-top: 0;
}

body.pwa-standalone.is-mobile .app-main {
  /* The main area needs to scroll properly */
  height: 100%;
  overflow: hidden;
}

body.pwa-standalone.is-mobile .app-topbar {
  /* Ensure topbar is always visible and not cut off */
  flex-shrink: 0;
  min-height: 52px;
}

/* Collapsed Sidebar Styles */
@media (min-width: 992px) {
  .app-sidebar.sidebar-collapsed .nav-text,
  .app-sidebar.sidebar-collapsed .nav-section-title,
  .app-sidebar.sidebar-collapsed .sidebar-brand {
    opacity: 0;
    visibility: hidden;
  }

  .app-sidebar.sidebar-collapsed .nav-item {
    justify-content: center;
    padding-left: var(--theme-spacing-base);
    padding-right: var(--theme-spacing-base);
  }

  .app-sidebar.sidebar-collapsed .nav-icon {
    margin-right: 0;
  }
}

/* Dropdown Improvements */
.dropdown-menu {
  border: 1px solid var(--theme-border);
  box-shadow: var(--theme-shadow-lg);
  border-radius: var(--theme-border-radius);
}

.dropdown-item {
  padding: var(--theme-spacing-sm) var(--theme-spacing-base);
  font-size: var(--theme-font-size-sm);
  transition: all var(--theme-transition-fast);
}

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

.dropdown-item.text-danger:hover {
  background-color: var(--theme-error-light);
  color: var(--theme-error);
}

.dropdown-header {
  font-size: var(--theme-font-size-xs);
  font-weight: var(--theme-font-weight-semibold);
  color: var(--theme-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Notification Badge */
.badge.rounded-pill {
  font-size: 0.6rem;
  padding: 0.2em 0.4em;
}

/* Utility Classes for Layouts */
.h-100vh {
  height: 100vh;
}

.min-h-100vh {
  min-height: 100vh;
}

.overflow-hidden {
  overflow: hidden;
}

.overflow-auto {
  overflow: auto;
}

.overflow-y-auto {
  overflow-y: auto;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

.z-index-1000 {
  z-index: 1000;
}

.z-index-1040 {
  z-index: 1040;
}

.z-index-1050 {
  z-index: 1050;
}

/* Authentication Pages Styles */
.auth-section {
  background: linear-gradient(135deg, var(--theme-background) 0%, #f8f9ff 100%);
  position: relative;
}

.auth-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="auth-pattern" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(91,63,208,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23auth-pattern)"/></svg>');
  pointer-events: none;
}

.auth-card {
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--theme-shadow-xl);
}

.auth-divider {
  position: relative;
  text-align: center;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--theme-border);
}

.auth-divider span {
  background-color: var(--theme-surface);
  padding: 0 var(--theme-spacing-base);
  position: relative;
  z-index: 1;
}

/* Form Select Improvements */
.form-select {
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-border-radius);
  padding: var(--theme-spacing-sm) var(--theme-spacing-base);
  font-size: var(--theme-font-size-base);
  transition: all var(--theme-transition-fast);
  background-color: var(--theme-surface);
  color: var(--theme-text-primary);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23718096' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
}

.form-select:focus {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 0.2rem rgba(91, 63, 208, 0.25);
  outline: none;
}

.form-select.is-invalid {
  border-color: var(--theme-error);
}

/* Input Group Improvements */
.input-group .btn {
  border-left: none;
}

.input-group .form-control:focus + .btn {
  border-color: var(--theme-primary);
}

/* Form Check Improvements */
.form-check-input {
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-border-radius-sm);
}

.form-check-input:checked {
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
}

.form-check-input:focus {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 0.2rem rgba(91, 63, 208, 0.25);
}

.form-check-input.is-invalid {
  border-color: var(--theme-error);
}

/* Form Text Improvements */
.form-text {
  color: var(--theme-text-muted);
  font-size: var(--theme-font-size-xs);
  margin-top: var(--theme-spacing-xs);
}

/* Success Message Styling */
.alert-success {
  background-color: var(--theme-success-light);
  border: 1px solid var(--theme-success);
  color: var(--theme-success-hover);
}

/* Loading State for Auth Forms */
.auth-card.loading {
  pointer-events: none;
  opacity: 0.8;
}

/* Responsive Auth Pages */
@media (max-width: 767.98px) {
  .auth-section {
    padding-top: var(--theme-spacing-base);
    padding-bottom: var(--theme-spacing-base);
  }

  .auth-card {
    margin: var(--theme-spacing-base);
  }

  .container-comfortable {
    padding-left: var(--theme-spacing-sm);
    padding-right: var(--theme-spacing-sm);
  }
}
/* Home Page Styles */
.bg-gradient-primary {
  background: linear-gradient(
    135deg,
    var(--theme-primary) 0%,
    var(--theme-primary-dark) 100%
  );
}

.text-white-75 {
  color: rgba(255, 255, 255, 0.75) !important;
}

.min-vh-75 {
  min-height: 75vh;
}

.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
  pointer-events: none;
}

.dashboard-preview {
  transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
  transition: transform var(--theme-transition-base);
}

.dashboard-preview:hover {
  transform: perspective(1000px) rotateY(-2deg) rotateX(2deg) scale(1.02);
}

.features-section {
  background-color: var(--theme-background);
}

.space-y-1 > * + * {
  margin-top: var(--theme-spacing-xs);
}

/* Display Typography */
.display-4 {
  font-size: 2.5rem;
  font-weight: var(--theme-font-weight-bold);
  line-height: 1.2;
}

@media (min-width: 768px) {
  .display-4 {
    font-size: 3rem;
  }
}

@media (min-width: 992px) {
  .display-4 {
    font-size: 3.5rem;
  }
}

/* Lead Text */
.lead {
  font-size: 1.125rem;
  font-weight: var(--theme-font-weight-normal);
  line-height: 1.6;
}

/* Feature Cards Hover Effects */
.card.hover-lift {
  transition: all var(--theme-transition-base);
}

.card.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: var(--theme-shadow-xl);
}

/* Icon Improvements */
.fas,
.fab {
  font-family: "Font Awesome 5 Free", "Font Awesome 5 Brands";
}

/* Responsive Improvements */
@media (max-width: 767.98px) {
  .hero-section {
    padding-top: var(--theme-spacing-xl);
    padding-bottom: var(--theme-spacing-xl);
  }

  .display-4 {
    font-size: 2rem;
  }

  .dashboard-preview {
    transform: none;
    margin-top: var(--theme-spacing-lg);
  }

  .features-section,
  .cta-section {
    padding-top: var(--theme-spacing-xl);
    padding-bottom: var(--theme-spacing-xl);
  }
}

/* Button Group Spacing */
.gap-base {
  gap: var(--theme-spacing-base);
}

.gap-sm {
  gap: var(--theme-spacing-sm);
}

.gap-lg {
  gap: var(--theme-spacing-lg);
}

/* List Improvements */
.list-unstyled li {
  display: flex;
  align-items: center;
}

/* Container Improvements */
.container-comfortable {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--theme-spacing-lg);
  padding-right: var(--theme-spacing-lg);
}

@media (max-width: 767.98px) {
  .container-comfortable {
    padding-left: var(--theme-spacing-base);
    padding-right: var(--theme-spacing-base);
  }
}
/* Dashboard Specific Styles */
.space-y-base > * + * {
  margin-top: var(--theme-spacing-base);
}

/* Grid Gap Utilities */
.g-base {
  --bs-gutter-x: var(--theme-spacing-base);
  --bs-gutter-y: var(--theme-spacing-base);
}

.g-sm {
  --bs-gutter-x: var(--theme-spacing-sm);
  --bs-gutter-y: var(--theme-spacing-sm);
}

.g-lg {
  --bs-gutter-x: var(--theme-spacing-lg);
  --bs-gutter-y: var(--theme-spacing-lg);
}

/* Font Weight Utilities */
.font-medium {
  font-weight: var(--theme-font-weight-medium);
}

/* Background Color Utilities for Icons */
.bg-primary-light {
  background-color: var(--theme-primary-light) !important;
}

.bg-success-light {
  background-color: var(--theme-success-light) !important;
}

.bg-warning-light {
  background-color: var(--theme-warning-light) !important;
}

.bg-info-light {
  background-color: var(--theme-info-light) !important;
}

.bg-error-light {
  background-color: var(--theme-error-light) !important;
}

/* Table Improvements */
.table th {
  font-size: var(--theme-font-size-sm);
  font-weight: var(--theme-font-weight-semibold);
  color: var(--theme-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  border-bottom: 2px solid var(--theme-border);
  padding: var(--theme-spacing-sm) var(--theme-spacing-base);
}

.table td {
  font-size: var(--theme-font-size-sm);
  padding: var(--theme-spacing-base);
  vertical-align: middle;
  border-bottom: 1px solid var(--theme-border-light);
}

.table-hover tbody tr:hover {
  background-color: var(--theme-surface-hover);
}

/* Button Full Width */
.btn.w-100 {
  width: 100% !important;
}

/* Flex Utilities */
.flex-shrink-0 {
  flex-shrink: 0 !important;
}

.flex-grow-1 {
  flex-grow: 1 !important;
}

/* Height Utilities */
.h-100 {
  height: 100% !important;
}

/* Rounded Utilities */
.rounded-lg {
  border-radius: var(--theme-border-radius-lg) !important;
}

/* Text Alignment */
.text-end {
  text-align: end !important;
}

/* Display Grid */
.d-grid {
  display: grid !important;
}

/* Template Slot Support (for future use) */
.card-footer {
  background-color: var(--theme-surface-hover);
  border-top: 1px solid var(--theme-border);
  padding: var(--theme-spacing-base) var(--theme-spacing-md);
  border-bottom-left-radius: var(--theme-border-radius-lg);
  border-bottom-right-radius: var(--theme-border-radius-lg);
}

/* Responsive Table */
.table-responsive {
  border-radius: var(--theme-border-radius);
}

@media (max-width: 767.98px) {
  .table-responsive {
    font-size: var(--theme-font-size-xs);
  }

  .table th,
  .table td {
    padding: var(--theme-spacing-xs) var(--theme-spacing-sm);
  }
}

/* Page Header Responsive */
@media (max-width: 767.98px) {
  .d-flex.justify-content-between.align-items-center {
    flex-direction: column;
    align-items: flex-start !important;
    gap: var(--theme-spacing-base);
  }

  .d-flex.gap-sm {
    width: 100%;
    justify-content: stretch;
    flex-direction: column;
  }

  .d-flex.gap-sm .btn {
    flex: 1;
  }
}

/* Menu Management Styles */
.menu-item-card {
  transition: all var(--theme-transition-base);
}

.menu-item-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--theme-shadow-lg);
}

.menu-item-image {
  height: 200px;
  object-fit: cover;
  border-top-left-radius: var(--theme-border-radius-lg);
  border-top-right-radius: var(--theme-border-radius-lg);
}

.menu-item-placeholder {
  height: 200px;
  background-color: var(--theme-background);
  border-top-left-radius: var(--theme-border-radius-lg);
  border-top-right-radius: var(--theme-border-radius-lg);
}

.category-card {
  transition: all var(--theme-transition-base);
}

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

.category-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* QR Code Styles */
.qr-code-card {
  transition: all var(--theme-transition-base);
}

.qr-code-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--theme-shadow);
}

.qr-code-display {
  background:
    linear-gradient(45deg, #f8f9fa 25%, transparent 25%),
    linear-gradient(-45deg, #f8f9fa 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f8f9fa 75%),
    linear-gradient(-45deg, transparent 75%, #f8f9fa 75%);
  background-size: 20px 20px;
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0px;
}

.qr-code-placeholder {
  width: 120px;
  height: 120px;
  box-shadow: var(--theme-shadow-sm);
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 2px;
  width: 80px;
  height: 80px;
  margin: 0 auto;
}

.qr-dot {
  background-color: #f8f9fa;
  border-radius: 1px;
  transition: background-color var(--theme-transition-fast);
}

.qr-dot.filled {
  background-color: var(--theme-text-primary);
}

/* Form Switch Improvements */
.form-check-input {
  border-radius: 1em;
  background-color: var(--theme-border);
  border: none;
  transition: all var(--theme-transition-fast);
}

.form-check-input:checked {
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
}

.form-check-input:focus {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 0.2rem rgba(91, 63, 208, 0.25);
}

/* Responsive Menu Management */
@media (max-width: 767.98px) {
  .menu-item-image,
  .menu-item-placeholder {
    height: 150px;
  }

  .category-icon {
    width: 50px;
    height: 50px;
  }

  .qr-code-placeholder {
    width: 100px;
    height: 100px;
  }

  .qr-grid {
    width: 60px;
    height: 60px;
  }
}

/* Print Styles for QR Codes */
@media print {
  .qr-code-card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid var(--theme-border) !important;
  }

  .qr-code-display {
    background: white !important;
  }

  .btn,
  .form-check {
    display: none !important;
  }
}
/* POS System Styles */
.pos-container {
  background-color: var(--theme-background);
}

.pos-header {
  min-height: 60px;
}

.pos-main {
  height: calc(100vh - 124px); /* Account for header and app topbar */
  min-width: 0;
}

.pos-menu,
.pos-menu-order {
  min-width: 0; /* Prevent flex overflow */
}

.category-tabs {
  min-height: 60px;
}

.category-tabs .btn {
  white-space: nowrap;
}

.menu-items {
  background-color: var(--theme-background);
}

.menu-item-card {
  background-color: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-border-radius);
  cursor: pointer;
  transition: all var(--theme-transition-fast);
  position: relative;
  overflow: hidden;
  height: 120px;
  display: flex;
  flex-direction: column;
}

.menu-item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--theme-shadow);
  border-color: var(--theme-primary);
}

.menu-item-card.unavailable {
  opacity: 0.6;
  cursor: not-allowed;
}

.menu-item-card.unavailable:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--theme-border);
}

.menu-item-image {
  height: 70px;
  overflow: hidden;
  background-color: var(--theme-background);
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-placeholder {
  color: var(--theme-text-muted);
  font-size: 1.5rem;
}

.menu-item-info {
  padding: var(--theme-spacing-sm);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.item-name {
  font-size: var(--theme-font-size-sm);
  font-weight: var(--theme-font-weight-medium);
  color: var(--theme-text-primary);
  line-height: 1.2;
  margin-bottom: var(--theme-spacing-xs);
}

.item-price {
  font-size: var(--theme-font-size-sm);
  font-weight: var(--theme-font-weight-semibold);
  color: var(--theme-primary);
}

.unavailable-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--theme-font-size-sm);
  font-weight: var(--theme-font-weight-medium);
}

/* Order Panel */
.pos-order {
  min-width: 400px;
  max-width: 400px;
}

.order-header {
  min-height: 80px;
}

.order-items {
  min-height: 0; /* Allow flex shrinking */
}

.order-item {
  transition: background-color var(--theme-transition-fast);
}

.order-item:hover {
  background-color: var(--theme-surface-hover);
}

.quantity-controls {
  background-color: var(--theme-background);
  border-radius: var(--theme-border-radius);
  padding: var(--theme-spacing-xs);
}

.quantity-controls .btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity {
  min-width: 30px;
  text-align: center;
}

.empty-order {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
}

.order-summary {
  border-top-left-radius: var(--theme-border-radius);
  border-top-right-radius: var(--theme-border-radius);
}

.summary-line {
  font-size: var(--theme-font-size-sm);
}

/* Orders Page Styles */
.table-warning-light {
  background-color: rgba(255, 167, 38, 0.1) !important;
}

.table-info-light {
  background-color: rgba(49, 130, 206, 0.1) !important;
}

.table-success-light {
  background-color: rgba(27, 184, 116, 0.1) !important;
}

/* Responsive POS */
@media (max-width: 1199.98px) {
  .pos-order {
    min-width: 350px;
    max-width: 350px;
  }

  .menu-item-card {
    height: 100px;
  }

  .menu-item-image {
    height: 60px;
  }
}

@media (max-width: 991.98px) {
  .pos-main {
    flex-direction: column;
  }

  .pos-order {
    min-width: 100%;
    max-width: 100%;
    max-height: 40vh;
    border-left: none;
    border-top: 1px solid var(--theme-border);
  }

  .pos-menu {
    max-height: 60vh;
  }
}

@media (max-width: 767.98px) {
  .menu-item-card {
    height: 80px;
  }

  .menu-item-image {
    height: 45px;
  }

  .item-name {
    font-size: var(--theme-font-size-xs);
  }

  .item-price {
    font-size: var(--theme-font-size-xs);
  }

  .category-tabs .btn {
    font-size: var(--theme-font-size-xs);
    padding: var(--theme-spacing-xs) var(--theme-spacing-sm);
  }
}

/* Print Styles for Orders */
@media print {
  .pos-container {
    display: none !important;
  }

  .order-receipt {
    background: white !important;
    color: black !important;
    font-family: "Courier New", monospace;
  }

  .order-receipt .btn {
    display: none !important;
  }
}
/* Guest Layout Styles */
.guest-layout {
  background-color: var(--theme-background);
}

.guest-header {
  min-height: 70px;
  box-shadow: var(--theme-shadow-sm);
}

.guest-footer {
  background-color: var(--theme-surface);
}

.floating-cart {
  position: fixed;
  bottom: var(--theme-spacing-base);
  left: var(--theme-spacing-base);
  right: var(--theme-spacing-base);
  z-index: 1000;
  max-width: 400px;
  margin: 0 auto;
}

/* Guest Ordering Styles */
.guest-ordering-container {
  min-height: 100vh;
}

.welcome-section {
  background: linear-gradient(
    135deg,
    var(--theme-primary) 0%,
    var(--theme-primary-dark) 100%
  );
  position: relative;
  overflow: hidden;
}

.welcome-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="welcome-pattern" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23welcome-pattern)"/></svg>');
  opacity: 0.3;
  pointer-events: none;
}

.welcome-stat {
  text-align: center;
  padding: var(--theme-spacing-base);
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--theme-border-radius);
  backdrop-filter: blur(10px);
}

.stat-number {
  font-size: 1.5rem;
  font-weight: var(--theme-font-weight-bold);
  line-height: 1;
}

.stat-label {
  font-size: var(--theme-font-size-sm);
  opacity: 0.9;
  margin-top: var(--theme-spacing-xs);
}

.category-nav {
  z-index: 100;
  box-shadow: var(--theme-shadow-sm);
}

.category-nav .btn {
  white-space: nowrap;
}

.menu-content {
  padding-bottom: 100px; /* Space for floating cart */
}

.menu-category {
  scroll-margin-top: 80px; /* Account for sticky nav */
}

.category-header .category-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-item-card {
  background-color: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-border-radius-lg);
  overflow: hidden;
  transition: all var(--theme-transition-base);
  height: 180px;
  position: relative;
}

.menu-item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--theme-shadow);
}

.menu-item-card.unavailable {
  opacity: 0.6;
}

.menu-item-card.unavailable::after {
  content: "Currently Unavailable";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--theme-font-weight-medium);
}

.item-image {
  height: 180px;
  overflow: hidden;
  background-color: var(--theme-background);
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-image .image-placeholder {
  color: var(--theme-text-muted);
  font-size: 2rem;
}

.item-content {
  padding: var(--theme-spacing-base);
}

.item-name {
  font-size: var(--theme-font-size-lg);
  font-weight: var(--theme-font-weight-semibold);
  color: var(--theme-text-primary);
  line-height: 1.2;
}

.item-description {
  font-size: var(--theme-font-size-sm);
  line-height: 1.4;
}

.item-price {
  font-size: var(--theme-font-size-lg);
  font-weight: var(--theme-font-weight-bold);
}

.allergens {
  display: flex;
  flex-wrap: wrap;
  gap: var(--theme-spacing-xs);
  align-items: center;
}

.quantity-controls {
  background-color: var(--theme-background);
  border-radius: var(--theme-border-radius);
  padding: var(--theme-spacing-xs) var(--theme-spacing-sm);
}

.quantity-controls .btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity {
  min-width: 40px;
  text-align: center;
  font-size: var(--theme-font-size-lg);
}

/* Cart Modal Styles */
.cart-item {
  padding: var(--theme-spacing-base) 0;
}

.cart-summary {
  background-color: var(--theme-background);
  padding: var(--theme-spacing-base);
  border-radius: var(--theme-border-radius);
}

/* Responsive Guest Ordering */
@media (max-width: 991.98px) {
  .welcome-section {
    padding-top: var(--theme-spacing-lg);
    padding-bottom: var(--theme-spacing-lg);
  }

  .welcome-stat {
    padding: var(--theme-spacing-sm);
  }

  .stat-number {
    font-size: 1.25rem;
  }

  .menu-item-card {
    height: 160px;
  }

  .item-image {
    height: 160px;
  }
}

@media (max-width: 767.98px) {
  .guest-header {
    min-height: 60px;
  }

  .guest-header .container-fluid {
    padding-left: var(--theme-spacing-sm);
    padding-right: var(--theme-spacing-sm);
  }

  .welcome-section {
    padding-top: var(--theme-spacing-base);
    padding-bottom: var(--theme-spacing-base);
  }

  .welcome-stat {
    padding: var(--theme-spacing-xs);
  }

  .stat-number {
    font-size: 1rem;
  }

  .stat-label {
    font-size: var(--theme-font-size-xs);
  }

  .category-header .category-icon {
    width: 50px;
    height: 50px;
  }

  .menu-item-card {
    height: 140px;
  }

  .item-image {
    height: 140px;
  }

  .item-name {
    font-size: var(--theme-font-size-base);
  }

  .item-description {
    font-size: var(--theme-font-size-xs);
  }

  .item-price {
    font-size: var(--theme-font-size-base);
  }

  .floating-cart {
    bottom: var(--theme-spacing-sm);
    left: var(--theme-spacing-sm);
    right: var(--theme-spacing-sm);
  }

  .category-nav .btn {
    font-size: var(--theme-font-size-xs);
    padding: var(--theme-spacing-xs) var(--theme-spacing-sm);
  }
}

/* Sticky Navigation */
.sticky-top {
  position: sticky;
  top: 0;
  z-index: 1020;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Print Styles for Guest Orders */
@media print {
  .guest-header,
  .guest-footer,
  .floating-cart,
  .category-nav {
    display: none !important;
  }

  .welcome-section {
    background: white !important;
    color: black !important;
  }

  .menu-item-card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid var(--theme-border) !important;
  }
}
/* Reservations & Waitlist Styles */
.waitlist-item {
  transition: background-color var(--theme-transition-fast);
}

.waitlist-item:hover {
  background-color: var(--theme-surface-hover);
}

.waitlist-item:last-child {
  border-bottom: none !important;
}

.position-badge {
  font-size: var(--theme-font-size-sm);
  min-width: 32px;
  min-height: 32px;
}

/* Calendar View Styles */
.calendar-view {
  overflow-x: auto;
}

.calendar-grid {
  display: grid;
  grid-template-columns: 80px repeat(7, 1fr);
  gap: 1px;
  background-color: var(--theme-border);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-border-radius);
  overflow: hidden;
  min-width: 800px;
}

.calendar-times {
  display: grid;
  grid-template-rows: 60px repeat(13, 60px);
  gap: 1px;
}

.time-header {
  background-color: var(--theme-surface);
  border-right: 1px solid var(--theme-border);
}

.calendar-times .time-slot {
  background-color: var(--theme-surface);
  padding: var(--theme-spacing-sm);
  font-size: var(--theme-font-size-sm);
  font-weight: var(--theme-font-weight-medium);
  color: var(--theme-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--theme-border);
}

.calendar-day {
  display: grid;
  grid-template-rows: 60px repeat(13, 60px);
  gap: 1px;
}

.day-header {
  background-color: var(--theme-surface);
  padding: var(--theme-spacing-sm);
  text-align: center;
  border-bottom: 1px solid var(--theme-border);
}

.day-header.today {
  background-color: var(--theme-primary-light);
  color: var(--theme-primary);
}

.day-name {
  font-size: var(--theme-font-size-sm);
  font-weight: var(--theme-font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.day-number {
  font-size: var(--theme-font-size-lg);
  font-weight: var(--theme-font-weight-bold);
  margin-top: var(--theme-spacing-xs);
}

.calendar-day .time-slot {
  background-color: var(--theme-surface);
  padding: var(--theme-spacing-xs);
  cursor: pointer;
  transition: background-color var(--theme-transition-fast);
  position: relative;
  overflow: hidden;
}

.calendar-day .time-slot:hover {
  background-color: var(--theme-surface-hover);
}

.calendar-day .time-slot.has-reservations {
  background-color: var(--theme-background);
}

.reservation-block {
  background-color: var(--theme-primary-light);
  border: 1px solid var(--theme-primary);
  border-radius: var(--theme-border-radius-sm);
  padding: 2px 4px;
  margin-bottom: 2px;
  font-size: 10px;
  line-height: 1.2;
}

.reservation-block.confirmed {
  background-color: var(--theme-success-light);
  border-color: var(--theme-success);
}

.reservation-block.pending {
  background-color: var(--theme-warning-light);
  border-color: var(--theme-warning);
}

.reservation-block.seated {
  background-color: var(--theme-info-light);
  border-color: var(--theme-info);
}

.res-name {
  font-weight: var(--theme-font-weight-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.res-details {
  color: var(--theme-text-secondary);
  font-size: 9px;
}

.more-reservations {
  font-size: 9px;
  color: var(--theme-text-muted);
  text-align: center;
  padding: 1px;
}

/* Navigation Tabs */
.nav-tabs {
  border-bottom: 2px solid var(--theme-border);
}

.nav-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--theme-text-secondary);
  font-weight: var(--theme-font-weight-medium);
  padding: var(--theme-spacing-base) var(--theme-spacing-lg);
  transition: all var(--theme-transition-fast);
}

.nav-tabs .nav-link:hover {
  color: var(--theme-primary);
  border-bottom-color: var(--theme-primary-light);
}

.nav-tabs .nav-link.active {
  color: var(--theme-primary);
  border-bottom-color: var(--theme-primary);
  background-color: transparent;
}

/* Responsive Reservations */
@media (max-width: 1199.98px) {
  .calendar-grid {
    min-width: 700px;
  }

  .calendar-times {
    grid-template-rows: 50px repeat(13, 50px);
  }

  .calendar-day {
    grid-template-rows: 50px repeat(13, 50px);
  }

  .calendar-day .time-slot,
  .calendar-times .time-slot {
    height: 50px;
  }
}

@media (max-width: 991.98px) {
  .calendar-grid {
    grid-template-columns: 60px repeat(7, 1fr);
    min-width: 600px;
  }

  .calendar-times {
    grid-template-rows: 40px repeat(13, 40px);
  }

  .calendar-day {
    grid-template-rows: 40px repeat(13, 40px);
  }

  .calendar-day .time-slot,
  .calendar-times .time-slot {
    height: 40px;
    padding: var(--theme-spacing-xs);
  }

  .day-name {
    font-size: var(--theme-font-size-xs);
  }

  .day-number {
    font-size: var(--theme-font-size-base);
  }

  .reservation-block {
    font-size: 9px;
    padding: 1px 2px;
  }
}

@media (max-width: 767.98px) {
  .nav-tabs .nav-link {
    padding: var(--theme-spacing-sm) var(--theme-spacing-base);
    font-size: var(--theme-font-size-sm);
  }

  .position-badge {
    width: 28px;
    height: 28px;
    font-size: var(--theme-font-size-xs);
  }

  .waitlist-item .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
    gap: var(--theme-spacing-sm);
  }

  .waitlist-item .d-flex:last-child {
    flex-direction: row !important;
    align-items: center !important;
  }

  .calendar-view {
    margin: 0 calc(-1 * var(--theme-spacing-base));
  }

  .calendar-grid {
    min-width: 500px;
  }
}

/* Print Styles for Reservations */
@media print {
  .nav-tabs,
  .btn,
  .form-control,
  .form-select {
    display: none !important;
  }

  .tab-content {
    display: block !important;
  }

  .calendar-grid {
    break-inside: avoid;
  }

  .reservation-block {
    background: white !important;
    border: 1px solid black !important;
    color: black !important;
  }
}
/* Inventory Management Styles */
.table-danger-light {
  background-color: rgba(229, 62, 62, 0.1) !important;
}

/* Recipe Management Styles */
.recipe-card {
  transition: all var(--theme-transition-base);
  overflow: hidden;
}

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--theme-shadow-lg);
}

.recipe-image {
  height: 200px;
  overflow: hidden;
  background-color: var(--theme-background);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.recipe-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-image .image-placeholder {
  color: var(--theme-text-muted);
  font-size: 2rem;
}

.recipe-stats {
  background-color: var(--theme-background);
  border-radius: var(--theme-border-radius);
  padding: var(--theme-spacing-sm);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: var(--theme-font-size-base);
  font-weight: var(--theme-font-weight-semibold);
  color: var(--theme-text-primary);
  line-height: 1;
}

.stat-label {
  font-size: var(--theme-font-size-xs);
  color: var(--theme-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Responsive Inventory & Recipes */
@media (max-width: 767.98px) {
  .recipe-image {
    height: 150px;
  }

  .recipe-stats {
    padding: var(--theme-spacing-xs);
  }

  .stat-value {
    font-size: var(--theme-font-size-sm);
  }

  .stat-label {
    font-size: 10px;
  }

  /* Stack inventory table on mobile */
  .table-responsive table,
  .table-responsive thead,
  .table-responsive tbody,
  .table-responsive th,
  .table-responsive td,
  .table-responsive tr {
    display: block;
  }

  .table-responsive thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .table-responsive tr {
    border: 1px solid var(--theme-border);
    margin-bottom: var(--theme-spacing-sm);
    border-radius: var(--theme-border-radius);
    padding: var(--theme-spacing-sm);
  }

  .table-responsive td {
    border: none;
    position: relative;
    padding-top: var(--theme-spacing-xs);
    padding-bottom: var(--theme-spacing-xs);
  }

  .table-responsive td:before {
    content: attr(data-label);
    position: absolute;
    left: 6px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: var(--theme-font-weight-medium);
    color: var(--theme-text-secondary);
  }
}

/* Print Styles for Inventory & Recipes */
@media print {
  .recipe-card,
  .inventory-card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid var(--theme-border) !important;
  }

  .recipe-image {
    height: 150px;
  }

  .btn,
  .form-control,
  .form-select {
    display: none !important;
  }

  .recipe-stats {
    background: white !important;
  }
}

/* Feature Card Icon Shapes */
.icon-shape {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-shape i {
  font-size: 1.5rem;
}

.bg-gradient-primary {
  background: linear-gradient(
    135deg,
    var(--theme-primary) 0%,
    var(--theme-primary-hover) 100%
  );
}

/* Feature Card Enhancements */
.card.border-primary {
  border-width: 2px !important;
}

.card .position-absolute {
  z-index: 10;
}

/* Feature Highlights List */
.list-unstyled li {
  padding-left: 0;
}

.list-unstyled li i.fa-check {
  color: var(--theme-success);
  font-size: 0.875rem;
}

/* Card Hover Effects for Feature Cards */
.card.shadow-sm {
  transition: all var(--theme-transition-base);
}

.card.shadow-sm:hover {
  box-shadow: var(--theme-shadow-lg) !important;
  transform: translateY(-4px);
}

/* Pricing Display */
.h4 {
  font-size: 1.5rem;
  font-weight: var(--theme-font-weight-bold);
}

/* Bootstrap Icons Support */
.bi {
  display: inline-block;
  vertical-align: middle;
}

/* Guest Public Menu */
.guest-menu-page {
  background: #ffffff;
  min-height: 100vh;
}

.guest-menu-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

.guest-menu-hero {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--theme-spacing-xl) var(--theme-spacing-base);
  color: #ffffff;
  background: linear-gradient(110deg, #5b3fd0 0%, #7a4be8 48%, #d946a2 100%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.12);
}

.guest-menu-brand {
  text-align: center;
}

.guest-menu-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--theme-border-radius-lg);
  background: rgba(0, 0, 0, 0.88);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--theme-spacing-base);
  box-shadow: var(--theme-shadow-lg);
  overflow: hidden;
}

.guest-menu-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guest-menu-logo i {
  font-size: 1.75rem;
}

.guest-menu-brand h1 {
  font-size: 1.5rem;
  font-weight: var(--theme-font-weight-bold);
  margin: 0 0 calc(var(--theme-spacing-sm) / 2);
  letter-spacing: 0;
}

.guest-menu-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--theme-spacing-sm);
  font-size: var(--theme-font-size-sm);
  opacity: 0.96;
}

.guest-menu-meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--theme-spacing-xs);
}

.guest-menu-toolbar {
  background: rgba(255, 255, 255, 0.98);
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: var(--theme-shadow-sm);
  padding: 0.65rem 0;
}

.guest-order-status-banner {
  margin: calc(var(--theme-spacing-base) * 1.5) auto 0;
  width: min(1040px, calc(100% - 32px));
  padding: var(--theme-spacing-base);
  border-radius: var(--theme-border-radius-lg);
  background: linear-gradient(
    120deg,
    rgba(91, 63, 208, 0.95),
    rgba(122, 75, 232, 0.95)
  );
  color: #ffffff;
  box-shadow: var(--theme-shadow-lg);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--theme-spacing-base);
  align-items: center;
  cursor: pointer;
  transition:
    transform var(--theme-transition-fast),
    box-shadow var(--theme-transition-fast),
    opacity var(--theme-transition-fast);
}

.guest-order-status-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 60px rgba(91, 63, 208, 0.28);
}

.guest-order-status-banner .guest-order-status-cta {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.guest-order-status-banner .guest-order-status-cta i {
  font-size: 0.9rem;
}

.guest-order-status-banner .text-white-75 {
  color: rgba(255, 255, 255, 0.82);
}

.guest-order-history {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: var(--theme-spacing-base) 0;
}

.guest-order-history-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--theme-spacing-base);
  flex-wrap: wrap;
}

.guest-order-history-count {
  background: rgba(91, 63, 208, 0.12);
  color: var(--theme-primary);
  font-weight: 600;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
}

.guest-order-history-grid {
  display: grid;
  gap: var(--theme-spacing-sm);
}

.guest-order-card {
  width: 100%;
  padding: calc(var(--theme-spacing-sm) * 1.05);
  border-radius: var(--theme-border-radius-lg);
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--theme-spacing-sm);
  align-items: center;
  transition:
    transform var(--theme-transition-fast),
    box-shadow var(--theme-transition-fast),
    border-color var(--theme-transition-fast);
  text-align: left;
}

.guest-order-card:hover,
.guest-order-card:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--theme-shadow-sm);
  border-color: var(--theme-primary);
}

.guest-order-card.active {
  border-color: rgba(var(--bs-primary-rgb), 0.35);
  box-shadow: var(--theme-shadow);
  background: rgba(var(--bs-primary-rgb), 0.05);
}

.guest-order-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.guest-order-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--theme-spacing-xs);
  align-items: center;
}

.guest-order-card-number {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--theme-primary-dark);
  background: rgba(91, 63, 208, 0.08);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}

.guest-order-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--theme-primary-dark);
  font-weight: 600;
  font-size: 0.82rem;
}

.guest-order-card-details {
  font-size: 0.9rem;
  color: var(--theme-text-muted);
}

.guest-order-card-summary {
  text-align: right;
  min-width: 120px;
}

.guest-order-card-total {
  font-size: 1rem;
  font-weight: 700;
}

.guest-order-card-label {
  font-size: 0.85rem;
}

@media (max-width: 767.98px) {
  .guest-order-status-banner {
    grid-template-columns: 1fr;
    padding: var(--theme-spacing-base);
    text-align: left;
  }

  .guest-order-status-banner .text-end {
    text-align: left !important;
  }

  .guest-order-card {
    grid-template-columns: 1fr;
  }

  .guest-order-card-summary {
    text-align: left;
    min-width: auto;
    margin-top: 0.75rem;
  }

  .guest-order-status-banner .text-end {
    text-align: left !important;
  }
}

.guest-menu-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 1fr) auto auto;
  gap: var(--theme-spacing-xs);
  align-items: center;
  padding: calc(var(--theme-spacing-sm) * 0.75) 0;
}

.guest-menu-search,
.guest-menu-jump {
  min-width: 0;
}

.guest-menu-filter,
.guest-menu-view-switcher {
  white-space: nowrap;
}

.guest-menu-filter .btn,
.guest-menu-view-switcher .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--theme-spacing-xs);
}

.diet-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.diet-dot.veg {
  background: var(--theme-success);
}

.diet-dot.nonveg {
  background: var(--theme-error);
}

.guest-menu-content {
  padding: var(--theme-spacing-md) 0 var(--theme-spacing-xl);
}

.guest-menu-category {
  scroll-margin-top: 84px;
  margin-bottom: var(--theme-spacing-xl);
}

.guest-menu-category-title {
  min-height: 36px;
  background: #f4f6ff;
  border-left: 3px solid var(--theme-primary);
  border-radius: 0 var(--theme-border-radius) var(--theme-border-radius) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--theme-spacing-xs) * 1.5) var(--theme-spacing-base);
  margin-bottom: var(--theme-spacing-sm);
  font-weight: var(--theme-font-weight-bold);
}

.guest-menu-category-title > div {
  display: inline-flex;
  align-items: center;
  gap: var(--theme-spacing-sm);
}

.guest-menu-category-title i {
  color: var(--theme-primary);
}

.guest-menu-count {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--theme-primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--theme-font-size-xs);
  padding: 0 var(--theme-spacing-sm);
}

.guest-menu-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--theme-spacing-sm);
}

.guest-public-menu-card {
  min-height: 100px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-border-radius);
  overflow: hidden;
  box-shadow: var(--theme-shadow-sm);
  transition:
    border-color var(--theme-transition-fast),
    box-shadow var(--theme-transition-fast),
    transform var(--theme-transition-fast);
}

.guest-public-menu-card:hover {
  border-color: var(--theme-primary);
  box-shadow: var(--theme-shadow);
  transform: translateY(-1px);
}

.guest-public-menu-card.unavailable,
.guest-menu-list-row.unavailable {
  opacity: 0.62;
}

.guest-public-menu-image {
  min-height: 100px;
  background: #f4f3fa;
  color: rgba(var(--bs-primary-rgb), 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
}

.guest-public-menu-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guest-public-menu-image i {
  font-size: 1.8rem;
}

.guest-public-menu-body {
  min-width: 0;
  padding: calc(var(--theme-spacing-sm) * 1.1);
  display: flex;
  flex-direction: column;
  gap: var(--theme-spacing-xs);
}

.guest-public-menu-body h3 {
  font-size: var(--theme-font-size-base);
  font-weight: var(--theme-font-weight-bold);
  margin: 0;
  line-height: 1.3;
}

.guest-public-menu-body p {
  color: var(--theme-text-secondary);
  font-size: var(--theme-font-size-sm);
  line-height: 1.35;
  margin: 0;
}

.guest-public-menu-price {
  color: #058346;
  font-weight: var(--theme-font-weight-bold);
  flex-shrink: 0;
}

.guest-public-menu-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--theme-spacing-sm);
}

.guest-diet-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--theme-spacing-xs);
}

.guest-diet-badge {
  border-radius: var(--theme-border-radius-sm);
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: var(--theme-font-weight-semibold);
  line-height: 1.3;
}

.guest-diet-badge.veg {
  background: var(--theme-success-light);
  color: #04723d;
  border: 1px solid rgba(27, 184, 116, 0.25);
}

.guest-diet-badge.nonveg {
  background: var(--theme-error-light);
  color: var(--theme-error-hover);
  border: 1px solid rgba(229, 62, 62, 0.24);
}

.guest-diet-badge.neutral {
  background: var(--theme-background);
  color: var(--theme-text-secondary);
  border: 1px solid var(--theme-border);
}

.guest-diet-badge.spicy {
  background: var(--theme-warning-light);
  color: var(--theme-warning-hover);
  border: 1px solid rgba(255, 167, 38, 0.3);
}

.guest-add-button {
  min-width: 58px;
  min-height: 32px;
  padding-inline: var(--theme-spacing-base);
}

.guest-quantity-control {
  display: inline-flex;
  align-items: center;
  gap: var(--theme-spacing-xs);
  background: var(--theme-background);
  border-radius: var(--theme-border-radius);
  padding: 2px;
}

.guest-quantity-control .btn {
  width: 30px;
  height: 30px;
  padding: 0;
}

.guest-quantity-control span {
  min-width: 24px;
  text-align: center;
  font-weight: var(--theme-font-weight-bold);
}

.guest-menu-list {
  display: flex;
  flex-direction: column;
  gap: var(--theme-spacing-sm);
}

.guest-menu-list-row {
  min-height: 40px;
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-border-radius);
  padding: calc(var(--theme-spacing-xs) * 1.5) var(--theme-spacing-base);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--theme-spacing-sm);
}

.guest-menu-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--theme-spacing-sm);
  flex-shrink: 0;
}

.guest-menu-table {
  overflow: hidden;
}

.guest-menu-table .table th {
  font-size: var(--theme-font-size-sm);
}

.guest-floating-cart {
  position: fixed;
  right: var(--theme-spacing-lg);
  bottom: var(--theme-spacing-lg);
  z-index: 1030;
  box-shadow: var(--theme-shadow-lg);
  padding: 0.8rem 1rem;
  min-width: auto;
}

.guest-active-orders-button {
  position: fixed;
  left: var(--theme-spacing-lg);
  bottom: calc(var(--theme-spacing-lg) + 84px);
  z-index: 1040;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  box-shadow: var(--theme-shadow-lg);
  display: inline-flex;
  align-items: center;
  gap: var(--theme-spacing-xs);
  font-weight: 700;
  min-width: 220px;
}

.modal-active-orders-grid {
  display: grid;
  gap: var(--theme-spacing-sm);
}

.modal-active-order-card {
  text-align: left;
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-border-radius-lg);
  padding: var(--theme-spacing-sm);
}

@media (max-width: 767.98px) {
  .guest-active-orders-button {
    left: var(--theme-spacing-base);
    right: var(--theme-spacing-base);
    width: auto;
    bottom: calc(var(--theme-spacing-lg) + 108px);
    justify-content: center;
  }
}

@media (max-width: 1199.98px) {
  .guest-menu-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .guest-menu-controls {
    grid-template-columns: 1fr 1fr;
  }

  .guest-menu-filter,
  .guest-menu-view-switcher {
    overflow-x: auto;
  }
}

@media (max-width: 767.98px) {
  .guest-menu-shell {
    width: min(100% - 20px, 1040px);
  }

  .guest-menu-hero {
    min-height: 220px;
    padding: var(--theme-spacing-xl) var(--theme-spacing-base);
  }

  .guest-menu-brand h1 {
    font-size: 1.5rem;
  }

  .guest-menu-controls,
  .guest-menu-card-grid {
    grid-template-columns: 1fr;
  }

  .guest-menu-toolbar {
    position: static;
  }

  .guest-public-menu-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .guest-public-menu-footer,
  .guest-menu-list-row,
  .guest-menu-row-actions {
    align-items: flex-start;
  }

  .guest-menu-list-row {
    flex-direction: column;
  }

  .guest-menu-row-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .guest-floating-cart {
    left: var(--theme-spacing-base);
    right: var(--theme-spacing-base);
    bottom: var(--theme-spacing-base);
    width: auto;
  }
}
