/* 
   What the Truck 907 - Core Glacial Amber Styling System
   Fully Responsive (Desktop Sidebar + Mobile Bottom Drawer), Glassmorphism, Micro-interactions.
*/

/* --- Design Tokens / Root Variables --- */
:root {
  /* Color Palette - Light Glacial & Amber Theme */
  --bg-deep: hsl(210, 30%, 96%);
  --bg-surface: hsla(0, 0%, 100%, 0.75);
  --bg-surface-elevated: hsl(210, 30%, 92%);
  
  --accent-teal: hsl(185, 90%, 36%);
  --accent-teal-glow: hsla(185, 90%, 36%, 0.15);
  --accent-blue: hsl(205, 100%, 35%);
  
  --accent-amber: hsl(24, 98%, 46%);
  --accent-amber-hover: hsl(20, 98%, 42%);
  --accent-amber-glow: hsla(24, 98%, 46%, 0.25);
  
  --success: hsl(145, 75%, 38%);
  --danger: hsl(355, 80%, 48%);
  --warning: hsl(45, 95%, 45%);

  /* Aura Blob Colors - Default Glacial Theme */
  --aura-color-1: hsl(185, 90%, 65%);
  --aura-color-2: hsl(205, 100%, 70%);
  --aura-color-3: hsl(24, 98%, 75%);

  /* Text Colors */
  --text-white: hsl(220, 40%, 12%);
  --text-misty: hsl(220, 20%, 35%);
  --text-muted: hsl(218, 12%, 50%);
  --text-dark: hsl(210, 30%, 98%);

  /* Typography */
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-secondary: 'Inter', system-ui, sans-serif;

  /* Borders & Shadows */
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-glass-bright: rgba(0, 0, 0, 0.14);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-premium: 0 10px 30px -10px rgba(0, 21, 64, 0.12);
  --shadow-glow: 0 0 20px -5px var(--accent-amber-glow);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-theme {
  /* Color Palette - Glacial Dark & Fire Amber Theme */
  --bg-deep: hsl(225, 60%, 7%);
  --bg-surface: hsla(224, 40%, 13%, 0.7);
  --bg-surface-elevated: hsl(223, 38%, 18%);
  
  --accent-teal: hsl(190, 85%, 48%);
  --accent-teal-glow: hsla(190, 85%, 48%, 0.3);
  --accent-blue: hsl(205, 100%, 40%);
  
  --accent-amber: hsl(28, 98%, 52%);
  --accent-amber-hover: hsl(32, 98%, 56%);
  --accent-amber-glow: hsla(28, 98%, 52%, 0.35);
  
  --success: hsl(145, 75%, 45%);
  --danger: hsl(355, 80%, 55%);
  --warning: hsl(45, 95%, 50%);

  /* Aura Blob Colors - Dark Mode */
  --aura-color-1: hsl(28, 98%, 35%);
  --aura-color-2: hsl(190, 85%, 30%);
  --aura-color-3: hsl(225, 60%, 20%);

  /* Text Colors */
  --text-white: hsl(210, 40%, 96%);
  --text-misty: hsl(215, 20%, 75%);
  --text-muted: hsl(218, 12%, 52%);
  --text-dark: hsl(224, 40%, 10%);

  /* Borders & Shadows */
  --border-glass: hsla(210, 40%, 96%, 0.08);
  --border-glass-bright: hsla(210, 40%, 96%, 0.16);
  --shadow-premium: 0 10px 30px -10px hsla(225, 60%, 3%, 0.6);
  --shadow-glow: 0 0 20px -5px var(--accent-amber-glow);
}


/* --- Base Reset & Setup --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Utility Classes */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-secondary);
  background-color: var(--bg-deep);
  color: var(--text-white);
  min-height: 100dvh;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  border: 2px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-teal);
}

