/* ============================================================
   My Next Lifer — Design System
   Josefin Sans: brand/chrome elements only
   Inter: all content, species data, eBird output
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@400;600&family=Inter:ital,wght@0,300;0,400;0,500;1,300&display=swap');

/* ------------------------------------------------------------
   CSS Custom Properties — Light mode (default)
   Dark mode activates via .dk class on #app
   ------------------------------------------------------------ */

:root, .lt {
  --bg:       #FCFAF7;   /* main canvas / page background      */
  --sf:       #FFFFFF;   /* sidebar, cards, panels             */
  --ac:       #2D5A27;   /* primary accent — Forest Green      */
  --rare:     #E76F51;   /* rare species ONLY — Terracotta     */
  --rare-bg:  #FDF1EE;   /* rare tag background                */
  --sg:       #C8D5C8;   /* borders, inactive toggles          */
  --al:       #EEF4ED;   /* active pill bg, lifer tag bg       */
  --t1:       #1A1A1A;   /* primary text                       */
  --t2:       #4A6645;   /* secondary text, labels             */
  --t3:       #8AAA85;   /* tertiary text, timestamps, hints   */
  --bd:       rgba(45, 90, 39, 0.13);  /* default border color */
  --bd-hover: rgba(45, 90, 39, 0.25);  /* hover border         */
  --shadow:   none;                    /* no shadows per design */
  --map-bg:   #e8ede6;
  --map-ln:   #d0d9cd;
}

.dk {
  --bg:       #0E1A0D;
  --sf:       #14231A;
  --ac:       #4A9E42;
  --rare:     #E8805E;
  --rare-bg:  rgba(232, 128, 94, 0.12);
  --sg:       #3A5438;
  --al:       rgba(74, 158, 66, 0.15);
  --t1:       #D4E8CF;
  --t2:       #6BA464;
  --t3:       #4A7045;
  --bd:       rgba(100, 180, 90, 0.18);
  --bd-hover: rgba(100, 180, 90, 0.32);
  --shadow:   none;
  --map-bg:   #0a1209;
  --map-ln:   #1a2e18;
}


/* ------------------------------------------------------------
   Reset & Base
   ------------------------------------------------------------ */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--t1);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--ac);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

img {
  max-width: 100%;
  display: block;
}

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

/* Josefin Sans: brand/chrome only */
.brand, nav, .nav-item, .section-label, .btn,
.filter-pill, .tag, .topbar-title {
  font-family: 'Josefin Sans', sans-serif;
}


/* ------------------------------------------------------------
   Layout — App Shell
   ------------------------------------------------------------ */

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top navigation bar */
.topbar {
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: 52px;
  background: var(--sf);
  border-bottom: 0.5px solid var(--bd);
  flex-shrink: 0;
  gap: 12px;
  position: relative;
  z-index: 1001;  /* must beat Leaflet map stacking context */
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.topbar-logo img,
.topbar-logo svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.topbar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ac);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-stat {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--t3);
  letter-spacing: 0.04em;
}

/* User avatar — ::after pseudo-element cannot be touched by JS */
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--al);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  /* Hide any text JS might set */
  font-size: 0 !important;
  color: transparent !important;
  line-height: 0;
  overflow: hidden;
}
.avatar::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 15px;
  transform: translate(-50%, -50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232D5A27' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%2F%3E%3Ccircle cx='12' cy='7' r='4'%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Two-panel main area */
.main-panels {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.panel-list {
  width: 40%;
  min-width: 300px;
  max-width: 480px;
  border-right: 0.5px solid var(--bd);
  display: flex;
  flex-direction: column;
  background: var(--sf);
  overflow: hidden;
}

.panel-map {
  flex: 1;
  position: relative;
  background: var(--map-bg);
  overflow: hidden;
}


/* ------------------------------------------------------------
   Search & Filters
   ------------------------------------------------------------ */

.search-area {
  padding: 12px 14px;
  border-bottom: 0.5px solid var(--bd);
  background: var(--sf);
}

.search-input-wrap {
  position: relative;
  margin-bottom: 10px;
}

.search-input-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  color: var(--t3);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 7px 10px 7px 29px;
  background: var(--bg);
  border: 0.5px solid var(--bd);
  border-radius: 20px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: var(--t1);
  transition: border-color 0.15s;
}

.search-input:focus {
  outline: none;
  border-color: var(--ac);
}

.search-input::placeholder {
  color: var(--t3);
}

/* Filter rows */
.filter-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
}

