/* ── Hyrox Simulation Platform — Mobile-first CSS ── */
:root {
  --primary: #FF5722;
  --primary-dark: #E64A19;
  --primary-light: #FF8A65;
  --bg: #0F0F0F;
  --bg2: #1A1A1A;
  --bg3: #252525;
  --card: #1E1E1E;
  --border: #333;
  --text: #F5F5F5;
  --text-muted: #999;
  --success: #4CAF50;
  --warning: #FF9800;
  --danger: #F44336;
  --info: #2196F3;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
  --transition: all 0.2s ease;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding: 0 0 80px;
}

/* ── Top Bar ── */
.topbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.topbar-brand .logo {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  color: white;
}

.topbar-brand .logo-img {
  background: white;
  object-fit: cover;
  padding: 0;
}

.topbar-brand .brand-name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.3px;
}

.topbar-brand .brand-sub {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
  text-decoration: none;
}

.avatar.avatar-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.profile-photo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--bg3);
  border-radius: 12px;
  margin-bottom: 16px;
}

.profile-photo-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg2);
  border: 2px solid var(--border);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--text-muted);
  flex-shrink: 0;
  cursor: pointer;
}

/* ── Bottom Nav ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  display: flex;
  height: 64px;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.bottom-nav a:hover {
  color: var(--text);
}

.bottom-nav a.active {
  color: var(--primary);
}

.bottom-nav a.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 4px 4px;
}

.bottom-nav .nav-icon {
  font-size: 20px;
  line-height: 1;
}

/* ── Container ── */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Page Header ── */
.page-header {
  padding: 24px 16px 16px;
  max-width: 600px;
  margin: 0 auto;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.page-header p {
  color: var(--text-muted);
  margin-top: 4px;
  font-size: 14px;
}

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}

.card-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
}

.card-body {
  padding: 16px;
}

/* ── Forms ── */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px;
  padding: 14px 16px;
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.15);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control.error {
  border-color: var(--danger);
}

.field-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  min-height: 50px;
  -webkit-tap-highlight-color: transparent;
}

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

.btn-primary:hover, .btn-primary:active {
  background: var(--primary-dark);
  transform: scale(0.98);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  min-height: 36px;
}

.btn-block {
  width: 100%;
}

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

.is-submitting {
  position: relative;
  pointer-events: none;
}

.form-loading-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  overflow: hidden;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: rgba(255,87,34,0.15);
  z-index: 2;
}

.form-loading-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: loadingBar 0.9s ease-in-out infinite;
}

@keyframes loadingBar {
  to { left: 100%; }
}

/* ── Alerts ── */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-success { background: rgba(76, 175, 80, 0.15); border: 1px solid rgba(76,175,80,0.3); color: #81C784; }
.alert-error { background: rgba(244, 67, 54, 0.15); border: 1px solid rgba(244,67,54,0.3); color: #EF9A9A; }
.alert-warning { background: rgba(255, 152, 0, 0.15); border: 1px solid rgba(255,152,0,0.3); color: #FFCC80; }
.alert-info { background: rgba(33, 150, 243, 0.15); border: 1px solid rgba(33,150,243,0.3); color: #90CAF9; }

/* ── Auth Pages ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo .logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  color: white;
  margin: 0 auto 16px;
  box-shadow: 0 8px 32px rgba(255,87,34,0.4);
}

.auth-logo .logo-icon-img {
  background: white;
  object-fit: cover;
  padding: 0;
}

.auth-logo h1 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -1px;
}

.auth-logo h1 span { color: var(--primary); }

.auth-logo p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.auth-card h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 24px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* Safety-net: any input/select/textarea inside the auth card or profile form
   gets the dashboard input look, even if its widget forgot the class. */
.auth-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]),
.auth-card select,
.auth-card textarea {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  padding: 14px 16px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .18s, box-shadow .18s, background .18s;
  outline: none;
  -webkit-appearance: none;
  font-weight: 500;
}
.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus {
  border-color: var(--primary);
  background: var(--bg3);
  box-shadow: 0 0 0 4px rgba(255,87,34,0.18);
}
.auth-card input::placeholder,
.auth-card textarea::placeholder {
  color: #707070;
  font-weight: 400;
}

/* Profile photo upload — match the dashboard look */
input[type="file"].file-input,
.auth-card input[type="file"] {
  width: 100%;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg2);
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color .18s, background .18s;
}
input[type="file"].file-input:hover,
.auth-card input[type="file"]:hover {
  border-color: var(--primary);
  background: var(--bg3);
}
input[type="file"].file-input::-webkit-file-upload-button,
.auth-card input[type="file"]::-webkit-file-upload-button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  margin-right: 12px;
}