/* --- Layout Architecture --- */
.app-container {
  display: flex;
  min-height: 100dvh;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Desktop Sidebar */
.desktop-sidebar {
  width: 280px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-glass);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.brand-logo {
  color: var(--accent-amber);
  cursor: pointer;
  transition: transform var(--transition-fast);
}
.brand-logo:hover {
  transform: scale(1.1) rotate(5deg);
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text-white) 30%, var(--accent-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-text .subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.desktop-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-weight: 500;
  color: var(--text-misty);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-item:hover {
  background-color: hsla(210, 40%, 96%, 0.04);
  color: var(--text-white);
  transform: translateX(4px);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--bg-surface-elevated), hsla(190, 85%, 48%, 0.08));
  border-color: var(--border-glass-bright);
  color: var(--accent-teal);
  box-shadow: var(--shadow-premium);
}

.nav-item.active .nav-icon {
  color: var(--accent-amber);
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-glass);
  padding-top: 1.5rem;
}
.install-prompt-sidebar {
  font-family: var(--font-primary);
  color: var(--accent-teal);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color var(--transition-fast);
}
.install-prompt-sidebar:hover {
  color: var(--accent-amber);
}
.copyright {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  margin-left: 280px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: calc(100% - 280px);
  box-sizing: border-box;
}

/* Mobile Header (Hidden on PC) */
.mobile-header {
  display: none;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.85rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 90;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-amber);
}
.mobile-brand h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-white);
}

/* Mobile Bottom Navigation (Hidden on PC) */
.mobile-bottom-nav {
  display: none;
  background: var(--bg-surface);
  opacity: 0.95;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 100;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  color: var(--text-muted);
  gap: 0.2rem;
  transition: all var(--transition-fast);
}

.mobile-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.mobile-nav-label {
  font-size: 0.65rem;
  font-weight: 500;
  font-family: var(--font-primary);
}

.mobile-nav-item:active .mobile-nav-icon {
  transform: scale(0.9);
}

.mobile-nav-item.active {
  color: var(--accent-teal);
}
.mobile-nav-item.active .mobile-nav-icon {
  color: var(--accent-amber);
  transform: translateY(-2px);
}

/* View Container content area */
.view-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* --- Design System Layout Modules & Utilities --- */
.hero-section {
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--bg-surface) 0%, hsla(28, 98%, 52%, 0.03) 100%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-premium);
}
.hero-section::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-amber-glow) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
}
.hero-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 0.25rem;
  position: relative;
  z-index: 2;
}
.hero-subtitle {
  font-size: 0.85rem;
  color: var(--text-misty);
  max-width: 600px;
  position: relative;
  z-index: 2;
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.view-title {
  font-size: 1.2rem;
  font-weight: 700;
  border-left: 4px solid var(--accent-teal);
  padding-left: 0.5rem;
  line-height: 1.2;
}

/* Grid & Flex layouts */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

/* Interactive Controllers */
.search-filter-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 250px;
}
.search-input {
  width: 100%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.85rem 0.55rem 2.5rem;
  color: var(--text-white);
  font-family: var(--font-secondary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}
.search-input:focus {
  outline: none;
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px var(--accent-teal-glow);
}
.search-icon-svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.filter-select {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.55rem 2.25rem 0.55rem 1rem;
  color: var(--text-white);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='hsl(215, 20%, 75%)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 1rem;
  transition: all var(--transition-fast);
}
.filter-select:focus {
  outline: none;
  border-color: var(--accent-teal);
}

/* Premium Button style */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  min-height: 38px; /* Mobile Friendly Tightened Target */
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-amber) 0%, var(--accent-amber-hover) 100%);
  color: var(--text-white);
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -5px var(--accent-amber-glow);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-secondary {
  background-color: var(--bg-surface-elevated);
  border-color: var(--border-glass-bright);
  color: var(--text-white);
}
.btn-secondary:hover {
  background-color: var(--bg-surface);
  transform: translateY(-1px);
}
.btn-danger {
  background-color: var(--danger);
  color: var(--text-white);
}
.btn-danger:hover {
  background-color: hsl(355, 80%, 48%);
}
.btn-icon-only {
  min-width: 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* --- Cards UI Component --- */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1rem;
  position: relative;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-premium);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glass-bright);
  box-shadow: 0 12px 30px -10px hsla(225, 60%, 3%, 0.8), 0 0 20px -10px var(--accent-teal-glow);
}

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

