/* =========================================================
   MinkeStinkerne – Felleovervåking
   Dark Nordic Forest / Navy UI inspired by Slides 2–9
   ========================================================= */

:root {
  --bg-deep: #050f19;
  --bg-surface: #0b1927;
  --bg-surface-2: #0f2234;
  --bg-card: rgba(12, 26, 40, 0.94);
  --bg-glass: rgba(8, 20, 32, 0.86);
  --border: rgba(140, 194, 255, 0.15);
  --border-strong: rgba(140, 194, 255, 0.28);

  --text-primary: #f1f6fb;
  --text-secondary: #8ea7c2;
  --text-muted: #5d7894;

  --blue-primary: #1a73e8;
  --blue-bright: #58c4ff;
  --blue-glow: rgba(88, 196, 255, 0.42);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.16);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.16);
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.16);

  --topbar-h: 66px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-lg: 0 22px 54px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.4);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.btn-full { width: 100%; }

/* Custom scrollbars */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(140, 194, 255, 0.2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(140, 194, 255, 0.35); }

/* =========================================================
   AUTH SCREEN (Slide 2)
   ========================================================= */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  background: radial-gradient(circle at 50% 0%, #102a42 0%, #06131f 52%, #030a12 100%);
}

.auth-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(85px);
  opacity: 0.45;
}

.auth-glow-1 {
  width: 460px;
  height: 460px;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, #3bb4ff 0%, transparent 70%);
}

.auth-glow-2 {
  width: 380px;
  height: 380px;
  bottom: -120px;
  right: -80px;
  background: radial-gradient(circle, #18634a 0%, transparent 70%);
}

.auth-leaf-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.09;
  background-image:
    radial-gradient(circle at 12% 22%, #68c6ff 0 2px, transparent 3px),
    radial-gradient(circle at 86% 74%, #4ade80 0 2px, transparent 3px),
    radial-gradient(circle at 75% 18%, #68c6ff 0 1.5px, transparent 2.5px);
  background-size: 160px 160px;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 430px;
  background: rgba(9, 23, 36, 0.9);
  border: 1px solid var(--border-strong);
  border-radius: 26px;
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(31, 134, 230, 0.14);
  backdrop-filter: blur(20px);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
  text-align: center;
}

.auth-logo-ring {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 28px rgba(45, 165, 255, 0.35);
  margin-bottom: 12px;
  background: #07131e;
}

.auth-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.42);
}

.auth-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.auth-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--blue-bright);
  margin-top: 3px;
  font-weight: 600;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(4, 12, 20, 0.7);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 13px;
  margin-bottom: 18px;
}

.auth-tab {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab.active {
  background: linear-gradient(135deg, #1d7ae8, #2fa2f6);
  color: #fff;
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.35);
}

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

.input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.input-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

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

.input-icon {
  position: absolute;
  left: 13px;
  width: 17px;
  height: 17px;
  color: var(--blue-bright);
  opacity: 0.85;
  pointer-events: none;
}

.input-wrapper input,
.compact-form input,
.compact-form select {
  width: 100%;
  background: rgba(6, 16, 26, 0.85);
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper input {
  padding-left: 40px;
}

.input-wrapper input:focus,
.compact-form input:focus,
.compact-form select:focus {
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 3px rgba(88, 196, 255, 0.16);
}

.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px dashed var(--border-strong);
  background: rgba(6, 16, 26, 0.55);
}

.avatar-upload-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--blue-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-bright);
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(29, 122, 232, 0.12);
}

.avatar-upload-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-upload-meta {
  display: flex;
  flex-direction: column;
}