/* ── Steps Indicator ── */
.steps {
  display: flex;
  align-items: center;
  padding: 16px;
  max-width: 600px;
  margin: 0 auto;
  gap: 0;
}

.step {
  display: flex;
  align-items: center;
  flex: 1;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid var(--border);
  color: var(--text-muted);
  background: var(--bg3);
}

.step.active .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px rgba(255,87,34,0.2);
}

.step.done .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
}

.step.done + .step .step-line,
.step.done .step-line {
  background: var(--success);
}

/* ── Category / Option Cards ── */
.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px;
  max-width: 600px;
  margin: 0 auto;
}

.option-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  -webkit-tap-highlight-color: transparent;
}

.option-card:hover, .option-card:active {
  border-color: var(--primary);
  background: rgba(255,87,34,0.05);
  transform: scale(0.97);
}

.option-card.selected {
  border-color: var(--primary);
  background: rgba(255,87,34,0.1);
}

.option-card .option-icon {
  font-size: 32px;
}

.option-card .option-title {
  font-size: 15px;
  font-weight: 700;
}

.option-card .option-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Station List ── */
.station-list {
  list-style: none;
}

.station-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.station-item:last-child { border-bottom: none; }

.station-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}

.station-info { flex: 1; }

.station-name {
  font-size: 14px;
  font-weight: 600;
}

.station-target {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.station-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 100px;
  font-weight: 600;
  background: var(--bg3);
  color: var(--text-muted);
}

/* ── Station Result States ── */
.station-done .station-num {
  background: var(--success);
  color: white;
}

.station-done .station-name {
  color: var(--success);
}

.station-current .station-num {
  background: var(--primary);
  color: white;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,87,34,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(255,87,34,0); }
}

/* ── Progress Bar ── */
.progress-bar-wrap {
  background: var(--bg3);
  border-radius: 100px;
  height: 8px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 100px;
  transition: width 0.5s ease;
}

/* ── Partner Search ── */
.search-input-wrap {
  position: relative;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
}

.search-input-wrap .form-control {
  padding-left: 44px;
}

.search-results {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 8px;
  overflow: hidden;
  display: none;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(255,87,34,0.08); }

.search-result-item .result-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.search-result-item .result-info .result-name {
  font-size: 14px;
  font-weight: 600;
}

.search-result-item .result-info .result-email {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Selected Partners ── */
.partners-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.partner-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,87,34,0.1);
  border: 1px solid rgba(255,87,34,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.partner-chip .chip-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.partner-chip .chip-info { flex: 1; }
.partner-chip .chip-name { font-size: 14px; font-weight: 600; }
.partner-chip .chip-email { font-size: 12px; color: var(--text-muted); }

.partner-chip .chip-remove {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  line-height: 1;
}

/* ── Summary/Confirm Card ── */
.summary-section {
  margin-bottom: 16px;
}

.summary-section .summary-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.summary-value {
  font-size: 18px;
  font-weight: 700;
}

.summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,87,34,0.15);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
}

/* ── Registration Card ── */
.reg-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.reg-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.reg-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255,87,34,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.reg-meta { flex: 1; }

.reg-title {
  font-size: 15px;
  font-weight: 700;
}

.reg-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.status-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-confirmed { background: rgba(76,175,80,0.2); color: var(--success); }
.status-pending { background: rgba(255,152,0,0.2); color: var(--warning); }

/* ── Event Day Admin ── */
.event-session-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}

.event-date-badge {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  text-align: center;
  padding: 12px 16px;
}

.event-date-badge .day { font-size: 28px; font-weight: 900; line-height: 1; }
.event-date-badge .month { font-size: 13px; font-weight: 600; opacity: 0.9; text-transform: uppercase; }

.category-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}

