/* Offroad Trails India — Styling System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Palette - Forest & Slush Offroad (Splash Matched) */
  --bg-primary: #171B18;       /* Very dark forest black-green */
  --bg-secondary: #222923;     /* Dark moss/olive gray */
  --bg-surface: #2E372E;       /* Muted forest green surface */
  --bg-card: rgba(34, 41, 35, 0.85);
  --border-color: #3C4B3D;     /* Mossy/rugged green border */
  
  --accent: #D05C2B;           /* Rugged Mud/Thar Terracotta Orange */
  --accent-hover: #B84D20;
  --accent-light: rgba(208, 92, 43, 0.15);
  
  --secondary: #4E8A44;        /* Jungle Forest Green */
  --secondary-light: rgba(78, 138, 68, 0.15);
  
  --text-primary: #ECECE6;     /* Light sand/cream text */
  --text-secondary: #A3ACA2;   /* Muted sage gray */
  --text-muted: #6C776B;       /* Dark moss gray */
  
  --difficulty-beginner: #4CAF50;
  --difficulty-easy: #8BC34A;
  --difficulty-moderate: #FFC107;
  --difficulty-difficult: #FF9800;
  --difficulty-extreme: #F44336;
  --difficulty-featured: #9C27B0;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.6);
  
  --glass-bg: rgba(23, 27, 24, 0.85);
  --glass-border: rgba(255, 255, 255, 0.03);
  --glass-blur: blur(16px);
}

/* Base resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #0B0C0E;
  color: var(--text-primary);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Layout Framework */
#app-container {
  display: flex;
  width: 100%;
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
  position: relative;
}

/* Mobile Screen Mockup Mode (for User Screens on Desktop) */
.device-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: radial-gradient(circle at center, #1E2226 0%, #0A0B0D 100%);
  transition: all 0.5s ease;
  position: relative;
}

/* Mock phone case style */
.mobile-device {
  width: 390px;
  height: 844px;
  background: var(--bg-primary);
  border-radius: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 0 12px #2A2F35;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 4px solid #000;
}

/* Phone notch/camera pill */
.mobile-device::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 30px;
  background: #000;
  border-radius: 15px;
  z-index: 1000;
}

/* Screen Wrapper */
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Sub-panels (scrollable content) */
.screen-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding-top: 40px; /* Space for phone notch on mobile view */
  position: relative;
}

/* Fullscreen Web Admin View */
.admin-mode-active .device-wrapper {
  display: none;
}

.admin-layout {
  display: none;
  flex-direction: row;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
}

.admin-mode-active .admin-layout {
  display: flex;
}

/* Views toggling class */
.hidden {
  display: none !important;
}

