@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

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

:root {
  --bg: #0a0a0a;
  --bg2: #111111;
  --bg3: #1a1a1a;
  --border: #2a2a2a;
  --accent: #f97316;
  --accent2: #fb923c;
  --green: #22c55e;
  --text: #ffffff;
  --text2: #a1a1aa;
  --text3: #52525b;
  --radius: 12px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; touch-action: manipulation; }
input, textarea, select { font-family: inherit; outline: none; }

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.5px; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { font-size: 0.9rem; color: var(--text2); transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-user {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--border); color: var(--text2);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.nav-user:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.nav-user svg { display: block; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: 8px;
  font-size: 0.9rem; font-weight: 600; transition: all 0.2s;
}
.btn-primary {
  background: var(--accent); color: #fff;
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text2); padding: 0.5rem 1rem; }
.btn-ghost:hover { color: var(--text); }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; border-radius: 10px; }
.btn-block { width: 100%; justify-content: center; }

/* BOTÓN ESTADO ÉXITO */
.btn-success, .btn-success:hover {
  background: var(--green); color: #fff; transform: none;
}
.check-mark {
  display: inline-block; width: 18px; height: 18px;
  position: relative; flex-shrink: 0;
  animation: check-pop 0.4s ease;
}
.check-mark::after {
  content: ''; position: absolute; left: 6px; top: 1px;
  width: 6px; height: 11px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
@keyframes check-pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 6rem 2rem 4rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(249,115,22,0.12) 0%, transparent 60%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 1rem; border-radius: 999px;
  background: rgba(249,115,22,0.1); border: 1px solid rgba(249,115,22,0.3);
  font-size: 0.8rem; font-weight: 600; color: var(--accent);
  margin-bottom: 1.5rem; letter-spacing: 0.5px; text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 900; line-height: 1;
  letter-spacing: -2px; margin-bottom: 1rem;
}
.hero h1 .highlight { color: var(--accent); }
.hero p {
  font-size: 1.1rem; color: var(--text2); max-width: 500px;
  margin: 0 auto 2.5rem; line-height: 1.6;
}
.hero-cta { display: flex; flex-direction: column; gap: 0.85rem; align-items: center; }

/* STATS BAR */
.stats-bar {
  display: flex; justify-content: center; gap: 3rem;
  padding: 2rem; margin-top: 3rem;
  border-top: 1px solid var(--border);
}
.stat { text-align: center; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 0.8rem; color: var(--text3); margin-top: 0.2rem; }

/* COUNTDOWN */
.countdown-section {
  padding: 5rem 2rem; background: var(--bg2);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.countdown-section h2 { text-align: center; font-size: 1rem; color: var(--text2); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 2rem; }
.countdown {
  display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap;
}
.countdown-item {
  text-align: center;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem 2rem; min-width: 90px;
}
.countdown-num { font-size: 3rem; font-weight: 800; line-height: 1; color: var(--accent); }
.countdown-label { font-size: 0.75rem; color: var(--text3); margin-top: 0.5rem; text-transform: uppercase; letter-spacing: 1px; }

/* PRIZES */
.prizes-section { padding: 5rem 2rem; max-width: 900px; margin: 0 auto; }
.section-title { text-align: center; font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; letter-spacing: -1px; }
.section-sub { text-align: center; color: var(--text2); margin-bottom: 3rem; }
.prizes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.prize-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; padding: 2rem; position: relative; overflow: hidden;
}
.prize-card.featured { border-color: var(--accent); }
.prize-card.featured::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.prize-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.prize-amount { font-size: 2.5rem; font-weight: 900; color: var(--accent); letter-spacing: -1px; }
.prize-label { font-size: 0.85rem; color: var(--text2); margin-top: 0.5rem; line-height: 1.5; }
.prize-condition { font-size: 0.8rem; color: var(--text3); margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* FEED */
.feed-section { padding: 5rem 2rem; max-width: 700px; margin: 0 auto; }
.feed { display: flex; flex-direction: column; gap: 0.75rem; }
.feed-item {
  display: flex; align-items: center; gap: 1rem;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  transition: border-color 0.2s;
}
.feed-item:hover { border-color: var(--border); }
.feed-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.feed-content { flex: 1; min-width: 0; }
.feed-name { font-weight: 700; font-size: 0.95rem; }
.feed-action { font-size: 0.85rem; color: var(--text2); margin-top: 0.1rem; }
.feed-meta { text-align: right; flex-shrink: 0; }
.feed-km { font-size: 1.1rem; font-weight: 800; color: var(--accent); }
.feed-time { font-size: 0.75rem; color: var(--text3); margin-top: 0.2rem; }

/* PROGRESS BAR */
.progress-bar {
  height: 4px; background: var(--border); border-radius: 999px;
  margin-top: 0.5rem; overflow: hidden;
}
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 999px; transition: width 1s ease;
}
.progress-fill.complete { background: var(--green); }

