/* ==========================================================================
   Landkönnuðir - Þverun Íslands 496,58 km
   Hönnunarkerfi: Fágað, fullorðinslegt útivistar- og leiðangursviðmót
   ========================================================================== */

:root {
  --slate-950: #090d16;
  --slate-900: #0f172a;
  --slate-850: #141e33;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --white:     #ffffff;

  --accent-amber: #d97706;
  --accent-amber-light: #f59e0b;
  --accent-amber-bg: #fffbeb;

  --accent-pine: #059669;
  --accent-pine-light: #10b981;
  --accent-pine-bg: #ecfdf5;

  --accent-blue: #0284c7;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-elevated: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Grunnstillingar */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--slate-100);
  color: var(--slate-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Header & Aðalvalmynd
   ========================================================================== */
.app-header {
  background-color: var(--slate-900);
  color: var(--white);
  border-bottom: 1px solid var(--slate-800);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-badge {
  width: 40px;
  height: 40px;
  background-color: var(--slate-800);
  color: var(--accent-amber-light);
  border: 1px solid var(--slate-700);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-meta {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-400);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
}

.brand-distance {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-amber-light);
  background-color: rgba(217, 119, 6, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
}

/* Liðsheildarstikla í Header */
.team-summary-banner {
  display: flex;
  align-items: center;
  background: var(--slate-850);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-800);
  gap: 1rem;
}

.summary-metric {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.metric-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-400);
  font-weight: 600;
}

.metric-val {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.metric-val.highlight {
  color: var(--accent-amber-light);
}

.summary-divider {
  width: 1px;
  height: 20px;
  background-color: var(--slate-700);
}

/* Aðalvalstika (Tabs) */
.main-nav {
  background-color: var(--slate-950);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-container::-webkit-scrollbar {
  display: none;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--slate-400);
  padding: 0.8rem 1.15rem;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.nav-svg {
  opacity: 0.75;
  transition: opacity var(--transition);
}

.nav-btn:hover {
  color: var(--white);
}

.nav-btn:hover .nav-svg {
  opacity: 1;
}

.nav-btn.active {
  color: var(--white);
  border-bottom-color: var(--accent-amber-light);
}

.nav-btn.active .nav-svg {
  opacity: 1;
  stroke: var(--accent-amber-light);
}

/* ==========================================================================
   Aðalsvæði & Flipastjórnun
   ========================================================================== */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tab-panel {
  display: none;
  flex: 1;
}

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

.content-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 2.25rem 1.5rem;
}

.max-w-lg {
  max-width: 680px;
}

/* ==========================================================================
   Kortasýn (Flipi 1)
   ========================================================================== */
.map-view-wrapper {
  display: flex;
  height: calc(100vh - 116px);
  min-height: 580px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.map-sidebar {
  width: 380px;
  background-color: var(--white);
  border-right: 1px solid var(--slate-200);
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  z-index: 10;
}

.map-container-area {
  flex: 1;
  position: relative;
  background-color: #2b3a4a;
}

.map-element {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  transition: opacity 250ms ease;
}

.map-element.opacity-0 {
  opacity: 0;
  pointer-events: none;
}

.pointer-events-none {
  pointer-events: none !important;
}

/* 2-Way Engine Mode Switcher (MapLibre 3D vs 2D Leaflet) */
.map-engine-switch {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  padding: 3px;
  border: 1px solid var(--slate-700);
  gap: 3px;
}

.engine-btn {
  background: none;
  border: none;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate-300);
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition);
}

.engine-btn:hover {
  color: var(--white);
}

.engine-btn.active {
  background-color: var(--slate-800);
  color: var(--accent-amber-light);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* MapLibre 3D Floating HUD (Exaggeration, Spin, Pitch, Focus) */
.maplibre-hud-panel {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  padding: 9px 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-700);
  color: var(--white);
  box-shadow: var(--shadow-elevated);
  min-width: 180px;
  transition: opacity 250ms ease;
}

.hud-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hud-label {
  font-size: 0.70rem;
  font-weight: 700;
  color: var(--slate-300);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hud-value {
  font-size: 0.80rem;
  font-weight: 800;
  color: var(--accent-amber-light);
  font-family: monospace;
}

.hud-slider {
  width: 100%;
  accent-color: var(--accent-amber);
  cursor: pointer;
  height: 4px;
}

.hud-btn-row {
  display: flex;
  align-items: center;
  gap: 5px;
  border-top: 1px solid var(--slate-800);
  padding-top: 6px;
  flex-wrap: wrap;
}

.hud-btn {
  background: var(--slate-800);
  border: 1px solid var(--slate-700);
  color: var(--slate-300);
  padding: 4px 7px;
  font-size: 0.70rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition);
}

.hud-btn:hover {
  background: var(--slate-700);
  color: var(--white);
}

.hud-btn.active {
  background: var(--accent-amber);
  color: var(--slate-950);
  border-color: var(--accent-amber-light);
}

.hud-btn.highlight {
  color: var(--accent-amber-light);
  border-color: rgba(245, 158, 11, 0.4);
}

.legend-3d-hint {
  color: var(--slate-400);
  font-size: 0.72rem;
  font-style: italic;
  border-left: 1px solid var(--slate-700);
  padding-left: 12px;
}

/* 3D Stýringar Leiðbeiningar í HUD */
.hud-control-info {
  border-top: 1px solid var(--slate-800);
  padding-top: 6px;
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-info-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-amber-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.control-info-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.control-info-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.69rem;
  line-height: 1.25;
}

.control-action {
  color: var(--slate-400);
  font-weight: 500;
}

.control-effect {
  color: var(--slate-200);
  font-weight: 600;
  text-align: right;
}

/* MapLibre 3D Custom Markers */
.maplibre-checkpoint-marker {
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.maplibre-checkpoint-marker:hover {
  transform: translate(-50%, -50%) scale(1.18);
  z-index: 50;
}

.maplibre-checkpoint-pin {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbbf24;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 10px rgba(245, 158, 11, 0.4);
}

.maplibre-checkpoint-pin.passed {
  background: #064e3b;
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 10px rgba(16, 185, 129, 0.4);
}

.maplibre-checkpoint-pin.destination {
  background: #7f1d1d;
  border-color: #ef4444;
  color: #f87171;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 12px rgba(239, 68, 68, 0.6);
}

.maplibre-checkpoint-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 4px;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  border: 1px solid rgba(51, 65, 85, 0.7);
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.maplibre-hiker-marker {
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.maplibre-hiker-pulse {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f59e0b;
  border: 3px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-weight: 800;
  font-size: 12px;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6), 0 0 16px rgba(245, 158, 11, 0.8);
  animation: pulseHiker 2s infinite ease-in-out;
}

@keyframes pulseHiker {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(245, 158, 11, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* MapLibre GL UI elements override */
.maplibregl-popup-content {
  background: rgba(15, 23, 42, 0.96) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(51, 65, 85, 0.8) !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6) !important;
  padding: 12px 14px !important;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif !important;
}

.maplibregl-popup-tip {
  border-top-color: rgba(15, 23, 42, 0.96) !important;
  border-bottom-color: rgba(15, 23, 42, 0.96) !important;
}

.maplibregl-popup-close-button {
  color: #94a3b8 !important;
  font-size: 16px !important;
  padding: 4px 8px !important;
}

.maplibregl-ctrl-group {
  background: rgba(15, 23, 42, 0.92) !important;
  border: 1px solid var(--slate-700) !important;
  border-radius: var(--radius-sm) !important;
}

.maplibregl-ctrl-group button {
  border-bottom: 1px solid var(--slate-800) !important;
}

.maplibregl-ctrl-icon {
  filter: invert(1) hue-rotate(180deg) brightness(1.5) !important;
}

/* Stýringar efst til hægri á korti */
.map-floating-panel {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 500;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100% - 28px);
}

.map-view-filter {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  padding: 3px;
  border: 1px solid var(--slate-700);
  gap: 4px;
}

.map-filter-btn {
  background: none;
  border: none;
  padding: 5px 11px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate-300);
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition);
}