.filter-row:last-child {
  margin-bottom: 0;
}

.filter-label {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  color: var(--t3);
  min-width: 46px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Pill buttons (radius, date) */
.filter-pill {
  padding: 3px 10px;
  border: 0.5px solid var(--bd);
  border-radius: 20px;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
  background: var(--sf);
  color: var(--t2);
  white-space: nowrap;
  transition: all 0.12s;
  user-select: none;
}

.filter-pill:hover {
  border-color: var(--bd-hover);
  color: var(--t1);
}

.filter-pill.active {
  background: var(--al);
  color: var(--ac);
  border-color: var(--ac);
}

.filter-api-note {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--t3);
  padding-left: 50px;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

/* Toggle row (lifers, rare) */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.toggle-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.toggle-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--t2);
  letter-spacing: 0.02em;
}

.toggle-setup-link {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--ac);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  letter-spacing: 0.02em;
}

/* Toggle switch */
.toggle-switch {
  width: 32px;
  height: 18px;
  border-radius: 9px;
  background: var(--sg);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
  border: none;
  padding: 0;
}

.toggle-switch.on {
  background: var(--ac);
}

.toggle-switch.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.toggle-knob {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left 0.15s;
  pointer-events: none;
}

.toggle-switch.on .toggle-knob {
  left: 16px;
}

/* Sort dropdown */
.sort-select {
  margin-left: auto;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.03em;
  border: 0.5px solid var(--bd);
  border-radius: 10px;
  padding: 3px 8px;
  background: var(--sf);
  color: var(--t2);
  cursor: pointer;
}

.sort-select:focus {
  outline: none;
  border-color: var(--ac);
}


/* ------------------------------------------------------------
   Results Bar
   ------------------------------------------------------------ */

.results-bar {
  padding: 7px 14px;
  border-bottom: 0.5px solid var(--bd);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--sf);
}

.results-count {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--t2);
  letter-spacing: 0.04em;
}

.results-count strong {
  font-weight: 500;
  color: var(--t1);
}

.ebird-attr {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  color: var(--t3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.ebird-attr:hover {
  color: var(--ac);
  text-decoration: none;
}


/* ------------------------------------------------------------
   Species List
   ------------------------------------------------------------ */

.species-list {
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
}

.species-list::-webkit-scrollbar {
  width: 4px;
}
.species-list::-webkit-scrollbar-track {
  background: transparent;
}
.species-list::-webkit-scrollbar-thumb {
  background: var(--sg);
  border-radius: 2px;
}

.species-row {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--bd);
  cursor: pointer;
  align-items: center;
  background: var(--sf);
  transition: background 0.1s;
}

.species-row:hover {
  background: var(--al);
}

.species-row.active {
  background: var(--al);
  border-left: 2px solid var(--ac);
  padding-left: 12px;
}

.species-row.rare-species {
  background: var(--sf);
}

.species-row.rare-species:hover {
  background: var(--rare-bg);
}

/* Thumbnail */
.species-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--al);
}

.species-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.species-thumb-svg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Species data — Inter throughout */
.species-info {
  flex: 1;
  min-width: 0;
}

.species-common-name {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--t1);
  margin-bottom: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.species-common-name a {
  color: var(--t1);
  text-decoration: none;
}
.species-common-name a:hover {
  color: var(--ac);
}

.species-sci-name {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 300;
  font-style: italic;
  color: var(--t3);
  margin-bottom: 2px;
  letter-spacing: 0.01em;
}

