/* --- Design Tokens & CSS Variables --- */
:root {
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Color Palette - Vibrant Dark Mode */
  --bg-darker: #2c2f33;
  --bg-dark: #5e7a94;
  --bg-card: rgba(30, 41, 59, 0.7); /* #1e293b at 70% opacity */
  --border-light: rgba(255, 255, 255, 0.08); /* #ffffff at 8% opacity */
  --border-focus: #06b6d4;
  
  --text-main: #ffffff;
  --text-muted: #fae2a2;
  
  /* Accent Colors */
  --primary: #f4c542;      /* Cyan */
  --primary-glow: rgba(205, 166, 192, 0.35); /* #cda6c0 at 35% opacity */
  --secondary: #4f46e5;    /* Indigo */
  --secondary-glow: rgba(79, 70, 229, 0.35); /* #4f46e7 at 35% opacity */
  --accent: #db2777;       /* Pink */
  --accent-glow: rgba(219, 39, 119, 0.35); /* #db2777 at 35% opacity */
  --success: #16a34a;      /* Emerald Green */
  --danger: #ef4444;       /* Rose Red */
  --warning: #f59e0b;      /* Amber Yellow */

  /* Glassmorphism Styles */
  --glass-bg: rgba(44, 47, 51, 0.35); /* #2c2f33 at 35% opacity */
  --glass-blur: blur(16px);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37); /* #000000 at 37% opacity */

  /* Layout values */
  --header-height: 70px;
}

/* --- Base Resets & Typography --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-darker);
  font-family: var(--font-body);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 600;
}

/* --- Layout Structure --- */
.app-container {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
}

/* --- Navigation & Overlays --- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-light);
  box-shadow: var(--glass-shadow);
  transform: translateZ(0);
}

.top-nav {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  height: 60px;
  z-index: 1000;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-icon {
  font-size: 1.5rem;
}
.logo h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #ef4444 0%, #f97316 50%, #eab308 100%); /* Fiery Red to Orange to Warning Yellow */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.5px rgba(127, 29, 29, 0.9); /* Dark red sharp fiery outline */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(249, 115, 22, 0.4); /* Hardware-accelerated text glow */
}

.search-container {
  flex: 1;
  max-width: 400px;
  margin: 0 16px;
  position: relative;
}
.search-container input {
  width: 100%;
  padding: 10px 16px;
  padding-right: 36px;
  background: rgba(15, 23, 42, 0.65); /* #0f172a at 65% opacity */
  border: 1px solid rgba(244, 197, 66, 0.35); /* #f4c542 at 35% opacity */
  border-radius: 12px;
  color: var(--text-main); /* #ffffff */
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}
.search-container input::placeholder {
  color: rgba(255, 255, 255, 0.65) !important; /* #ffffff at 65% opacity */
}
.search-container input:focus {
  outline: none;
  border-color: var(--primary); /* #f4c542 */
  background: rgba(15, 23, 42, 0.9); /* #0f172a at 90% opacity */
  box-shadow: 0 0 12px rgba(244, 197, 66, 0.35); /* #f4c542 at 35% opacity */
}
#clear-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}
.hidden {
  display: none !important;
}

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

.nav-icon-btn, .profile-avatar-btn {
  background: rgba(250, 226, 162, 0.35);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  border-radius: 12px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.2s ease;
}
.nav-icon-btn:hover, .profile-avatar-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.05);
}
.profile-avatar-btn {
  border-color: var(--primary);
  font-size: 1.15rem;
}

/* --- Map Elements --- */
.map-wrapper {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
}
#map {
  width: 100%;
  height: 100%;
  background-color: var(--bg-darker);
}

/* Dark Theme overrides for Leaflet */
.leaflet-container {
  background-color: #0b0f19 !important;
}
.leaflet-bar {
  border: 1px solid var(--border-light) !important;
  box-shadow: var(--glass-shadow) !important;
}
.leaflet-bar a {
  background-color: var(--bg-dark) !important;
  color: var(--text-main) !important;
  border-bottom: 1px solid var(--border-light) !important;
}
.leaflet-bar a:hover {
  background-color: #1e293b !important;
  color: var(--primary) !important;
}