.map-filter-btn:hover {
  color: var(--white);
}

.map-filter-btn.active {
  background-color: var(--slate-800);
  color: var(--accent-amber-light);
}

.map-filter-select {
  background-color: var(--slate-900);
  border: 1px solid var(--slate-700);
  color: var(--white);
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  outline: none;
}

.map-filter-select:focus {
  border-color: var(--accent-amber-light);
}

/* Virkur upplýsingagluggi á korti */
.map-active-inspector {
  position: absolute;
  top: 64px;
  right: 14px;
  z-index: 490;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--slate-700);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  color: var(--white);
  max-width: 360px;
  box-shadow: var(--shadow-elevated);
  transition: all var(--transition);
}

.inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.inspector-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--accent-amber-light);
}

.inspector-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inspector-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--slate-800);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.inspector-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
}

.inspector-metrics {
  font-size: 0.82rem;
  color: var(--slate-300);
  margin: 4px 0;
  font-variant-numeric: tabular-nums;
}

.inspector-progress-track {
  width: 100%;
  height: 6px;
  background: var(--slate-800);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 6px 0;
}

.inspector-progress-fill {
  height: 100%;
  background: var(--accent-amber-light);
  border-radius: var(--radius-full);
  transition: width 350ms ease;
}

.inspector-subtext {
  font-size: 0.76rem;
  color: var(--slate-400);
  margin-top: 4px;
}

