/* Modern CSS Design System - Premium Dark Mode & Glassmorphism */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Palette */
  --bg-primary: #0b0f19;
  --bg-secondary: #131b2e;
  --bg-tertiary: #1e2942;
  --glass-bg: rgba(19, 27, 46, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-glow: rgba(99, 102, 241, 0.2);
  
  /* Accent Colors */
  --accent-primary: #6366f1; /* Electric Indigo */
  --accent-primary-rgb: 99, 102, 241;
  --accent-secondary: #10b981; /* Emerald */
  --accent-secondary-rgb: 16, 185, 129;
  --accent-cyan: #06b6d4; /* Neon Cyan */
  --accent-pink: #ec4899; /* Hot Pink */
  
  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Category Colors */
  --color-food: #f59e0b; /* Amber */
  --color-nature: #10b981; /* Emerald */
  --color-culture: #8b5cf6; /* Violet */
  --color-sport: #06b6d4; /* Cyan */
  --color-hotel: #ec4899; /* Pink */
  
  /* Shadow and Glows */
  --shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 24px -4px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 32px -8px rgba(0, 0, 0, 0.5);
  --glow-primary: 0 0 20px rgba(99, 102, 241, 0.3);
  
  /* Transition & Timing */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) var(--bg-secondary);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 4px;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, .brand-font {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Glassmorphism utility */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}

/* Layout */
.app-header {
  height: 70px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  background: rgba(11, 15, 25, 0.8);
  border-bottom: 1px solid var(--glass-border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow-primary);
}

.brand h1 {
  font-size: 20px;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn {
  padding: 10px 18px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), rgba(99, 102, 241, 0.8));
  color: white;
  box-shadow: var(--glow-primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.5);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), var(--accent-primary));
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-secondary), rgba(16, 185, 129, 0.8));
  color: white;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
}

.main-content {
  flex-grow: 1;
  display: flex;
  position: relative;
  overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
  width: 420px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-right: 1px solid var(--glass-border);
  transition: all var(--transition-normal);
  z-index: 999;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-bottom: 1px solid var(--glass-border);
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

/* Category Filter Chips */
.category-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-filters::-webkit-scrollbar {
  height: 2px;
}

.chip {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  border: 1px solid var(--glass-border);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.chip:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.chip.active[data-category="all"] {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}
.chip.active[data-category="food"] { background: var(--color-food); color: #000; border-color: var(--color-food); }
.chip.active[data-category="nature"] { background: var(--color-nature); color: #000; border-color: var(--color-nature); }
.chip.active[data-category="culture"] { background: var(--color-culture); color: white; border-color: var(--color-culture); }
.chip.active[data-category="sport"] { background: var(--color-sport); color: #000; border-color: var(--color-sport); }
.chip.active[data-category="hotel"] { background: var(--color-hotel); color: white; border-color: var(--color-hotel); }

/* Sidebar Results Scroll Area */
.results-container {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.point-card {
  padding: 16px;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  gap: 14px;
}

.point-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--glass-border-glow);
  box-shadow: var(--shadow-sm);
}

.point-card.active {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

.card-img {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-tertiary);
}

.card-info {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-desc {
  font-size: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  line-height: 1.4;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.card-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 12px;
}

/* Badge colors */
.badge-food { background: rgba(245, 158, 11, 0.15); color: var(--color-food); }
.badge-nature { background: rgba(16, 185, 129, 0.15); color: var(--color-nature); }
.badge-culture { background: rgba(139, 92, 246, 0.15); color: var(--color-culture); }
.badge-sport { background: rgba(6, 182, 212, 0.15); color: var(--color-sport); }
.badge-hotel { background: rgba(236, 72, 153, 0.15); color: var(--color-hotel); }

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-muted);
  text-align: center;
  gap: 12px;
  height: 100%;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  color: var(--bg-tertiary);
}

/* Map Container */
.map-wrapper {
  flex-grow: 1;
  position: relative;
  height: 100%;
}

#map {
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
}

/* Customizing Leaflet styling */
.leaflet-container {
  font-family: inherit !important;
}

/* Custom styling for Leaflet custom popup */
.custom-popup-wrapper .leaflet-popup-content-wrapper {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg) !important;
  border-radius: 16px;
  color: var(--text-primary) !important;
  padding: 0;
  overflow: hidden;
}

.custom-popup-wrapper .leaflet-popup-content {
  margin: 0 !important;
  width: 280px !important;
}

.custom-popup-wrapper .leaflet-popup-tip {
  background: var(--bg-secondary) !important;
  border-left: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.popup-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-bottom: 1px solid var(--glass-border);
}

.popup-content {
  padding: 16px;
}

.popup-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.popup-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
}