/* Custom Floating Action Map Controls */
.map-controls {
  position: absolute;
  top: 84px;
  right: 12px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.map-ctrl-btn {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  color: var(--text-main);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--glass-shadow);
  transition: all 0.2s ease;
}
.map-ctrl-btn:hover {
  background: #1e293b;
  transform: translateX(-2px);
}
.map-ctrl-btn .icon {
  font-size: 1.1rem;
}
.map-ctrl-btn .lbl {
  font-size: 0.8rem;
  font-weight: 500;
}

/* PULSING BOOP BUTTON */
.pulse-btn {
  position: absolute;
  bottom: 24%; /* Default phone position: stays above the bottom sheet drawer */
  right: 16px;
  z-index: 999;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.pulse-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(6, 182, 212, 0.6);
}
.pulse-btn:active {
  transform: scale(0.95);
}
.pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: pulse-ring-animation 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  pointer-events: none;
}
.boop-text {
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Map toasts and tips */
.map-toast {
  position: absolute;
  bottom: 24%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  background: var(--bg-dark);
  border: 1.5px solid var(--warning);
  color: var(--text-main);
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--glass-shadow);
  max-width: 90%;
  animation: slideUp 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}
.toast-btn {
  background: var(--danger);
  border: none;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Leaflet Div Icon Wrapper resetting: ensures transparency for custom pins. */
.custom-pin-wrapper {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* Custom CSS Pin Markers on Leaflet Map */
.custom-user-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px !important;
  height: 48px !important;
  border-radius: 50%;
  border: 2.5px solid transparent;
  font-size: 1.45rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-user-pin::after {
  content: '';
  position: absolute;
  top: -2.5px;
  left: -2.5px;
  right: -2.5px;
  bottom: -2.5px;
  border: 2.5px solid;
  border-color: inherit;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}
.custom-user-pin:hover {
  transform: scale(1.2) translateY(-4px);
  z-index: 1000 !important;
}
.custom-user-pin.current-user {
  box-shadow: 0 0 15px var(--primary-glow);
}

.custom-event-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50%;
  border: 2px solid transparent;
  font-size: 1.15rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
  background-color: rgba(15, 23, 42, 0.85) !important;
  background-clip: padding-box;
}
.custom-event-pin::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 2px solid;
  border-color: inherit;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}
.custom-event-pin:hover {
  transform: scale(1.15) translateY(-2px);
  border-color: #fff !important;
}
.custom-event-pin.pending-event {
  opacity: 0.85;
}
.custom-event-pin.pending-event::after {
  border-style: dashed;
}

/* Custom POI CSS Pin Markers on Leaflet Map */
.custom-poi-pin-wrapper {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}
.custom-poi-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px !important;
  height: 36px !important;
  border: 2px solid transparent;
  transform: rotate(45deg);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
  background-color: rgba(15, 23, 42, 0.85) !important;
  background-clip: padding-box;
}
.custom-poi-pin::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 2px solid;
  border-color: inherit;
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
}
.custom-poi-pin:hover {
  transform: rotate(45deg) scale(1.15);
  border-color: #fff !important;
}
.custom-poi-pin span {
  transform: rotate(-45deg); /* Keep emoji/icon upright */
  font-size: 1.1rem;
  display: block;
}
.custom-poi-pin.pending-poi {
  opacity: 0.85;
}
.custom-poi-pin.pending-poi::after {
  border-style: dashed;
}

/* Geofuzzing Circles on Map styling */
.fuzz-radius-indicator {
  stroke-dasharray: 6, 6;
}

/* --- Bottom Drawer --- */
.bottom-drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20%; /* Collapsed height */
  max-height: 80%;
  z-index: 999;
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  border-bottom: none;
  display: flex;
  flex-direction: column;
  transition: height 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  overflow: hidden;
}
.bottom-drawer.expanded {
  height: 60%;
}
.bottom-drawer.full {
  height: 80%;
}