/* Universal Typography & Utility classes */
.text-orange { color: var(--accent); }
.text-green { color: var(--secondary); }
.bg-orange { background-color: var(--accent); }
.bg-green { background-color: var(--secondary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: var(--border-color);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline:hover {
  background: var(--accent-light);
}

.btn-text {
  background: transparent;
  color: var(--text-secondary);
  padding: 6px 12px;
}
.btn-text:hover {
  color: var(--text-primary);
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.btn-block {
  width: 100%;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.card-interactive:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Forms styling */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-control {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
select.form-control {
  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='%239CA3AF'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px;
  padding-right: 40px;
}
.form-control-file {
  display: none;
}
.file-upload-trigger {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}
.file-upload-trigger:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

/* Badges styling */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.badge-beginner { background: rgba(76, 175, 80, 0.15); color: var(--difficulty-beginner); }
.badge-easy { background: rgba(139, 195, 74, 0.15); color: var(--difficulty-easy); }
.badge-moderate { background: rgba(255, 193, 7, 0.15); color: var(--difficulty-moderate); }
.badge-difficult { background: rgba(255, 152, 0, 0.15); color: var(--difficulty-difficult); }
.badge-extreme { background: rgba(244, 67, 54, 0.15); color: var(--difficulty-extreme); }
.badge-featured { background: rgba(156, 39, 176, 0.15); color: var(--difficulty-featured); }
.badge-status { background: var(--bg-surface); color: var(--text-secondary); border: 1px solid var(--border-color); }

/* --- 1. SPLASH SCREEN --- */
#screen-splash {
  background: url('splash.jpg') no-repeat center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* Push loader to the bottom */
  align-items: center;
  text-align: center;
  position: relative;
}
#screen-splash::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.1) 100%);
  z-index: 1;
}
.splash-logo {
  display: none; /* Already in image */
}
.splash-title {
  display: none; /* Already in image */
}
.splash-subtitle {
  display: none; /* Already in image */
}
.splash-loader-container {
  position: relative;
  z-index: 2;
  margin-bottom: 60px; /* Space from bottom above Jimny cars */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.spinning-tyre {
  font-size: 32px;
  color: var(--text-primary);
  opacity: 0.8;
  animation: spinTyre 1.5s linear infinite;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
@keyframes spinTyre {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* --- 2. AUTH SCREEN --- */
.auth-header {
  text-align: center;
  margin-bottom: 30px;
  margin-top: 40px;
}
.auth-header i {
  font-size: 48px;
  color: var(--accent);
  margin-bottom: 12px;
}
.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 40px;
}
.btn-oauth {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 16px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 14px;
}
.btn-oauth:hover {
  background: var(--bg-surface);
  border-color: var(--text-secondary);
}

/* --- 3. MOBILE NAVIGATION HEADER / FOOTER --- */
.mobile-header {
  height: 60px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
}
.mobile-header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.mobile-footer-nav {
  height: 64px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
  border: none;
  background: transparent;
}
.nav-item i {
  font-size: 20px;
  margin-bottom: 4px;
}
.nav-item.active {
  color: var(--accent);
}

/* --- 4. MAP COMPONENT & HOME SCREEN --- */
.map-container {
  width: 100%;
  height: 100%;
  position: relative;
}
#home-map {
  width: 100%;
  height: 100%;
  background: #242426; /* Fallback dark */
  z-index: 10;
}
/* Leaflet map Dark Mode filters */
.leaflet-container {
  background: #1a1d20 !important;
}
.leaflet-tile {
  filter: brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3);
}
.leaflet-bar {
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-md) !important;
}
.leaflet-bar a {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--border-color) !important;
}
.leaflet-bar a:hover {
  background-color: var(--bg-surface) !important;
  color: var(--accent) !important;
}

/* Map Overlays */
.map-floating-panel {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 500;
  pointer-events: none;
}
.map-search-bar {
  display: flex;
  align-items: center;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 6px 12px;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
}
.map-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 8px;
  outline: none;
  font-size: 14px;
}
.radius-slider-panel {
  position: absolute;
  bottom: 80px;
  left: 16px;
  right: 16px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  z-index: 500;
}
.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.slider-control {
  width: 100%;
  accent-color: var(--accent);
  background: var(--border-color);
  height: 6px;
  border-radius: 3px;
  outline: none;
}

/* Bottom Sheet Preview Card */
.bottom-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-radius: 24px 24px 0 0;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.1, 0.76, 0.55, 0.94);
  box-shadow: 0 -8px 24px rgba(0,0,0,0.5);
  max-height: 85%;
  display: flex;
  flex-direction: column;
}
.bottom-sheet.open {
  transform: translateY(0);
}
.bottom-sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  margin: 12px auto;
  cursor: pointer;
}
.bottom-sheet-content {
  padding: 0 20px 24px 20px;
  overflow-y: auto;
}
.trail-preview-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.trail-preview-img {
  width: 100%;
  height: 140px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-surface);
}

/* --- 5. SEARCH & FILTER SCREEN --- */
.filter-section-title {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-top: 16px;
  margin-bottom: 8px;
}
.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.chip {
  padding: 8px 14px;
  border-radius: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.chip:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}
.chip.selected {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

/* --- 6. ADD TRAIL SCREEN --- */
.step-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  background: var(--bg-secondary);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}
.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}
.step-dot.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-hover);
}
.step-dot.completed {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}
.trail-step-content {
  display: none;
}
.trail-step-content.active {
  display: block;
}

/* Small embedded map for pin dropping */
.small-map-selector {
  width: 100%;
  height: 220px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 8px;
  overflow: hidden;
  background: #1a1d20;
}

.uploaded-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.uploaded-photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
}
.uploaded-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.remove-photo-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- 7. TRAIL DETAIL SCREEN --- */
.detail-photo-carousel {
  width: 100%;
  height: 260px;
  position: relative;
  overflow: hidden;
  background: var(--bg-secondary);
}
.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease-in-out;
}
.carousel-slide {
  min-width: 100%;
  height: 100%;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carousel-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}
.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
}
.indicator-dot.active {
  background: #fff;
  width: 18px;
  border-radius: 4px;
}
.detail-body {
  padding: 20px;
}
.detail-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.detail-stats-bar {
  display: flex;
  gap: 16px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}