.popup-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Marker glow animations */
.marker-pin-custom {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.marker-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.marker-core {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  border: 3px solid;
  box-shadow: 0 0 8px rgba(0,0,0,0.5);
  transition: all var(--transition-fast);
}

.marker-pin-custom:hover .marker-core {
  transform: scale(1.3);
}

@keyframes pulse-ring {
  0% { transform: scale(0.3); opacity: 1; }
  80%, 100% { transform: scale(2.2); opacity: 0; }
}

/* Floating Prompt/Instructions for Map interaction */
.map-instructions {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--accent-primary);
  pointer-events: none;
  animation: slide-down 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  color: var(--text-primary);
  background: rgba(19, 27, 46, 0.95);
}

/* Admin Dashboard Side Drawer / Floating Panel */
.admin-drawer {
  position: absolute;
  right: -420px;
  top: 0;
  width: 420px;
  height: 100%;
  background: var(--bg-secondary);
  border-left: 1px solid var(--glass-border);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transition: right var(--transition-normal);
  box-shadow: var(--shadow-lg);
}

.admin-drawer.open {
  right: 0;
}

.drawer-header {
  padding: 24px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.drawer-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* Form Styling */
.admin-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  flex-grow: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.color-picker-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.color-option {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
}

.color-option.active {
  border-color: white;
  transform: scale(1.1);
  box-shadow: 0 0 10px currentColor;
}

.drawer-footer {
  padding: 24px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 12px;
}

.drawer-footer button {
  flex: 1;
}

/* Modal view / Points table for Admin Management */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.admin-modal {
  width: 90%;
  max-width: 900px;
  max-height: 80%;
  display: flex;
  flex-direction: column;
  animation: modal-enter 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px;
}

/* Premium Table design */
.premium-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.premium-table th {
  padding: 12px 16px;
  border-bottom: 2px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.premium-table td {
  padding: 16px;
  border-bottom: 1px solid var(--glass-border);
  font-size: 14px;
  color: var(--text-primary);
  vertical-align: middle;
}

.premium-table tr:hover {
  background: rgba(255,255,255,0.02);
}

.table-point-img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.02);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}

.btn-icon.delete:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

/* Animations */
@keyframes slide-down {
  from { transform: translate(-50%, -20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes modal-enter {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  animation: slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slide-in {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Sidebar Toggle Handle Button (Desktop is hidden) */
.sidebar-toggle-btn {
  position: absolute;
  left: 20px;
  top: 20px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(19, 27, 46, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: white;
  display: none; /* Hidden on desktop */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1002;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast), left var(--transition-normal);
}

.sidebar-toggle-btn:hover {
  background: var(--accent-primary);
  box-shadow: var(--glow-primary);
}

/* Mobile Geolocation Button */
.mobile-location-btn {
  position: absolute;
  left: 20px;
  top: 76px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(19, 27, 46, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: white;
  display: none; /* Hidden on desktop */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1002;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.mobile-location-btn:hover {
  background: var(--accent-primary);
  box-shadow: var(--glow-primary);
}

/* Premium Mobile Responsive Layout System */
@media (max-width: 768px) {
  .app-header {
    height: auto;
    padding: 12px 16px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }
  
  .brand h1 {
    font-size: 18px;
  }
  
  .brand-icon {
    width: 32px;
    height: 32px;
  }

  .nav-controls {
    gap: 6px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 8px;
  }

  .btn i {
    width: 14px;
    height: 14px;
  }

  .main-content {
    flex-direction: row; /* Keep horizontal to allow full-screen map on mobile */
  }

  .sidebar-toggle-btn {
    display: flex; /* Show toggle tab on mobile */
    left: 16px;
    top: 16px;
    border-radius: 50%; /* Gorgeous round button on mobile */
  }

  .mobile-location-btn {
    display: flex;
    left: 16px;
    top: 76px;
    border-radius: 50%;
  }

  .sidebar-toggle-btn.open {
    left: 336px; /* Moves together with the drawer! 320px + 16px spacing */
    border-radius: 12px; /* Smoothly morphs shape! */
  }

  /* Slide-out drawer from the Left for a cleaner, full-screen map experience */
  .sidebar {
    position: absolute;
    left: -320px; /* Hidden offscreen by default */
    top: 0;
    bottom: 0;
    width: 320px;
    height: 100%;
    z-index: 1001;
    border-right: 1px solid var(--glass-border);
    border-top: none;
    box-shadow: var(--shadow-lg);
    background: rgba(19, 27, 46, 0.98) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: left var(--transition-normal);
  }

  .sidebar.open {
    left: 0; /* Slide in! */
  }

  .sidebar-header {
    padding: 14px;
    gap: 8px;
  }

  .results-container {
    padding: 14px;
    gap: 10px;
  }

  .point-card {
    padding: 12px;
    border-radius: 12px;
    gap: 10px;
  }

  .card-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
  }

  /* Slide-up panel from bottom on mobile for better UX */
  .admin-drawer {
    width: 100%;
    height: 75%;
    right: 0 !important;
    left: 0;
    top: auto;
    bottom: -100%;
    border-left: none;
    border-top: 1px solid var(--glass-border);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    transition: bottom var(--transition-normal);
  }

  .admin-drawer.open {
    bottom: 0;
  }

  .drawer-header {
    padding: 16px 20px;
  }

  .admin-form {
    padding: 20px;
    gap: 16px;
  }

  .modal-overlay.open {
    align-items: flex-end;
  }

  .admin-modal {
    width: 100%;
    height: 85%;
    border-radius: 20px 20px 0 0;
    margin: 0;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-content {
    padding: 16px;
  }

  .premium-table {
    display: block;
    overflow-x: auto;
  }
}

/* Map Style Selector Control */
.map-style-control {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.style-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.style-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.style-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  box-shadow: var(--glow-primary);
}

/* Premium Glassmorphic City Search Bar Control */
.city-search-control {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 18px;
  border-radius: 40px; /* Modern pill shape */
  background: rgba(19, 27, 46, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 10px 30px -10px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.1);
  width: 320px;
  transition: all var(--transition-normal);
}

/* Beautiful glow and expand transition when user focuses the search bar */
.city-search-control:focus-within {
  width: 350px;
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 
    0 12px 40px -10px rgba(99, 102, 241, 0.25),
    0 0 20px rgba(99, 102, 241, 0.2),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.15);
  background: rgba(19, 27, 46, 0.85);
}

.city-search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.city-search-control:focus-within .city-search-icon {
  color: var(--accent-primary); /* Color shifts on active focus */
}

.city-search-control input {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  outline: none;
  padding: 2px 0;
}

.city-search-control input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

/* Gorgeous circular action button */
#btn-city-search-go {
  width: 34px;
  height: 34px;
  border-radius: 50%; /* Perfect circle */
  border: none;
  background: linear-gradient(135deg, var(--accent-primary), rgba(99, 102, 241, 0.8));
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  box-shadow: var(--glow-primary);
}

#btn-city-search-go:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), var(--accent-primary));
}

#btn-city-search-go svg {
  width: 16px;
  height: 16px;
}

/* Adjustments on narrow viewport sizes */
@media (max-width: 768px) {
  .city-search-control {
    width: calc(100% - 48px);
    top: 85px;
    left: 24px;
  }
  .city-search-control:focus-within {
    width: calc(100% - 48px);
  }
}

/* Modal Segmented Tab Controls */
.modal-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  padding: 3px;
  gap: 2px;
}

.tab-btn {
  padding: 6px 16px;
  border-radius: 30px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.tab-btn.active {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Category Admin Panel Layout */
.category-admin-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
  align-items: start;
}

.category-add-card,
.category-list-card {
  padding: 20px;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.01);
}

.category-add-card h3,
.category-list-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 12px;
}

.color-swatch-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 6px currentColor;
}