.species-hotspot {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: var(--t2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.species-tags {
  display: flex;
  gap: 3px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.tag {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 10px;
  display: inline-block;
}

.tag-rare {
  background: var(--rare-bg);
  color: var(--rare);
}

.tag-lifer {
  background: var(--al);
  color: var(--ac);
}

.species-timestamp {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: var(--t3);
  white-space: nowrap;
  align-self: flex-start;
  padding-top: 2px;
  margin-left: 6px;
  letter-spacing: 0.01em;
}

/* Empty / loading states */
.list-empty {
  padding: 40px 20px;
  text-align: center;
}

.list-empty-icon {
  margin: 0 auto 12px;
  color: var(--sg);
}

.list-empty-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--t2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.list-empty-desc {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: var(--t3);
  line-height: 1.6;
}

.list-more {
  padding: 12px 14px;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--t3);
  letter-spacing: 0.03em;
}


/* ------------------------------------------------------------
   Export Button
   ------------------------------------------------------------ */

.export-bar {
  padding: 10px 14px;
  border-top: 0.5px solid var(--bd);
  background: var(--sf);
}

.btn-export {
  width: 100%;
  padding: 9px;
  background: var(--ac);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-export:hover {
  opacity: 0.88;
}

.btn-export:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}


/* ------------------------------------------------------------
   Buttons (general)
   ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 20px;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
  text-decoration: none;
  white-space: nowrap;
  border: none;
}

.btn-primary {
  background: var(--ac);
  color: #fff;
  padding: 9px 22px;
  font-size: 11px;
}

.btn-primary:hover {
  opacity: 0.88;
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--ac);
  border: 0.5px solid var(--ac);
  padding: 8px 20px;
  font-size: 11px;
}

.btn-outline:hover {
  background: var(--al);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--t2);
  border: 0.5px solid var(--bd);
  padding: 8px 18px;
  font-size: 11px;
}

.btn-ghost:hover {
  border-color: var(--bd-hover);
  color: var(--t1);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-full {
  width: 100%;
}

.btn-lg {
  padding: 11px 28px;
  font-size: 12px;
}


/* ------------------------------------------------------------
   Forms
   ------------------------------------------------------------ */

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

.form-label {
  display: block;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--t2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 9px 14px;
  background: var(--bg);
  border: 0.5px solid var(--bd);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--t1);
  transition: border-color 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: var(--ac);
}

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

.form-input.error {
  border-color: var(--rare);
}

.form-hint {
  margin-top: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: var(--t3);
  line-height: 1.5;
}

.form-error {
  margin-top: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: var(--rare);
  line-height: 1.5;
}

.form-divider {
  height: 0.5px;
  background: var(--bd);
  margin: 24px 0;
}


/* ------------------------------------------------------------
   Cards
   ------------------------------------------------------------ */

.card {
  background: var(--sf);
  border: 0.5px solid var(--bd);
  border-radius: 12px;
  padding: 20px 22px;
}

.card-sm {
  border-radius: 8px;
  padding: 12px 14px;
}


/* ------------------------------------------------------------
   Notices & Alerts
   ------------------------------------------------------------ */

.notice {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px 13px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
}

.notice svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.notice-warning {
  background: #fffbf5;
  border: 0.5px solid #e8c97a;
  color: #7a5a10;
}

.notice-info {
  background: var(--al);
  border: 0.5px solid var(--bd);
  color: var(--t2);
}


/* ------------------------------------------------------------
   Step Indicators (Life List page)
   ------------------------------------------------------------ */

.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: flex;
  gap: 14px;
  padding-bottom: 22px;
  position: relative;
}

.step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 26px;
  bottom: 0;
  width: 0.5px;
  background: var(--bd);
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ac);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.step-num.done {
  background: var(--al);
  color: var(--ac);
  font-size: 14px;
}

.step-content {
  flex: 1;
  padding-top: 2px;
}

.step-title {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--t1);
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}

.step-title.muted {
  color: var(--t3);
}

.step-desc {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: var(--t2);
  line-height: 1.65;
}


/* ------------------------------------------------------------
   Dropzone (CSV upload)
   ------------------------------------------------------------ */

.dropzone {
  border: 1.5px dashed var(--sg);
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--sf);
  margin-top: 10px;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--ac);
  background: var(--al);
}

.dropzone-icon {
  color: var(--t3);
  margin: 0 auto 10px;
}

.dropzone-title {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--t2);
  margin-bottom: 3px;
}

.dropzone-title strong {
  font-weight: 500;
  color: var(--t1);
}

.dropzone-sub {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: var(--t3);
}

.dropzone.success {
  border-color: var(--ac);
  background: var(--al);
  border-style: solid;
}

.dropzone-success-title {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--ac);
  margin-bottom: 3px;
}


/* ------------------------------------------------------------
   Map attribution + legend
   ------------------------------------------------------------ */

.map-attribution {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.75);
  padding: 2px 6px;
  border-radius: 3px;
  color: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  pointer-events: none;
}