.card-type-icon {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass-bright);
  padding: 0.4rem;
  border-radius: var(--radius-md);
  color: var(--accent-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.card-title-area {
  flex: 1;
}
.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.2;
  margin-bottom: 0.15rem;
}
.card-cuisine {
  font-size: 0.8rem;
  color: var(--accent-teal);
  font-weight: 500;
  font-family: var(--font-primary);
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-misty);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
  flex: 1;
}

/* Today Schedule Info Box in Card */
.card-schedule-box {
  background-color: var(--bg-surface-elevated);
  border-left: 3px solid var(--accent-amber);
  padding: 0.5rem 0.75rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
}
.card-schedule-box.inactive {
  border-left-color: var(--text-muted);
}
.schedule-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.05rem;
}
.schedule-value {
  color: var(--text-white);
  font-weight: 600;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-glass);
  padding-top: 0.75rem;
  margin-top: auto;
}

/* Social links icons */
.social-links {
  display: flex;
  gap: 0.5rem;
}
.social-icon-btn {
  color: var(--text-muted);
  transition: all var(--transition-fast);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.social-icon-btn:hover {
  color: var(--accent-teal);
  background-color: hsla(210, 40%, 96%, 0.03);
  transform: translateY(-2px);
}

/* Map Notice Banner */
.map-notice-banner {
  margin-bottom: 0.75rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  box-shadow: var(--shadow-premium);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeIn 0.25s ease-out;
}

.map-notice-banner .notice-icon {
  color: var(--accent-amber);
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.map-notice-banner .notice-text {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-misty);
  line-height: 1.4;
  font-family: var(--font-secondary);
}

.map-notice-banner .notice-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  margin-left: auto;
  border-radius: 50%;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.map-notice-banner .notice-close-btn:hover {
  color: var(--text-white);
  background-color: var(--border-glass);
}

/* Mapping Screen Styles */
.map-view-container {
  display: flex;
  flex: 1;
  gap: 1.5rem;
  height: calc(100dvh - 12rem);
  position: relative;
}
.map-container-box {
  flex: 2;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  overflow: hidden;
  box-shadow: var(--shadow-premium);
  position: relative;
  background-color: var(--bg-surface);
}
#map-element {
  width: 100%;
  height: 100%;
  z-index: 10;
}
.map-sidebar-list {
  flex: 1;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  box-shadow: var(--shadow-premium);
}
.map-sidebar-header {
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.75rem;
}
.map-sidebar-header h3 {
  font-size: 1.1rem;
}
.map-sidebar-header p {
  font-size: 0.75rem;
  color: var(--text-misty);
}
.map-list-item {
  background-color: var(--bg-surface-elevated);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.map-list-item:hover {
  transform: translateX(4px);
  border-color: var(--border-glass-bright);
}
.map-list-item.active {
  border-color: var(--accent-teal);
  background: linear-gradient(135deg, var(--bg-surface-elevated), hsla(190, 85%, 48%, 0.05));
}
.map-list-info {
  flex: 1;
}
.map-list-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.1rem;
}
.map-list-sub {
  font-size: 0.75rem;
  color: var(--text-misty);
}