.avatar-upload-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.avatar-upload-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.btn-glow-primary {
  border: none;
  border-radius: 999px;
  padding: 13px 20px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #041322;
  background: linear-gradient(135deg, #74d1ff 0%, #4bb8ff 100%);
  box-shadow: 0 0 26px var(--blue-glow), 0 8px 20px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-glow-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 0 34px rgba(88, 196, 255, 0.6), 0 10px 24px rgba(0, 0, 0, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 11px 18px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
  background: rgba(88, 196, 255, 0.12);
  border-color: var(--blue-bright);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-switch-text {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.link-btn {
  border: none;
  background: none;
  color: var(--blue-bright);
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.link-btn:hover { text-decoration: underline; }
.link-btn.small { font-size: 0.78rem; }

.form-error {
  font-size: 0.82rem;
  color: #fca5a5;
  background: var(--red-soft);
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 8px 12px;
  border-radius: 10px;
}

/* =========================================================
   APP SHELL & TOPBAR (Slide 3 – No Bottom Menu!)
   ========================================================= */
.app-shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-h);
  flex-shrink: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 18px;
  background: rgba(6, 16, 27, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-self: end;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: 14px;
  transition: background 0.2s;
}

.topbar-brand:hover {
  background: rgba(255, 255, 255, 0.05);
}

.topbar-logo-wrap {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 14px rgba(45, 165, 255, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #07131e;
  flex-shrink: 0;
}

.topbar-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.42);
}

.topbar-brand-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.topbar-title {
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.topbar-subtitle {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--blue-bright);
  margin-top: 2px;
}

.icon-pill-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(15, 34, 52, 0.78);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-pill-btn:hover {
  border-color: var(--blue-bright);
  background: rgba(29, 122, 232, 0.2);
  transform: translateY(-1px);
}

.notif-btn.has-unread {
  background: rgba(239, 68, 68, 0.9);
  border-color: rgba(255, 150, 150, 0.45);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.45);
}

.notif-btn.has-unread:hover {
  background: #dc2626;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #fff;
  color: #b91c1c;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.simulate-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(88, 196, 255, 0.35);
  background: rgba(26, 115, 232, 0.16);
  color: #d9f1ff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.simulate-btn:hover {
  background: rgba(26, 115, 232, 0.32);
  border-color: var(--blue-bright);
  box-shadow: 0 0 18px rgba(88, 196, 255, 0.25);
}

.sim-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.profile-avatar-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: linear-gradient(135deg, #16304a, #0e2236);
  color: var(--text-primary);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, transform 0.2s;
}

.profile-avatar-btn:hover {
  border-color: var(--blue-bright);
  transform: translateY(-1px);
}

.profile-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================
   FULL-SCREEN MAP STAGE
   ========================================================= */
.map-stage {
  position: relative;
  flex: 1;
  width: 100%;
  overflow: hidden;
}

.map-canvas {
  width: 100%;
  height: 100%;
  background: #07131e;
}

.map-canvas.map-dark-tiles .leaflet-tile-pane {
  filter: invert(100%) hue-rotate(196deg) brightness(86%) contrast(94%) saturate(72%);
}

/* Leaflet tweaks */
.leaflet-control-attribution {
  background: rgba(6, 16, 27, 0.75) !important;
  color: var(--text-muted) !important;
  font-size: 10px !important;
  border-top-left-radius: 8px;
}

.leaflet-control-attribution a {
  color: var(--text-secondary) !important;
}

/* Floating Map Controls */
.map-floating-pill,
.map-floating-btn,
.map-status-chip,
.layer-switcher,
.map-square-btn {
  z-index: 600;
  background: var(--bg-glass);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
}

.compass-pill {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 16px 8px 10px;
  border-radius: 999px;
}

.compass-arrow-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.55);
  color: #4ade80;
  display: flex;
  align-items: center;
  justify-content: center;
}

#compass-arrow-svg {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.compass-distance {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.1;
}

.compass-bearing {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.map-top-right-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 600;
}

.map-floating-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.2s;
}

.map-floating-btn:hover {
  border-color: var(--blue-bright);
  background: rgba(15, 34, 52, 0.95);
}

.map-chip-btn.active {
  background: rgba(239, 68, 68, 0.24);
  border-color: rgba(239, 68, 68, 0.7);
  color: #fecaca;
}

.map-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot-blue { background: var(--blue-bright); }
.dot-red { background: var(--red); }
.dot-amber { background: var(--amber); }
.chip-sep { color: var(--text-muted); }