.inspector-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.inspector-btn {
  background: var(--slate-800);
  border: 1px solid var(--slate-700);
  color: var(--slate-200);
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.inspector-btn:hover {
  background: var(--slate-700);
  color: var(--white);
}

.inspector-btn.primary {
  background: var(--accent-amber);
  border-color: transparent;
  color: var(--white);
}

.inspector-btn.primary:hover {
  background: #b45309;
}

.map-mode-selector {
  display: flex;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  padding: 3px;
  border: 1px solid var(--slate-700);
}

.map-mode-btn {
  background: none;
  border: none;
  padding: 5px 11px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate-300);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition);
}

.map-mode-btn:hover {
  color: var(--white);
}

.map-mode-btn.active {
  background-color: var(--slate-800);
  color: var(--accent-amber-light);
}

.map-action-btns {
  display: flex;
  gap: 6px;
}

.map-tool-btn {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--slate-700);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate-200);
  cursor: pointer;
  transition: all var(--transition);
}

.map-tool-btn:hover {
  background-color: var(--slate-800);
  color: var(--white);
}

/* Skýringalisti neðst á korti */
.map-legend-bar {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 500;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-700);
  display: flex;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--slate-300);
  align-items: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-color-line.gold {
  width: 20px;
  height: 3px;
  background: #f59e0b;
  border-radius: 2px;
}

.legend-color-line.faded-route {
  width: 20px;
  height: 3px;
  background: rgba(245, 158, 11, 0.35);
  border: 1px dashed rgba(245, 158, 11, 0.7);
  border-radius: 2px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.marker-scout {
  background: #38bdf8;
  border: 1.5px solid #ffffff;
}

.legend-dot.marker-checkpoint {
  background: #f59e0b;
  border: 1.5px solid #ffffff;
}

/* ==========================================================================
   Spjöld (Cards) & Íhlutir
   ========================================================================== */
.sidebar-card, .card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  padding: 1.25rem;
  box-shadow: var(--shadow-subtle);
}

.team-hero-card {
  background-color: var(--slate-50);
  border: 1px solid var(--slate-200);
}

.card-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-amber);
  margin-bottom: 0.35rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.3;
}

.hero-desc {
  font-size: 0.82rem;
  color: var(--slate-600);
  margin-top: 0.35rem;
  line-height: 1.5;
}

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

.card-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate-900);
}

.card-note {
  font-size: 0.76rem;
  color: var(--slate-500);
  margin-bottom: 0.75rem;
}

/* Framvindustika */
.progress-box {
  margin: 1rem 0;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--slate-600);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  width: 100%;
  height: 8px;
  background-color: var(--slate-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--accent-amber);
  border-radius: var(--radius-full);
  transition: width 400ms ease;
}