/* Customizing Leaflet styling to match premium dark UI */
.leaflet-container {
  background-color: var(--bg-deep) !important;
}
.leaflet-bar {
  border: 1px solid var(--border-glass) !important;
  box-shadow: var(--shadow-premium) !important;
}
.leaflet-bar a {
  background-color: var(--bg-surface) !important;
  color: var(--text-white) !important;
  border-bottom: 1px solid var(--border-glass) !important;
  transition: background-color var(--transition-fast);
}
.leaflet-bar a:hover {
  background-color: var(--bg-surface-elevated) !important;
  color: var(--accent-teal) !important;
}
.leaflet-popup-content-wrapper {
  background-color: var(--bg-surface) !important;
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-md) !important;
  color: var(--text-white) !important;
  box-shadow: var(--shadow-premium) !important;
}
.leaflet-popup-tip {
  background: var(--bg-surface) !important;
  border-left: 1px solid var(--border-glass-bright);
  border-bottom: 1px solid var(--border-glass-bright);
}
.leaflet-popup-content {
  margin: 12px 16px !important;
  font-family: var(--font-secondary);
}
.popup-title {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1rem !important;
  margin-bottom: 4px;
  color: var(--text-white);
}
.popup-sub {
  font-size: 0.75rem;
  color: var(--accent-teal);
  margin-bottom: 6px;
  font-weight: 500;
}
.popup-desc {
  font-size: 0.75rem;
  color: var(--text-misty);
  margin-bottom: 10px;
}
.popup-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, var(--accent-amber) 0%, var(--accent-amber-hover) 100%);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-primary);
  transition: all var(--transition-fast);
}
.popup-nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px var(--accent-amber-glow);
}

/* Custom Marker Styling (Food Truck / Tent / Trailer) */
.custom-leaflet-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface-elevated);
  border: 2px solid var(--accent-teal);
  border-radius: 50%;
  color: var(--accent-amber);
  box-shadow: 0 0 10px rgba(0,0,0,0.5), var(--shadow-glow);
  transition: all var(--transition-fast);
}
.custom-leaflet-marker:hover {
  transform: scale(1.15) !important;
  border-color: var(--accent-amber);
  color: var(--accent-teal);
}

/* --- Detail Modal Styling --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.3s ease-out;
}
.modal-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 90dvh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-premium);
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10;
}
.modal-close:hover {
  color: var(--text-white);
  border-color: var(--border-glass-bright);
  transform: rotate(90deg);
}

.modal-body {
  padding: 2rem;
}

.vendor-details-hero {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  align-items: center;
}
.vendor-details-type-icon {
  background-color: var(--bg-surface-elevated);
  border: 2px solid var(--border-glass-bright);
  color: var(--accent-amber);
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-premium);
}
.vendor-details-meta h2 {
  font-size: 1.75rem;
  line-height: 1.2;
}
.vendor-details-meta p {
  color: var(--accent-teal);
  font-weight: 500;
  font-family: var(--font-primary);
}

.vendor-details-bio {
  font-size: 0.95rem;
  color: var(--text-misty);
  margin-bottom: 1.5rem;
}

.modal-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Elegant Calendar Component */
.calendar-widget {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
}
.calendar-slider {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-top: 0.6rem;
  padding-bottom: 0.8rem;
  scrollbar-width: thin;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
.calendar-day-card {
  flex: 0 0 100px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  transition: all var(--transition-fast);
}
.calendar-day-card.active {
  border-color: var(--accent-teal);
  background: linear-gradient(180deg, var(--bg-surface), hsla(190, 85%, 48%, 0.03));
}
.calendar-day-card.active-date {
  border-color: var(--accent-teal) !important;
  background: var(--accent-teal-glow) !important;
  box-shadow: 0 0 10px var(--accent-teal-glow) !important;
}
.calendar-day-card.today {
  border-color: var(--accent-amber);
  background: linear-gradient(180deg, var(--bg-surface), hsla(28, 98%, 52%, 0.05));
  position: relative;
}
.calendar-day-card.today::before {
  content: 'TODAY';
  position: absolute;
  top: -6px;
  font-size: 0.5rem;
  font-weight: 800;
  background: var(--accent-amber);
  color: white;
  padding: 1px 4px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.cal-day-name {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}
.cal-day-num {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-primary);
  line-height: 1;
}
.cal-month-name {
  font-size: 0.7rem;
  color: var(--accent-teal);
  font-weight: 600;
}

.cal-details-box {
  margin-top: 1rem;
  background-color: var(--bg-deep);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  border-left: 3px solid var(--accent-teal);
}
.cal-details-box.closed {
  border-left-color: var(--text-muted);
}
.cal-details-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.cal-details-addr {
  color: var(--text-misty);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

/* --- Admin Console Control Panel --- */
.admin-login-container {
  max-width: 400px;
  width: 100%;
  margin: 5rem auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-premium);
  text-align: center;
}
.admin-login-header {
  color: var(--accent-amber);
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-primary);
  margin-bottom: 0.4rem;
  color: var(--text-misty);
}
.form-control {
  width: 100%;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-white);
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}
.form-control:focus {
  outline: none;
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 3px var(--accent-amber-glow);
}

