@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* --- Theme Variables & Design Tokens (Mint Earth Light Mode) --- */
:root {
  --bg-page: #f2f5f3;
  --text-page: #1a231d;
  --panel-bg: #ffffff;
  --panel-border: #e0e5e1;
  
  --primary: #2e7d32;      /* Leaf Green */
  --primary-light: #4caf50;
  --primary-glow: rgba(76, 175, 80, 0.2);
  --accent: #795548;       /* Earthy Brown */
  --accent-light: #a1887f;
  
  --bg-app: #f9fbf9;       /* App Background */
  --bg-card: #ffffff;      /* Card Background */
  --text-primary: #1b2e1e; /* Core text */
  --text-secondary: #5c6b5e; /* Subtext */
  --border-color: #e2e8e3;
  --glow-color: rgba(46, 125, 50, 0.15);
  
  --safe-green: #2e7d32;
  --warn-orange: #ff9800;
  --danger-red: #d32f2f;
  --info-blue: #0288d1;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
}

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

html, body {
  height: 100%;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-page);
  display: flex;
  flex-direction: column;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow: hidden; /* Prevent body scroll */
}

#app-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  /* Use device-specific full screen height */
  height: 100vh;
}

/* Simulator Screen Area - Now acting as the main app container */
.simulator-screen {
  flex: 1;
  background-color: var(--bg-app);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  transition: background-color 0.4s ease;
  /* Ensure edge-to-edge for mobile */
  width: 100%;
  height: 100%;
}

/* Leaflet Map Styling */
#map {
  width: 100%;
  height: 100%;
}

