/* ============================================================
   FishTrackr — Global Styles
   Dark ocean theme: blues, greens, earthy accents
   ============================================================ */

:root {
  /* Background layers */
  --bg-primary: #0a1628;
  --bg-surface: #0f2040;
  --bg-card: #152a4a;
  --bg-card-alt: #1a3560;
  --bg-input: #0d1e38;
  --bg-modal: #0f2040;

  /* Brand colors */
  --blue-primary: #3b9ddd;
  --blue-light: #64b5f6;
  --blue-bright: #4fc3f7;
  --green-primary: #4caf50;
  --green-light: #66bb6a;
  --amber: #ffa726;
  --amber-light: #ffb74d;
  --red: #ef5350;
  --red-light: #ff6b6b;

  /* Text */
  --text-primary: #e8f4fd;
  --text-secondary: #8fb0c8;
  --text-muted: #4a6a88;

  /* Borders & dividers */
  --border: rgba(59, 157, 221, 0.18);
  --border-light: rgba(59, 157, 221, 0.09);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
  --shadow-blue: 0 0 20px rgba(59, 157, 221, 0.2);

  /* Radii */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Layout */
  --header-height: 56px;
  --nav-height: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ============================================================
   Reset & Base
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

textarea { resize: vertical; }

a { color: var(--blue-light); text-decoration: none; }

/* ============================================================
   Utility Classes
   ============================================================ */

.hidden { display: none !important; }

/* ============================================================
   Loading Overlay
   ============================================================ */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.loading-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--blue-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============================================================
   Toast Notifications
   ============================================================ */

.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card-alt);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 8000;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

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

.toast.success { border-color: var(--green-primary); }
.toast.error { border-color: var(--red); }

/* ============================================================
   Auth Section
   ============================================================ */

#auth-section {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  overflow-y: auto;
  padding: 20px;
  padding-top: calc(20px + var(--safe-top));
}

.auth-container {
  width: 100%;
  max-width: 380px;
  padding: 40px 32px;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg), var(--shadow-blue);
}

.auth-logo {
  font-size: 52px;
  text-align: center;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 16px rgba(79, 195, 247, 0.4));
}

.auth-title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 32px;
}

.auth-instruction {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ============================================================
   Form Elements
   ============================================================ */

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(59, 157, 221, 0.15);
}

.form-input::placeholder {
  color: var(--text-muted);
}

select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238fb0c8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

select.form-input option {
  background: var(--bg-surface);
}

.input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-group .form-input {
  flex: 1;
}

.input-suffix {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 24px;
}

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

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--blue-primary);
  color: #fff;
  border-color: var(--blue-primary);
}

.btn-primary:hover {
  background: var(--blue-light);
  border-color: var(--blue-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(239, 83, 80, 0.15);
  color: var(--red);
  border-color: rgba(239, 83, 80, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 83, 80, 0.25);
}

.btn-full {
  width: 100%;
  margin-bottom: 10px;
}

.btn-full:last-child { margin-bottom: 0; }

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
  background: var(--bg-card-alt);
  color: var(--text-primary);
}

/* ============================================================
   App Layout
   ============================================================ */

#app-section {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(var(--header-height) + var(--safe-top));
  padding: 0 16px;
  padding-top: var(--safe-top);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-logo {
  font-size: 24px;
  filter: drop-shadow(0 0 8px rgba(79, 195, 247, 0.5));
}

.app-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

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

/* Main Content */
.main-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Views */
.view {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  -webkit-overflow-scrolling: touch;
}

.view.active {
  opacity: 1;
  pointer-events: all;
}

#view-map {
  overflow: hidden;
}

.view-header {
  padding: 20px 16px 12px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 10;
}

.view-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-bottom: 12px;
}

/* Bottom Navigation */
.bottom-nav {
  display: flex;
  align-items: stretch;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  flex-shrink: 0;
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 8px 0;
  transition: color 0.15s;
}

.nav-item .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}

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

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

/* ============================================================
   Map View
   ============================================================ */

#map-container {
  position: absolute;
  inset: 0;
}

/* Mapbox overrides */
.mapboxgl-canvas { outline: none; }

.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-bottom-right {
  display: none;
}