.quick-stats-row {
  display: flex;
  gap: 0.75rem;
  margin: 0.85rem 0;
}

.mini-stat {
  flex: 1;
  background: var(--white);
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
}

.stat-number {
  display: block;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate-900);
  font-variant-numeric: tabular-nums;
}

.stat-sub {
  font-size: 0.68rem;
  color: var(--slate-500);
}

.card-action-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* Félagalisti á hliðarstiku */
.scouts-quick-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.scout-quick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  background-color: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition);
}

.scout-quick-item:hover {
  background-color: var(--white);
  border-color: var(--slate-400);
}

.scout-quick-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.scout-avatar-sm {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background-color: var(--slate-800);
  color: var(--white);
  flex-shrink: 0;
}

.scout-quick-name {
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--slate-900);
}

.scout-quick-km {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--slate-900);
  font-variant-numeric: tabular-nums;
}

/* Kennileitalisti */
.checkpoints-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.checkpoint-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-xs);
  background-color: var(--slate-50);
  font-size: 0.78rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
}

.checkpoint-item:hover {
  background-color: var(--white);
  border-color: var(--slate-300);
}

.checkpoint-index {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--slate-400);
  width: 18px;
}

.checkpoint-name {
  font-weight: 500;
  color: var(--slate-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.checkpoint-km {
  font-weight: 700;
  color: var(--accent-amber);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Hnappar & Viðmót
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-primary {
  background-color: var(--slate-900);
  color: var(--white);
}

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

.btn-outline {
  background-color: var(--white);
  color: var(--slate-700);
  border-color: var(--slate-300);
}

.btn-outline:hover {
  background-color: var(--slate-50);
  border-color: var(--slate-400);
  color: var(--slate-900);
}

.btn-danger {
  background-color: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

.btn-danger:hover {
  background-color: #ffe4e6;
}

.btn-cheer {
  background-color: var(--accent-amber);
  color: var(--white);
}

.btn-cheer:hover {
  background-color: #b45309;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
}

.btn-xs {
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
}

.btn-block {
  width: 100%;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent-amber);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

.badge {
  display: inline-block;
  padding: 2px 7px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  background-color: var(--slate-100);
  color: var(--slate-600);
}

.badge-accent {
  background-color: var(--accent-amber-bg);
  color: var(--accent-amber);
  border: 1px solid rgba(217, 119, 6, 0.2);
}

/* ==========================================================================
   Eyðublöð (Form)
   ========================================================================== */
.form-card {
  padding: 2rem;
}

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

.form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--slate-800);
  margin-bottom: 0.4rem;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--slate-900);
  background-color: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--slate-800);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.1);
}

.km-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.km-input {
  font-size: 1.35rem;
  font-weight: 700;
  padding-right: 3.5rem;
  color: var(--slate-900);
  font-variant-numeric: tabular-nums;
}

.km-suffix {
  position: absolute;
  right: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--slate-400);
  pointer-events: none;
}

.quick-km-chips {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.chip-btn {
  background-color: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xs);
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  transition: all var(--transition);
  font-variant-numeric: tabular-nums;
}

.chip-btn:hover {
  background-color: var(--slate-200);
  color: var(--slate-900);
}

/* Útivistarval */
.activity-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 0.45rem;
}

.activity-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.35rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  background-color: var(--white);
}

.activity-option input[type="radio"] {
  display: none;
}

.act-svg {
  color: var(--slate-500);
  margin-bottom: 4px;
  transition: color var(--transition);
}

.act-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-600);
}

.activity-option:hover {
  border-color: var(--slate-400);
  background-color: var(--slate-50);
}

.activity-option.active {
  border-color: var(--slate-900);
  background-color: var(--slate-50);
}

.activity-option.active .act-svg {
  color: var(--slate-900);
}

.activity-option.active .act-text {
  color: var(--slate-900);
}

/* ==========================================================================
   Framvindutafla (Flipi 3)
   ========================================================================== */
.team-banner-card {
  background-color: var(--slate-900);
  border-radius: var(--radius-xl);
  color: var(--white);
  padding: 2.25rem;
  box-shadow: var(--shadow-card);
}