.drawer-handle-area {
  width: 100%;
  padding: 12px 0;
  cursor: grab;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
}
.drawer-handle-area:active {
  cursor: grabbing;
}
.drawer-handle {
  width: 44px;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  transition: background 0.3s;
}
.drawer-handle-area:hover .drawer-handle {
  background: rgba(255, 255, 255, 0.4);
}

.drawer-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 16px 24px 16px;
  overflow: hidden;
}

.drawer-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 16px;
  gap: 16px;
}
.tab-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 10px 4px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}
.tab-link:hover {
  color: var(--text-main);
}
.tab-link.active {
  color: var(--primary);
}
.tab-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--primary);
}

.tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}
.tab-content.active {
  display: flex;
  flex-direction: column;
}

/* Cards & Content inside drawer */
.cards-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-state {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 36px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* User & Event Cards */
.user-card, .event-card {
  background: rgba(251, 146, 60, 0.08); /* #fb923c at 8% opacity */
  border: 1px solid rgba(251, 146, 60, 0.25); /* #fb923c at 25% opacity */
  border-radius: 16px;
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  transition: all 0.2s ease;
}
.user-card:hover, .event-card:hover {
  background: rgba(251, 146, 60, 0.15); /* #fb923c at 15% opacity */
  border-color: rgba(251, 146, 60, 0.55); /* #fb923c at 55% opacity */
  box-shadow: 0 4px 15px rgba(251, 146, 60, 0.18); /* #fb923c glow */
  transform: translateY(-2px);
}
.card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.card-info {
  flex: 1;
}
.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.card-info h4 {
  font-size: 1.05rem;
  color: var(--text-main);
}
.privacy-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
}
.privacy-badge.exact {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.privacy-badge.fuzzy {
  background: rgba(6, 182, 212, 0.15);
  color: var(--primary);
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.privacy-badge.regional {
  background: rgba(79, 70, 229, 0.15);
  color: var(--secondary);
  border: 1px solid rgba(79, 70, 229, 0.3);
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.interest-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 6px;
}
.interest-tag.match {
  background: rgba(6, 182, 212, 0.15);
  color: var(--primary);
  border-color: rgba(6, 182, 212, 0.3);
  font-weight: 500;
}

.event-details-row {
  display: flex;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 4px 0 6px 0;
}
.event-desc-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.35;
}
.events-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

/* Buttons */
.btn {
  font-family: var(--font-title);
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 8px;
}
.btn-block {
  display: flex;
  width: 100%;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}
.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease-out;
}
.modal-card {
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: scaleUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
}
.close-modal-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
}
.close-modal-btn:hover {
  color: var(--text-main);
}
.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* Form Styles */
.section-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}
.section-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-main);
}
.section-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  margin-top: 12px;
}
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="time"], select, textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  margin-bottom: 8px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(30, 41, 59, 0.8);
}
.form-row {
  display: flex;
  gap: 12px;
}
.form-col {
  flex: 1;
}

/* Pin designer preview */
.pin-designer {
  display: flex;
  gap: 20px;
  align-items: center;
}
.preview-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.custom-pin-preview {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
}
.design-inputs {
  flex: 1;
}
.emoji-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.emoji-opt {
  font-size: 1.4rem;
  padding: 6px;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-light);
  user-select: none;
  transition: all 0.15s ease;
}
.emoji-opt:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.1);
}
.emoji-opt.selected {
  background: var(--primary-glow);
  border-color: var(--primary);
  transform: scale(1.1);
}

.color-picker-grid {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s;
}
.color-swatch:hover {
  transform: scale(1.15);
}
.color-swatch.selected {
  border-color: white;
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(255,255,255,0.3);
}

/* Privacy Selection Panels */
.privacy-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.privacy-option {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  background: rgba(255,255,255,0.01);
  transition: all 0.2s ease;
}
.privacy-option:hover {
  background: rgba(255,255,255,0.04);
}
.privacy-option.selected {
  background: rgba(6, 182, 212, 0.05);
  border-color: var(--primary);
}
.priv-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--text-main);
  pointer-events: none;
}
.priv-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
  pointer-events: none;
  padding-left: 22px;
}
.privacy-warning {
  margin-top: 14px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--warning);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.4;
}