.category-group-header {
  background: var(--bg3);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.category-group-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-count {
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
}

.category-group-body {
  display: none;
}

.category-group-body.open {
  display: block;
}

.participant-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
}

.participant-row:last-child { border-bottom: none; }
.participant-row:hover { background: rgba(255,87,34,0.05); }

.participant-info { flex: 1; }
.participant-name { font-size: 14px; font-weight: 600; }
.participant-level { font-size: 12px; color: var(--text-muted); }

.participant-progress {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

/* ── Recording Form ── */
.recording-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}

.recording-card-header {
  background: var(--bg3);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.recording-station-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.recording-station-num.done {
  background: var(--success);
}

.recording-station-name {
  font-size: 15px;
  font-weight: 700;
  flex: 1;
}

.recording-station-target {
  font-size: 12px;
  color: var(--text-muted);
}

.time-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.time-input-wrap {
  position: relative;
}

.time-input-wrap label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: block;
}

.time-input-wrap .form-control {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  padding: 12px;
}

.time-separator {
  display: flex;
  align-items: flex-end;
  padding-bottom: 16px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-muted);
  justify-content: center;
  grid-column: span 1;
}

/* ── Results View ── */
.result-station {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.result-station:last-child { border-bottom: none; }

.result-station-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.result-station-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.result-complete .result-station-num { background: var(--success); color: white; }
.result-partial .result-station-num { background: var(--warning); color: white; }
.result-pending .result-station-num { background: var(--bg3); color: var(--text-muted); }

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 4px 0;
}

.result-row .label { color: var(--text-muted); }
.result-row .value { font-weight: 600; }

.result-time { font-size: 20px; font-weight: 800; color: var(--primary); }

/* ── Home Dashboard ── */
.hero-section {
  background: linear-gradient(160deg, rgba(255,87,34,0.15) 0%, transparent 60%);
  padding: 32px 16px 24px;
  max-width: 600px;
  margin: 0 auto;
}

.hero-greeting {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.hero-name {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.hero-name span { color: var(--primary); }

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px;
  max-width: 600px;
  margin: 0 auto;
}

.quick-action-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition);
}

.quick-action-btn:hover {
  border-color: var(--primary);
  background: rgba(255,87,34,0.05);
}

.quick-action-btn .qa-icon {
  font-size: 28px;
}

.quick-action-btn .qa-title {
  font-size: 14px;
  font-weight: 700;
}

.quick-action-btn .qa-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Admin Quick actions ── */
.admin-quick-action {
  border-color: rgba(255,87,34,0.3);
  background: rgba(255,87,34,0.05);
}

/* ── Spinner ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,87,34,0.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

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

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state p { font-size: 14px; margin-bottom: 24px; }

/* ── Toggle Switch ── */
.toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

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

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  top: 4px;
  left: 4px;
  transition: var(--transition);
}

.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(22px); }

/* ── Utility ── */
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.fw-bold { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.text-center { text-align: center; }
.p-16 { padding: 16px; }
.hidden { display: none !important; }

/* ── Responsiveness ── */
@media (min-width: 600px) {
  .main-content { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .topbar { padding: 0 24px; }

  .topbar-desktop-nav {
    display: flex;
    gap: 4px;
  }

  .topbar-desktop-nav a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
  }

  .topbar-desktop-nav a:hover {
    color: var(--text);
    background: rgba(255,255,255,0.05);
  }

  .topbar-desktop-nav a.active {
    color: var(--primary);
    background: rgba(255,87,34,0.12);
    font-weight: 700;
  }
}

@media (max-width: 599px) {
  .topbar-desktop-nav { display: none; }
  .option-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Upgrade additions ── */

/* Stat tiles on home */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.stat-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
}

.stat-tile .stat-value {
  font-size: 26px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.stat-tile .stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Upcoming session banner */
.upcoming-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.upcoming-banner .banner-icon {
  font-size: 36px;
  flex-shrink: 0;
}

.upcoming-banner .banner-title {
  font-size: 15px;
  font-weight: 700;
  color: white;
}

.upcoming-banner .banner-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  margin-top: 2px;
}

.upcoming-banner .banner-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.2);
  color: white;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Activity feed */
.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.activity-dot.green { background: var(--success); }
.activity-dot.orange { background: var(--primary); }
.activity-dot.blue { background: var(--info); }