/* Tab controls */
.tabs-navigation {
  display: flex;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.tab-button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
}
.tab-button:hover {
  color: var(--text-white);
}
.tab-button.active {
  color: var(--accent-teal);
}
.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent-teal);
  box-shadow: 0 0 10px var(--accent-teal);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease-out;
}
.tab-pane.active {
  display: block;
}

/* Admin Item Row Tables */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
.admin-table th, .admin-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-glass);
}
.admin-table th {
  font-family: var(--font-primary);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-table tr {
  transition: background-color var(--transition-fast);
}
.admin-table tr:hover {
  background-color: hsla(210, 40%, 96%, 0.02);
}
.admin-action-col {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
.admin-logs-table th, .admin-logs-table td {
  padding: 0.5rem 0.4rem !important;
}
.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  font-family: var(--font-primary);
}
.badge-truck {
  background-color: hsla(28, 98%, 52%, 0.15);
  color: var(--accent-amber);
  border: 1px solid hsla(28, 98%, 52%, 0.3);
}
.badge-tent {
  background-color: hsla(190, 85%, 48%, 0.15);
  color: var(--accent-teal);
  border: 1px solid hsla(190, 85%, 48%, 0.3);
}
.badge-trailer {
  background-color: hsla(205, 100%, 40%, 0.15);
  color: #00b4d8;
  border: 1px solid hsla(205, 100%, 40%, 0.3);
}

/* Universal Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}
.toast {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-glass-bright);
  border-left: 4px solid var(--accent-teal);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  color: var(--text-white);
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: var(--shadow-premium);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  pointer-events: auto;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.3s ease;
}
.toast.success {
  border-left-color: var(--success);
}
.toast.error {
  border-left-color: var(--danger);
}
.toast.removing {
  opacity: 0;
  transform: translateY(15px);
}

/* --- Animation keyframes --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* --- Today List Layout & Toggle buttons --- */
.layout-toggle-container {
  display: inline-flex;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
  align-items: center;
}
.layout-toggle-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.layout-toggle-btn:hover {
  color: var(--text-white);
  background-color: hsla(210, 40%, 96%, 0.04);
}
.layout-toggle-btn.active {
  color: var(--accent-teal);
  background-color: var(--bg-surface-elevated);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
  border: 1px solid var(--border-glass-bright);
}

/* --- View Mode Toggle Segmented Control (Pill switch) --- */
.view-mode-toggle-container {
  display: inline-flex;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
  align-items: center;
}
.view-mode-toggle-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.4rem 1.1rem;
  min-height: 34px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.view-mode-toggle-btn:hover {
  color: var(--text-white);
  background-color: hsla(210, 40%, 96%, 0.04);
}
.view-mode-toggle-btn.active {
  color: var(--accent-teal);
  background-color: var(--accent-teal-glow);
  border: 1px solid var(--accent-teal);
  box-shadow: 0 0 10px var(--accent-teal-glow);
}


.list-layout-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.list-layout-card {
  padding: 0.5rem 0.85rem !important;
  width: 100%;
}

.list-layout-main {
  display: flex;
  gap: 1rem;
  align-items: center;
  width: 100%;
  justify-content: space-between;
}

.list-layout-title-block {
  flex: 0 0 200px;
}

.list-layout-schedule-block {
  flex: 1;
}

.list-layout-action-block {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.compact-schedule-row {
  font-size: 0.85rem;
  color: var(--text-misty);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.2;
}
.compact-schedule-row.active {
  color: var(--accent-teal);
}
.compact-schedule-row.inactive {
  color: var(--text-muted);
}

/* Make list layout perfectly responsive on tablets and mobiles */
@media (max-width: 1024px) {
  .list-layout-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .list-layout-title-block,
  .list-layout-schedule-block,
  .list-layout-upcoming-block,
  .list-layout-action-block {
    flex: none !important;
    width: 100% !important;
  }
  .loc-address-text {
    display: none; /* Hide address subtitle in small mobile widths to fit spots */
  }
}

/* --- Media Queries (Mobile Responsive Design) --- */
@media (max-width: 900px) {
  .desktop-sidebar {
    display: none; /* Hide PC sidebar */
  }
  .main-wrapper {
    margin-left: 0; /* Clear desktop margin */
    padding-bottom: 74px; /* Reserve space for bottom mobile nav */
    max-width: 100% !important;
  }
  .mobile-header {
    display: flex; /* Show mobile bar */
  }
  .mobile-bottom-nav {
    display: flex; /* Show bottom tabs */
  }
  .view-content {
    padding: 0.75rem; /* Narrowed margins */
    max-width: 100% !important;
  }
  
  .map-view-container {
    flex-direction: column; /* Stack maps on mobile */
    height: calc(100dvh - 12rem);
  }
  .map-container-box {
    flex: 1;
    min-height: 300px;
  }
  .map-sidebar-list {
    flex: none;
    height: auto !important;
    padding: 0.75rem !important;
    gap: 0 !important;
  }
  .map-sidebar-title {
    display: none !important;
  }
  .map-sidebar-header {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }
  #map-sidebar-items-container {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 1.25rem;
  }
  .hero-title {
    font-size: 1.35rem;
  }
  .hero-subtitle {
    font-size: 0.8rem;
  }
  .grid-cards {
    grid-template-columns: 1fr;
  }
  
  /* Compact Modals for Mobile */
  .modal-overlay {
    padding: 0.75rem;
  }
  .modal-body {
    padding: 0.75rem !important;
  }
  .modal-close {
    top: 0.5rem;
    right: 0.5rem;
    width: 30px;
    height: 30px;
  }
  .vendor-details-hero {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin-bottom: 0.5rem !important;
  }
  .vendor-details-type-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: var(--radius-sm) !important;
    border-width: 1px !important;
  }
  .vendor-details-type-icon svg {
    width: 20px !important;
    height: 20px !important;
  }
  .vendor-details-meta h2 {
    font-size: 1.1rem !important;
  }
  .vendor-details-meta p {
    font-size: 0.75rem !important;
  }
  .vendor-details-bio {
    margin-bottom: 0.5rem !important;
  }
  .vendor-details-bio p {
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
  }
  .vendor-details-socials {
    margin-bottom: 0.5rem !important;
  }
  .vendor-details-socials .btn {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.7rem !important;
    min-height: 26px !important;
  }
  .modal-section-title {
    font-size: 0.85rem !important;
    margin-bottom: 0.25rem !important;
  }
  
  /* Horizontal 30-day calendar compaction */
  .calendar-widget {
    padding: 0.5rem !important;
  }
  .calendar-slider {
    gap: 0.4rem !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }
  .calendar-day-card {
    flex: 0 0 62px !important;
    padding: 0.35rem 0.2rem !important;
    border-radius: var(--radius-sm) !important;
    gap: 1px !important;
  }
  .calendar-day-card.today::before {
    top: -5px !important;
    font-size: 0.4rem !important;
    padding: 0px 3px !important;
  }
  .cal-day-name {
    font-size: 0.55rem !important;
  }
  .cal-day-num {
    font-size: 1rem !important;
  }
  .cal-month-name {
    font-size: 0.55rem !important;
  }
  .cal-details-box {
    margin-top: 0.5rem !important;
    padding: 0.4rem 0.6rem !important;
    font-size: 0.75rem !important;
  }
  .cal-details-title {
    font-size: 0.75rem !important;
  }
  .cal-details-addr {
    font-size: 0.7rem !important;
    margin-bottom: 0.35rem !important;
  }
  
  /* Form compaction inside modals */
  .modal-card .form-group {
    margin-bottom: 0.65rem !important;
  }
  .modal-card .form-control {
    padding: 0.45rem 0.6rem !important;
    font-size: 0.85rem !important;
  }
  .modal-card .form-label {
    font-size: 0.75rem !important;
    margin-bottom: 0.25rem !important;
  }
  
  .admin-login-container {
    padding: 1.5rem;
    margin: 2rem auto;
  }
  .admin-table th, .admin-table td {
    padding: 0.45rem;
    font-size: 0.75rem;
  }
  .badge {
    padding: 0.12rem 0.35rem;
    font-size: 0.6rem;
  }
}