.team-badge-pill {
  display: inline-block;
  background-color: var(--slate-800);
  border: 1px solid var(--slate-700);
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-300);
  margin-bottom: 0.75rem;
}

.team-big-heading {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.25;
}

.team-subtext {
  font-size: 0.92rem;
  color: var(--slate-300);
  margin-top: 0.45rem;
  max-width: 640px;
  line-height: 1.5;
}

.team-progress-wrapper {
  margin-top: 1.5rem;
}

.team-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.team-km-status {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.team-km-pct {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--accent-amber-light);
  font-variant-numeric: tabular-nums;
}

.team-progress-bar-container {
  width: 100%;
  height: 12px;
  background-color: var(--slate-800);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.team-progress-bar-fill {
  height: 100%;
  background-color: var(--accent-amber);
  border-radius: var(--radius-full);
  transition: width 500ms ease;
}

.team-milestone-quote {
  font-style: italic;
  font-size: 0.84rem;
  color: var(--slate-400);
  margin-top: 0.85rem;
}

/* Framvindulisti */
.leaderboard-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.leaderboard-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.lb-card {
  background-color: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  transition: border-color var(--transition);
  cursor: pointer;
}

.lb-card:hover {
  border-color: var(--slate-400);
}

.lb-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.lb-rank {
  font-size: 0.85rem;
  font-weight: 700;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  background-color: var(--slate-100);
  color: var(--slate-600);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.lb-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  background-color: var(--slate-800);
  color: var(--white);
  flex-shrink: 0;
}

.lb-details {
  flex: 1;
}

.lb-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.lb-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate-900);
}

.lb-badge-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  background-color: var(--slate-100);
  color: var(--slate-600);
}

.lb-location-text {
  font-size: 0.78rem;
  color: var(--slate-500);
  margin-top: 2px;
}

.lb-progress-bar {
  width: 100%;
  height: 5px;
  background-color: var(--slate-100);
  border-radius: var(--radius-full);
  margin-top: 6px;
  overflow: hidden;
}

.lb-progress-fill {
  height: 100%;
  background-color: var(--slate-700);
  border-radius: var(--radius-full);
}

.lb-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  flex-shrink: 0;
}

.lb-km {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-900);
  font-variant-numeric: tabular-nums;
}

.lb-pct {
  font-size: 0.75rem;
  color: var(--slate-500);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Einkasíða félaga (Flipi 4)
   ========================================================================== */
.profile-selector-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  background-color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  flex-wrap: wrap;
}

.select-inline {
  width: auto;
  min-width: 220px;
}

.profile-hero-card {
  background-color: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.profile-hero-main {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex: 1;
}

.profile-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background-color: var(--slate-900);
  color: var(--white);
  border: 2px solid var(--slate-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-details {
  flex: 1;
}

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

.profile-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--slate-900);
}

.scout-group-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  background-color: var(--slate-100);
  color: var(--slate-600);
}

.profile-subtitle {
  font-size: 0.85rem;
  color: var(--slate-500);
  margin-top: 2px;
}

.profile-metrics-row {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}

.prof-metric {
  display: flex;
  flex-direction: column;
}

.prof-metric-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-900);
  font-variant-numeric: tabular-nums;
}

.prof-metric-lbl {
  font-size: 0.68rem;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-cheer-cta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

/* Tveggja dálka prófíl */
.profile-two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .profile-two-column {
    grid-template-columns: 1fr;
  }
}

.current-location-box {
  background-color: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}

.location-headline {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--slate-900);
  margin-bottom: 2px;
}

.location-desc {
  font-size: 0.8rem;
  color: var(--slate-600);
  line-height: 1.45;
}

.location-next {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-amber);
  margin-top: 6px;
}

/* Áfangamerki */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.badge-card {
  background-color: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.5rem;
  text-align: center;
  transition: all var(--transition);
}

.badge-card.earned {
  background-color: var(--white);
  border-color: var(--accent-amber);
}

.badge-card.locked {
  opacity: 0.4;
}