/* Leaderboard rank colours */
.rank-1 { color: #FFD700; }
.rank-2 { color: #C0C0C0; }
.rank-3 { color: #CD7F32; }

/* Finish celebration */
.finish-banner {
  background: linear-gradient(135deg, rgba(76,175,80,0.15), rgba(76,175,80,0.05));
  border: 1px solid rgba(76,175,80,0.3);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
}

/* Admin nav tab (setup) */
.bottom-nav a[data-setup] .nav-icon { color: var(--warning); }

/* PWA install prompt */
.pwa-prompt {
  position: fixed;
  bottom: 80px;
  left: 16px;
  right: 16px;
  background: var(--card);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 200;
  box-shadow: var(--shadow);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.pwa-prompt .pwa-text { flex: 1; font-size: 13px; font-weight: 600; }
.pwa-prompt .pwa-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Better form controls */
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Number input hide spinners on mobile */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { opacity: 1; }

/* Total time badge */
.total-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(255,87,34,0.3);
}

/* Setup nav highlight */
.setup-nav-btn {
  background: rgba(255,152,0,0.1);
  border-color: rgba(255,152,0,0.3);
  color: var(--warning);
}

/* ── Back button ── */
.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 18px;
  text-decoration: none;
  flex-shrink: 0;
  transition: var(--transition);
}
.back-btn:hover { background: var(--border); color: var(--primary); }

/* ── Input with icon ── */
.input-icon-wrap {
  position: relative;
}
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
  z-index: 1;
}
.form-control-icon {
  padding-left: 42px;
}

/* ── Improved form-control ── */
.form-control {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 16px;
  padding: 13px 16px;
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
  -webkit-appearance: none;
  width: 100%;
  box-sizing: border-box;
}
.form-control:focus {
  border-color: var(--primary);
  background: var(--bg3);
  box-shadow: 0 0 0 3px rgba(255,87,34,0.15);
}
.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Saved-but-incomplete station card ── */
.recording-station-num.saved {
  background: var(--warning);
  color: #1a1a1a;
}
.card-saved {
  border-color: rgba(255,152,0,0.4);
  background: rgba(255,152,0,0.04);
}
.card-done {
  border-color: rgba(76,175,80,0.35);
}

/* ── Running timer state ── */
.recording-station-num.running {
  background: var(--success);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(76,175,80,0.55);
  animation: pulseRunning 1.4s ease-out infinite;
}
.card-running {
  border-color: rgba(76,175,80,0.55);
  background: rgba(76,175,80,0.05);
}
@keyframes pulseRunning {
  0%   { box-shadow: 0 0 0 0 rgba(76,175,80,0.6); }
  70%  { box-shadow: 0 0 0 12px rgba(76,175,80,0); }
  100% { box-shadow: 0 0 0 0 rgba(76,175,80,0); }
}
.result-summary-saved {
  background: rgba(255,152,0,0.07);
  border-top: 1px solid rgba(255,152,0,0.25);
}

/* ── Stat tile ── */
.stat-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}
.stat-tile .stat-value {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}
.stat-tile .stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ── Select field polish ── */
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

/* ── Textarea ── */
textarea.form-control {
  min-height: 90px;
  resize: vertical;
  line-height: 1.5;
}

/* ── Polished form controls (override) ── */
.form-control {
  font-size: 15px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  font-weight: 500;
  letter-spacing: 0.1px;
  color: var(--text);
  transition: border-color .18s, box-shadow .18s, background .18s, transform .12s;
}
.form-control:hover:not(:focus) {
  border-color: var(--text-muted);
  background: var(--bg3);
}
.form-control:focus {
  border-color: var(--primary);
  background: var(--bg3);
  box-shadow: 0 0 0 4px rgba(255,87,34,0.18);
}
.form-control::placeholder {
  color: #707070;
  font-weight: 400;
}

/* Numeric/time inputs slightly larger and centred where appropriate */
.time-input-wrap .form-control {
  font-size: 26px;
  font-weight: 800;
  padding: 14px;
  text-align: center;
  letter-spacing: 1px;
}

input[type="time"].form-control,
input[type="date"].form-control {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: 0.5px;
  color-scheme: dark;
}