.map-overlay-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 10;
  pointer-events: none;
}

.add-spot-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-card-alt);
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--blue-primary);
  box-shadow: var(--shadow);
  pointer-events: all;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.add-spot-indicator span {
  font-size: 14px;
  font-weight: 500;
  color: var(--blue-bright);
}

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

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

.map-btn:active { transform: scale(0.95); }

/* FAB */
.fab {
  position: absolute;
  bottom: 20px;
  right: 16px;
  width: 56px;
  height: 56px;
  background: var(--blue-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 16px rgba(59, 157, 221, 0.5);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  z-index: 10;
  border: none;
}

.fab:active {
  transform: scale(0.92);
  box-shadow: 0 2px 8px rgba(59, 157, 221, 0.3);
}

/* Map spot markers */
.spot-marker {
  width: 36px;
  height: 36px;
  background: var(--blue-primary);
  border: 2.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, background 0.15s;
  position: relative;
}

.spot-marker::after {
  content: '🎣';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  font-size: 14px;
  line-height: 1;
}

.spot-marker:hover {
  background: var(--blue-light);
  transform: rotate(-45deg) scale(1.1);
}

.spot-marker.selected {
  background: var(--amber);
  transform: rotate(-45deg) scale(1.15);
}

/* ============================================================
   Bottom Sheet (Spot Detail)
   ============================================================ */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sheet-backdrop.visible {
  opacity: 1;
  pointer-events: all;
}

#spot-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border-top: 1px solid var(--border);
  z-index: 600;
  padding: 12px 20px calc(20px + var(--safe-bottom));
  max-height: 75vh;
  overflow-y: auto;
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
  -webkit-overflow-scrolling: touch;
}

#spot-sheet.open {
  transform: translateY(0);
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sheet-title-group {
  flex: 1;
  min-width: 0;
}

.sheet-title-group h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  line-height: 1.2;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.spot-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.spot-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sheet-catch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.sheet-catch-header h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12px;
}

.spot-catches-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================================
   Badge
   ============================================================ */

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(59, 157, 221, 0.15);
  color: var(--blue-bright);
  border: 1px solid rgba(59, 157, 221, 0.25);
  text-transform: capitalize;
}

.badge-green {
  background: rgba(76, 175, 80, 0.15);
  color: var(--green-light);
  border-color: rgba(76, 175, 80, 0.25);
}

.badge-amber {
  background: rgba(255, 167, 38, 0.15);
  color: var(--amber-light);
  border-color: rgba(255, 167, 38, 0.25);
}

/* ============================================================
   Catch Cards
   ============================================================ */

.catch-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  transition: border-color 0.15s;
}

.catch-card:hover {
  border-color: var(--border);
}

.catch-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.catch-species {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.catch-date {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.catch-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.catch-detail-chip {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-input);
  padding: 4px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.catch-spot-name {
  font-size: 13px;
  color: var(--blue-primary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.catch-weather {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
}

.catch-notes {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
  font-style: italic;
  line-height: 1.4;
}

/* ============================================================
   History View
   ============================================================ */

.filter-bar {
  display: flex;
  gap: 8px;
}

.filter-select {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
}

.filter-select option {
  background: var(--bg-surface);
}

.catch-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 20px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  opacity: 0.4;
  filter: grayscale(0.3);
}

.empty-state p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
}

.loading-placeholder {
  color: var(--text-muted);
  font-size: 14px;
  padding: 20px;
  text-align: center;
}

/* ============================================================
   Insights View
   ============================================================ */

.insights-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 24px;
}

.insights-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.summary-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  border: 1px solid var(--border-light);
}

.summary-card .value {
  font-size: 28px;
  font-weight: 800;
  color: var(--blue-bright);
  line-height: 1;
  margin-bottom: 4px;
}

.summary-card .label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.insight-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border-light);
}

.insight-section h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.insight-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.insight-rank {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.insight-name {
  flex: 1;
  font-size: 15px;
  color: var(--text-primary);
  padding: 0 12px;
}

.insight-count {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-primary);
}

.insight-bar-container {
  flex: 1;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 12px;
}