/* Interest list in settings */
.interest-input-box {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.interest-input-box input {
  margin-bottom: 0;
  flex: 1;
}
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-tag-item {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--primary);
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tag-remove {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}

/* Danger zone */
.danger-zone {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.02);
}
.danger-zone h3 {
  color: var(--danger);
}
.danger-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.danger-row p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.coord-inputs {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}
.coord-inputs input {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(0,0,0,0.15);
}
.input-tip {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* --- Notifications & Toast --- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-light);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--glass-shadow);
  animation: slideUp 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  text-align: center;
  pointer-events: none;
}

/* --- Animations --- */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
  100% { transform: translateY(0px); }
}

@keyframes pulse-ring-animation {
  0% { transform: scale(0.95); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes my-pin-float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

@keyframes rotate-dash {
  to { stroke-dashoffset: -1000; }
}

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

@keyframes scaleUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes slideUp {
  from { transform: translate(-50%, 40px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* --- RESPONSIVE DESKTOP LAYOUT (Big Screens) --- */
@media (min-width: 769px) {
  .app-container {
    flex-direction: row;
  }
  
  .top-nav {
    left: 20px;
    right: 20px;
    top: 20px;
  }
  
  .map-wrapper {
    order: 2;
    flex: 1;
    height: 100vh;
  }

  /* Reposition floating elements for desktop */
  .pulse-btn {
    bottom: 24px;
    right: 24px;
  }
  
  .map-controls {
    top: 96px;
    right: 24px;
  }
  
  /* Replace the swipe bottom drawer with a static side panel */
  .bottom-drawer {
    order: 1;
    position: static;
    width: 380px;
    height: 100vh !important;
    max-height: 100vh;
    border-radius: 0;
    border-right: 1px solid var(--border-light);
    border-top: none;
    background: var(--bg-dark);
    box-shadow: 10px 0 30px rgba(0,0,0,0.25);
  }
  
  .drawer-handle-area {
    display: none; /* No drag handle on desktop */
  }
  
  .drawer-content {
    margin-top: 90px; /* Leave space for overlay logo navigation */
    padding: 24px;
  }

  .map-toast {
    bottom: 24px;
  }
}

/* Admin Table & Modal Custom styling */
table th, table td {
  padding: 10px;
  vertical-align: middle;
}
table tr {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}
.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover {
  background: #15803d;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
}
.btn-warning {
  background: var(--warning);
  color: white;
}
.btn-warning:hover {
  background: #d97706;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Custom Toggle Switch slider */
.switch input:checked + .slider {
  background-color: var(--primary) !important;
  box-shadow: 0 0 10px var(--primary-glow);
}
.switch .slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
.switch input:checked + .slider:before {
  transform: translateX(22px);
}

/* Custom Profile Picture Styles */
.pin-avatar-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.card-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.admin-avatar-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Base Map Tiles (.leaflet-tile-pane) */
.leaflet-tile-pane {
  /* Using native Carto Dark tiles - no client CPU filter needed */
}

/* Map Text Labels (.leaflet-map-labels-pane) */
.leaflet-map-labels-pane {
  pointer-events: none;
}

/* Custom Zoom Buttons Container (.leaflet-control-zoom.leaflet-bar): Resets default borders and shadow container. */
#map .leaflet-control-zoom.leaflet-bar {
  border: none !important;
  background: none !important;
  box-shadow: none !important;
}

/* Zoom Button Anchors (.leaflet-control-zoom a): Custom glassmorphic styling, sizing, and text centering. */
#map .leaflet-control-zoom.leaflet-control a {
  background: rgba(30, 41, 59, 0.85) !important; /* #1e293b at 85% opacity */
  backdrop-filter: blur(10px);
  color: #fff !important;
  border: 1px solid var(--border-light) !important;
  transition: all 0.2s ease;
  width: 36px !important;
  height: 36px !important;
  line-height: 34px !important;
  font-size: 1.35rem !important;
}

/* Zoom Button Hover States (.leaflet-control-zoom a:hover): Hover effects for the buttons. */
#map .leaflet-control-zoom.leaflet-control a:hover {
  background: rgba(255, 255, 255, 0.15) !important; /* #ffffff at 15% opacity */
  color: #fff !important;
  transform: scale(1.05);
}

/* PC-Screen Zoom Positioning (@media min-width: 769px): Positions the buttons in the horizontal center and vertical bottom of the PC view. */
@media (min-width: 769px) {
  #map .leaflet-control-zoom.leaflet-control {
    left: 50% !important;
    bottom: 20px !important;
    top: auto !important;
    right: auto !important;
    transform: translateX(-50%);
    display: flex !important;
    flex-direction: row !important;
    margin: 0 !important;
    position: absolute !important;
    gap: 8px;
  }
  #map .leaflet-control-zoom.leaflet-control a {
    border-radius: 8px !important;
  }
}

/* Phone-Screen Zoom Positioning (@media max-width: 768px): Positions the buttons in the vertical center and right side of the phone view. */
@media (max-width: 768px) {
  #map .leaflet-control-zoom.leaflet-control {
    right: 12px !important;
    top: 50% !important;
    bottom: auto !important;
    left: auto !important;
    transform: translateY(-50%);
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    position: absolute !important;
    gap: 6px;
  }
  #map .leaflet-control-zoom.leaflet-control a {
    border-radius: 8px !important;
  }
}