.map-bottom-left {
  position: absolute;
  bottom: 22px;
  left: 16px;
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-control-stack {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
}

.map-control-stack .map-square-btn {
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.map-control-stack .map-square-btn:first-child {
  border-bottom: 1px solid var(--border);
}

.map-square-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.map-square-btn:hover {
  background: rgba(26, 115, 232, 0.28);
  border-color: var(--blue-bright);
}

.map-bottom-right {
  position: absolute;
  bottom: 22px;
  right: 16px;
  z-index: 600;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.layer-switcher {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  gap: 3px;
}

.layer-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

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

.pick-location-banner {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(26, 115, 232, 0.94);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
}

.btn-small-ghost {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
  border-radius: 999px;
  padding: 4px 11px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

/* =========================================================
   CUSTOM MAP MARKERS (Mink pins + Reg number + User dot)
   ========================================================= */
.trap-marker-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transform: translate(-50%, -88%);
}

.trap-pin {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  background: linear-gradient(135deg, #2b8ff7, #1359b8);
  border: 2.5px solid #e6f4ff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.trap-marker-wrap:hover .trap-pin,
.trap-marker-wrap.selected .trap-pin {
  transform: rotate(-45deg) scale(1.16);
  box-shadow: 0 0 24px rgba(88, 196, 255, 0.75);
}

.trap-pin-inner {
  transform: rotate(45deg);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b1c2e;
}

.trap-pin-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.42);
}

.trap-marker-wrap.alert .trap-pin {
  background: linear-gradient(135deg, #f87171, #dc2626);
  border-color: #fff;
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.75);
}

.trap-marker-wrap.alert::before {
  content: "";
  position: absolute;
  top: 2px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.45);
  animation: marker-ripple 1.8s infinite;
  pointer-events: none;
}

@keyframes marker-ripple {
  0% { transform: scale(0.95); opacity: 0.85; }
  100% { transform: scale(2.15); opacity: 0; }
}

.trap-marker-wrap.locked .trap-pin {
  background: linear-gradient(135deg, #64748b, #334155);
  border-color: #cbd5e1;
}

.trap-lock-mini {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f59e0b;
  color: #08131f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0,0,0,0.45);
  z-index: 3;
}

.trap-reg-pill {
  margin-top: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(5, 15, 25, 0.9);
  border: 1px solid rgba(140, 194, 255, 0.35);
  color: #eaf4ff;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}

.trap-marker-wrap.alert .trap-reg-pill {
  background: rgba(185, 28, 28, 0.95);
  border-color: #fecaca;
}

.user-dot-marker {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3b82f6;
  border: 3.5px solid #ffffff;
  box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.28), 0 4px 12px rgba(0, 0, 0, 0.5);
}

.direction-arrow-marker {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.65));
}

/* =========================================================
   TRAP DETAIL SHEET (Slide 5 & 6)
   ========================================================= */
.trap-sheet {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(650px, calc(100% - 28px));
  max-height: calc(100vh - 96px);
  z-index: 900;
  display: flex;
  flex-direction: column;
  background: rgba(8, 20, 32, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px);
  animation: sheet-up 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes sheet-up {
  from { opacity: 0; transform: translate(-50%, 26px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.trap-sheet-handle {
  width: 44px;
  height: 4px;
  border-radius: 99px;
  background: rgba(140, 194, 255, 0.25);
  margin: 10px auto 2px;
  flex-shrink: 0;
}

.trap-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 22px 14px;
  border-bottom: 1px solid var(--border);
}

.trap-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.status-dot.red { background: var(--red); box-shadow: 0 0 10px var(--red); }
.status-dot.green { background: var(--green); box-shadow: 0 0 10px var(--green); }
.status-dot.amber { background: var(--amber); box-shadow: 0 0 10px var(--amber); }

.status-label-text {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.status-label-text.red { color: #f87171; }
.status-label-text.green { color: #4ade80; }
.status-label-text.amber { color: #fbbf24; }

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 6px;
}

.trap-sheet-title {
  font-size: 1.48rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.trap-sheet-meta {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.circle-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.circle-close-btn:hover {
  color: #fff;
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.12);
}

.trap-sheet-body {
  padding: 16px 22px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.trap-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.kpi-box {
  background: rgba(15, 31, 47, 0.78);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px 15px;
}

.kpi-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 1.02rem;
  font-weight: 700;
}

.text-red { color: #f87171; }
.text-amber { color: #fbbf24; }
.text-green { color: #4ade80; }
.text-sky { color: var(--blue-bright); }

.battery-bar-track {
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.battery-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--green);
  transition: width 0.35s ease, background 0.35s ease;
}

.trap-note-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.trap-note-text {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.coords-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
}

.coords-chip:hover {
  border-color: var(--blue-bright);
  color: #fff;
}

.trap-action-row {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  gap: 10px;
}

.btn-live-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #1d75e8, #1258c2);
  box-shadow: 0 8px 22px rgba(24, 115, 232, 0.42);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-live-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-outline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(15, 31, 47, 0.65);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline-action:hover {
  border-color: var(--blue-bright);
  background: rgba(26, 115, 232, 0.16);
}

.trap-controls-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.control-row-col {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.control-title {
  font-size: 0.88rem;
  font-weight: 700;
}

.control-desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 27px;
  flex-shrink: 0;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: 0.22s;
}

.slider::before {
  content: "";
  position: absolute;
  height: 19px;
  width: 19px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.22s;
}

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

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

/* Segmented control */
.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  background: rgba(4, 12, 20, 0.75);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 12px;
}

.segmented-control.compact {
  display: inline-grid;
  min-width: 260px;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.18s;
}

.seg-btn.active {
  background: var(--blue-primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(26, 115, 232, 0.35);
}

.seg-btn.active[data-mode="kill"],
.seg-btn.active[data-gmode="kill"] {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.35);
}

/* Species chips */
.species-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.species-chip {
  border: 1px solid var(--border);
  background: rgba(15, 31, 47, 0.7);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s;
}

.species-chip.active {
  background: rgba(88, 196, 255, 0.18);
  border-color: var(--blue-bright);
  color: #e0f5ff;
}

/* =========================================================
   BACKDROP, SIDE DRAWERS & FULL MODALS
   ========================================================= */
.overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(2, 8, 14, 0.68);
  backdrop-filter: blur(5px);
}

.side-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: min(440px, 94vw);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  background: #081522;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.side-drawer-left {
  left: 0;
  border-left: none;
  animation: slide-in-left 0.22s ease;
}

.side-drawer-right {
  right: 0;
  border-right: none;
  animation: slide-in-right 0.22s ease;
}

@keyframes slide-in-left {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes slide-in-right {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-header,
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.drawer-title,
.modal-title {
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.drawer-subtitle,
.modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.drawer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

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

.filter-pill {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
}

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

.text-action-btn {
  border: none;
  background: none;
  color: var(--blue-bright);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.drawer-scroll-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Notification Cards (Slide 4) */
.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 15px;
  border: 1px solid var(--border);
  background: rgba(13, 29, 45, 0.82);
  cursor: pointer;
  transition: all 0.18s;
  text-align: left;
  width: 100%;
  color: inherit;
  font-family: inherit;
}

.notif-item:hover {
  border-color: var(--blue-bright);
  background: rgba(21, 45, 68, 0.92);
  transform: translateY(-1px);
}

.notif-item.unread {
  border-left: 3px solid var(--red);
  background: rgba(239, 68, 68, 0.09);
}

.notif-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-icon-box.catch { background: var(--red-soft); color: #f87171; }
.notif-icon-box.sighting { background: rgba(88, 196, 255, 0.16); color: var(--blue-bright); }
.notif-icon-box.battery { background: var(--amber-soft); color: #fbbf24; }
.notif-icon-box.system { background: var(--green-soft); color: #4ade80; }

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.notif-title {
  font-size: 0.9rem;
  font-weight: 700;
}

.notif-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.notif-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notif-cta {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--blue-bright);
}

/* =========================================================
   FULL MODALS (Slide 8 Statistics & Slide 9 Camera)
   ========================================================= */
.full-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(980px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  background: #07131f;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modal-pop 0.2s ease;
}

@keyframes modal-pop {
  from { opacity: 0; transform: translate(-50%, -47%) scale(0.97); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.modal-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Camera Modal (Slide 9) */
.camera-trap-pills,
.stats-scope-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 22px 6px;
  flex-shrink: 0;
}

.trap-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(13, 29, 45, 0.8);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s;
}

.trap-pill-btn:hover {
  border-color: var(--blue-bright);
  color: #fff;
}

.trap-pill-btn.active {
  background: var(--blue-primary);
  border-color: var(--blue-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.4);
}

.pill-alert-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f87171;
  box-shadow: 0 0 8px #ef4444;
}

.camera-view-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border);
}

.camera-quick-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.btn-small-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--blue-primary);
  color: #fff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-small-primary:hover { filter: brightness(1.1); }

.camera-live-pane {
  padding: 16px 22px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.camera-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 56vh;
  border-radius: 18px;
  overflow: hidden;
  background: #02070c;
  border: 1px solid var(--border-strong);
}

.camera-feed-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.camera-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 3px
  );
}

.cam-badge-live {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.92);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: blink 1.1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.cam-badge-reg {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 11px;
  border-radius: 8px;
  background: rgba(5, 14, 23, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
}

.cam-ai-box {
  position: absolute;
  left: 48%;
  top: 44%;
  width: 34%;
  height: 38%;
  border: 2px solid #ef4444;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), inset 0 0 24px rgba(239, 68, 68, 0.16);
  pointer-events: none;
  transition: all 0.25s ease;
}

.cam-ai-box.ignored {
  border-color: #fbbf24;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), inset 0 0 24px rgba(245, 158, 11, 0.14);
}

.cam-ai-label {
  position: absolute;
  top: -24px;
  left: -2px;
  padding: 2px 8px;
  border-radius: 5px;
  background: #ef4444;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.cam-ai-box.ignored .cam-ai-label {
  background: #f59e0b;
  color: #09131d;
}

.cam-hud-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(to top, rgba(3, 9, 15, 0.88), transparent);
  font-size: 0.74rem;
  color: #d8e7f6;
}

.mono-text {
  font-family: var(--font-mono);
}

.camera-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(13, 29, 45, 0.75);
  border: 1px solid var(--border);
}

.camera-footer-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.camera-footer-info span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.camera-footer-btns {
  display: flex;
  gap: 8px;
}

/* Stills gallery */
.camera-stills-pane {
  padding: 16px 22px 22px;
  overflow-y: auto;
}

.stills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.still-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(13, 29, 45, 0.85);
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s;
}

.still-card:hover {
  transform: translateY(-2px);
  border-color: var(--blue-bright);
}

.still-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.still-card-body {
  padding: 10px 12px;
}

.still-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.still-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

.still-tag.mink { background: var(--red-soft); color: #fca5a5; }
.still-tag.other { background: var(--amber-soft); color: #fcd34d; }
.still-tag.empty { background: rgba(148, 163, 184, 0.16); color: #cbd5e1; }

.still-time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

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

/* =========================================================
   STATISTICS MODAL (Slide 8)
   ========================================================= */
.stats-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-card {
  background: rgba(12, 26, 40, 0.9);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 20px;
}

.stat-card-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--text-secondary);
}

.stat-card-num {
  font-size: 2.15rem;
  font-weight: 800;
  margin: 10px 0 4px;
  line-height: 1;
}

.stat-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.chart-card {
  background: rgba(12, 26, 40, 0.9);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 20px;
}

.chart-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.chart-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #d6e4f2;
}

.chart-legend {
  display: flex;
  gap: 14px;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  margin-right: 5px;
}
.legend-dot.red { background: #e53935; }
.legend-dot.sky { background: #7eb8f7; }

.bar-chart-wrap {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  height: 204px;
}

.chart-yaxis {
  height: 176px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
  line-height: 1;
}

.chart-bars-grid {
  position: relative;
  height: 176px;
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 7px;
  align-items: end;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background-image: linear-gradient(to bottom, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 100% 44px;
}

.bar-col {
  position: relative;
  height: 176px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.bar-stack {
  width: 100%;
  max-width: 34px;
  display: flex;
  flex-direction: column-reverse;
  border-radius: 6px 6px 2px 2px;
  overflow: hidden;
  transition: transform 0.15s;
}

.bar-col:hover .bar-stack {
  transform: scaleY(1.04);
  transform-origin: bottom;
}

.bar-seg-mink {
  background: linear-gradient(180deg, #ef4444, #d63031);
}

.bar-seg-other {
  background: linear-gradient(180deg, #93c5fd, #6aaaf7);
}

.bar-date {
  position: absolute;
  bottom: -22px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.stats-lower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hotspot-list,
.species-stat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hotspot-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hotspot-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.83rem;
}

.hotspot-bar-bg {
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.hotspot-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #3b82f6, #ef4444);
}

/* =========================================================
   SETTINGS, MANUAL & PROFILE DRAWERS (Slide 7)
   ========================================================= */
.drawer-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 12px 20px 0;
  flex-shrink: 0;
}

.drawer-tab {
  border: 1px solid var(--border);
  background: rgba(13, 29, 45, 0.65);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 9px 6px;
  border-radius: 11px;
  cursor: pointer;
}

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

.settings-card {
  background: rgba(13, 29, 45, 0.82);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.settings-card-title {
  font-size: 0.94rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.settings-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.btn-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

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

.compact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-primary-sm {
  border: none;
  border-radius: 11px;
  padding: 10px 14px;
  background: var(--blue-primary);
  color: #fff;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.18s;
}

.btn-primary-sm:hover { filter: brightness(1.1); }

.btn-outline-sm {
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-outline-sm:hover {
  border-color: var(--blue-bright);
  background: rgba(88, 196, 255, 0.12);
}

.btn-danger-outline {
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: 11px;
  padding: 10px 12px;
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.24);
}

.btn-success-outline {
  border: 1px solid rgba(34, 197, 94, 0.5);
  border-radius: 11px;
  padding: 10px 12px;
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-success-outline:hover {
  background: rgba(34, 197, 94, 0.24);
}

.traps-manage-list,
.shared-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.manage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(6, 16, 26, 0.72);
  border: 1px solid var(--border);
}

.manage-row-info strong {
  display: block;
  font-size: 0.86rem;
}

.manage-row-info span {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.manage-row-actions {
  display: flex;
  gap: 6px;
}

.mini-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 5px 9px;
  font-family: inherit;
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
}

.mini-btn:hover { border-color: var(--blue-bright); }
.mini-btn.danger:hover { border-color: var(--red); color: #fca5a5; }

/* Manual */
.manual-section {
  background: rgba(13, 29, 45, 0.78);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.manual-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--blue-bright);
  background: rgba(88, 196, 255, 0.14);
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.manual-section h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.manual-section p,
.manual-section li {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.manual-section p + p { margin-top: 8px; }
.manual-section ul { margin: 8px 0 0 18px; display: flex; flex-direction: column; gap: 5px; }

.manual-tip {
  margin-top: 10px !important;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fde68a !important;
}

/* Profile Hero */
.profile-hero-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(13, 29, 45, 0.82);
  border: 1px solid var(--border);
}

.profile-big-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--blue-bright);
  background: linear-gradient(135deg, #1b4368, #0f253c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}

.profile-big-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-hero-info h3 {
  font-size: 1.05rem;
}

.profile-hero-info p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 2px 0 5px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(2, 6, 11, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 12px;
}

.lightbox img {
  max-width: min(960px, 92vw);
  max-height: 78vh;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
}

.lightbox-caption {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Toasts */
.toast-container {
  position: fixed;
  top: calc(var(--topbar-h) + 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1600;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(420px, calc(100vw - 28px));
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(10, 24, 38, 0.96);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  font-size: 0.86rem;
  animation: toast-in 0.22s ease;
}

.toast.alert {
  border-color: rgba(239, 68, 68, 0.75);
  background: rgba(58, 12, 18, 0.96);
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.6);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   RESPONSIVE (Mobile & Small Screens)
   ========================================================= */
@media (max-width: 720px) {
  .topbar {
    padding: 0 10px;
    height: 60px;
  }

  .topbar-brand-text {
    display: none;
  }

  .sim-label {
    display: none;
  }

  .simulate-btn {
    width: 38px;
    padding: 0;
    justify-content: center;
  }

  .trap-sheet {
    bottom: 0;
    width: 100%;
    border-radius: 22px 22px 0 0;
    max-height: 82vh;
  }

  .trap-action-row {
    grid-template-columns: 1fr 1fr;
  }

  .btn-live-primary {
    grid-column: 1 / -1;
  }

  .stats-kpi-row {
    grid-template-columns: 1fr;
  }

  .stats-lower-grid {
    grid-template-columns: 1fr;
  }

  .compass-pill {
    top: 10px;
    left: 10px;
    padding: 6px 12px 6px 8px;
  }

  .map-top-right-controls {
    top: 10px;
    right: 10px;
  }

  .map-bottom-right {
    bottom: 14px;
    right: 10px;
  }

  .map-bottom-left {
    bottom: 14px;
    left: 10px;
  }

  .full-modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
}