.map-canvas-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* Mock App Header */
.app-header {
  padding: 0.5rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
  background-color: var(--bg-app);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.app-title-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-logo-badge {
  width: 28px;
  height: 28px;
  background: radial-gradient(circle at 50% 45%, #0f2a22, #08120e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-logo-badge img {
  width: 22px;
  height: 22px;
}

.app-title-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.user-score-badge {
  background-color: var(--border-color);
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* --- APP SCREEN PANELS --- */
.app-screen {
  flex: 1;
  position: relative;
  overflow-y: auto;
  display: none;
  flex-direction: column;
}

.app-screen.active {
  display: flex;
}


/* --- TAB 1: INTERACTIVE MAP SCREEN --- */
.map-canvas-container {
  flex: 1;
  position: relative;
  z-index: 0; /* contain Leaflet's high z-index panes so overlays like the details sheet stay on top */
  background-color: #d8ebd6; /* Leafy ground color */
  overflow: hidden;
}

.map-svg-mock {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  cursor: grab;
}

.map-svg-mock:active {
  cursor: grabbing;
}

/* Map Overlays */
.map-search-bar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  height: 46px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 500;
}

.map-search-bar input {
  border: none;
  background: transparent;
  flex: 1;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
}

.map-filter-scroll {
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  padding: 0 12px 10px 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  z-index: 500;
  scrollbar-width: none; /* Hide firefox scrollbar */
}

.map-filter-scroll::-webkit-scrollbar {
  display: none;
}

.map-filter-chip {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.map-filter-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.map-layer-controls {
  position: absolute;
  right: 12px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}

.map-fab-btn {
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.map-fab-btn:hover {
  transform: scale(1.05);
}

.map-fab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.radar-pulse-ring {
  position: absolute;
  width: 80px;
  height: 80px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  background-color: var(--primary-glow);
  transform: translate(-50%, -50%);
  animation: pulse-ring 2.5s infinite linear;
  pointer-events: none;
}

@keyframes pulse-ring {
  0% {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

.user-marker {
  position: absolute;
  width: 16px;
  height: 16px;
  background: #2196f3;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(33, 150, 243, 0.5);
  transform: translate(-50%, -50%);
  z-index: 9;
}

/* --- TAB 2: AI IDENTIFICATION --- */
.camera-viewfinder {
  flex: 1;
  background-color: #111;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.viewfinder-target {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  transform: translate(-50%, -65%);
  border: 2px dashed rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-md);
  pointer-events: none;
}

.viewfinder-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--primary-light);
  border-style: solid;
  pointer-events: none;
}

.corner-tl { top: -2px; left: -2px; border-width: 4px 0 0 4px; border-top-left-radius: 6px; }
.corner-tr { top: -2px; right: -2px; border-width: 4px 4px 0 0; border-top-right-radius: 6px; }
.corner-bl { bottom: -2px; left: -2px; border-width: 0 0 4px 4px; border-bottom-left-radius: 6px; }
.corner-br { bottom: -2px; right: -2px; border-width: 0 4px 4px 0; border-bottom-right-radius: 6px; }

.laser-scanner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, transparent, var(--primary-light), transparent);
  box-shadow: 0 0 8px var(--primary-light);
  display: none;
  animation: laser-sweep 2s ease-in-out infinite;
}

@keyframes laser-sweep {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

.camera-controls-top {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  z-index: 10;
  color: white;
}

.camera-gallery-strip {
  padding: 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gallery-strip-title {
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.8;
}

.gallery-items {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gallery-item-card {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
}

.gallery-item-card:hover, .gallery-item-card.selected {
  border-color: var(--primary-light);
  transform: scale(1.05);
}

.gallery-item-card span {
  position: absolute;
  bottom: 2px;
  left: 2px;
  right: 2px;
  background: rgba(0,0,0,0.7);
  color: white;
  font-size: 0.5rem;
  text-align: center;
  border-radius: 3px;
  padding: 1px 0;
}

.camera-shutter-bar {
  padding: 20px;
  background: black;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 10;
}

.shutter-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: white;
  border: 6px solid #333;
  cursor: pointer;
  outline: none;
  transition: transform 0.2s ease;
}

.shutter-btn:active {
  transform: scale(0.9);
}

.camera-side-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #222;
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* AI Classifier Dialog Panel Overlay */
.ai-results-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  box-shadow: 0 -8px 30px rgba(0,0,0,0.15);
  z-index: 100;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-results-overlay.active {
  transform: translateY(0);
}

.ai-results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.ai-status-badge {
  background: #e8f5e9;
  color: var(--safe-green);
  font-weight: 700;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
}

.ai-result-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.ai-species-row {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-species-row.selected {
  border-color: var(--primary);
  background-color: var(--primary-glow);
}

.ai-species-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.confidence-bar-bg {
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.confidence-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  width: 0%;
  transition: width 1s ease;
}

.ai-species-label {
  font-weight: 600;
  font-size: 0.85rem;
}

.ai-species-sci {
  font-style: italic;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.health-status-box {
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.3);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--warn-orange);
  margin-top: 10px;
}

.health-status-box.healthy {
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: var(--safe-green);
}

.confirm-action-row {
  display: flex;
  gap: 10px;
}

.btn-secondary {
  flex: 1;
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  flex: 1.5;
  background: var(--primary);
  border: none;
  color: white;
  padding: 10px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

/* --- TAB 3: PLANT RADAR --- */
.radar-screen-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #0b0f0c;
  color: white;
  overflow: hidden;
}

.radar-ping-area {
  height: 250px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #101c13 0%, #080c09 100%);
  border-bottom: 1px solid #142217;
}

.radar-sweeper {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(76, 175, 80, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-sweeper::before {
  content: '';
  position: absolute;
  top: 0;
}

.radar-sweeper::after {
  content: '';
  position: absolute;
  bottom: 0;
}

.radar-center-dot {
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary-light);
  position: relative;
  z-index: 5;
}

.radar-target-dot {
  width: 10px;
  height: 10px;
  background-color: #00f0ff;
  border-radius: 50%;
  position: absolute;
  box-shadow: 0 0 8px #00f0ff;
  animation: blink 1.5s infinite alternate;
}

@keyframes blink {
  0% { opacity: 1; }
  100% { opacity: 0.5; }
}

.radar-info-panel {
  padding: 1.25rem;
  background: var(--bg-app);
  color: var(--text-primary);
  flex: 1;
  overflow-y: auto;
}

.radar-list-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.radar-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  padding: 10px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  border: 1px solid var(--border-color);
}

.radar-card-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-glow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.radar-card-info {
  flex: 1;
}

.radar-card-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.radar-card-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* --- TAB 4: VERIFICATION QUEUE --- */
.verification-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 1.25rem 1rem 1.25rem;
}

.verification-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.verification-header {
  padding: 10px 12px;
  background: var(--primary-glow);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  border-bottom: 1px solid var(--border-color);
}

.verification-image {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
}

.verification-content {
  padding: 12px;
}

.verification-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.verification-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

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

.verify-btn {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  border: 1px solid transparent;
}

.verify-btn-agree {
  background: var(--safe-green);
  color: white;
}

.verify-btn-agree:hover {
  background: #2e7d32;
}

.verify-btn-disagree {
  background: var(--warn-orange);
  color: white;
}

.verify-btn-disagree:hover {
  background: #e68a00;
}

.verify-btn-skip {
  background: var(--bg-app);
  color: var(--text-secondary);
  border-color: var(--border-color);
}

.verify-btn-skip:hover {
  background: var(--panel-bg);
}

.verification-meta-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* --- TAB 5: EXPLORER PROFILE --- */
.profile-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem 1rem 1.25rem;
}

.profile-card-top {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.profile-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: var(--border-color);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 3px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

button.profile-avatar-large {
  position: relative;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
button.profile-avatar-large:disabled {
  cursor: default;
}

.profile-avatar-edit-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary, #2e7d32);
  border: 2px solid var(--bg-card, #ffffff);
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.profile-details-top {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-edit-profile {
  align-items: center;
  background: rgba(46, 125, 50, 0.1);
  color: var(--primary, #2e7d32);
  border: 1px solid rgba(46, 125, 50, 0.25);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.profile-title-rank {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 2px;
}

.profile-points-bar {
  margin-top: 10px;
}

.profile-bar-bg {
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.profile-bar-fill {
  height: 100%;
  background: var(--primary-light);
  border-radius: 3px;
  width: 46.8%; /* 2340/5000 XP */
}

.profile-points-txt {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-box {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.profile-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.badges-case-grid {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}

.badge-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--border-color);
  border: 2px solid var(--border-color);
  transition: all 0.2s ease;
}

.badge-icon-wrap.unlocked {
  background: #e8f5e9;
  border-color: var(--safe-green);
}

.badge-icon-wrap.badge-green {
  background: var(--safe-green);
  color: white;
}

.badge-icon-wrap.locked {
  filter: grayscale(100%) opacity(0.6);
}

.badge-item-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* --- GLOBAL COMPONENT: DETAILS SHEET --- */
.detail-bottom-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: var(--bg-app);
  z-index: 100;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  box-shadow: 0 -8px 30px rgba(0,0,0,0.15);
}

.detail-bottom-sheet.active {
  transform: translateY(0);
}

.detail-sheet-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.2);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
}

.detail-sheet-header {
  position: relative;
  width: 100%;
  height: 200px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.detail-image-grad {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
}

.detail-sheet-title-box {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 1rem;
  color: white;
}

.detail-common-name {
  font-size: 1.8rem;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.detail-scientific-name {
  font-size: 1rem;
  font-style: italic;
  font-weight: 400;
  opacity: 0.8;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.detail-sheet-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.detail-pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.detail-pill {
  background: var(--primary-glow);
  color: var(--primary);
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(46, 125, 50, 0.2);
}

.detail-grid-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.detail-section-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.detail-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.detail-section-body {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.detail-grid-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-grid-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.detail-grid-val {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.detail-votes-action {
  background: var(--primary-glow);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(46, 125, 50, 0.2);
}

.detail-vote-desc {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.detail-vote-btn-sheet {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

/* --- Navigation Bar (Default to classic nav for this CSS block, JS handles dock) --- */
.phone-nav-bar {
  position: relative;
  flex-shrink: 0;
  background: var(--bg-card);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0;
  z-index: 10;
  transition: all 0.3s ease;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 500;
  transition: color 0.2s ease;
  padding: 4px 0;
}

.nav-item svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  margin-bottom: 2px;
}

.nav-item.active {
  color: var(--primary);
}

/* --- Layout Specific Styles: Glassy Floating Dock --- */
.layout-glass-dock .app-screen {
  padding-bottom: 100px; /* Space for the dock */
}

.layout-glass-dock .phone-nav-bar {
  position: absolute;
  bottom: 24px; /* Lifted from the bottom edge */
  left: 50%;
  transform: translateX(-50%);
  width: 90%; /* Floating width */
  max-width: 380px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.75rem 0;
}

.layout-glass-dock .nav-item {
  font-size: 0.75rem;
}

.layout-glass-dock .nav-item svg {
  width: 22px;
  height: 22px;
}

/* Highlight the camera icon in the center */
.layout-glass-dock .nav-item-camera {
  background: var(--primary);
  color: white;
  padding: 10px;
  border-radius: 50%;
  box-shadow: 0 4px 10px var(--primary-glow);
  transform: translateY(-5px); /* Slightly raise the central FAB */
  border: 4px solid var(--bg-app); /* Light border contrast */
  z-index: 1;
}

.layout-glass-dock .nav-item-camera span {
  display: none; /* Hide text label for central FAB */
}

.layout-glass-dock .nav-item-camera svg {
  fill: white;
  width: 24px;
  height: 24px;
}

/* --- Layout Specific Styles: Radial Menu (Removing logic, but keeping component for clean CSS) --- */
.phone-radial-menu-wrapper {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 10;
  display: none; /* Keep hidden as the dock is the chosen layout */
}

.radial-trigger-btn {
  width: 56px;
  height: 56px;
  background: var(--primary);
  border-radius: 50%;
  border: none;
  color: white;
  font-size: 1.5rem;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.radial-menu-items {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 56px;
  height: 56px;
  transition: all 0.3s ease-out;
  pointer-events: none;
}

.phone-radial-menu-wrapper.open .radial-menu-items {
  transform: scale(1.5);
  pointer-events: auto;
}

.radial-item {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  opacity: 0;
  transform: translate(0, 0);
  transition: all 0.3s ease-out;
}

.radial-item svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Custom Scrollbar Styling (for web dev environment only) */
.profile-scroll::-webkit-scrollbar,
.verification-scroll::-webkit-scrollbar,
.detail-sheet-scroll::-webkit-scrollbar {
  width: 8px;
}

.profile-scroll::-webkit-scrollbar-thumb,
.verification-scroll::-webkit-scrollbar-thumb,
.detail-sheet-scroll::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}

.profile-scroll::-webkit-scrollbar-track,
.verification-scroll::-webkit-scrollbar-track,
.detail-sheet-scroll::-webkit-scrollbar-track {
  background: var(--bg-app);
}
/* --- PRIMARY CAPTURE ACTION: MAP CAPTURE BUTTON --- */
.map-capture-btn {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, #1b5e20 100%);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.4);
  padding: 12px 24px;
  border-radius: 30px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 10px 25px rgba(46, 125, 50, 0.45), 0 4px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.map-capture-btn:hover {
  transform: translateX(-50%) translateY(-2px) scale(1.04);
  box-shadow: 0 14px 28px rgba(46, 125, 50, 0.55), 0 6px 12px rgba(0, 0, 0, 0.25);
  background: linear-gradient(135deg, #388e3c 0%, #1b5e20 100%);
}

.map-capture-btn:active {
  transform: translateX(-50%) translateY(1px) scale(0.97);
}

.map-capture-btn .capture-icon {
  font-size: 1.25rem;
}

.btn-camera-back {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-camera-back:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* --- TAB 3: FEEDS & ACHIEVEMENTS STYLING --- */
.feeds-header {
  padding: 1rem 1.25rem 0.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--bg-app);
}

.feeds-title-area {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feeds-main-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.feeds-sub-title {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.feeds-filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.feed-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.feed-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}

.feeds-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 1.25rem 1rem 1.25rem;
}

.feed-achievement-card {
  background: linear-gradient(135deg, rgba(232, 245, 233, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(46, 125, 50, 0.12);
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1.5px solid rgba(76, 175, 80, 0.4);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feed-achievement-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(46, 125, 50, 0.18);
}

.feed-achievement-header {
  padding: 10px 14px;
  background: linear-gradient(90deg, #2e7d32, #43a047);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.feed-achievement-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feed-achievement-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 1.5px solid white;
}

.feed-achievement-body {
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.feed-achievement-badge-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #ffb300);
  box-shadow: 0 4px 12px rgba(255, 179, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.feed-achievement-details {
  flex: 1;
}

.feed-achievement-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.feed-achievement-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.feed-achievement-footer {
  padding: 8px 14px 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(46, 125, 50, 0.1);
  background: rgba(255, 255, 255, 0.5);
}

.feed-cheer-btn {
  background: white;
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.feed-cheer-btn:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
}

.feed-cheer-btn.cheered {
  background: #e8f5e9;
  border-color: var(--primary);
  color: var(--primary);
}

/* --- SETTINGS & TOGGLE SWITCH --- */
.settings-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 12px 16px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  gap: 12px;
}

.setting-info {
  flex: 1;
}

.setting-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.setting-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.setting-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 6px 0;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cfd8dc;
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.milestone-badge-pill {
  background: var(--primary-glow);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid rgba(46, 125, 50, 0.25);
}

/* --- TOAST NOTIFICATION --- */
.toast-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: rgba(26, 36, 27, 0.95);
  backdrop-filter: blur(12px);
  color: white;
  padding: 12px 22px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 100000;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.feeds-scroll::-webkit-scrollbar {
  width: 8px;
}
.feeds-scroll::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}
.feeds-scroll::-webkit-scrollbar-track {
  background: var(--bg-app);
}


/* --- FIREBASE AUTHENTICATION UI --- */
.header-auth-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(46, 125, 50, 0.1);
  color: var(--primary);
  border: 1px solid rgba(46, 125, 50, 0.25);
  border-radius: 20px;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.header-auth-pill:hover {
  background: rgba(46, 125, 50, 0.2);
  transform: translateY(-1px);
}
.header-auth-pill.logged-in {
  background: rgba(46, 125, 50, 0.15);
  border-color: var(--primary);
}

.auth-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease-out;
}
.auth-modal-overlay.active {
  display: flex !important;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.auth-card {
  background: var(--bg-card, #ffffff);
  width: 100%;
  max-width: 360px;
  border-radius: var(--radius-lg, 24px);
  padding: 1.8rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  border: 1px solid var(--border-color, #e0e0e0);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-secondary, #757575);
  cursor: pointer;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  pointer-events: auto;
}
.auth-modal-close:hover {
  background: rgba(0, 0, 0, 0.05);
}

.auth-header-visual {
  text-align: center;
  margin-bottom: 1.4rem;
}
.auth-logo-leaf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 45%, #0f2a22, #08120e);
  margin-bottom: 0.6rem;
  box-shadow: 0 6px 16px rgba(46, 125, 50, 0.25);
}

.auth-logo-leaf img {
  width: 40px;
  height: 40px;
}
.auth-header-visual h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary, #1b2e1e);
  margin-bottom: 0.2rem;
}
.auth-header-visual p {
  font-size: 0.8rem;
  color: var(--text-secondary, #5c6b5e);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}
.auth-input-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary, #1b2e1e);
}
.auth-input-group input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-color, #dcdcdc);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  background: var(--bg-app, #f9fbf9);
  transition: border-color 0.2s;
}
.auth-input-group input:focus {
  border-color: var(--primary, #2e7d32);
}

.auth-error-banner {
  background: rgba(211, 47, 47, 0.1);
  color: #d32f2f;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  border: 1px solid rgba(211, 47, 47, 0.25);
  text-align: center;
}

.auth-btn-primary {
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 11px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 4px;
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
  transition: transform 0.1s, opacity 0.2s;
}
.auth-btn-primary:active {
  transform: scale(0.98);
}

.auth-toggle-mode {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-secondary, #5c6b5e);
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.auth-link-btn {
  background: none;
  border: none;
  color: var(--primary, #2e7d32);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.78rem;
  text-decoration: underline;
  padding: 0;
  font-family: inherit;
}

.auth-logged-in-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}
.auth-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(46, 125, 50, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(46, 125, 50, 0.2);
  text-align: left;
}
.auth-user-avatar {
  font-size: 1.8rem;
}
.auth-user-email-text {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
  word-break: break-all;
}
.auth-user-status {
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 500;
}
.auth-btn-danger {
  background: #d32f2f;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
}
.auth-btn-danger:hover {
  opacity: 0.9;
}


/* --- LIVE CAMERA SHUTTER STYLING --- */
.live-shutter-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 15px rgba(46, 125, 50, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
  outline: none;
}
.live-shutter-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6);
}
.live-shutter-btn:active {
  transform: scale(0.94);
}
.live-shutter-inner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  transition: background 0.2s ease;
}
.live-shutter-btn:hover .live-shutter-inner {
  background: linear-gradient(135deg, #66bb6a, #388e3c);
}


/* --- OPENSTREETMAP & GPS LOCATION UI ENHANCEMENTS --- */
.gps-status-pill {
  position: absolute;
  top: 114px;
  right: 12px;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  z-index: 500;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.gps-status-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}
.gps-status-pill:active {
  transform: translateY(0);
}
.gps-status-pill .gps-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fbc02d;
  box-shadow: 0 0 6px rgba(251, 192, 45, 0.6);
  transition: all 0.3s ease;
}
.gps-status-pill.active .gps-dot {
  background: #2e7d32;
  box-shadow: 0 0 8px rgba(46, 125, 50, 0.75);
}
.gps-status-pill.denied .gps-dot {
  background: #d32f2f;
  box-shadow: 0 0 8px rgba(211, 47, 47, 0.75);
}

.map-location-banner {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  background: linear-gradient(135deg, #1b382b 0%, #204e38 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(129, 199, 132, 0.35);
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: slideDownBanner 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideDownBanner {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
.map-location-banner .banner-content {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.map-location-banner .banner-icon {
  font-size: 1.3rem;
  line-height: 1;
}
.map-location-banner .banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.map-location-banner .banner-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e8f5e9;
}
.map-location-banner .banner-sub {
  font-size: 0.74rem;
  color: #c8e6c9;
  line-height: 1.35;
}
.map-location-banner .banner-action-btn {
  align-self: flex-end;
  background: #4caf50;
  color: #ffffff;
  border: none;
  padding: 7px 16px;
  border-radius: 16px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}
.map-location-banner .banner-action-btn:hover {
  background: #388e3c;
  transform: scale(1.03);
}

/* User Location GPS Beacon */
.user-location-marker-container {
  background: transparent !important;
  border: none !important;
}
.user-location-beacon {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-location-dot {
  position: relative;
  z-index: 2;
  width: 14px;
  height: 14px;
  background: #1976d2;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.user-location-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(33, 150, 243, 0.45);
  animation: user-gps-ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
  z-index: 1;
}
@keyframes user-gps-ping {
  0% { transform: scale(0.5); opacity: 0.9; }
  75% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Map FAB Buttons (Recenter / Heatmap) */
.map-fab-btn {
  position: absolute;
  z-index: 500;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.1rem;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.map-fab-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.map-fab-btn:active {
  transform: scale(0.95);
}
.map-fab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Plant Marker Pins & Leaflet Popups */
.custom-plant-pin {
  background: transparent !important;
  border: none !important;
  transition: transform 0.2s ease;
}
.custom-plant-pin:hover {
  transform: scale(1.18);
}
.leaflet-popup-content-wrapper {
  border-radius: 14px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
  background: var(--bg-card, #ffffff) !important;
  color: var(--text-primary, #212121) !important;
  padding: 2px !important;
}
.leaflet-popup-tip {
  background: var(--bg-card, #ffffff) !important;
}
.leaflet-control-attribution {
  font-size: 10px !important;
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(4px) !important;
  padding: 3px 8px !important;
  border-radius: 4px 0 0 0 !important;
}


/* Google Auth UI Enhancements */
.profile-auth-status-card {
  background: var(--bg-card, #ffffff);
  border-radius: 16px;
  border: 1px solid var(--border-color, #e0e0e0);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.04));
}

.profile-auth-unauthenticated,
.profile-auth-authenticated {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.profile-auth-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-auth-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary, #1b2e1e);
}

.profile-auth-desc {
  font-size: 0.78rem;
  color: var(--text-secondary, #5c6b5e);
}

.profile-auth-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: #2e7d32;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-profile-signout {
  background: rgba(211, 47, 47, 0.08);
  color: #d32f2f;
  border: 1px solid rgba(211, 47, 47, 0.2);
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-profile-signout:hover {
  background: rgba(211, 47, 47, 0.15);
}

.btn-delete-account {
  display: block;
  margin: 8px auto 0;
  background: none;
  border: none;
  color: #d32f2f;
  font-size: 0.75rem;
  text-decoration: underline;
  cursor: pointer;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 6px 0;
  color: var(--text-secondary, #8e9e90);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.auth-divider span {
  padding: 0 10px;
}

.google-modal-btn-wrap,
.profile-google-btn-container {
  display: flex;
  justify-content: center;
  min-height: 40px;
}

/* --- IDENTIFY SCREEN: welcome hero, preview panel --- */
.camera-viewfinder {
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

/* Keep the results drawer fully hidden until a result is shown */
.ai-results-overlay {
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.3s;
}
.ai-results-overlay.active {
  visibility: visible;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
}

.camera-viewfinder,
.camera-viewfinder.is-initial {
  background-color: #1b5e20;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(165, 214, 167, 0.35) 0, transparent 38%),
    radial-gradient(circle at 85% 75%, rgba(129, 199, 132, 0.30) 0, transparent 42%),
    radial-gradient(circle at 80% 10%, rgba(255, 241, 118, 0.18) 0, transparent 30%),
    linear-gradient(160deg, #2e7d32 0%, #1b5e20 55%, #0d3b12 100%);
}

.camera-top-title {
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  align-self: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.identify-hero {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 5;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 20px 24px;
  text-align: center;
  color: #fff;
}
.camera-viewfinder.is-initial .identify-hero {
  display: flex;
}

.identify-hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.06), 0 12px 32px rgba(0, 0, 0, 0.25);
  margin-bottom: 18px;
}

.identify-hero-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: #fff;
}

.identify-hero-sub {
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
  max-width: 320px;
  margin: 0 0 26px;
}

.identify-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 340px;
}

.identify-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border-radius: 18px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.identify-btn:active {
  transform: scale(0.97);
}

.identify-btn-camera {
  background: #ffffff;
  color: #1b5e20;
  border: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.identify-btn-gallery {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
}

.identify-btn-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.identify-btn-camera .identify-btn-icon {
  background: #e8f5e9;
}
.identify-btn-gallery .identify-btn-icon {
  background: rgba(255, 255, 255, 0.18);
}

.identify-btn-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.identify-btn-text strong {
  font-size: 1.02rem;
  font-weight: 700;
}
.identify-btn-text small {
  font-size: 0.78rem;
  opacity: 0.75;
}

.identify-hero-tips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 26px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
}
.identify-tip {
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* Bottom panel shown over the chosen photo */
.camera-preview-panel {
  position: relative;
  z-index: 10;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: var(--bg-card);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.25);
}
.organ-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.organ-chips-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.organ-chip {
  padding: 5px 11px;
  font-size: 0.78rem;
  font-family: inherit;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-app);
  color: var(--text-primary);
  cursor: pointer;
}
.organ-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.camera-preview-menu {
  display: flex;
  gap: 10px;
  width: 100%;
}

/* --- EMPTY STATES & FEED ACTIONS --- */
.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-secondary);
}
.empty-state-icon {
  font-size: 2.4rem;
  margin-bottom: 8px;
}
.empty-state-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.empty-state-desc {
  font-size: 0.82rem;
}

.verification-image-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: #e8f5e9;
}

.feed-vouch-btn {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  font-size: 0.8rem;
  border-radius: 10px;
}

.camera-controls-bottom {
  position: relative;
  z-index: 10;
  padding: 12px;
}

/* Chosen photo card (opaque layers only, so nothing behind can show through) */
.identify-photo-wrap {
  display: none;
  flex: 1;
  min-height: 0;
  padding: 4px 16px 0;
  position: relative;
  z-index: 6;
}
.camera-viewfinder.has-photo .identify-photo-wrap {
  display: flex;
}
#identify-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  background: #0d3b12;
}

.camera-viewfinder .btn-camera-back {
  background: #0d3b12;
  backdrop-filter: none;
  border-color: rgba(255, 255, 255, 0.35);
}
.identify-btn-gallery {
  background: #2e6b32;
  backdrop-filter: none;
}

/* Header: keep everything on one line on narrow phones */
.app-title-text,
.header-auth-pill,
.user-score-badge {
  white-space: nowrap;
}
.app-header {
  gap: 8px;
}
@media (max-width: 400px) {
  .app-header {
    padding: 0.5rem 0.75rem;
  }
  .app-title-text {
    font-size: 1rem;
  }
  .header-auth-pill,
  .user-score-badge {
    font-size: 0.7rem;
    padding: 4px 8px;
  }
}

.loading-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 4px solid #e8f5e9;
  border-top-color: var(--primary);
  animation: plantgo-spin 0.8s linear infinite;
}
@keyframes plantgo-spin {
  to { transform: rotate(360deg); }
}

.native-google-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px 9px 9px;
  border-radius: 24px;
  border: none;
  background: #1a73e8;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.native-google-g {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  color: #1a73e8;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Edit Profile modal (reuses the auth modal layout) */
.edit-profile-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.edit-profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background-color: var(--border-color);
  background-size: cover;
  background-position: center;
  border: 3px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.edit-profile-actions {
  display: flex;
  gap: 10px;
}
.edit-profile-actions > button {
  flex: 1;
}

.auth-btn-secondary {
  background: transparent;
  color: var(--text-primary, #1b2e1e);
  border: 1px solid var(--border-color, #dcdcdc);
  border-radius: 12px;
  padding: 11px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 4px;
}

.auth-btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
}

/* --- Report / block (user-generated content moderation) --- */
.verification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.feed-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-menu-btn {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  padding: 2px 6px;
  margin: -4px -6px -4px 0;
  border-radius: 8px;
  cursor: pointer;
}

.post-menu-btn:active {
  background: rgba(0, 0, 0, 0.08);
}

.post-actions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-action-btn {
  text-align: left;
  background: var(--bg-main, #f5f5f5);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 11px 14px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.post-action-danger {
  color: #d32f2f;
}

.post-actions-note {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: 1.5;
}

.post-actions-note a {
  color: var(--primary);
}

.guidelines-summary {
  margin: 0 0 4px 1.1rem;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.8;
}

.detail-report-btn {
  display: block;
  margin: -0.75rem auto 1.5rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.78rem;
  text-decoration: underline;
  cursor: pointer;
}

.blocked-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.blocked-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e8f5e9 center/cover no-repeat;
  flex-shrink: 0;
}

.blocked-user-name {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blocked-user-unblock {
  padding: 6px 12px;
  font-size: 0.75rem;
  border-radius: 8px;
}

.about-link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.about-link-row span {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

#guidelines-overlay .edit-profile-actions {
  margin-top: 16px;
}