/* Leaflet Popup Content Wrapper (.leaflet-popup-content-wrapper): Dark glassmorphic background (#0f172a) with orange border and glow. */
.leaflet-popup-content-wrapper {
  background: rgba(15, 23, 42, 0.95) !important; /* #0f172a at 95% opacity */
  border: 1px solid rgba(251, 146, 60, 0.35) !important; /* #fb923c at 35% opacity */
  border-radius: 12px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(251, 146, 60, 0.15) !important; /* orange glow */
  color: #f8fafc !important;
}

/* Leaflet Popup Tip/Arrow (.leaflet-popup-tip): Matching dark color and orange border. */
.leaflet-popup-tip {
  background: rgba(15, 23, 42, 0.95) !important; /* #0f172a at 95% opacity */
  border-left: 1px solid rgba(251, 146, 60, 0.35) !important; /* #fb923c at 35% opacity */
  border-bottom: 1px solid rgba(251, 146, 60, 0.35) !important; /* #fb923c at 35% opacity */
}

/* Leaflet Popup Close Button (.leaflet-popup-close-button): Style close icon. */
.leaflet-popup-close-button {
  color: #94a3b8 !important; /* #94a3b8 */
}
.leaflet-popup-close-button:hover {
  color: #ffffff !important; /* #ffffff */
}

/* Sidebar Card Boop Status (.card-boop-status): Informational message for mutual boop contact info. */
.card-boop-status {
  margin-top: 10px;
  background: rgba(34, 197, 94, 0.1) !important; /* #22c55e at 10% opacity */
  border: 1px solid rgba(34, 197, 94, 0.3) !important; /* #22c55e at 30% opacity */
  border-radius: 8px;
  padding: 8px;
}
.card-boop-status span {
  font-size: 0.8rem;
  color: #4ade80; /* #4ade80 */
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}
.card-boop-status .im-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.card-boop-status .im-list span {
  font-size: 0.75rem;
  color: #e2e8f0; /* #e2e8f0 */
  font-weight: normal;
}

/* Sidebar Card Boop Buttons (.card-boop-btn): Actions for sending boops to users in the list. */
.card-boop-btn {
  margin-top: 8px;
  width: 100%;
  padding: 6px;
  font-size: 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15); /* #ffffff at 15% opacity */
  background: rgba(30, 41, 59, 0.7); /* #1e293b at 70% opacity */
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}
.card-boop-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1); /* #ffffff at 10% opacity */
}
.card-boop-btn.booped {
  background: rgba(255, 255, 255, 0.05); /* #ffffff at 5% opacity */
  color: #94a3b8; /* #94a3b8 */
  border-color: transparent;
  cursor: not-allowed;
}

