/* ============================================================
   styles.css — Adventure Journal Design System
   Dark theme with orange (#ff6b35) accent
   ============================================================ */

/* ── Reset & custom properties ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0a0a0a;
  --bg-2:        #111111;
  --bg-card:     #161616;
  --bg-card-2:   #1e1e1e;
  --border:      #272727;
  --border-2:    #333333;
  --accent:      #ff6b35;
  --accent-dim:  rgba(255, 107, 53, 0.15);
  --accent-2:    #ff8c5a;
  --strava:      #FC4C02;
  --strava-dim:  rgba(252, 76, 2, 0.15);
  --green:       #4caf82;
  --text:        #f0f0f0;
  --text-2:      #a0a0a0;
  --text-3:      #6b6b6b;
  --red:         #e05c5c;
  --shadow:      0 4px 24px rgba(0,0,0,0.5);
  --radius:      10px;
  --radius-sm:   6px;
  --font:        system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:   'SF Mono', 'Fira Code', monospace;
  --transition:  0.18s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

img { max-width: 100%; }

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1.5rem;
  height: 60px;
  background: rgba(10,10,10,0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  white-space: nowrap;
}
.nav__brand a { color: var(--text); }
.nav__logo { font-size: 1.4rem; }
.nav__logo-img { width: 32px; height: 32px; object-fit: contain; display: block; }

.nav__links {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
}

.nav__link {
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav__link:hover, .nav__link--active { color: var(--text); }

.strava-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-3);
  display: inline-block;
  transition: background var(--transition);
}
.strava-dot--connected { background: var(--green); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  white-space: nowrap;
}

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

.btn--ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border-2);
}
.btn--ghost:hover { color: var(--text); border-color: var(--text-3); background: var(--bg-card-2); }

.btn--danger {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}
.btn--danger:hover { background: rgba(224,92,92,0.15); }

.btn--strava {
  background: var(--strava);
  color: #fff;
  border-color: var(--strava);
}
.btn--strava:hover { opacity: 0.9; }

.btn--sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn--lg { padding: 0.7rem 1.5rem; font-size: 1rem; }
.btn--full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-group { display: flex; gap: 0.5rem; }

/* ── Hero / Stats Banner ─────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, #111 0%, #1a0f08 60%, #0a0a0a 100%);
  border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}

.hero__mascot {
  display: block;
  margin: 0 auto 1.5rem;
  width: clamp(160px, 30vw, 280px);
  height: auto;
}

.hero__title {
  font-family: var(--font);
  font-size: clamp(2.4rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.hero__title span { color: var(--accent); }

.hero__sub {
  color: var(--text-2);
  margin: 0.5rem 0 2rem;
  font-size: 1.05rem;
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  max-width: 700px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.stat-item {
  flex: 1;
  min-width: 120px;
  padding: 1rem;
  border-right: 1px solid var(--border);
  text-align: center;
}
.stat-item:last-child { border-right: none; }

.stat-item__val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
  line-height: 1.1;
}
.stat-item__lbl {
  font-size: 0.75rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 0.2rem;
}

/* ── Main layout ─────────────────────────────────────────────── */
.page { max-width: 860px; margin: 0 auto; padding: 2rem 1.5rem; }
.page--wide { max-width: 1100px; }

/* ── Entry list ──────────────────────────────────────────────── */
.entry-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.entry-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  display: block;
  color: var(--text);
}
.entry-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--text);
}

.entry-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.entry-card__date {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.entry-card__loc {
  font-size: 0.8rem;
  color: var(--text-3);
}
.entry-card__loc::before { content: '📍 '; }

.entry-card__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.entry-card__preview {
  font-size: 0.875rem;
  color: var(--text-2);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.entry-card__footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.chip--strava { background: var(--strava-dim); border-color: var(--strava); color: #fff; }
.chip--accent { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* ── Entry detail view ───────────────────────────────────────── */
.entry-detail { max-width: 800px; margin: 0 auto; padding: 2rem 1.5rem; }

.entry-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-2);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  transition: color var(--transition);
}
.entry-detail__back:hover { color: var(--text); }

.entry-detail__date {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.entry-detail__loc { color: var(--text-2); margin-bottom: 0.75rem; font-size: 0.95rem; }

.entry-detail__title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 2rem;
}

/* ── Section headers ─────────────────────────────────────────── */
.section {
  margin-bottom: 2.5rem;
}

.section__title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── Events timeline ─────────────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.45rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding: 0.75rem 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.6rem;
  top: 1.15rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-item__time {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-mono);
  margin-bottom: 0.15rem;
}

.timeline-item__desc {
  color: var(--text-2);
  font-size: 0.95rem;
}

/* ── Strava activity cards ───────────────────────────────────── */
.strava-cards { display: grid; gap: 1rem; }

.strava-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  border-left: 3px solid var(--strava);
  overflow: hidden;
}
.strava-card:hover { border-color: var(--strava); box-shadow: 0 0 0 1px var(--strava-dim); }