.form-group label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Wave selection (registration step3) ── */
.wave-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 480px) {
  .wave-options { grid-template-columns: 1fr; }
}

.wave-option {
  display: block;
  cursor: pointer;
  position: relative;
  background: var(--bg3);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  transition: var(--transition);
}

.wave-option:hover {
  border-color: var(--primary);
  background: rgba(255,87,34,0.05);
}

.wave-option.selected {
  border-color: var(--primary);
  background: rgba(255,87,34,0.12);
  box-shadow: 0 0 0 3px rgba(255,87,34,0.18);
}

.wave-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wave-option .wave-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.wave-option .wave-time {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
}

/* ── Wave admin time badge ── */
.wave-time-badge {
  background: linear-gradient(135deg, rgba(255,87,34,0.18), rgba(255,87,34,0.05));
  border: 1px solid rgba(255,87,34,0.3);
  border-radius: 10px;
  padding: 8px 12px;
  flex-shrink: 0;
  text-align: center;
}

.wave-time-badge .wave-time-time {
  font-size: 18px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: 1px;
  line-height: 1;
}

/* ── Status legend (record results) ── */
.status-legend {
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg3);
}

.legend-dot.legend-pending { background: var(--bg3); border: 1px solid var(--border); }
.legend-dot.legend-saved   { background: var(--warning); }
.legend-dot.legend-done    { background: var(--success); }

/* ── Record action buttons ── */
.record-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.record-help {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.55;
  background: var(--bg2);
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 3px solid var(--warning);
}

.record-help strong { color: var(--text); }

/* ── Admin panel grid (home page) ── */
.admin-panel-card {
  border-color: rgba(255,152,0,0.35);
}
.admin-panel-card .card-header {
  background: rgba(255,152,0,0.07);
}

.admin-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
}

.admin-action-grid .quick-action-btn {
  padding: 16px 14px;
}
.admin-action-grid .qa-title { font-size: 14px; font-weight: 700; }
.admin-action-grid .qa-sub   { font-size: 11.5px; }

/* ── Admin event detail extras ── */
.participant-row {
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .participant-row > div:last-child .btn {
    font-size: 12px;
    padding: 6px 10px;
    min-height: 32px;
  }
}

/* Saved partial card pulse-free indicator */
.recording-card {
  transition: border-color .25s, background-color .25s;
}
.recording-card.card-saved .recording-station-name::after {
  content: ' · ⏳ Partial';
  color: var(--warning);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-left: 4px;
}
.recording-card.card-done .recording-station-name {
  color: var(--success);
}

/* ── Toggle (slider) — bigger for touch ── */
.toggle {
  width: 52px;
  height: 28px;
}
.toggle-slider::before {
  width: 20px;
  height: 20px;
  top: 4px;
  left: 4px;
}
.toggle input:checked + .toggle-slider::before {
  transform: translateX(24px);
}