.map-legend {
  position: absolute;
  bottom: 6px;
  left: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--t3);
  z-index: 1000;
  pointer-events: none;
}

.map-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.8);
  flex-shrink: 0;
}

/* Leaflet map pin overrides */
.leaflet-marker-pin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ac);
  border: 2.5px solid rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.1s;
}

.leaflet-marker-pin.rare {
  background: var(--rare);
}

.leaflet-marker-pin:hover,
.leaflet-marker-pin.selected {
  transform: scale(1.2);
}


/* ------------------------------------------------------------
   Mobile bottom drawer
   ------------------------------------------------------------ */

.mobile-drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--sf);
  border-radius: 16px 16px 0 0;
  border-top: 0.5px solid var(--bd);
  overflow: hidden;
  transition: height 0.25s ease;
  z-index: 500;
}

.drawer-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--sg);
  margin: 10px auto 6px;
  cursor: pointer;
}

.drawer-header {
  padding: 2px 16px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--t1);
}

.drawer-toggle {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  color: var(--ac);
  cursor: pointer;
  letter-spacing: 0.04em;
  background: none;
  border: none;
  padding: 0;
}


/* ------------------------------------------------------------
   Auth page layout
   ------------------------------------------------------------ */

.auth-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px 60px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--sf);
  border: 0.5px solid var(--bd);
  border-radius: 14px;
  overflow: hidden;
}

.auth-header {
  padding: 28px 28px 22px;
  border-bottom: 0.5px solid var(--bd);
  text-align: center;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}

.auth-app-name {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ac);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: var(--t3);
  letter-spacing: 0.03em;
}

.auth-body {
  padding: 24px 28px;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 22px;
  border-bottom: 0.5px solid var(--bd);
}

.auth-tab {
  flex: 1;
  padding: 8px 12px;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--t3);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: -0.5px;
}

.auth-tab.active {
  color: var(--ac);
  border-bottom-color: var(--ac);
}

.auth-footer {
  padding: 16px 28px;
  border-top: 0.5px solid var(--bd);
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: var(--t3);
  line-height: 1.6;
}


/* ------------------------------------------------------------
   API Key onboarding card (signup step 2)
   ------------------------------------------------------------ */

.api-key-card {
  background: var(--al);
  border: 0.5px solid var(--ac);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.api-key-card-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--ac);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.api-key-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.api-key-step {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.api-key-step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ac);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}

.api-key-step-text {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: var(--t2);
  line-height: 1.55;
  padding-top: 1px;
}

.api-key-step-text strong {
  font-weight: 500;
  color: var(--t1);
}

.api-key-step-text code {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  background: var(--sf);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--ac);
}


/* ------------------------------------------------------------
   Page headers (Life List, etc.)
   ------------------------------------------------------------ */

.page-header {
  margin-bottom: 28px;
}

.page-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--ac);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.page-desc {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: var(--t2);
  line-height: 1.65;
}


/* ------------------------------------------------------------
   Utility classes
   ------------------------------------------------------------ */

.text-muted  { color: var(--t3); }
.text-accent { color: var(--ac); }
.text-rare   { color: var(--rare); }
.text-center { text-align: center; }
.text-right  { text-align: right; }

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.hidden { display: none !important; }

.ebird-data {
  font-family: 'Inter', sans-serif;
}

/* Loading spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--sg);
  border-top-color: var(--ac);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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


/* ------------------------------------------------------------
   Responsive — Mobile
   ------------------------------------------------------------ */

@media (max-width: 680px) {
  .panel-list {
    display: none;
  }

  .panel-map {
    width: 100%;
  }

  /* Mobile: search bar floats above the map */
  .mobile-search-bar {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 500;
    background: var(--sf);
    border-radius: 20px;
    border: 0.5px solid var(--bd);
    padding: 7px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-filter-pills {
    position: absolute;
    top: 54px;
    left: 10px;
    right: 10px;
    z-index: 500;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .mobile-filter-pills::-webkit-scrollbar {
    display: none;
  }

  .auth-page {
    padding: 20px 16px 40px;
    align-items: flex-start;
  }

  .auth-body {
    padding: 20px 18px;
  }

  .auth-header {
    padding: 22px 18px 18px;
  }
}

@media (min-width: 681px) {
  .mobile-search-bar,
  .mobile-filter-pills,
  .mobile-drawer {
    display: none;
  }
}