/* BADGE */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.6rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600;
}
.badge-green { background: rgba(34,197,94,0.15); color: var(--green); }
.badge-orange { background: rgba(249,115,22,0.15); color: var(--accent); }
.badge-gray { background: var(--bg3); color: var(--text2); }

/* HOW IT WORKS */
.how-section { padding: 5rem 2rem; max-width: 900px; margin: 0 auto; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-top: 3rem; }
.step { text-align: center; }
.step-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(249,115,22,0.1); border: 1px solid rgba(249,115,22,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 800; color: var(--accent);
  margin: 0 auto 1rem;
}
.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.step p { font-size: 0.85rem; color: var(--text2); line-height: 1.6; }

/* FORMS */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text2); margin-bottom: 0.5rem; }
.form-input {
  width: 100%; padding: 0.85rem 1rem;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 0.95rem;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text3); }
.form-hint { font-size: 0.78rem; color: var(--text3); margin-top: 0.35rem; }

/* PASSWORD CON OJO */
.password-wrap { position: relative; }
.password-wrap .form-input { padding-right: 3rem; }
.password-toggle {
  position: absolute; right: 0.35rem; top: 50%;
  transform: translateY(-50%);
  background: transparent; border: none; cursor: pointer;
  color: var(--text3);
  width: 2.4rem; height: 2.4rem;
  display: flex; align-items: center; justify-content: center;
}
.password-toggle:hover { color: var(--text2); }
.password-toggle svg { display: block; }

/* KM STEPPER */
.km-stepper {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.25rem 1.75rem;
}
.km-btn {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: #fff;
  font-size: 1.9rem; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s, background 0.15s;
}
.km-btn:hover:not(:disabled) { background: var(--accent2); transform: scale(1.08); }
.km-btn:active:not(:disabled) { transform: scale(0.95); }
.km-btn:disabled { background: var(--bg2); color: var(--text3); cursor: not-allowed; }
.km-value-wrap {
  flex: 1; min-width: 0;
  display: flex; align-items: baseline; justify-content: center; gap: 0.3rem;
}
.km-value {
  text-align: center;
  font-size: 3rem; font-weight: 900; color: var(--accent);
  letter-spacing: -1px; line-height: 1;
  background: transparent; border: none; padding: 0;
  font-family: inherit;
}
.km-value:focus { outline: none; }
.km-unit { font-size: 1rem; font-weight: 600; color: var(--text2); flex-shrink: 0; }

/* TOGGLE UNIDAD km / millas */
.unit-toggle {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 0.85rem;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px;
}
.unit-btn {
  flex: 1; padding: 0.55rem; border-radius: 7px;
  font-size: 0.85rem; font-weight: 600;
  background: transparent; color: var(--text2);
  transition: background 0.2s, color 0.2s;
}
.unit-btn.active { background: var(--accent); color: #fff; }

/* CARD */
.card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; padding: 2rem;
}
.card-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.25rem; }
.card-sub { font-size: 0.85rem; color: var(--text2); margin-bottom: 1.5rem; }