/* ─── Achievement / Level-up celebration card ─────────────────────── */
.achievement-card {
  position: relative;
  border-radius: 18px;
  padding: 22px 20px 24px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(135deg, rgba(255,87,34,0.18), rgba(255,87,34,0.02) 60%, rgba(0,0,0,0));
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}
.achievement-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 20% 0%, rgba(255,255,255,0.10), transparent 55%);
  pointer-events: none;
}
.achievement-beginner {
  background: linear-gradient(135deg, rgba(76,175,80,0.22), rgba(33,150,243,0.10) 60%, rgba(0,0,0,0));
  border-color: rgba(76,175,80,0.35);
}
.achievement-intermediate {
  background: linear-gradient(135deg, rgba(33,150,243,0.22), rgba(255,87,34,0.10) 60%, rgba(0,0,0,0));
  border-color: rgba(33,150,243,0.35);
}
.achievement-advanced {
  background: linear-gradient(135deg, rgba(255,152,0,0.22), rgba(255,87,34,0.18) 60%, rgba(0,0,0,0));
  border-color: rgba(255,152,0,0.45);
}
.achievement-other {
  background: linear-gradient(135deg, rgba(76,175,80,0.18), rgba(255,87,34,0.06) 60%, rgba(0,0,0,0));
  border-color: rgba(76,175,80,0.30);
}
.achievement-burst {
  position: absolute;
  top: -22px;
  right: -10px;
  font-size: 110px;
  line-height: 1;
  opacity: 0.18;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
  pointer-events: none;
  animation: achPop 1.4s ease-out;
}
@keyframes achPop {
  0%   { transform: scale(0.6) rotate(-12deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(6deg);  opacity: 0.25; }
  100% { transform: scale(1) rotate(0);        opacity: 0.18; }
}
.achievement-body { position: relative; z-index: 1; }
.achievement-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(255,255,255,0.10);
  color: #fff;
  margin-bottom: 10px;
}
.achievement-headline {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.2px;
  line-height: 1.15;
  color: #fff;
}
.achievement-text {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255,255,255,0.86);
}
.achievement-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.achievement-stat {
  background: rgba(0,0,0,0.30);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  backdrop-filter: blur(2px);
}
.achievement-stat-value {
  font-weight: 900;
  font-size: 16px;
  color: #fff;
  line-height: 1.1;
  word-break: break-word;
}
.achievement-stat-label {
  font-size: 10px;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 4px;
}
.achievement-next {
  background: rgba(0,0,0,0.30);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,0.9);
}
.achievement-next strong { color: #fff; }
.achievement-next-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  background: rgba(255,255,255,0.14);
  font-weight: 700;
  margin: 0 2px;
}
@media (max-width: 480px) {
  .achievement-stats { grid-template-columns: 1fr 1fr; }
  .achievement-headline { font-size: 20px; }
  .achievement-burst { font-size: 90px; }
}

/* ─── Result page — hero summary ──────────────────────────────────── */
.result-hero {
  position: relative;
  border-radius: 18px;
  padding: 22px 20px 20px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,87,34,0.25);
  background:
    radial-gradient(circle at 80% -10%, rgba(255,87,34,0.20), transparent 55%),
    linear-gradient(180deg, rgba(255,87,34,0.10), rgba(0,0,0,0.30));
  box-shadow: 0 14px 32px rgba(0,0,0,0.40);
}
.result-hero-glow {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 20% 0%, rgba(255,255,255,0.08), transparent 55%);
  pointer-events: none;
}
.result-hero-body { position: relative; z-index: 1; }

.result-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.result-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.result-pill-primary { background: rgba(255,87,34,0.18); color: var(--primary-light); border: 1px solid rgba(255,87,34,0.40); }
.result-pill-muted   { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.85); }
.result-pill-success { background: rgba(76,175,80,0.18); color: var(--success); }

.result-hero-time {
  background: rgba(0,0,0,0.30);
  border-radius: 14px;
  padding: 18px 18px 16px;
  text-align: center;
}
.result-hero-time-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.65);
  font-weight: 700;
}
.result-hero-time-value {
  font-size: 46px;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1.05;
  margin-top: 6px;
  color: #fff;
  background: linear-gradient(180deg, #fff, var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.result-hero-progress {
  margin-top: 14px;
  height: 8px;
  border-radius: 100px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.result-hero-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success), var(--primary));
  border-radius: 100px;
  transition: width 0.6s ease-out;
}
.result-hero-progress-meta {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}
.result-hero-progress-meta strong { color: #fff; font-weight: 800; }

.result-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.result-split-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,0.30);
  border-radius: 12px;
  padding: 12px 14px;
  border-left: 4px solid;
}
.result-split-run     { border-left-color: var(--info); }
.result-split-workout { border-left-color: var(--primary); }
.result-split-icon { font-size: 22px; line-height: 1; }
.result-split-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(255,255,255,0.6);
  font-weight: 700;
}
.result-split-value {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  margin-top: 2px;
  line-height: 1.1;
}
.result-split-run .result-split-value     { color: var(--info); }
.result-split-workout .result-split-value { color: var(--primary-light); }
.result-split-pct {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
}
.result-split-bar {
  display: flex;
  height: 10px;
  border-radius: 100px;
  overflow: hidden;
  background: rgba(0,0,0,0.30);
  margin-top: 12px;
}
.result-split-bar-run     { background: var(--info); transition: width 0.6s ease-out; }
.result-split-bar-workout { background: var(--primary); transition: width 0.6s ease-out; }