.strava-card__header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.strava-card__icon { font-size: 1.5rem; flex-shrink: 0; }

.strava-card__name {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.15rem;
  color: var(--text);
}
.strava-card__name:hover { color: var(--accent); }

.strava-card__date { font-size: 0.8rem; color: var(--text-2); }

.strava-card__badge {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--strava);
  color: #fff;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}
.strava-card__badge:hover { opacity: 0.85; }

/* Route map — bleeds to card edges, sits between header and stats */
.strava-card__map {
  height: 190px;
  margin: 0 -1.25rem 1rem;
  background: var(--bg-card-2);
}

.strava-card__stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.strava-stat { text-align: left; }
.strava-stat__val { display: block; font-size: 1.4rem; font-weight: 800; line-height: 1.1; }
.strava-stat__lbl { font-size: 0.68rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.07em; margin-top: 0.15rem; }

/* ── Video / Audio sections ──────────────────────────────────── */
.video-grid { display: grid; gap: 1.25rem; }

.video-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.video-item__embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
}
.video-item__embed iframe,
.video-item__embed video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
  object-fit: contain;
}

.video-item__title {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--text-2);
  border-top: 1px solid var(--border);
}

.audio-list { display: flex; flex-direction: column; gap: 0.75rem; }

.audio-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.audio-item__label { font-size: 0.875rem; color: var(--text-2); flex-shrink: 0; }
.audio-item audio { flex: 1; height: 36px; }

/* ── Photo grid (public view) ────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.photo-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: block;
  transition: border-color var(--transition), transform var(--transition);
}
.photo-item:hover { border-color: var(--border-2); transform: translateY(-2px); }

.photo-item__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.photo-item__caption {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-2);
}

/* ── Photo editor grid (admin) ───────────────────────────────── */
.photo-upload-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  color: var(--text-3);
  font-size: 0.875rem;
  transition: all var(--transition);
  user-select: none;
}
.photo-upload-zone:hover,
.photo-upload-zone--drag {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--text);
}

.photo-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}

.photo-editor-item {
  position: relative;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.photo-editor-item__img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}

.photo-editor-item__caption {
  padding: 0.4rem 0.5rem;
}

.photo-editor-item__remove {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  background: rgba(0,0,0,0.75);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.photo-editor-item__remove:hover { background: var(--red); }

/* ── Description ─────────────────────────────────────────────── */
.entry-description {
  color: var(--text-2);
  line-height: 1.8;
  font-size: 1rem;
}

/* ── Empty state ─────────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-3);
}
.empty__icon { font-size: 3rem; margin-bottom: 1rem; }
.empty h2 { color: var(--text-2); margin-bottom: 0.5rem; }
.empty p  { font-size: 0.9rem; margin-bottom: 1.5rem; }

/* ── Loading spinner ─────────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Login page ──────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(ellipse at 50% 0%, #1a0f08 0%, var(--bg) 70%);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}

.login-card__icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.login-card__title { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.3rem; }
.login-card__sub { color: var(--text-2); font-size: 0.9rem; margin-bottom: 2rem; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--bg-card-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
  transition: border-color var(--transition);
  appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-3); }

.form-textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2.5rem; }

.form-error {
  color: var(--red);
  font-size: 0.8rem;
  margin-top: 0.75rem;
}

.form-hint { color: var(--text-3); font-size: 0.8rem; margin-top: 0.3rem; }

/* ── Admin layout ────────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.admin-sidebar__section {
  padding: 0 1rem 1rem;
  margin-bottom: 0.5rem;
}
.admin-sidebar__title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 0.5rem;
  padding: 0 0.5rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.sidebar-link:hover { color: var(--text); background: var(--bg-card); }
.sidebar-link--active { color: var(--accent); background: var(--accent-dim); }

.admin-main { padding: 2rem; overflow-x: hidden; }

/* ── Admin entry table ───────────────────────────────────────── */
.admin-entry-list { display: flex; flex-direction: column; gap: 0.75rem; }

.admin-entry-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-entry-item__info { flex: 1; min-width: 0; }
.admin-entry-item__title { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.2rem; }
.admin-entry-item__meta { font-size: 0.8rem; color: var(--text-2); }
.admin-entry-item__actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

.badge { display: inline-block; font-size: 0.7rem; padding: 0.1rem 0.5rem; border-radius: 20px; font-weight: 600; }
.badge--published { background: rgba(76,175,130,0.2); color: var(--green); }
.badge--draft     { background: var(--bg-card-2); color: var(--text-3); border: 1px solid var(--border); }

/* ── Editor ──────────────────────────────────────────────────── */
.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.editor-header h2 { font-size: 1.4rem; font-weight: 800; }

.editor-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.editor-section__title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Events editor ───────────────────────────────────────────── */
.event-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.event-row .form-input { margin: 0; }

/* ── Media editor rows ───────────────────────────────────────── */
.media-item-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.media-item-row__icon { font-size: 1.2rem; flex-shrink: 0; }
.media-item-row__label { flex: 1; font-size: 0.875rem; color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-item-row__actions { display: flex; gap: 0.4rem; flex-shrink: 0; }

/* ── Recording indicator ─────────────────────────────────────── */
.recording-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(224,92,92,0.1);
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-2);
}