.insight-bar {
  height: 100%;
  background: var(--blue-primary);
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* Time of day grid */
.time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.time-card {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.time-card .time-icon { font-size: 22px; margin-bottom: 4px; }
.time-card .time-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.time-card .time-count { font-size: 22px; font-weight: 800; color: var(--text-primary); }

/* Season grid */
.season-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.season-card {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.season-card .season-icon { font-size: 20px; }
.season-card .season-info .season-name { font-size: 12px; color: var(--text-secondary); text-transform: capitalize; }
.season-card .season-info .season-count { font-size: 18px; font-weight: 700; color: var(--text-primary); }

/* Trophy fish */
.trophy-card {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border-light);
}

.trophy-card:last-child { margin-bottom: 0; }

.trophy-icon { font-size: 22px; }

.trophy-info .trophy-species {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.trophy-info .trophy-stats {
  font-size: 13px;
  color: var(--text-secondary);
}

.trophy-info .trophy-spot {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   Profile View
   ============================================================ */

.profile-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 24px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-light);
}

.profile-avatar {
  font-size: 44px;
  filter: drop-shadow(0 0 12px rgba(79, 195, 247, 0.3));
  flex-shrink: 0;
}

.profile-email {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.profile-since {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.settings-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px 20px;
  border: 1px solid var(--border-light);
}

.settings-section h3 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 14px;
}

.units-toggle {
  display: flex;
  gap: 8px;
}

.unit-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  transition: all 0.15s;
}

.unit-btn.active {
  background: rgba(59, 157, 221, 0.2);
  border-color: var(--blue-primary);
  color: var(--blue-bright);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-card {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--blue-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
}

/* ============================================================
   Modals
   ============================================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  align-items: flex-end;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.modal-content {
  position: relative;
  width: 100%;
  max-height: 90vh;
  background: var(--bg-modal);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.modal-content-tall {
  max-height: 95vh;
}

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

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

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

.modal-footer {
  display: flex;
  gap: 10px;
  padding: 16px 20px calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

.modal-footer .btn {
  flex: 1;
}

.location-preview {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-light);
}

.weather-auto-note {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(76, 195, 247, 0.08);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(76, 195, 247, 0.2);
  font-size: 13px;
  color: var(--blue-bright);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   Responsive / Landscape
   ============================================================ */

@media (min-width: 600px) {
  #auth-section {
    align-items: center;
    justify-content: center;
  }

  .modal-content {
    max-width: 540px;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    max-height: 80vh;
  }

  #spot-sheet {
    max-width: 540px;
    left: 50%;
    transform: translateX(-50%) translateY(110%);
  }

  #spot-sheet.open {
    transform: translateX(-50%) translateY(0);
  }
}

/* ============================================================
   DAILY FISHING REPORT
   ============================================================ */

.report-toggle-btn {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: rgba(10, 31, 61, 0.92);
  color: white;
  border: 1px solid rgba(249, 115, 22, 0.5);
  border-radius: 100px;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  transition: background 0.2s, border-color 0.2s;
}
.report-toggle-btn:hover {
  background: rgba(249, 115, 22, 0.2);
  border-color: #f97316;
}

.daily-report-card {
  position: absolute;
  top: 50px;
  left: 12px;
  right: 12px;
  z-index: 20;
  background: rgba(10, 31, 61, 0.96);
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  max-height: 70vh;
  overflow-y: auto;
}

.report-header {
  margin-bottom: 14px;
}

.report-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.report-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.report-title {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

.report-date {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}

.report-close {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  flex-shrink: 0;
}

.report-conditions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.condition-pill {
  background: rgba(255,255,255,0.08);
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}

.condition-pill.moon {
  border: 1px solid rgba(255,255,255,0.15);
}

.report-species {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.species-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
}

.species-heat {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.species-info {
  flex: 1;
  min-width: 0;
}

.species-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
}

.species-bait {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
}

.species-count {
  font-size: 0.75rem;
  color: rgba(249,115,22,0.8);
  flex-shrink: 0;
  font-weight: 600;
}

.report-tides {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 12px;
}

.tides-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.tide-row {
  display: flex;
  gap: 12px;
}

.tide-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 6px 12px;
  flex: 1;
}

.tide-type {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}