/* GDPR Consent Banner (.consent-banner): Fixed bottom, glassmorphic layout. */
.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.95); /* Slate 900 at 95% opacity */
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 24px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.consent-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.consent-content p {
  margin: 0;
  font-size: 0.82rem;
  color: #cbd5e1; /* Slate 300 */
  line-height: 1.5;
}

.consent-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .consent-content {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 4px 0;
  }
  .consent-banner {
    padding: 14px 16px;
  }
}

/* Photo Slots Grid Styles */
.photo-slots-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
  margin-bottom: 12px;
}
.photo-slot {
  position: relative;
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}
.photo-slot:hover {
  border-color: var(--secondary);
  background: rgba(251, 146, 60, 0.05);
}
.photo-slot-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
.photo-slot-preview.empty {
  padding: 10px;
}
.photo-slot .remove-slot-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 4px 8px;
  font-size: 0.7rem;
  z-index: 10;
}

.drawer-version-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.15);
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* Custom Map Context Menu */
.context-menu {
  background: rgba(15, 23, 42, 0.92) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45) !important;
  padding: 6px 0 !important;
  display: flex;
  flex-direction: column;
  min-width: 185px;
  opacity: 1;
  pointer-events: auto;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.8rem;
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.context-menu-item:hover {
  background: rgba(251, 146, 60, 0.15); /* Orange hover highlight */
  color: #fb923c;
}

.context-menu-item .icon {
  font-size: 1rem;
}

.context-menu-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 6px 0;
}

/* Premium Admin Dashboard Styling */
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.85rem;
}
.admin-table th {
  padding: 12px 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.8px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.4);
}
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}
.admin-table tbody tr {
  transition: all 0.2s ease;
}
.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Glowing pill badges */
.admin-badge {
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
}
.admin-badge.approved {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.admin-badge.pending {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.admin-badge.activated {
  background: rgba(6, 182, 212, 0.12);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.admin-badge.not-activated {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* User role tags */
.role-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.role-badge.admin {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.role-badge.moderator {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}
.role-badge.user {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Editable cells styling */
.admin-table input[type="text"].admin-event-icon-input,
.admin-table input[type="text"].admin-poi-icon-input {
  width: 38px;
  text-align: center;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff;
  border-radius: 6px;
  padding: 4px 2px;
  font-size: 1.05rem;
  transition: all 0.2s ease;
  outline: none;
}
.admin-table input[type="text"].admin-event-icon-input:hover,
.admin-table input[type="text"].admin-poi-icon-input:hover,
.admin-table input[type="text"].admin-event-icon-input:focus,
.admin-table input[type="text"].admin-poi-icon-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 8px var(--primary-glow);
  background: rgba(0, 0, 0, 0.5) !important;
}

.admin-table input[type="color"] {
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 6px;
  padding: 0;
  background: none;
  cursor: pointer;
  vertical-align: middle;
  transition: all 0.2s ease;
}
.admin-table input[type="color"]:hover {
  transform: scale(1.1);
  border-color: #fff !important;
}

/* Layout cards in admin panel */
.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 4px;
}

/* Custom base map styling */
.map-base-tiles {
}

.remove-photo-btn {
  position: absolute !important;
  bottom: 4px !important;
  top: auto !important;
  right: 4px !important;
  left: auto !important;
  background: rgba(239, 68, 68, 0.9) !important;
  color: #ffffff !important;
  border: none !important;
  font-size: 0.65rem !important;
  font-weight: bold !important;
  padding: 3px 6px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  z-index: 20 !important;
  line-height: 1.2 !important;
  height: auto !important;
  min-height: 0 !important;
  min-width: 0 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important;
  transition: background 0.2s !important;
  margin: 0 !important;
}
.remove-photo-btn:hover {
  background: rgb(239, 68, 68) !important;
}
