/* ====================================================================
   Fly Fishing Trials - Responsive Modern Riverbank Theme
   ==================================================================== */

:root {
  --bg-primary: #0f172a;
  --bg-card: #1e293b;
  --bg-subtle: #334155;
  --bg-elevated: #283548;
  
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.2);

  --accent-gold: #f59e0b;
  --accent-blue: #38bdf8;
  --danger: #ef4444;
  --warning: #f97316;
  --info: #0ea5e9;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border: #334155;
  --border-light: #475569;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
  
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Alert Banner */
.alert-banner {
  background: linear-gradient(90deg, #b91c1c, #dc2626);
  color: #fff;
  padding: 0.75rem 1rem;
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.banner-icon {
  font-size: 1.2rem;
}

.banner-btn {
  background: #fff;
  color: #b91c1c;
  border: none;
  padding: 0.35rem 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: transform 0.15s ease;
}

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

/* App Header */
.app-header {
  background: linear-gradient(180deg, #1e293b 0%, #16202f 100%);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-badge {
  font-size: 2.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.logo-area h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.sub-meta {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.meta-tag {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
}

.tag-accent {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tag-format {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.tag-ateam {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.ateam-checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem;
  max-height: 280px;
  overflow-y: auto;
  padding: 0.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.ateam-check-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.65rem;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.ateam-check-item:hover {
  border-color: var(--border-light);
}

.ateam-check-item.selected {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.5);
}

.ateam-check-item input[type="checkbox"] {
  accent-color: var(--accent-gold);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.ateam-badge-mini {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.35);
  margin-left: auto;
}

.clash-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Tabs Navigation */
.tabs-nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.tabs-container {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-btn:hover {
  background: var(--bg-subtle);
  color: #fff;
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.tab-highlight {
  border: 1px dashed var(--accent-gold);
}

.badge-count {
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

/* Main Content */
.main-content {
  padding-top: 1.75rem;
  padding-bottom: 3.5rem;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.stats-overview {
  display: flex;
  gap: 1rem;
}

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

.stat-value {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  padding: 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th, 
.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.9rem;
}

.rank-1 { background: #eab308; color: #000; box-shadow: 0 0 10px rgba(234, 179, 8, 0.5); }
.rank-2 { background: #94a3b8; color: #000; }
.rank-3 { background: #b45309; color: #fff; }
.rank-other { background: var(--bg-subtle); color: var(--text-muted); }

.score-highlight {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}

.fish-count {
  font-family: var(--font-mono);
  font-weight: 600;
}

.blank-pill {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Rule Card */
.rule-card {
  background: var(--bg-subtle);
  border-left: 4px solid var(--primary);
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 0.8rem;
}

.rule-item {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.rule-item strong {
  display: block;
  color: #fff;
  margin-bottom: 0.2rem;
}

/* Schedule / Sessions Matrix */
.session-filter-buttons {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
}

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

.schedule-sessions-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.session-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.session-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.session-header-row h3 {
  font-size: 1.2rem;
  color: #fff;
}

.session-time-pill {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.matches-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.match-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.match-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-light);
}

.match-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.beat-tag {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.match-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-pending { background: #334155; color: #94a3b8; }
.status-partial { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }
.status-confirmed { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.status-discrepancy { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); animation: pulse 1.5s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.competitors-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.competitor-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
}

.competitor-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.competitor-result {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: flex;
  gap: 0.5rem;
}

.fish-pill {
  color: #e2e8f0;
}

.pts-pill {
  color: var(--primary);
  font-weight: 700;
}

.three-way-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-top: 0.5rem;
}

.match-quick-action {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

/* Submit Form */
.form-wrapper {
  max-width: 650px;
  margin: 0 auto;
}

.form-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.form-badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-main);
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.form-hint {
  display: block;
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-top: 0.35rem;
}

.match-info-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.match-info-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 700;
}

.match-info-status {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.catch-inputs-container {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.catch-fields-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.catch-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  gap: 1rem;
}

.catch-field-label {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.angler-is-you {
  background: var(--primary);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
}

.catch-field-input {
  width: 90px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.4rem;
}

.submission-alert {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-top: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

.submission-alert.success {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid var(--primary);
  color: #a7f3d0;
}

.submission-alert.info {
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid var(--info);
  color: #bae6fd;
}

.submission-alert.danger {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid var(--danger);
  color: #fecaca;
}

/* Admin Discrepancy Cards */
.discrepancy-card {
  background: var(--bg-primary);
  border: 1px solid var(--danger);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.discrepancy-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.discrepancy-reports {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.report-box {
  background: var(--bg-card);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.report-author {
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.report-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 0.15rem 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--bg-subtle);
  color: #fff;
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
}

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

.btn-outline:hover {
  background: var(--bg-subtle);
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: #fff;
}

.qr-box {
  background: #fff;
  padding: 1rem;
  border-radius: var(--radius-md);
  display: inline-block;
  margin: 1rem auto;
}

.copy-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

/* Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.monospace { font-family: var(--font-mono); }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-3 { margin-bottom: 0.75rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .grid-2-col {
    grid-template-columns: 1fr;
  }
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* ========================================================
   TOP 4-SESSION VISUAL PIN TRACKER BAR
   ======================================================== */
.top-tracker-bar {
  background: linear-gradient(90deg, #09131f 0%, #0d2137 50%, #0f172a 100%);
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  padding: 0.65rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 100;
}

.tracker-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.tracker-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 280px;
}

.tracker-title {
  font-size: 0.88rem;
  color: #38bdf8;
  white-space: nowrap;
}

.tracker-select {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  width: 100%;
  max-width: 360px;
  cursor: pointer;
}

.tracker-select:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.session-pills-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.sess-pill {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  letter-spacing: 0.02em;
}

.pill-s1 {
  background: rgba(234, 179, 8, 0.18);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.5);
}

.pill-s2 {
  background: rgba(249, 115, 22, 0.18);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.5);
}

.pill-s3 {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.pill-s4 {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.5);
}

.btn-map-jump {
  background: #0284c7;
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-map-jump:hover {
  background: #0369a1;
  transform: translateY(-1px);
}

.btn-outline-beats {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-outline-beats:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* ========================================================
   INTERACTIVE MAP & LAYER SWITCHER
   ======================================================== */
.map-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.map-layer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.layer-bar-label {
  font-size: 0.88rem;
  color: #cbd5e1;
}

.layer-buttons-group {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.layer-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.layer-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #fff;
}

.layer-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  border-color: #38bdf8;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

.stream-map-container {
  width: 100%;
  height: 560px;
  background: #0f172a;
}

/* Map Legend */
.map-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

.legend-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.legend-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-right: 0.2rem;
}

.legend-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #cbd5e1;
}

.river-sample {
  width: 16px;
  height: 4px;
  border-radius: 2px;
  display: inline-block;
}

.sample-sb {
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
}

.sample-yp {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.trail-sample {
  width: 16px;
  height: 2px;
  border-top: 2px dashed #f59e0b;
  display: inline-block;
}

/* Leaflet Custom Pin Markers */
.custom-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.custom-pin:hover {
  transform: scale(1.15);
  z-index: 9999 !important;
}

.pin-s1 {
  background: #eab308;
  border: 2.5px solid #fff;
  color: #000;
}

.pin-s2 {
  background: #f97316;
  border: 2.5px solid #fff;
  color: #fff;
}

.pin-s3 {
  background: #10b981;
  border: 2.5px solid #fff;
  color: #fff;
}

.pin-s4 {
  background: #3b82f6;
  border: 2.5px solid #fff;
  color: #fff;
}

.pin-beat-point {
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid #38bdf8;
  color: #38bdf8;
  font-size: 11px;
}

/* Leaflet Popups */
.leaflet-popup-content-wrapper {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
  padding: 0 !important;
}

.leaflet-popup-tip {
  background: #0f172a !important;
}

.map-popup-card {
  padding: 0.9rem;
  max-width: 280px;
}

.popup-session-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.4rem;
}

.map-popup-card h4 {
  margin: 0 0 0.35rem 0;
  font-size: 1.05rem;
  color: #fff;
}

.popup-river-tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.popup-river-sb {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.popup-river-yp {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.popup-detail {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0.25rem 0;
  line-height: 1.35;
}

.popup-detail strong {
  color: #e2e8f0;
}

.popup-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #38bdf8;
  text-decoration: none;
}

.popup-nav-link:hover {
  text-decoration: underline;
}

/* ========================================================
   ANGLER 4-SESSION ITINERARY CARDS
   ======================================================== */
.itinerary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.itinerary-title-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.itinerary-avatar {
  font-size: 1.8rem;
  background: rgba(56, 189, 248, 0.15);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.itinerary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.itinerary-card {
  background: rgba(30, 41, 59, 0.6);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.itinerary-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
}

.itinerary-card.card-s1 { border-top: 4px solid #eab308; }
.itinerary-card.card-s2 { border-top: 4px solid #f97316; }
.itinerary-card.card-s3 { border-top: 4px solid #10b981; }
.itinerary-card.card-s4 { border-top: 4px solid #3b82f6; }

.itinerary-beat-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0.35rem 0;
}

.itinerary-status-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.tag-stay {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.tag-move {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

/* Modal Large for Beats Manager */
.modal-large {
  max-width: 1100px;
}

.beats-table-wrapper {
  max-height: 60vh;
  overflow-y: auto;
}

.input-coord {
  width: 130px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.3rem 0.5rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  color: #fff;
  border-radius: var(--radius-sm);
}

.river-select {
  font-size: 0.82rem;
  padding: 0.3rem 0.5rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  color: #fff;
  border-radius: var(--radius-sm);
}