/* UPLOAD ZONE */
.upload-zone {
  border: 2px dashed var(--border); border-radius: 12px;
  padding: 2rem; text-align: center; cursor: pointer;
  transition: all 0.2s;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--accent); background: rgba(249,115,22,0.05); }
.upload-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.upload-text { font-size: 0.9rem; color: var(--text2); }
.upload-text strong { color: var(--accent); }
.upload-preview { margin-top: 1rem; }
.upload-preview img { width: 100%; max-height: 200px; object-fit: cover; border-radius: 8px; }

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 1rem; opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; padding: 2rem; width: 100%; max-width: 440px;
  transform: translateY(20px); transition: transform 0.2s;
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.modal-title { font-size: 1.2rem; font-weight: 800; }
.modal-close { background: var(--bg3); border: none; color: var(--text2); width: 32px; height: 32px; border-radius: 50%; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.modal-close:hover { color: var(--text); }

/* ALERT */
.alert {
  padding: 0.85rem 1rem; border-radius: 8px;
  font-size: 0.88rem; margin-bottom: 1rem; display: none;
}
.alert.show { display: block; }
.alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #f87171; }
.alert-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: var(--green); }

/* DASHBOARD */
.dashboard { padding: 6rem 2rem 4rem; max-width: 700px; margin: 0 auto; }
.profile-header {
  display: flex; align-items: center; gap: 1.5rem;
  margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border);
}
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; flex-shrink: 0;
}
.profile-name { font-size: 1.5rem; font-weight: 800; }
.profile-alias { font-size: 0.9rem; color: var(--accent); font-weight: 600; }
.profile-meta { font-size: 0.8rem; color: var(--text2); margin-top: 0.2rem; }

.big-progress {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; padding: 2rem; margin-bottom: 1.5rem; text-align: center;
}
.big-km { font-size: 4rem; font-weight: 900; line-height: 1; color: var(--accent); letter-spacing: -2px; }
.big-km span { font-size: 1.5rem; font-weight: 600; color: var(--text2); }
.big-label { font-size: 0.85rem; color: var(--text2); margin-bottom: 1rem; }
.big-bar { position: relative; height: 8px; background: var(--bg3); border-radius: 999px; overflow: hidden; margin-bottom: 0.5rem; }
.big-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width 1s ease; border-radius: 999px; }
.big-fill.complete { background: var(--green); }
.big-pct { font-size: 0.85rem; color: var(--text2); }

/* MILESTONES EN LA BARRA */
.bar-tick {
  position: absolute; top: 0; bottom: 0; width: 3px;
  background: var(--bg); transform: translateX(-50%); z-index: 1;
}
.milestones { position: relative; height: 34px; margin-top: 0.5rem; }
.milestone {
  position: absolute; top: 0;
  display: flex; flex-direction: column; align-items: center; line-height: 1.25;
  transform: translateX(-50%); white-space: nowrap;
}
.milestone-end { left: 100%; transform: translateX(-100%); align-items: flex-end; }
.milestone-amt { font-size: 0.82rem; font-weight: 800; color: var(--text2); transition: color 0.3s; }
.milestone-km { font-size: 0.68rem; color: var(--text3); }
.milestone.reached .milestone-amt { color: var(--green); }

/* RUNS LIST */
.runs-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }
.run-item {
  display: flex; align-items: center; gap: 1rem;
  background: var(--bg3); border-radius: 10px; padding: 0.85rem 1rem;
}
.run-icon { font-size: 1.5rem; }
.run-info { flex: 1; }
.run-km { font-weight: 700; }
.run-date { font-size: 0.8rem; color: var(--text2); }
.run-status { font-size: 0.8rem; }