.tide-time {
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  margin: 2px 0;
}

.tide-height {
  font-size: 0.7rem;
  color: rgba(249,115,22,0.8);
}

.report-no-data {
  text-align: center;
  color: rgba(255,255,255,0.35);
  font-size: 0.85rem;
  padding: 12px 0;
}

/* ============================================================
   MAP FILTERS
   ============================================================ */

.map-filter-btn {
  position: absolute;
  bottom: 80px;
  left: 12px;
  z-index: 10;
  background: rgba(10, 31, 61, 0.92);
  color: white;
  border: 1px solid rgba(249, 115, 22, 0.4);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  position: absolute;
  bottom: 80px;
  left: 12px;
}

.map-filter-btn.active {
  background: rgba(249, 115, 22, 0.9);
  border-color: #f97316;
}

.filter-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #f97316;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-filter-panel {
  position: absolute;
  bottom: 130px;
  left: 12px;
  z-index: 20;
  background: rgba(10, 31, 61, 0.97);
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: 16px;
  padding: 16px;
  width: 300px;
  max-height: 70vh;
  overflow-y: auto;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.filter-panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: white;
}

.filter-panel-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
}

.filter-group {
  margin-bottom: 14px;
}

.filter-label {
  display: block;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  color: rgba(255,255,255,0.65);
  padding: 5px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.filter-chip.active {
  background: rgba(249, 115, 22, 0.2);
  border-color: #f97316;
  color: #f97316;
  font-weight: 600;
}

.filter-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.filter-actions .btn {
  flex: 1;
}

.filter-match-today {
  margin-top: 10px;
}

.btn-match-today {
  width: 100%;
  background: linear-gradient(135deg, rgba(249,115,22,0.15), rgba(249,115,22,0.25));
  border: 1px solid rgba(249,115,22,0.4);
  border-radius: 10px;
  color: #f97316;
  padding: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.2s;
}

.btn-match-today:hover {
  background: rgba(249,115,22,0.35);
}

/* ============================================================
   SYNC STATUS INDICATOR
   ============================================================ */

.sync-indicator {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.sync-indicator.sync-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.sync-indicator.sync-ok {
  background: rgba(76, 175, 80, 0.15);
  color: var(--green-light);
  border: 1px solid rgba(76, 175, 80, 0.3);
}

/* ============================================================
   CATCH PHOTOS
   ============================================================ */

.photo-upload-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.photo-previews {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.photo-preview-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-remove-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.75);
  border-radius: 50%;
  color: white;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  line-height: 1;
}

.catch-photos {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.catch-photo-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--border-light);
  transition: opacity 0.15s;
  display: block;
}

.catch-photo-thumb:hover {
  opacity: 0.85;
}

.pending-badge {
  font-size: 12px;
  vertical-align: middle;
}

.photo-report-placeholder {
  margin-top: 6px;
}

.btn-report-photo {
  font-size: 11px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.btn-report-photo:hover {
  color: var(--text-secondary);
}

/* ============================================================
   PIN CATEGORIES — LAYER TOGGLE
   ============================================================ */

.layer-toggle-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(10, 31, 61, 0.92);
  color: white;
  border: 1px solid rgba(59, 157, 221, 0.4);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  transition: background 0.2s, border-color 0.2s;
}

.layer-toggle-btn:hover {
  background: rgba(59, 157, 221, 0.2);
  border-color: var(--blue-primary);
}

.layer-panel {
  position: absolute;
  top: 58px;
  right: 12px;
  z-index: 20;
  background: rgba(10, 31, 61, 0.97);
  border: 1px solid rgba(59, 157, 221, 0.3);
  border-radius: 12px;
  padding: 14px;
  min-width: 200px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.layer-panel-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.layer-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 0.9rem;
  color: white;
  gap: 12px;
}

.layer-toggle-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.layer-toggle-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--blue-primary);
  flex-shrink: 0;
}

/* Filtered spot popup */
.filter-active-banner {
  background: rgba(249,115,22,0.15);
  border: 1px solid rgba(249,115,22,0.3);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  color: #f97316;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-active-banner a {
  color: rgba(249,115,22,0.7);
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.78rem;
}