@media (max-width: 768px) {
  .category-admin-layout {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   AUTHENTICATION & LOGIN GATE STYLES (Dark Glassmorphism)
   ========================================================================== */

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(11, 15, 25, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.login-backdrop-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(6, 182, 212, 0.1) 50%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  animation: pulse-ambient 8s ease-in-out infinite alternate;
}

@keyframes pulse-ambient {
  0% { transform: scale(0.9) translate(-20px, -20px); opacity: 0.7; }
  100% { transform: scale(1.1) translate(20px, 20px); opacity: 1; }
}

.login-card {
  position: relative;
  z-index: 1;
  max-width: 450px;
  width: 90%;
  padding: 36px 32px;
  border-radius: 24px;
  background: rgba(19, 27, 46, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 40px rgba(99, 102, 241, 0.2);
  animation: modal-enter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--glass-border);
}

.login-brand h2 {
  font-size: 22px;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

.login-title-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.login-title-section p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.login-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  animation: shake 0.3s ease-in-out;
}

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

.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.field-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  width: 18px;
  height: 18px;
  z-index: 2;
}

.input-icon-wrapper input {
  width: 100%;
  padding-left: 42px !important;
  padding-right: 42px !important;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  height: 44px;
  transition: all var(--transition-fast);
}

.input-icon-wrapper input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.btn-toggle-pwd {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color var(--transition-fast);
  z-index: 2;
}

.btn-toggle-pwd:hover {
  color: var(--text-primary);
}

.btn-login-submit {
  width: 100%;
  height: 46px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  border-radius: 12px;
}

.login-hint {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  text-align: center;
}

.login-hint strong {
  color: var(--accent-cyan);
}

/* Header User Profile Widget */
.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 6px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
  color: white;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
}

.user-avatar-sm {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
  color: white;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 8px;
  display: inline-block;
  letter-spacing: 0.04em;
  width: fit-content;
}

.user-role-badge.role-admin {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.user-role-badge.role-user {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
}

.spin-animation {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.pwd-target-info {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.pwd-target-info strong {
  color: var(--accent-cyan);
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-icon.delete:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-logout-header {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.btn-logout-header:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ffffff;
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