.detail-stat-item {
  flex: 1;
  text-align: center;
}
.detail-stat-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.detail-stat-lbl {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.safety-box {
  background: rgba(244, 67, 54, 0.08);
  border-left: 4px solid var(--difficulty-extreme);
  padding: 12px 16px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.5;
}
.comments-list {
  margin-top: 16px;
}
.comment-item {
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
}
.comment-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
}
.rating-input-stars {
  display: flex;
  gap: 8px;
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
  margin: 12px 0;
}
.rating-input-stars i.active {
  color: var(--difficulty-moderate);
}

/* --- 8. PROFILE SCREEN --- */
.profile-hero {
  text-align: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-color);
}
.profile-avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 12px auto;
}
.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
}
.avatar-edit-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid var(--bg-primary);
}
.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-top: 16px;
}
.profile-tab {
  flex: 1;
  text-align: center;
  padding: 12px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}
.profile-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* --- 9. DONATIONS PAGE --- */
.donate-qr-wrapper {
  text-align: center;
  margin: 24px 0;
}
.donate-qr-img {
  width: 200px;
  height: 200px;
  border: 4px solid #fff;
  border-radius: 12px;
  background: #fff;
}

/* --- 10. WEB ADMIN PORTAL LAYOUT --- */
.admin-sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px;
}
.admin-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.admin-nav-item:hover, .admin-nav-item.active {
  background: var(--bg-surface);
  color: var(--accent);
}
.admin-nav-item.active {
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
}
.admin-sidebar-footer {
  margin-top: auto;
}
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-primary);
}
.admin-header {
  height: 70px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--bg-secondary);
}
.admin-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.admin-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

/* Admin Widgets Dashboard Grid */
.admin-widgets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
.widget-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.widget-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.widget-icon.green {
  background: var(--secondary-light);
  color: var(--secondary);
}
.widget-num {
  font-size: 28px;
  font-weight: 800;
  margin-top: 4px;
}
.widget-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
}

/* Admin Table Design */
.admin-table-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 32px;
}
.table-actions-bar {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.admin-table th {
  padding: 16px 24px;
  background: var(--bg-surface);
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
}
.admin-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  vertical-align: middle;
}
.admin-table tr:hover {
  background: rgba(255,255,255,0.02);
}
.admin-table tr:last-child td {
  border-bottom: none;
}