.recording-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

/* ── Strava settings ─────────────────────────────────────────── */
.strava-settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.strava-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}

.strava-status__dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--text-3);
  flex-shrink: 0;
}
.strava-status__dot--connected { background: var(--green); box-shadow: 0 0 6px var(--green); }

.strava-status__text { font-size: 0.9rem; color: var(--text-2); flex: 1; }
.strava-status__text strong { color: var(--text); }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  backdrop-filter: blur(4px);
  padding: 1rem;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  width: 100%;
  max-width: 580px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal__title { font-weight: 700; font-size: 1.05rem; }
.modal__close { background: none; border: none; color: var(--text-2); font-size: 1.4rem; cursor: pointer; padding: 0.25rem; line-height: 1; }
.modal__close:hover { color: var(--text); }

.modal__body { padding: 1.25rem 1.5rem; overflow-y: auto; flex: 1; }
.modal__footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 0.75rem; flex-shrink: 0; }

/* ── Activity select list (in modal) ─────────────────────────── */
.activity-select-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-card-2);
}
.activity-select-item:hover { border-color: var(--border-2); }
.activity-select-item--selected { border-color: var(--accent); background: var(--accent-dim); }

.activity-select-item__icon { font-size: 1.4rem; flex-shrink: 0; }
.activity-select-item__info { flex: 1; min-width: 0; }
.activity-select-item__name { font-weight: 600; font-size: 0.9rem; }
.activity-select-item__meta { font-size: 0.78rem; color: var(--text-2); }
.activity-select-item__check { font-size: 1.1rem; color: var(--accent); flex-shrink: 0; }

/* ── Toast ───────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 1000;
  transition: transform 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--shadow);
}
.toast--show { transform: translateX(-50%) translateY(0); }
.toast--info    { background: var(--bg-card-2); border: 1px solid var(--border-2); color: var(--text); }
.toast--success { background: rgba(76,175,130,0.9); color: #fff; }
.toast--error   { background: rgba(224,92,92,0.9); color: #fff; }

/* ── Utility classes ─────────────────────────────────────────── */
.hidden { display: none !important; }
.flex { display: flex; }
.flex--center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-muted { color: var(--text-2); }
.text-sm { font-size: 0.875rem; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .event-row { grid-template-columns: 80px 1fr auto; }
  .strava-card__stats { gap: 1.25rem; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .photo-editor-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .stats-row { gap: 0; }
  .stat-item { min-width: 90px; }
  .nav__links { gap: 0.75rem; }
  .entry-detail, .page { padding: 1.5rem 1rem; }
}

@media (max-width: 480px) {
  .event-row { grid-template-columns: 1fr auto; }
  .event-row .form-input:first-child { display: none; }
  .hero { padding: 2rem 1rem 1.5rem; }
  .stats-row { flex-wrap: wrap; }
  .stat-item { min-width: 45%; }
}