.badge-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px auto;
  color: var(--slate-600);
}

.badge-card.earned .badge-icon-wrap {
  background: var(--accent-amber-bg);
  color: var(--accent-amber);
}

.badge-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate-800);
}

.badge-req {
  font-size: 0.68rem;
  color: var(--slate-500);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* Göngusaga tafla */
.profile-history-table-wrapper {
  overflow-x: auto;
  margin-top: 0.75rem;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.history-table th {
  text-align: left;
  padding: 0.45rem 0.65rem;
  font-weight: 600;
  color: var(--slate-500);
  border-bottom: 1px solid var(--slate-200);
}

.history-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-700);
}

.history-km {
  font-weight: 700;
  color: var(--slate-900);
  font-variant-numeric: tabular-nums;
}

.cheers-wall {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 0.75rem;
}

.cheer-item {
  background-color: var(--slate-50);
  border-left: 2px solid var(--accent-amber);
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
}

.cheer-author {
  font-weight: 700;
  color: var(--slate-900);
}

.cheer-msg {
  color: var(--slate-600);
  margin-top: 2px;
}

/* ==========================================================================
   Prufugögn & Umsýsla (Flipi 5)
   ========================================================================== */
.demo-buttons-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.file-input-label {
  cursor: pointer;
}

.reference-map-preview {
  margin-top: 0.75rem;
}

.img-responsive {
  max-width: 100%;
  height: auto;
  display: block;
}

.rounded {
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-300);
}

/* ==========================================================================
   Kortamerki (Leaflet Custom Markers)
   ========================================================================== */
.leaflet-scout-marker {
  background: none;
  border: none;
}

.scout-pin-bubble {
  position: relative;
  width: 32px;
  height: 32px;
  background-color: var(--slate-900);
  color: var(--white);
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: -0.02em;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.scout-pin-bubble:hover {
  transform: scale(1.15);
  z-index: 1000;
}

.scout-pin-bubble.active-scout {
  transform: scale(1.22);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.7), 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 1001;
}

.scout-pin-bubble.dimmed {
  opacity: 0.45;
}

.team-pin-bubble {
  position: relative;
  background-color: var(--slate-950);
  color: var(--accent-amber-light);
  border: 2px solid var(--accent-amber-light);
  border-radius: var(--radius-full);
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  animation: pulseTeamPin 2.5s infinite;
}

@keyframes pulseTeamPin {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.scout-pin-label {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(15, 23, 42, 0.95);
  color: #ffffff;
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.checkpoint-pin-bubble {
  width: 18px;
  height: 18px;
  background-color: var(--accent-amber);
  border: 2px solid #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.finish-pin-bubble {
  background-color: var(--slate-900);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--slate-600);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Modals & Toast
   ========================================================================== */
.app-dialog {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: 480px;
  width: 90%;
  margin: auto;
  box-shadow: var(--shadow-modal);
  background-color: var(--white);
}

.app-dialog-lg {
  max-width: 780px;
}

.app-dialog::backdrop {
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.dialog-content {
  padding: 1.5rem;
}

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

.dialog-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-900);
}

.dialog-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--slate-400);
  cursor: pointer;
  line-height: 1;
}

.dialog-close:hover {
  color: var(--slate-800);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toast {
  background-color: var(--slate-900);
  color: var(--white);
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  box-shadow: var(--shadow-elevated);
  border-left: 3px solid var(--accent-amber);
}

.toast.success {
  border-left-color: var(--accent-pine);
}

/* Hjálparstílar */
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.text-center { text-align: center; }
.text-muted { color: var(--slate-500); }
.text-sm { font-size: 0.8rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-gold { color: var(--accent-amber); }

/* Farsímalagfæringar */
@media (max-width: 860px) {
  .map-view-wrapper {
    flex-direction: column;
    height: auto;
  }
  .map-sidebar {
    width: 100%;
    height: 380px;
    border-right: none;
    border-bottom: 1px solid var(--slate-200);
  }
  .map-element {
    height: 460px;
  }
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .team-summary-banner {
    width: 100%;
    justify-content: space-between;
  }
}