/* --- Inline Schedules Coordinator Layout --- */
.admin-schedules-section {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-glass-bright);
}
.admin-schedules-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
  align-items: flex-start;
}
@media (max-width: 900px) {
  .admin-schedules-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
.admin-schedules-form-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: sticky;
  top: 1rem;
}
.admin-schedules-logs-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

/* --- Admin High-Density Search Bar Styles --- */
.admin-search-bar {
  display: flex;
  margin-bottom: 1.25rem;
  max-width: 360px;
  position: relative;
  width: 100%;
}
.admin-search-input {
  width: 100%;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.75rem 0.45rem 2.25rem;
  color: var(--text-white);
  font-size: 0.85rem;
  font-family: var(--font-secondary);
  transition: all var(--transition-fast);
}
.admin-search-input:focus {
  outline: none;
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 3px var(--accent-amber-glow);
}
.admin-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

/* --- Pulsing User GPS Marker Animation --- */
.user-location-marker-pulse {
  animation: pulseUser 2s infinite;
  border-radius: 50%;
}
@keyframes pulseUser {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 150, 199, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 150, 199, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 150, 199, 0);
  }
}

/* Enforce Tile view on small portrait mobile screens */
@media (max-width: 480px) {
  .layout-toggle-container {
    display: none !important; /* Hide layout switcher on tiny portrait mobiles */
  }
  
  .list-layout-wrapper {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .list-layout-card {
    padding: 0.75rem 1rem !important;
    border-radius: var(--radius-lg) !important;
  }

  .list-layout-main {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
    position: relative !important;
  }

  /* Position the type icon at the top right of the card, exactly like standard cards */
  .list-layout-card .card-type-icon {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    flex: none !important;
  }

  .list-layout-card .list-layout-title-block {
    width: calc(100% - 48px) !important;
    flex: none !important;
    margin-bottom: 0.25rem !important;
  }

  .list-layout-card .list-layout-schedule-block {
    width: 100% !important;
    flex: none !important;
    margin-bottom: 0.25rem !important;
  }

  .list-layout-card .list-layout-upcoming-block {
    width: 100% !important;
    flex: none !important;
    margin-bottom: 0.25rem !important;
  }

  .list-layout-card .list-layout-action-block {
    width: 100% !important;
    flex: none !important;
    justify-content: flex-end !important;
    border-top: 1px solid var(--border-glass) !important;
    padding-top: 0.6rem !important;
    margin-top: 0.25rem !important;
    display: flex !important;
    gap: 0.4rem !important;
  }
}

/* --- Interactive Floating Dust Particles Background (Option 4) --- */
.dust-bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 1;
  pointer-events: none;
  background-color: var(--bg-deep);
  transition: background-color var(--transition-normal);
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

/* Responsive Styles for Modal Schedule Assignment */
.modal-assign-form {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr auto;
  gap: 0.5rem;
  align-items: flex-end;
  width: 100%;
}
@media (max-width: 600px) {
  .modal-assign-form {
    grid-template-columns: 1fr 1fr !important;
  }
  .modal-assign-form button {
    grid-column: span 2 !important;
    width: 100% !important;
  }
}
@media (max-width: 400px) {
  .modal-assign-form {
    grid-template-columns: 1fr !important;
  }
  .modal-assign-form button {
    grid-column: span 1 !important;
  }
}

.modal-schedule-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-surface-elevated);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 480px) {
  .modal-schedule-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .modal-schedule-row > div:last-child {
    align-self: flex-end;
  }
}