/* ADMIN */
.admin-page { padding: 6rem 2rem 4rem; max-width: 980px; margin: 0 auto; }
.admin-table-wrap { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; overflow-x: auto; }
.tbl-btn {
  padding: 0.4rem 0.75rem; border-radius: 6px;
  font-size: 0.78rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.tbl-btn-view { background: var(--bg3); color: var(--text2); border: 1px solid var(--border); }
.tbl-btn-view:hover { color: var(--text); border-color: var(--accent); }
.tbl-btn-del { background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.tbl-btn-del:hover { background: rgba(239,68,68,0.2); }
.admin-denied { padding: 8rem 2rem; text-align: center; color: var(--text2); }
.admin-denied .lock { font-size: 3rem; margin-bottom: 1rem; }

/* ADMIN HERO */
.admin-hero {
  border-radius: 18px; overflow: hidden; margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  background-image: linear-gradient(rgba(10,10,10,0.5), rgba(10,10,10,0.92)), url("https://images.unsplash.com/photo-1552674605-db6ffd4facb5?w=1400&q=80&fm=jpg&fit=crop");
  background-size: cover; background-position: center 35%;
}
.admin-hero-inner { padding: 2.5rem 2rem; }
.admin-hero-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent); font-weight: 700; }
.admin-hero-km { font-size: clamp(2.5rem,7vw,3.6rem); font-weight: 900; letter-spacing: -2px; line-height: 1; margin: 0.6rem 0 0.3rem; }
.admin-hero-km span { color: var(--accent); }
.admin-hero-sub { color: var(--text2); font-size: 0.9rem; }

/* ADMIN STAT CARDS */
.admin-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 2.5rem; }
.astat {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.3rem 1.2rem; position: relative; overflow: hidden;
}
.astat::after { content:''; position:absolute; top:0; left:0; right:0; height:3px; background: linear-gradient(90deg,var(--accent),var(--accent2)); }
.astat.is-green::after { background: var(--green); }
.astat-icon { font-size: 1.5rem; }
.astat-num { font-size: 2rem; font-weight: 900; letter-spacing: -1px; margin-top: 0.35rem; }
.astat.is-green .astat-num { color: var(--green); }
.astat-label { font-size: 0.76rem; color: var(--text3); margin-top: 0.15rem; }

/* BUSCADOR ADMIN */
.admin-search-wrap { position: relative; margin-bottom: 1rem; }
.admin-search {
  width: 100%; padding: 0.8rem 1rem 0.8rem 2.5rem;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: 0.95rem;
}
.admin-search:focus { border-color: var(--accent); }
.admin-search::placeholder { color: var(--text3); }
.admin-search-ico { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--text3); font-size: 0.95rem; }