/* ─── Result page — stations breakdown ────────────────────────────── */
.result-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 2px 12px;
  flex-wrap: wrap;
}
.result-section-title {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  letter-spacing: 0.3px;
  color: #fff;
}
.result-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
}
.result-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.dot-complete { background: var(--success); }
.dot-partial  { background: var(--warning); }
.dot-pending  { background: var(--bg3); border: 1px solid var(--border); }

.result-stations {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.result-station-card {
  position: relative;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--bg2), var(--bg3));
  border: 1px solid var(--border);
  padding: 14px 14px 14px 18px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}
.result-station-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--primary);
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}
.result-station-card.leg-run::before     { background: var(--info); }
.result-station-card.leg-workout::before { background: var(--primary); }
.result-station-card.status-complete  { border-color: rgba(76,175,80,0.35); }
.result-station-card.status-partial   { border-color: rgba(255,152,0,0.35); }
.result-station-card.status-pending   { opacity: 0.85; }
.result-station-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 10px 22px rgba(0,0,0,0.30);
}

.result-station-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.30);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
}
.result-station-toggle:hover { background: rgba(255,255,255,0.10); color: #fff; }
.result-station-card[aria-expanded="false"] .result-station-chevron { transform: rotate(-90deg); display: inline-block; transition: transform 0.2s; }
.result-station-card[aria-expanded="true"]  .result-station-chevron { transform: rotate(0); display: inline-block; transition: transform 0.2s; }
.result-station-card[aria-expanded="false"] .result-station-detail { display: none; }

.result-station-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-right: 32px;
}
.result-station-num-wrap { flex-shrink: 0; }
.result-station-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 15px;
  background: var(--bg3);
  color: var(--text-muted);
  border: 2px solid var(--border);
}
.status-complete .result-station-num {
  background: rgba(76,175,80,0.22);
  color: var(--success);
  border-color: rgba(76,175,80,0.50);
  box-shadow: 0 0 0 4px rgba(76,175,80,0.10);
}
.status-partial .result-station-num {
  background: rgba(255,152,0,0.22);
  color: var(--warning);
  border-color: rgba(255,152,0,0.50);
}

.result-station-info { flex: 1; min-width: 0; }
.result-station-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.result-station-name {
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  letter-spacing: 0.2px;
}
.result-leg-pill {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 2px 7px;
  border-radius: 100px;
  text-transform: uppercase;
}
.pill-run     { background: rgba(33,150,243,0.18); color: var(--info); }
.pill-workout { background: rgba(255,87,34,0.18);  color: var(--primary-light); }
.result-pb-pill {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 2px 7px;
  border-radius: 100px;
  text-transform: uppercase;
  background: rgba(255,152,0,0.20);
  color: var(--warning);
  animation: pbPulse 2s ease-in-out infinite;
}
@keyframes pbPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,152,0,0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(255,152,0,0); }
}
.result-station-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}
.result-station-meta strong { color: rgba(255,255,255,0.85); font-weight: 700; }
.result-station-time {
  font-weight: 900;
  font-size: 16px;
  color: var(--success);
  letter-spacing: 0.5px;
}
.status-partial .result-station-time { color: var(--warning); }
.result-station-status-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 2px 8px;
  border-radius: 100px;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  text-transform: uppercase;
}

.result-station-detail {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  animation: stationFadeIn 0.25s ease-out;
}
@keyframes stationFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.result-station-warning {
  font-size: 12px;
  color: var(--warning);
  background: rgba(255,152,0,0.08);
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}
.result-station-pb-line {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.result-station-pb-line strong { color: #fff; }

.result-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}
.result-metric {
  background: rgba(0,0,0,0.25);
  border-radius: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
}
.result-metric-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
}
.result-metric-value {
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  margin-top: 2px;
}
.result-station-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  padding: 8px 10px;
  border-radius: 8px;
  border-left: 3px solid var(--border);
}

@media (max-width: 480px) {
  .result-hero-time-value { font-size: 38px; }
  .result-split { grid-template-columns: 1fr; }
}


/* ─── Achievement / Level-up celebration card ─────────────────────── */
.achievement-card {
  position: relative;
  border-radius: 18px;
  padding: 22px 20px 24px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(135deg, rgba(255,87,34,0.18), rgba(255,87,34,0.02) 60