/* Dashboard Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
.chart-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
}
.mock-bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 200px;
  padding-top: 20px;
  border-bottom: 2px solid var(--border-color);
}
.chart-bar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}
.chart-bar {
  width: 30px;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  transition: height 1s ease;
  position: relative;
}
.chart-bar:hover {
  background: var(--accent-hover);
}
.chart-bar::before {
  content: attr(data-val);
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-primary);
}
.chart-bar-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 8px;
  text-align: center;
  max-width: 60px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- 11. GENERAL POPUPS & DIALOGS --- */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 25000;
  backdrop-filter: blur(4px);
}
.dialog-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 90%;
  max-width: 340px;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: scaleUp 0.2s ease;
}
.dialog-icon {
  font-size: 36px;
  color: var(--accent);
  margin-bottom: 16px;
}
.dialog-icon.success { color: var(--secondary); }
.dialog-icon.danger { color: var(--difficulty-extreme); }
.dialog-icon.info { color: #2196F3; }
.dialog-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  left: auto;
  width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 30000;
  transform: translateY(-120px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@media (max-width: 580px) {
  .toast {
    left: 20px;
    right: 20px;
    width: auto;
  }
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast.success { border-left-color: var(--secondary); }
.toast.error { border-left-color: var(--difficulty-extreme); }

/* --- 12. ANIMATIONS --- */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes scaleUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Offline Banner NFR-004 */
.offline-banner {
  background: #B71C1C;
  color: #fff;
  text-align: center;
  padding: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  z-index: 9999;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: none;
}
.offline .offline-banner {
  display: block;
}

/* Admin Dashboard Toggle Switch */
.view-toggle-btn {
  display: none !important;
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: var(--bg-surface);
  color: var(--accent);
  border: 1px solid var(--border-color);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.view-toggle-btn:hover {
  transform: scale(1.1);
  background: var(--border-color);
}

/* ==================== RESPONSIVE WEB PORTAL OVERRIDES ==================== */

/* Remove mobile frame mockup style for clean web portal look */
.device-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  background: var(--bg-primary);
  transition: all 0.3s ease;
  position: relative;
  width: 100%;
  height: 100%;
}

.mobile-device {
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  border: none;
}

/* Hide notch/camera pill */
.mobile-device::before {
  display: none !important;
}

/* Clean space above content */
.screen-content {
  padding-top: 20px;
}

/* Desktop and Tablet Enhancements (Width >= 768px) */
@media (min-width: 768px) {
  /* Navigation Bar turns into Left Sidebar */
  #screen-main-container {
    flex-direction: row !important;
  }

  .mobile-footer-nav {
    width: 250px;
    height: 100% !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    padding: 32px 16px !important;
    border-top: none !important;
    border-right: 1px solid var(--border-color) !important;
    gap: 12px !important;
    box-shadow: var(--shadow-sm);
  }

  .nav-item {
    flex-direction: row !important;
    justify-content: flex-start !important;
    width: 100% !important;
    padding: 14px 20px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    gap: 16px !important;
    transition: all 0.2s ease;
  }

  .nav-item i {
    font-size: 18px !important;
    margin-bottom: 0 !important;
  }

  .nav-item.active {
    background: var(--bg-surface) !important;
    color: var(--accent) !important;
    box-shadow: var(--shadow-sm);
  }

  /* Form & Content limits on Desktop to prevent stretching */
  #form-register,
  #form-addtrail,
  .profile-hero,
  .donate-qr-wrapper,
  .donate-qr-wrapper + .form-group,
  #btn-launch-upi-app {
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Detail Screen Dual Column Grid */
  #screen-traildetail .screen-content {
    display: grid !important;
    grid-template-columns: 1.2fr 1fr !important;
    gap: 32px !important;
    padding: 32px !important;
    height: 100% !important;
    overflow-y: auto !important;
  }

  .detail-photo-carousel {
    height: 450px !important;
    border-radius: 16px !important;
    position: sticky !important;
    top: 0 !important;
  }

  .detail-body {
    padding: 0 !important;
  }

  /* Map Panel compactness */
  .map-floating-panel {
    max-width: 400px !important;
    left: 24px !important;
    top: 24px !important;
  }

  .radius-slider-panel {
    max-width: 320px !important;
    left: 24px !important;
    bottom: 24px !important;
  }

  #btn-my-location {
    bottom: 120px !important;
    right: 24px !important;
  }
}

/* ==================== RESPONSIVE WEB ADMIN OVERRIDES ==================== */
@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column !important;
  }

  .admin-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 260px !important;
    z-index: 10000 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: var(--shadow-lg);
  }

  .admin-sidebar.open {
    transform: translateX(0) !important;
  }

  .admin-header {
    padding: 0 16px !important;
  }

  .admin-body {
    padding: 16px !important;
  }

  .admin-widgets-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
  }

  .widget-card {
    padding: 16px !important;
  }

  .widget-num {
    font-size: 20px !important;
  }

  .charts-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* Table responsiveness helper */
.admin-table-container {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

.admin-table th, .admin-table td {
  white-space: nowrap !important;
}

/* Menu Backdrop Overlay */
.admin-menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  display: none;
  backdrop-filter: blur(2px);
}
.admin-menu-backdrop.show {
  display: block;
}

/* ==================== ADMIN PANEL MODALS & CRUD FORM STYLES ==================== */
.admin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 15000;
  backdrop-filter: blur(8px);
  padding: 16px;
}

.admin-modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  animation: scaleUp 0.2s ease;
  display: flex;
  flex-direction: column;
}

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

.admin-modal-header h3 {
  font-size: 18px;
  color: var(--accent);
}

.admin-modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}
.admin-modal-close:hover {
  color: var(--text-primary);
}

.admin-modal-body {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-right: 4px;
}

.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 580px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== GOOGLE SIGN-IN SIMULATOR MODAL ==================== */
.google-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20000;
  backdrop-filter: blur(4px);
}

.google-modal-box {
  background: #ffffff;
  color: #202124;
  width: 100%;
  max-width: 450px;
  min-height: 500px;
  border-radius: 8px;
  border: 1px solid #dadce0;
  padding: 40px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  font-family: 'Roboto', 'Inter', -apple-system, sans-serif;
}

.google-view {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.google-header {
  text-align: center;
  margin-bottom: 24px;
}

.google-logo {
  height: 24px;
  margin-bottom: 16px;
}

.google-header h2 {
  font-size: 24px;
  font-weight: 400;
  color: #202124;
  margin: 0;
  line-height: 1.3;
}

.google-header p {
  font-size: 16px;
  color: #202124;
  margin: 8px 0 0 0;
}

.google-accounts-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #dadce0;
  border-bottom: 1px solid #dadce0;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 24px;
}