/* FILA DE PARTICIPANTE */
.prow {
  display: flex; align-items: center; gap: 0.9rem;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 0.85rem 1.1rem; margin-bottom: 0.5rem;
  cursor: pointer; transition: border-color .15s;
}
.prow:hover { border-color: var(--accent); }
.prow.done { border-color: rgba(34,197,94,0.3); }
.prow-rank { font-size: 0.95rem; font-weight: 800; color: var(--text3); min-width: 30px; text-align: center; flex-shrink: 0; }
.prow-av { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.prow-id { flex: 1; min-width: 0; }
.prow-alias { font-weight: 800; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow-sub { font-size: 0.82rem; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow-km { flex-shrink: 0; text-align: right; }
.prow-km b { color: var(--accent); font-weight: 900; font-size: 1.5rem; letter-spacing: -1px; }
.prow-km span { font-size: 0.72rem; color: var(--text3); }
.prow-km.done b { color: var(--green); }
.prow-empty { text-align: center; color: var(--text3); padding: 3rem; background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; }

/* MODAL DETALLE PARTICIPANTE */
.detail-box {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 16px;
  width: 100%; max-width: 600px; max-height: 88vh;
  display: flex; flex-direction: column;
}
.detail-header { display: flex; align-items: center; gap: 0.85rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.detail-av { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.detail-alias { font-size: 1.2rem; font-weight: 800; }
.detail-sub { font-size: 0.8rem; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-close { background: var(--bg3); border: none; color: var(--text2); width: 32px; height: 32px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; flex-shrink: 0; }
.detail-body { padding: 1.25rem 1.5rem; overflow-y: auto; }
.detail-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); }
.detail-del {
  width: 100%; padding: 0.8rem; border-radius: 9px;
  background: rgba(239,68,68,0.1); color: #f87171;
  border: 1px solid rgba(239,68,68,0.25); font-weight: 700; font-size: 0.9rem; cursor: pointer;
}
.detail-del:hover { background: rgba(239,68,68,0.2); }

@media (max-width: 640px) {
  .admin-stats { grid-template-columns: repeat(2,1fr); }
}
.submissions-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.submission-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.25rem; display: flex; gap: 1rem; align-items: flex-start;
}
.submission-imgs { display: flex; gap: 0.5rem; }
.submission-imgs img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; cursor: pointer; }
.submission-info { flex: 1; }
.submission-name { font-weight: 700; }
.submission-alias { font-size: 0.85rem; color: var(--accent); }
.submission-km { font-size: 0.85rem; color: var(--text2); margin-top: 0.25rem; }
.submission-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.btn-approve { background: rgba(34,197,94,0.15); color: var(--green); border: 1px solid rgba(34,197,94,0.3); padding: 0.4rem 1rem; border-radius: 6px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.btn-approve:hover { background: rgba(34,197,94,0.25); }
.btn-reject { background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.2); padding: 0.4rem 1rem; border-radius: 6px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.btn-reject:hover { background: rgba(239,68,68,0.2); }

/* APPS / TRACKING SECTION */
.apps-section { padding: 5rem 2rem; background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.apps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; max-width: 900px; margin: 3rem auto 0; }
.app-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.5rem 1rem; text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.app-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.app-card-icon { font-size: 2.2rem; margin-bottom: 0.75rem; }
.app-card-name { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.app-card-desc { font-size: 0.75rem; color: var(--text3); margin-top: 0.3rem; line-height: 1.4; }

/* RUNNING PHOTO */
.running-photo {
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border);
}
.running-photo img {
  width: 100%; height: 340px; object-fit: cover; display: block;
}

/* DAY STRIP (DASHBOARD) */
.day-strip {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(249,115,22,0.08); border: 1px solid rgba(249,115,22,0.25);
  border-radius: 10px; padding: 0.85rem 1rem; margin-bottom: 1.25rem;
}
.day-dots { display: flex; gap: 0.45rem; }
.day-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border);
}
.day-dot.active { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(249,115,22,0.2); }
.day-dot.done { background: var(--accent); border-color: var(--accent); opacity: 0.45; }
.day-label { font-size: 0.85rem; font-weight: 700; color: var(--accent); }

/* FOOTER */
footer {
  border-top: 1px solid var(--border); padding: 2rem;
  text-align: center; color: var(--text3); font-size: 0.85rem;
}
footer strong { color: var(--accent); }

/* RESPONSIVE */
@media (max-width: 640px) {
  nav { padding: 1rem; }
  .nav-links { gap: 0.75rem; }
  .stats-bar { gap: 1.5rem; }
  .profile-header { flex-direction: column; text-align: center; }
  .running-photo img { height: 220px; }
  .km-stepper { padding: 1rem 1.25rem; }
  .km-btn { width: 46px; height: 46px; font-size: 1.6rem; }
  .km-value { font-size: 2.25rem; }
}

/* SPINNER */
.spinner {
  width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.6s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* EMOJI AVATAR COLORS */
.av-1 { background: linear-gradient(135deg, #f97316, #ef4444); }
.av-2 { background: linear-gradient(135deg, #8b5cf6, #3b82f6); }
.av-3 { background: linear-gradient(135deg, #22c55e, #06b6d4); }
.av-4 { background: linear-gradient(135deg, #f59e0b, #f97316); }
.av-5 { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