.google-account-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f1f3f4;
  transition: background-color 0.2s ease;
  text-align: left;
}

.google-account-row:last-child {
  border-bottom: none;
}

.google-account-row:hover {
  background-color: #f8f9fa;
}

.google-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #1a73e8;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  margin-right: 12px;
}

.google-avatar.admin-avatar {
  background-color: #c0392b;
}

.google-avatar.custom-avatar {
  background-color: #f1f3f4;
  color: #5f6368;
}

.google-account-info {
  flex: 1;
  text-align: left;
}

.google-account-name {
  font-size: 14px;
  font-weight: 500;
  color: #3c4043;
}

.google-account-email, .google-account-role {
  font-size: 12px;
  color: #5f6368;
}

.google-form-body {
  flex: 1;
  margin-bottom: 24px;
}

.google-input-group {
  position: relative;
  margin-top: 20px;
  margin-bottom: 10px;
}

.google-input-group input {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  outline: none;
  background: transparent;
  color: #202124;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.google-input-group input:focus {
  border-color: #1a73e8;
  border-width: 2px;
  padding: 15px;
}

.google-input-group label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: #ffffff;
  padding: 0 4px;
  color: #5f6368;
  font-size: 16px;
  transition: 0.2s ease all;
  pointer-events: none;
}

.google-input-group input:focus ~ label,
.google-input-group input:not(:placeholder-shown) ~ label {
  top: 0;
  font-size: 12px;
  color: #1a73e8;
}

.google-error-msg {
  font-size: 12px;
  color: #d93025;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  text-align: left;
}

.google-help-text {
  font-size: 12px;
  color: #5f6368;
  line-height: 1.5;
  margin-top: 16px;
  text-align: left;
}

.google-help-text a {
  color: #1a73e8;
  text-decoration: none;
  font-weight: 500;
}

.google-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.google-next-btn {
  background-color: #1a73e8;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.google-next-btn:hover {
  background-color: #1b66ca;
}

.google-back-btn, .google-cancel-btn {
  background: transparent;
  color: #1a73e8;
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.google-back-btn:hover, .google-cancel-btn:hover {
  background-color: #f8f9fa;
}

.google-footer-links {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

/* --- 12. WEB SPLASH & CUSTOM ENHANCEMENTS --- */
.web-splash {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.5s ease, visibility 0.5s;
}
.web-splash.fade-out {
  opacity: 0;
  visibility: hidden;
}
.web-splash-content {
  text-align: center;
  animation: scaleUp 0.3s ease;
}
.web-splash-logo {
  width: 180px;
  height: 180px;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
  object-fit: cover;
}
.web-splash-loader {
  width: 200px;
  height: 4px;
  background: var(--bg-surface);
  border-radius: 2px;
  margin: 0 auto 16px auto;
  overflow: hidden;
  position: relative;
}
.web-splash-progress {
  width: 0%;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  animation: webSplashBar 1.8s ease-in-out forwards;
}
.web-splash-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
@keyframes webSplashBar {
  0% { width: 0%; }
  30% { width: 40%; }
  70% { width: 80%; }
  100% { width: 100%; }
}

/* Custom City styles */
.form-control.hidden {
  display: none !important;
}

/* Blog list UI */
.blog-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.blog-card-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}
.blog-card-content {
  padding: 16px;
}
.blog-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.blog-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Info page content styling */
.info-section {
  margin-bottom: 20px;
}
.info-section h3 {
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-section p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}
.info-bullet-list {
  padding-left: 20px;
  margin: 8px 0;
}
.info-bullet-list li {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.4;
}

/* Quill custom styles override */
.ql-editor {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  font-family: inherit !important;
  min-height: 250px;
  border-radius: 0 0 12px 12px;
}
.ql-toolbar {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  border-radius: 12px 12px 0 0;
}
.ql-container {
  border-color: var(--border-color) !important;
  border-radius: 0 0 12px 12px;
}

/* Blog Rich Content Renderer */
.blog-rich-content p {
  margin-bottom: 14px;
}
.blog-rich-content h1, .blog-rich-content h2, .blog-rich-content h3 {
  margin-top: 20px;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.blog-rich-content ul, .blog-rich-content ol {
  margin-bottom: 14px;
  padding-left: 20px;
}
.blog-rich-content li {
  margin-bottom: 6px;
}

