/* ══════════════════════════════════════════════════════════════
   UP THE WALL — Dark Premium Theme
   ══════════════════════════════════════════════════════════════ */

:root {
  --bg-primary: #0a1628;
  --bg-secondary: #161b22;
  --bg-card: #1c2333;
  --bg-card-hover: #222d3f;
  --bg-input: #0d1117;
  --border: #30363d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent: #c8251a;
  --accent-hover: #e02d20;
  --accent-green: #3fb950;
  --accent-blue: #58a6ff;
  --accent-orange: #c8251a;
  --accent-purple: #bc8cff;
  --sidebar-width: 260px;
  --header-height: 0px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  min-height: 100%;
  background: #0a1628;
  color-scheme: dark;
}

/* Lucide icons — inline defaults */
[data-lucide] {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  stroke: currentColor;
  fill: none;
  margin-right: 4px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  background-color: var(--bg-primary);
  background-image: url('../img/backgrounds/BACKGROUND CERRO WALWALÜN.jpg');
  background-size: cover;
  background-position: center 30%;
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.65);
  z-index: 0;
  pointer-events: none;
}
#appLayout {
  position: relative;
  z-index: 1;
}

/* ── LOGIN PAGE ──────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #0a0e14 0%, #1a1f2e 100%);
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(30,50,80,0.6) 0%, transparent 100%);
  pointer-events: none;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow);
}

.login-logo {
  margin-bottom: 8px;
  text-align: center;
}
.logo-img {
  max-width: 200px;
  height: auto;
}
.logo-img-sm {
  height: 36px;
  width: auto;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 32px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--accent);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn .inline-icon {
  flex-shrink: 0;
}

.inline-icon {
  line-height: 0;
}

.inline-icon svg,
.btn .inline-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
  text-transform: uppercase;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(241, 246, 252, 0.52);
  border-color: rgba(255, 255, 255, 0.08);
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.btn-primary:disabled:hover,
.btn-secondary:disabled:hover,
.btn-danger:disabled:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
}

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

.btn-danger {
  background: #da3633;
  color: #fff;
}

.btn-danger:hover {
  background: #f85149;
}

.btn-delete-climb {
  background: none;
  border: none;
  color: #484f58;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.btn-delete-climb:hover {
  color: #f85149;
  background: rgba(248, 81, 73, 0.1);
}

.table-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.history-bulk-count {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.history-bulk-delete {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.history-select-all,
.history-select-row {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.history-select-cell {
  text-align: center;
  padding-left: 12px;
  padding-right: 4px;
}

.history-row.is-selected {
  background: rgba(200, 37, 26, 0.06);
}

.signup-choice-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0 20px;
}

.signup-choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 16px;
  background: #141a24;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  color: var(--text-primary);
}

.signup-choice-card:hover {
  border-color: var(--accent);
  background: rgba(255, 68, 68, 0.06);
}

.signup-choice-icon {
  font-size: 28px;
  margin-bottom: 2px;
}

.signup-choice-title {
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
}

.signup-choice-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.signup-closed-notice {
  background: rgba(218, 54, 51, 0.15);
  border: 1px solid rgba(218, 54, 51, 0.4);
  color: #f85149;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  text-transform: uppercase;
  margin: 8px 0 20px;
}

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

.form-divider {
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.invite-row {
  margin-bottom: 8px !important;
}
.invite-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 500;
}

.btn-add-invite {
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
  text-transform: uppercase;
}

.btn-add-invite:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.login-switch {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  text-transform: uppercase;
}

.login-switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.login-switch a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.login-public-btn {
  width: 100%;
  margin-top: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-contact {
  margin-top: 16px;
  text-align: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.login-contact a {
  color: var(--text-muted);
  text-decoration: none;
}
.login-contact a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* Generic card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Contact page */
.contact-intro-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  margin-bottom: 12px;
}
.contact-icon {
  flex-shrink: 0;
}
.contact-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.contact-card {
  padding: 24px 20px;
}
.contact-card .form-group {
  margin-bottom: 20px;
}
.contact-card .form-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: block;
}
.contact-card textarea.form-input {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}
.contact-subject-help {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(240, 136, 62, 0.34);
  background:
    linear-gradient(180deg, rgba(48, 43, 47, 0.92) 0%, rgba(28, 35, 49, 0.92) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 189, 122, 0.08),
    0 8px 20px rgba(0, 0, 0, 0.12);
}
.contact-subject-help-title {
  color: #ffe0c4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.contact-subject-help-copy {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}
.contact-success-check {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.contact-success-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.contact-success-sub {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.login-error {
  background: rgba(218, 54, 51, 0.15);
  border: 1px solid rgba(218, 54, 51, 0.4);
  color: #f85149;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

/* ── APP LAYOUT ──────────────────────────────────────────── */
.app-layout {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
}

.app-layout.active {
  display: flex;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s;
}

.sidebar-header {
  padding: 28px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header .logo-img-sm {
  height: 52px;
}

.sidebar-brand {
  font-family: 'Georgia', serif;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-primary);
}

.sidebar-user {
  margin-top: 20px;
  font-size: 15px;
  color: var(--text-secondary);
}

.sidebar-user strong {
  color: var(--text-primary);
  display: block;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 3px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
  border-left: 3px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-item.active {
  color: var(--accent);
  background: rgba(255, 68, 68, 0.08);
  border-left-color: var(--accent);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 20px;
}

.sidebar-footer {
  padding: 16px 20px calc(80px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.btn-logout {
  width: auto;
  padding: 6px 20px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}

.btn-logout:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.app-layout.public-mode .nav-item:not(.public-nav-item),
.app-layout.public-mode .nav-divider {
  display: none;
}

.app-layout.public-mode .sidebar-user span {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── MAIN CONTENT ────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px;
  min-height: 100vh;
}

.page-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 28px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
}

.dashboard-top-row {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-left: 16px;
  padding-right: 4px;
  box-sizing: border-box;
}

.dashboard-greeting-line {
  color: #e6edf3;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.dashboard-top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  min-width: fit-content;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-admin {
  background: rgba(200, 37, 26, 0.15);
  color: var(--accent);
  border: 1px solid rgba(200, 37, 26, 0.3);
  text-transform: uppercase;
}

.badge-user {
  background: rgba(200, 37, 26, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(200, 37, 26, 0.3);
  text-transform: uppercase;
}

/* ── CHALLENGE BANNER ────────────────────────────────────── */
.challenge-notif {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.challenge-notif-top {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.challenge-notif-desc {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.challenge-notif:hover {
  border-color: var(--accent);
}
.challenge-notif.is-daily-five {
  border-color: rgba(200, 37, 26, 0.46);
  background:
    linear-gradient(180deg, rgba(30, 39, 56, 0.98) 0%, rgba(24, 31, 45, 0.98) 100%);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 133, 118, 0.12),
    inset 0 0 0 1px rgba(200, 37, 26, 0.05);
}
.challenge-notif.is-boost-challenge {
  border-color: rgba(88, 166, 255, 0.48);
  background:
    radial-gradient(circle at 12% 0%, rgba(88, 166, 255, 0.22), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(125, 202, 255, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(19, 34, 54, 0.98) 0%, rgba(22, 27, 34, 0.98) 100%);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(138, 208, 255, 0.16),
    inset 0 0 0 1px rgba(88, 166, 255, 0.08);
}
.challenge-notif-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  background: var(--accent);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.challenge-notif-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.challenge-notif-arrow {
  font-size: 18px;
  color: var(--text-muted);
}
.challenge-boost-panel {
  border: 1px solid rgba(88, 166, 255, 0.32);
  border-radius: 10px;
  background: rgba(6, 16, 31, 0.36);
  padding: 10px;
}
.challenge-boost-main {
  display: flex;
  align-items: center;
  gap: 10px;
}
.challenge-boost-multiplier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 24px;
  border-radius: 999px;
  background: rgba(88, 166, 255, 0.22);
  color: #8ad0ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.challenge-boost-copy {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.challenge-boost-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}
.challenge-boost-rules span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(230, 237, 243, 0.86);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── LAST ASCENSION EVENT BANNER ─────────────────────────── */
#lastAscensionBanner {
  padding: 0 0 14px;
}

.last-ascension-card {
  position: relative;
  width: 100%;
  appearance: none;
  border: 1px solid rgba(200, 37, 26, 0.36);
  border-radius: 14px;
  padding: 13px 14px 14px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  overflow: hidden;
  color: var(--text-primary);
  background:
    linear-gradient(90deg, rgba(200, 37, 26, 0.16), rgba(28, 35, 51, 0.98) 28%, rgba(28, 35, 51, 0.98) 100%);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  text-transform: uppercase;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.last-ascension-card.has-integrated-boost {
  border-color: rgba(88, 166, 255, 0.46);
  background:
    linear-gradient(90deg, rgba(200, 37, 26, 0.16), rgba(28, 35, 51, 0.98) 28%, rgba(19, 34, 54, 0.98) 100%);
}

.last-ascension-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(200, 37, 26, 0.18), transparent 44%);
  opacity: 0.72;
  pointer-events: none;
}

.last-ascension-card:hover,
.last-ascension-card:focus-visible {
  border-color: rgba(200, 37, 26, 0.9);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(200, 37, 26, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
  outline: none;
}

.last-ascension-main,
.last-ascension-meta {
  position: relative;
  z-index: 1;
}

.last-ascension-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.last-ascension-kicker {
  color: rgba(230, 237, 243, 0.68);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.last-ascension-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-size: clamp(21px, 6vw, 30px);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 0.98;
  text-shadow: none;
  white-space: nowrap;
}

.last-ascension-copy {
  max-width: 760px;
  color: rgba(230, 237, 243, 0.78);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.045em;
}

.last-ascension-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(230, 237, 243, 0.72);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.075em;
  white-space: nowrap;
}

.last-ascension-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.last-ascension-boost-strip {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  margin-top: 3px;
  border: 1px solid rgba(88, 166, 255, 0.28);
  border-radius: 12px;
  padding: 9px 10px;
  background:
    radial-gradient(circle at 10% 10%, rgba(88, 166, 255, 0.22), transparent 32%),
    linear-gradient(180deg, rgba(10, 23, 41, 0.66), rgba(8, 15, 27, 0.52));
  color: var(--text-primary);
}

.last-ascension-boost-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  border-radius: 999px;
  background: rgba(88, 166, 255, 0.16);
  color: #a7d8ff;
  padding: 3px 7px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.last-ascension-boost-label strong {
  color: inherit;
  font-size: 1em;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.last-ascension-boost-main {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(245, 248, 252, 0.94);
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.055em;
}

.last-ascension-boost-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 20px;
  border-radius: 999px;
  background: rgba(88, 166, 255, 0.22);
  color: #8ad0ff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.last-ascension-boost-meta {
  color: rgba(230, 237, 243, 0.76);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.065em;
}

/* ── LAST ASCENSION DETAIL PAGE ──────────────────────────── */
.last-ascension-page {
  display: grid;
  gap: 14px;
}

.last-ascension-detail-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(200, 37, 26, 0.44);
  border-radius: 18px;
  padding: 22px;
  background:
    radial-gradient(circle at 88% 10%, rgba(200, 37, 26, 0.22), transparent 38%),
    linear-gradient(135deg, rgba(28, 35, 51, 0.98) 0%, rgba(28, 35, 51, 0.94) 58%, rgba(74, 28, 27, 0.96) 100%);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
}

.last-ascension-detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(200, 37, 26, 0.16), transparent 48%),
    repeating-linear-gradient(112deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 18px);
  pointer-events: none;
}

.last-ascension-detail-hero > * {
  position: relative;
  z-index: 1;
}

.last-ascension-detail-kicker {
  color: rgba(230, 237, 243, 0.76);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.last-ascension-detail-title {
  color: var(--accent);
  font-size: clamp(42px, 9vw, 86px);
  font-weight: 950;
  letter-spacing: -0.065em;
  line-height: 0.82;
  margin-bottom: 16px;
}

.last-ascension-detail-title span {
  display: block;
}

.last-ascension-detail-hero p {
  max-width: 760px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.last-ascension-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.last-ascension-detail-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid rgba(200, 37, 26, 0.28);
  border-radius: 14px;
  background: rgba(28, 35, 51, 0.94);
  text-transform: uppercase;
}

.last-ascension-detail-card.is-clickable {
  width: 100%;
  appearance: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.last-ascension-detail-card.is-clickable:hover,
.last-ascension-detail-card.is-clickable:focus-visible {
  border-color: rgba(200, 37, 26, 0.72);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(200, 37, 26, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.last-ascension-detail-card.is-weather {
  border-color: rgba(200, 37, 26, 0.34);
  background:
    linear-gradient(135deg, rgba(200, 37, 26, 0.32), rgba(28, 35, 51, 0.94));
}

.last-ascension-detail-card.is-schedule {
  display: block;
  padding: 17px;
  border-color: rgba(200, 37, 26, 0.34);
  background:
    linear-gradient(135deg, rgba(200, 37, 26, 0.16), rgba(31, 72, 120, 0.28) 44%, rgba(28, 35, 51, 0.95));
}

.last-ascension-schedule-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.last-ascension-schedule-heading h2 {
  margin-bottom: 0;
}

.last-ascension-detail-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: rgba(200, 37, 26, 0.12);
  flex: 0 0 auto;
}

.last-ascension-detail-card.is-weather .last-ascension-detail-icon {
  color: var(--accent);
  background: rgba(200, 37, 26, 0.14);
}

.last-ascension-detail-icon [data-lucide] {
  margin-right: 0;
}

.last-ascension-detail-card h2 {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.last-ascension-detail-card p {
  color: rgba(230, 237, 243, 0.78);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.last-ascension-schedule {
  display: grid;
  gap: 9px;
  margin-top: 4px;
}

.last-ascension-schedule-row {
  position: relative;
  width: 100%;
  appearance: none;
  display: grid;
  grid-template-columns: minmax(80px, auto) minmax(112px, 0.9fr) minmax(0, 1.45fr);
  gap: 10px;
  align-items: center;
  padding: 11px 34px 11px 12px;
  border: 1px solid rgba(200, 37, 26, 0.24);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(13, 17, 23, 0.48), rgba(22, 34, 55, 0.42));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  color: inherit;
  font: inherit;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.last-ascension-schedule-row::after {
  content: '›';
  position: absolute;
  top: 50%;
  right: 12px;
  color: rgba(230, 237, 243, 0.56);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
  transition: color 0.18s ease, transform 0.18s ease;
}

.last-ascension-schedule-row:hover,
.last-ascension-schedule-row:focus-visible {
  border-color: rgba(200, 37, 26, 0.68);
  background:
    linear-gradient(90deg, rgba(200, 37, 26, 0.16), rgba(31, 72, 120, 0.5));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transform: translateY(-1px);
  outline: none;
}

.last-ascension-schedule-row:hover::after,
.last-ascension-schedule-row:focus-visible::after {
  color: var(--text-primary);
  transform: translate(2px, -50%);
}

.last-ascension-schedule-time {
  color: var(--accent);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.last-ascension-schedule-name {
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.last-ascension-schedule-desc {
  color: rgba(230, 237, 243, 0.72);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.035em;
}

.last-ascension-detail-link {
  display: inline-flex;
  margin-top: 9px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.last-ascension-detail-cta {
  justify-self: start;
}

.modal-overlay.weather-forecast-open .modal {
  max-width: 520px;
}

.weather-forecast-modal {
  display: grid;
  gap: 12px;
  text-transform: uppercase;
}

.weather-forecast-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(200, 37, 26, 0.32);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(200, 37, 26, 0.38), rgba(28, 35, 51, 0.94));
}

.weather-forecast-summary [data-lucide],
.weather-forecast-summary .inline-icon {
  color: var(--accent);
  margin-right: 0;
}

.weather-forecast-summary strong {
  display: block;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}

.weather-forecast-summary span {
  display: block;
  color: rgba(230, 237, 243, 0.76);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
  letter-spacing: 0.04em;
}

.weather-forecast-list {
  display: grid;
  gap: 8px;
}

.weather-forecast-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  background: rgba(13, 17, 23, 0.38);
}

.weather-forecast-time {
  color: var(--accent);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.weather-forecast-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.weather-forecast-temp {
  color: var(--text-primary);
  font-size: 34px;
  font-weight: 850;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.weather-forecast-condition {
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.weather-forecast-feels {
  color: rgba(230, 237, 243, 0.58);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-top: 3px;
}

.weather-forecast-metrics {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 10px;
  color: rgba(230, 237, 243, 0.74);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.weather-forecast-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.weather-forecast-metrics [data-lucide],
.weather-forecast-metrics .inline-icon {
  flex: 0 0 auto;
  color: var(--accent);
  margin-right: 0;
}

.weather-forecast-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  padding: 11px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 11px;
  background: rgba(200, 37, 26, 0.11);
  color: rgba(230, 237, 243, 0.82);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.4;
  letter-spacing: 0.05em;
}

.weather-forecast-note [data-lucide],
.weather-forecast-note .inline-icon {
  color: var(--accent);
  margin-right: 0;
}

@media (max-width: 768px) {
  #lastAscensionBanner {
    padding: 0 0 12px;
  }

  .last-ascension-card {
    padding: 12px 12px 13px;
    gap: 7px;
    border-radius: 14px;
  }

  .last-ascension-title {
    font-size: clamp(21px, 6.4vw, 28px);
  }

  .last-ascension-copy {
    font-size: 10px;
  }

  .last-ascension-meta {
    align-self: stretch;
    font-size: 10px;
  }

  .last-ascension-detail-hero {
    padding: 18px;
  }

  .last-ascension-detail-kicker {
    font-size: 9px;
  }

  .last-ascension-detail-title {
    font-size: clamp(38px, 15vw, 58px);
  }

  .last-ascension-detail-hero p {
    font-size: 12px;
  }

  .last-ascension-detail-grid {
    grid-template-columns: 1fr;
  }

  .last-ascension-detail-card {
    padding: 14px;
  }

  .last-ascension-schedule-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .modal-overlay.weather-forecast-open .modal {
    width: calc(100% - 22px);
    max-height: calc(100dvh - 54px);
    padding: 16px;
  }

  .modal-overlay.weather-forecast-open .modal h3 {
    margin-bottom: 12px;
  }

  .weather-forecast-modal {
    gap: 8px;
  }

  .weather-forecast-summary {
    gap: 8px;
    padding: 10px;
    border-radius: 12px;
  }

  .weather-forecast-summary strong {
    font-size: 10px;
    margin-bottom: 4px;
  }

  .weather-forecast-summary span {
    font-size: 9.5px;
    line-height: 1.35;
  }

  .weather-forecast-list {
    gap: 6px;
  }

  .weather-forecast-row {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 6px 8px;
    padding: 8px;
    border-radius: 11px;
  }

  .weather-forecast-time {
    font-size: 14px;
  }

  .weather-forecast-temp {
    font-size: 25px;
  }

  .weather-forecast-condition {
    font-size: 9.5px;
    line-height: 1.18;
  }

  .weather-forecast-feels {
    font-size: 8px;
    margin-top: 2px;
  }

  .weather-forecast-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px 6px;
    font-size: 7.5px;
  }

  .weather-forecast-note {
    padding: 9px 10px;
    font-size: 8.5px;
    line-height: 1.3;
  }
}

.daily-five-route-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.daily-five-route-list.is-compact {
  gap: 6px;
}
.daily-five-route-pill {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.daily-five-route-pill.is-compact {
  padding: 8px 10px;
  border-radius: 10px;
}
.daily-five-route-pill-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.daily-five-route-pill-line {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.daily-five-route-pill-meta {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.35;
}
.daily-five-route-pill.is-compact .daily-five-route-pill-line {
  font-size: 11px;
}
.daily-five-route-pill.is-compact .daily-five-route-pill-meta {
  font-size: 10px;
}
.daily-five-preview-block {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.daily-five-preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.daily-five-preview-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.daily-five-preview-day {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.daily-five-preview-copy {
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.booster-notif {
  background:
    linear-gradient(180deg, rgba(30, 39, 56, 0.98) 0%, rgba(24, 31, 45, 0.98) 100%);
  border: 1px solid rgba(63, 185, 80, 0.34);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(138, 208, 255, 0.14),
    inset 0 0 0 1px rgba(88, 166, 255, 0.08);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.booster-notif.is-muted {
  border-color: rgba(240, 136, 62, 0.34);
}
.booster-notif:hover,
.booster-notif:focus-within {
  border-color: rgba(200, 37, 26, 0.7);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(200, 37, 26, 0.38),
    inset 0 1px 0 rgba(138, 208, 255, 0.14),
    inset 0 0 0 1px rgba(200, 37, 26, 0.08);
}
.booster-notif::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 18%, rgba(125, 202, 255, 0.26), transparent 36%),
    radial-gradient(circle at 84% -12%, rgba(200, 37, 26, 0.16), transparent 40%),
    radial-gradient(circle at 68% 120%, rgba(63, 185, 80, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(120, 194, 255, 0.08) 0%, rgba(63, 185, 80, 0.04) 46%, transparent 72%);
  pointer-events: none;
}
.booster-notif > * {
  position: relative;
  z-index: 1;
}

.booster-notif-top {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.booster-notif-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #e8fff0;
  background: rgba(63, 185, 80, 0.24);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.booster-notif-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booster-notif-desc {
  font-size: 12px;
  color: rgba(230, 237, 243, 0.86);
  line-height: 1.45;
}
.booster-notif-meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}
.log-booster-banner.is-integrated-challenge-boost {
  border-color: rgba(88, 166, 255, 0.5);
  background:
    radial-gradient(circle at 12% 0%, rgba(88, 166, 255, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(19, 34, 54, 0.96) 0%, rgba(22, 27, 34, 0.96) 100%);
}

.challenge-info {
  width: 100%;
}
.challenge-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.challenge-info p {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.challenge-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  width: 100%;
}

.challenge-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── CHALLENGE DETAIL CARD (classement défis page) ──────── */
.challenge-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
}
.challenge-detail-name {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.challenge-detail-desc {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.challenge-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.challenge-detail-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── HERO STAT CARD ──────────────────────────────────────── */
.stat-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px 20px;
  margin-bottom: 16px;
  transition: border-color 0.2s;
  max-width: 100%;
  overflow: hidden;
}
.stat-hero-card:hover {
  border-color: var(--accent);
}
.stat-hero-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.stat-hero-value {
  font-size: 96px;
  font-weight: 800;
  line-height: 0.9;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -2px;
  word-break: break-all;
  overflow-wrap: break-word;
}
.stat-hero-unit {
  font-size: 28px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0;
}
.stat-hero-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.stat-hero-link {
  color: var(--accent-blue);
  cursor: pointer;
}
.stat-hero-link:hover { text-decoration: underline; }
.stat-hero-progress-track {
  height: 72px;
  background: rgba(13, 17, 23, 0.55);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
}
.palier-seg {
  position: relative;
  height: 100%;
  border-right: 2px solid rgba(255,255,255,0.34);
  overflow: hidden;
  cursor: default;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}
.palier-seg:last-child { border-right: none; }
.palier-seg:hover,
.palier-seg:focus-visible {
  background: rgba(255,255,255,0.04);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14);
  outline: none;
}
.palier-seg.is-current {
  box-shadow: inset 0 0 0 2px rgba(255, 133, 118, 0.36);
}
.palier-seg-fill {
  height: 100%;
  background: var(--accent-orange);
  transition: width 0.8s ease;
}
.stat-hero-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

.stat-hero-progress-hint {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(230, 237, 243, 0.84);
  line-height: 1.4;
}

.stat-hero-progress-check {
  color: var(--accent-green);
  font-weight: 800;
}

.stat-hero-progress-hint strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* ── PALIER TROPHY ───────────────────────────────────────── */
.palier-badges {
  display: flex;
  justify-content: flex-end;
  padding: 0;
  margin-bottom: 0;
}
.palier-trophy {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}
.palier-trophy img {
  height: 52px;
  width: auto;
  max-height: 100%;
  object-fit: contain;
}

/* ── PALIER POPUP ────────────────────────────────────────── */
.palier-popup {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  padding: 24px;
}
.palier-popup-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 24px 20px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}
.palier-popup-header {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: -12px;
  line-height: 1.4;
}
.palier-popup-sticker {
  width: 180px;
  height: 180px;
  object-fit: contain;
  display: block;
  margin: -16px auto -20px;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4));
}
.palier-popup-goodie-label {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-orange);
  margin-bottom: 4px;
}
.palier-popup-goodie-value {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-orange);
  text-transform: none;
  line-height: 1.4;
  margin-bottom: 12px;
  opacity: 0.85;
}
.palier-popup-divider {
  height: 1px;
  background: var(--border);
  margin: 0 0 12px;
}
.palier-popup-next-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.palier-popup-next-name {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}
.palier-popup-next-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.45;
  text-transform: none;
  font-style: italic;
  margin-bottom: 14px;
}
.palier-popup-btn {
  width: 100%;
  height: 25px;
  padding: 0 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  gap: 10px;
  min-height: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.palier-popup-btn > span:first-child {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.palier-popup-btn .inline-icon,
.palier-popup-btn [data-lucide] {
  width: 15px !important;
  height: 15px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin: 0 !important;
  transform: translateY(0.5px);
}

.palier-popup-btn svg {
  width: 15px;
  height: 15px;
  display: block;
  stroke-width: 2.25;
}

/* ── PAGE PALIERS ──────────────────────────────────────────── */
.paliers-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.palier-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  position: relative;
  transition: border-color 0.2s ease;
  overflow: hidden;
}
.palier-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 14px 2px 12px;
}
.palier-card:hover {
  border-color: var(--accent);
}
.palier-card.locked {
  opacity: 0.4;
}
.palier-card.current {
  border-color: var(--accent-orange);
  box-shadow: 0 0 20px rgba(240, 136, 62, 0.2);
}
.palier-card-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-orange);
  min-width: 28px;
  text-align: center;
  line-height: 1;
}
.palier-card.locked .palier-card-num {
  color: var(--text-muted);
}
.palier-card-img {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 0;
  padding: 0;
}
.palier-card-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}
.palier-card.locked .palier-card-img {
  background: transparent;
}
.palier-card.locked .palier-card-img img {
  filter: grayscale(1) brightness(0.5);
}
.palier-card-info {
  flex: 1;
  min-width: 0;
  text-align: center;
}
.palier-card-nom {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.palier-card-range {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.palier-card-desc {
  padding: 0 14px 10px;
  width: 100%;
}
.palier-card-lieu {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-orange);
  margin-bottom: 4px;
}
.palier-card-desc-text {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.45;
  text-transform: none;
  font-style: italic;
}
.palier-card-goodie {
  width: 100%;
  padding: 0 14px 10px;
}
.palier-card-goodie-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-orange);
  margin-bottom: 4px;
}
.palier-card-goodie-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  font-style: italic;
}
.palier-card-check {
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
}
.palier-card-lock {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0.4;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.palier-card.locked:hover {
  border-color: var(--accent);
  opacity: 0.7;
}
.palier-card.locked:hover .palier-card-lock {
  opacity: 1;
  color: var(--accent);
}

@media (min-width: 1024px) {
  .paliers-content {
    gap: 20px;
  }

  .palier-card {
    border-radius: 18px;
  }

  .palier-card-top {
    display: grid;
    grid-template-columns: auto auto minmax(320px, 440px) 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 26px 30px 8px 28px;
  }

  .palier-card-num {
    min-width: 0;
    font-size: 56px;
    line-height: 0.9;
    text-align: left;
  }

  .palier-card-img {
    width: 180px;
    height: 116px;
    justify-content: flex-start;
  }

  .palier-card-info {
    text-align: left;
    align-self: center;
  }

  .palier-card-nom {
    font-size: 23px;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
  }

  .palier-card-range {
    font-size: 16px;
    letter-spacing: 0.05em;
  }

  .palier-card-check,
  .palier-card-lock {
    align-self: center;
    justify-self: end;
    font-size: 28px;
  }

  .palier-card-desc,
  .palier-card-goodie {
    padding-left: 28px;
    padding-right: 30px;
  }

  .palier-card-desc {
    padding-top: 4px;
    padding-bottom: 14px;
  }

  .palier-card-goodie {
    padding-bottom: 20px;
  }

  .palier-card-lieu,
  .palier-card-goodie-label {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .palier-card-desc-text,
  .palier-card-goodie-text {
    max-width: 760px;
    font-size: 16px;
    line-height: 1.5;
  }
}

/* ── STAT CARDS GRID ─────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  max-width: 100%;
}
.stats-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.stats-grid-2 {
  display: flex;
  gap: 10px;
}
.stats-grid-2 .stat-total-card {
  flex: 1 1 0;
  min-width: 0;
}
.stats-grid-2 .stat-rank-score-card {
  flex: 0 0 auto;
  width: 120px;
}

@media (min-width: 769px) {
  .stats-grid-2 .stat-total-card {
    flex: 3 1 0;
  }
  .stats-grid-2 .stat-rank-score-card {
    flex: 1 1 0;
    width: auto;
    min-width: 160px;
  }
}

/* ── RANK ARC CARD ───────────────────────────────────────── */
.stat-rank-card,
.stat-card.stat-rank-card {
  margin-bottom: 16px;
  padding: 12px 16px 40px;
  width: 100%;
}
.rank-arc-panel {
  position: relative;
  min-height: 0;
  margin-top: 0;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}
.rank-team-svg {
  width: 100%;
  display: block;
  overflow: visible;
}
.rank-center-badge {
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  display: flex;
  align-items: baseline;
  gap: 2px;
  white-space: nowrap;
}
.rank-center-rank {
  font-size: 64px;
  line-height: 1;
  font-weight: 900;
  color: var(--text-primary);
}
.rank-center-total {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
.rank-arc-track {
  fill: none;
  stroke: rgba(230, 237, 243, 0.18);
  stroke-width: 16;
  stroke-linecap: butt;
}
.rank-arc-fill {
  fill: none;
  stroke: rgba(245, 240, 232, 0.92);
  stroke-width: 16;
  stroke-linecap: butt;
}
.rank-arc-fill.current-user {
  stroke: var(--accent-orange);
}
.rank-arc-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  fill: rgba(13, 17, 23, 0.92);
}
.rank-arc-label-gray {
  fill: rgba(13, 17, 23, 0.75);
}
.rank-arc-label.current-user {
  fill: #0d1117;
}
@media (max-width: 768px) {
  .rank-center-rank {
    font-size: 58px;
  }
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.stat-card .stat-card-link {
  margin-top: auto;
  padding-top: 8px;
}

.stat-card:hover {
  border-color: var(--accent);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.stat-card-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: block;
  min-height: 2.4em;
}

.stat-card-light {
  background: #e8edf5;
  border-color: #c8d0e0;
  color: #0d1117;
}
.stat-card-light .stat-card-label { color: #3a4a6a; }
.stat-card-light .stat-card-value { color: #0d1117; }
.stat-card-light .stat-card-sub { color: #4a5a7a; }
.stat-card-light:hover { border-color: var(--accent); }

.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 68, 68, 0.12);
  color: var(--accent);
}

.stat-card-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 2px;
}

.stat-card-unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
}

.stat-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

#page-team .stat-card {
  align-items: center;
  justify-content: center;
  text-align: center;
}

#page-team .stat-card-label {
  min-height: 0;
  margin-bottom: 10px;
}

.stat-card-link {
  display: inline-block;
  font-size: 12px;
  color: var(--accent-blue);
  margin-top: 8px;
  cursor: pointer;
}

.stat-card-link:hover {
  text-decoration: underline;
}

.stat-rank-score-card {
  background: #f5f0e8;
  border-color: #ddd5c0;
  color: #0d1117;
}
.stat-rank-score-card .stat-card-label { color: #3a3a50; }
.stat-rank-score-card:hover { border-color: var(--accent); }
.stat-rank-score-card .stat-card-link { color: #3a3a50; }

.rank-score-display {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin: 4px 0 8px;
}
.rank-score-num {
  font-size: 80px;
  font-weight: 900;
  line-height: 1;
  color: #0d1117;
}
.rank-score-total {
  font-size: 13px;
  font-weight: 600;
  color: #4a4a6a;
}

@media (max-width: 768px) {
  .stat-rank-score-card {
    width: 126px;
  }

  .stat-rank-score-card .rank-score-display {
    gap: 1px;
  }

  .stat-rank-score-card .rank-score-num {
    font-size: 72px;
  }

  .stat-rank-score-card .rank-score-total {
    font-size: 12px;
  }

  .stat-rank-score-card.rank-score-compact {
    width: 132px;
  }

  .stat-rank-score-card.rank-score-compact .rank-score-num {
    font-size: 64px;
  }

  .stat-rank-score-card.rank-score-compact .rank-score-total {
    font-size: 11px;
  }

  .stat-rank-score-card.rank-score-ultra {
    width: 138px;
  }

  .stat-rank-score-card.rank-score-ultra .rank-score-num {
    font-size: 56px;
  }

  .stat-rank-score-card.rank-score-ultra .rank-score-total {
    font-size: 10px;
  }
}

.stat-total-card {
  border-left: 3px solid var(--accent-orange);
  background: linear-gradient(135deg, #1c2333 0%, #1a2030 100%);
}
.stat-total-num {
  font-size: 56px;
  font-weight: 900;
  color: var(--accent-orange);
  line-height: 1;
}
.stat-total-unit {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-left: 2px;
}
.stat-total-card .stat-card-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: 0.3px;
}

/* ── TABLES ──────────────────────────────────────────────── */
.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.table-title {
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 12px 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

tr:last-child td {
  border-bottom: none;
}

/* Centre la dernière colonne (Ascensions) */
th:last-child,
td:last-child {
  text-align: center;
}

tr:hover td {
  background: var(--bg-card-hover);
}

/* Team members table alignment */
#page-team table {
  table-layout: fixed;
}
#page-team th:nth-child(1),
#page-team td:nth-child(1) {
  width: 68px;
  text-align: center;
  padding-left: 18px;
  padding-right: 8px;
}
#page-team th:nth-child(2),
#page-team td:nth-child(2) {
  padding-left: 6px;
}
#page-team th:nth-child(3),
#page-team td:nth-child(3) {
  width: 190px;
}
#page-team th:nth-child(4),
#page-team td:nth-child(4) {
  width: 170px;
  text-align: center;
}

/* History table column widths */
#page-history table { table-layout: fixed; }
#page-history th:nth-child(1),
#page-history td:nth-child(1) { width: 6%; text-align: center; padding-left: 12px; padding-right: 4px; }
#page-history th:nth-child(2),
#page-history td:nth-child(2) { width: 18%; padding-left: 12px; padding-right: 4px; }
#page-history th:nth-child(3),
#page-history td:nth-child(3) { width: 16%; text-align: center; }
#page-history th:nth-child(4),
#page-history td:nth-child(4) { width: 14%; text-align: center; }
#page-history th:nth-child(5),
#page-history td:nth-child(5) { width: 14%; text-align: center; }
#page-history th:nth-child(6),
#page-history td:nth-child(6) { width: 18%; text-align: center; }
#page-history th:nth-child(7),
#page-history td:nth-child(7) { width: 14%; text-align: center; padding: 0; }

.history-route-note {
  display: inline-block;
  margin-top: 4px;
  color: rgba(240, 136, 62, 0.92);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.history-color-missing {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
}

/* ── LOG CLIMB FORM ──────────────────────────────────────── */
.log-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 100%;
}

.log-form.is-locked {
  opacity: 0.82;
}

.log-form h3 {
  font-size: 18px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.log-form-note {
  margin: -10px 0 16px;
  max-width: 720px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.log-special-note-banner {
  margin-bottom: 16px;
}

.log-special-note-banner .log-restriction-banner-card {
  border-color: rgba(240, 136, 62, 0.42);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(240, 136, 62, 0.08),
    inset 0 1px 0 rgba(255, 189, 122, 0.16),
    inset 0 0 0 1px rgba(240, 136, 62, 0.06);
}

.log-special-note-banner .log-restriction-banner-card::before {
  background:
    radial-gradient(circle at 10% 14%, rgba(255, 184, 110, 0.22), transparent 36%),
    radial-gradient(circle at 88% -6%, rgba(125, 202, 255, 0.16), transparent 40%),
    linear-gradient(180deg, rgba(255, 171, 92, 0.11) 0%, rgba(240, 136, 62, 0.06) 56%, transparent 82%);
}

.log-special-note-banner .restriction-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 210, 171, 0.96);
  letter-spacing: 0.08em;
  text-shadow: 0 0 18px rgba(125, 202, 255, 0.16);
}

.log-special-note-banner .special-note-alert-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(240, 136, 62, 0.16);
  color: #ffb16f;
  font-size: 12px;
  line-height: 1;
  box-shadow:
    0 0 0 1px rgba(240, 136, 62, 0.24),
    0 6px 16px rgba(125, 202, 255, 0.16);
}

.log-special-note-banner .restriction-desc {
  color: rgba(230, 237, 243, 0.84);
}

.log-special-note-banner .text-accent {
  color: #ff9966;
}

/* ── Plan du gym ─────────────────────── */
.gym-plan-btn {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
}
.gym-plan-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}
.gym-plan-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  margin-top: 0;
}
.gym-plan-container.open {
  max-height: min(78vh, 1400px);
  margin-top: 12px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  text-align: center;
  touch-action: pan-x pan-y pinch-zoom;
}
.gym-plan-help {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.gym-plan-img {
  height: auto;
  border-radius: var(--radius);
  display: block;
  margin: 0 auto;
  max-width: 100%;
  touch-action: pan-x pan-y pinch-zoom;
}
.gym-plan-landscape { display: none; }
.gym-plan-portrait {
  width: min(100%, 720px);
  max-width: 100%;
}

@media (min-width: 769px) {
  .gym-plan-landscape {
    display: block;
    width: min(100%, 860px);
    max-width: 100%;
  }
  .gym-plan-portrait { display: none; }
}

.climb-headers {
  display: flex;
  gap: 8px;
  padding: 0 0 6px;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding-right: 32px;
}
.climb-h-ligne { flex: 0 0 clamp(84px, 25vw, 98px); }
.climb-h-voie { flex: 1; padding-left: 2px; }
.climb-h-reps { flex: 0 0 46px; text-align: center; margin-left: 0; }

@media (min-width: 769px) {
  .climb-headers {
    gap: 12px;
    padding-right: 36px; /* match remove button space */
  }
  .climb-h-ligne { flex: 0 0 72px; }
  .climb-h-voie { flex: 1; padding-left: 2px; }
  .climb-h-reps { flex: 0 0 60px; text-align: center; margin-left: 0; }
}

/* Mobile defaults (original sizes) */
.climb-entry {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.climb-entry .climb-ligne {
  flex: 0 0 clamp(84px, 25vw, 98px);
  width: clamp(84px, 25vw, 98px);
  min-width: 84px;
  max-width: 98px;
  padding: 10px 26px 10px 9px;
  font-size: 13px;
  text-align: left;
  text-align-last: left;
  background-position: right 9px center;
  -moz-appearance: textfield;
}
.climb-entry .climb-ligne::-webkit-inner-spin-button,
.climb-entry .climb-ligne::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.climb-voie-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 118px;
}
.climb-voie-wrap .climb-voie {
  flex: 1;
  min-width: 0;
  font-size: 13px;
}
.couleur-dot {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}
.climb-dot {
  flex-shrink: 0;
}

.climb-entry .climb-reps {
  flex: 0 0 46px;
  text-align: center;
  padding: 10px 4px;
}
.climb-entry-status {
  flex: 0 0 100%;
  padding-left: clamp(92px, calc(25vw + 8px), 106px);
  margin-top: -2px;
  font-size: 11px;
  line-height: 1.35;
  color: #ffb4ab;
  letter-spacing: 0.01em;
}

.log-calc-toast {
  display: none;
  margin: -8px 0 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(30, 39, 56, 0.98) 0%, rgba(24, 31, 45, 0.98) 100%);
  border: 1px solid rgba(200, 37, 26, 0.28);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(138, 208, 255, 0.09);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.log-calc-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.log-calc-toast.is-death {
  border-color: rgba(200, 37, 26, 0.34);
}

.log-calc-toast.is-booster {
  border-color: rgba(63, 185, 80, 0.36);
}

.log-calc-toast.is-combo {
  border-color: rgba(200, 37, 26, 0.34);
}

.log-calc-toast-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(230, 237, 243, 0.76);
  margin-bottom: 4px;
}

.log-calc-toast-top .inline-icon {
  flex-shrink: 0;
}

.log-calc-toast-value {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: #e6edf3;
}
.climb-entry.is-at-limit .climb-reps {
  border-color: rgba(200, 37, 26, 0.6);
  color: #ffb4ab;
  box-shadow: inset 0 0 0 1px rgba(200, 37, 26, 0.1);
}

/* Desktop: bigger inputs, full-width flex */
@media (min-width: 769px) {
  .climb-entry {
    gap: 12px;
    margin-bottom: 14px;
  }
  .climb-entry .climb-ligne {
    flex: 0 0 72px;
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    padding: 12px 10px;
    font-size: 16px;
  }
  .climb-voie-wrap {
    flex: 1;
    min-width: 0;
  }
  .climb-voie-wrap .climb-voie {
    font-size: 14px;
    padding: 12px 10px;
  }
  .climb-entry .climb-reps {
    flex: 0 0 60px;
    padding: 12px 8px;
    font-size: 16px;
    -moz-appearance: textfield;
  }
  .climb-entry .climb-reps::-webkit-inner-spin-button,
  .climb-entry .climb-reps::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .climb-entry-status {
    padding-left: 84px;
    font-size: 12px;
  }
}

.climb-entry-remove {
  flex: 0 0 24px;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.climb-entry-remove:hover {
  background: rgba(200, 37, 26, 0.15);
}

.climb-add-btn {
  display: block;
  width: 100%;
  padding: 10px;
  margin-bottom: 16px;
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  white-space: normal;
  line-height: 1.35;
  transition: all 0.2s;
}

.climb-add-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.climb-add-btn:disabled,
.gym-plan-btn:disabled,
.log-form.is-locked .climb-entry-remove:disabled,
.log-form.is-locked .form-input:disabled,
.log-form.is-locked .form-select:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.form-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  appearance: none;
  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='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

.form-select:focus {
  border-color: var(--accent);
}

.form-select option {
  font-size: 13px;
  background: #1c2128;
  color: var(--text-primary);
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

.route-preview {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  display: none;
}

.route-preview.visible {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.route-preview-info span {
  display: block;
}

.route-preview-height {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
}

.success-message {
  background: rgba(63, 185, 80, 0.12);
  border: 1px solid rgba(88, 166, 255, 0.32);
  color: var(--accent-green);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  display: none;
  font-size: 14px;
}

.success-popup {
  position: fixed;
  top: 50%;
  left: 24px;
  right: 24px;
  transform: translateY(-50%) scale(0.95);
  background: #161b22;
  border: 1.5px solid #e6edf3;
  border-radius: var(--radius);
  padding: 20px 24px;
  color: #e6edf3;
  font-size: 13px;
  text-align: center;
  text-transform: uppercase;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.success-popup.show {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* Desktop: constrain to content area (right of sidebar) */
@media (min-width: 769px) {
  .success-popup {
    left: calc(var(--sidebar-width) + 40px);
    right: 40px;
  }
}

/* ── ADMIN TABS ──────────────────────────────────────────── */
.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

/* ── Admin Challenge Cards ─────────────────────────────── */
.admin-challenge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.admin-chall-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.admin-chall-name {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-primary);
}

.admin-chall-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 12px;
  vertical-align: middle;
}

.badge-active {
  background: rgba(63, 185, 80, 0.15);
  color: #3fb950;
  border: 1px solid rgba(88, 166, 255, 0.32);
}

.badge-ended {
  background: rgba(139, 148, 158, 0.15);
  color: #8b949e;
  border: 1px solid rgba(139, 148, 158, 0.3);
}

.badge-upcoming {
  background: rgba(240, 136, 62, 0.15);
  color: #f0883e;
  border: 1px solid rgba(240, 136, 62, 0.3);
}

.admin-chall-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.admin-chall-details {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.admin-chall-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-chall-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-chall-detail > span:last-child {
  font-size: 14px;
  color: var(--text-primary);
}

.admin-chall-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-chall-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.admin-chall-actions .btn .inline-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-password-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.admin-password-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-password-title {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-primary);
}

.admin-password-copy {
  margin-top: 6px;
  max-width: 720px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.admin-password-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 16px;
  align-items: start;
}

.admin-password-summary {
  min-height: 100%;
  background: rgba(13, 17, 23, 0.58);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.admin-password-summary.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 184px;
  color: var(--text-muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-password-summary-title {
  margin-bottom: 14px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-password-meta {
  display: grid;
  gap: 12px;
}

.admin-password-meta-row {
  display: grid;
  gap: 4px;
}

.admin-password-meta-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-password-meta-value {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.admin-password-confirm-hint {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-password-confirm-hint.is-valid {
  color: var(--accent-green);
}

.admin-password-confirm-hint.is-error {
  color: var(--accent);
}

.admin-password-note {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-password-result {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(63, 185, 80, 0.08);
  border: 1px solid rgba(63, 185, 80, 0.22);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.6;
  text-transform: uppercase;
}

.admin-password-result strong {
  color: #3fb950;
}

.btn-activate {
  background: rgba(63, 185, 80, 0.15);
  color: #3fb950;
  border: 1px solid rgba(88, 166, 255, 0.32);
}

.btn-activate:hover {
  background: rgba(63, 185, 80, 0.25);
}

.btn-terminate {
  background: rgba(240, 136, 62, 0.15);
  color: #f0883e;
  border: 1px solid rgba(240, 136, 62, 0.3);
}

.btn-terminate:hover {
  background: rgba(240, 136, 62, 0.25);
}

/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  width: calc(100% - 48px);
  max-width: 380px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}

.modal h3 {
  font-size: 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.challenge-test-modal {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.challenge-test-lead {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

.challenge-test-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.challenge-test-date-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.challenge-test-date-sep {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.challenge-test-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.challenge-test-label {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.challenge-test-help {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.challenge-test-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}

.challenge-test-toggle input,
.challenge-test-option input {
  accent-color: var(--accent);
}

.challenge-test-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.challenge-test-grid.is-disabled {
  opacity: 0.46;
}

.challenge-test-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  color: var(--text-primary);
}

.challenge-test-option-text {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.challenge-test-summary {
  padding: 12px 14px;
  border: 1px solid rgba(200, 37, 26, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(200, 37, 26, 0.08);
  color: rgba(255,255,255,0.86);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.5;
  text-transform: uppercase;
}

.challenge-announce-modal {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-overlay.challenge-announce-open .modal h3 {
  justify-content: flex-end;
  margin-bottom: 8px;
}

.modal-overlay.challenge-announce-open #modalTitle {
  display: none;
}

.challenge-announce-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.challenge-announce-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: rgba(200, 37, 26, 0.14);
  border: 1px solid rgba(200, 37, 26, 0.45);
  color: #ffb4ab;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.challenge-announce-name {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  color: var(--text-primary);
}

.challenge-announce-subtitle {
  margin-top: -6px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.challenge-announce-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(63, 185, 80, 0.1);
  border: 1px solid rgba(63, 185, 80, 0.22);
  color: #d2f4d6;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.challenge-announce-copy {
  margin: 0;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.55;
}

.challenge-announce-details {
  display: grid;
  gap: 10px;
}

.challenge-announce-detail {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
}

.challenge-announce-detail [data-lucide] {
  color: var(--accent);
  margin-top: 2px;
}

.challenge-announce-detail-label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.challenge-announce-detail-value {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 768px) {
  .challenge-announce-name {
    font-size: 24px;
  }

  .challenge-announce-topline {
    flex-direction: column;
    align-items: stretch;
  }

  .challenge-announce-badge,
  .challenge-announce-meta {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ── DELETE CONFIRMATION ─────────────────────────────────── */
.delete-confirm {
  text-align: center;
  padding: 8px 0;
}
.delete-confirm-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.8;
}
.delete-confirm-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.delete-confirm-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
}
.delete-confirm-cell {
  font-size: 14px;
  color: var(--text-secondary);
}
.delete-confirm-cell strong {
  color: var(--text-primary);
}
.delete-confirm-warning {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #f85149;
  margin-bottom: 24px;
}
.delete-confirm-actions {
  display: flex;
  gap: 12px;
}
.delete-confirm-cancel {
  flex: 1;
  background: var(--border) !important;
  color: var(--text-primary) !important;
  padding: 12px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
}
.delete-confirm-cancel:hover {
  background: #484f58 !important;
}
.delete-confirm-delete {
  flex: 1;
  background: #c8251a !important;
  color: #fff !important;
  padding: 12px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
}
.delete-confirm-delete:hover {
  background: #e02d20 !important;
}
.delete-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── LEADERBOARD ─────────────────────────────────────────── */
.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

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

.leaderboard-item.is-my-team {
  margin: 6px 8px;
  padding: 11px 16px;
  border: 1px solid rgba(200, 37, 26, 0.44);
  border-radius: var(--radius-sm);
  border-bottom: 1px solid rgba(200, 37, 26, 0.44);
  background:
    linear-gradient(180deg, rgba(30, 39, 56, 0.98) 0%, rgba(24, 31, 45, 0.98) 100%);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 133, 118, 0.12),
    inset 0 0 0 1px rgba(200, 37, 26, 0.05);
  position: relative;
  overflow: hidden;
}

.leaderboard-item.is-my-team::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 120, 94, 0.16), transparent 34%),
    radial-gradient(circle at 86% -8%, rgba(200, 37, 26, 0.11), transparent 38%),
    linear-gradient(180deg, rgba(255, 108, 88, 0.06) 0%, rgba(200, 37, 26, 0.03) 52%, transparent 78%);
  pointer-events: none;
}

.leaderboard-item.is-my-team > * {
  position: relative;
  z-index: 1;
}

.leaderboard-item.is-my-team .leaderboard-team-name,
.leaderboard-item.is-my-team .leaderboard-meters {
  color: #f5f7fb;
}

.leaderboard-item.is-my-team .leaderboard-team-meta,
.leaderboard-item.is-my-team .challenge-pct,
.leaderboard-item.is-my-team .leaderboard-meters small {
  color: rgba(230, 237, 243, 0.82);
}

.leaderboard-rank {
  font-size: 14px;
  font-weight: 800;
  width: 28px;
  text-align: center;
  color: var(--text-muted);
}

.leaderboard-rank.top-1 { color: #ffd700; }
.leaderboard-rank.top-2 { color: #c0c0c0; }
.leaderboard-rank.top-3 { color: #cd7f32; }

.leaderboard-team {
  flex: 1;
}

.leaderboard-team-name {
  font-weight: 600;
  font-size: 13px;
}

.leaderboard-team-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.leaderboard-meters {
  font-size: 15px;
  font-weight: 700;
  text-align: right;
}

.leaderboard-meters small {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

/* ── CHALLENGE LEADERBOARD EXTRAS ───────────────────────── */
.challenge-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}
.challenge-progress-fill {
  height: 100%;
  background: var(--text-muted);
  border-radius: 2px;
  transition: width 0.8s ease;
}
.challenge-progress-fill.complete {
  background: var(--accent);
}
.leaderboard-pct-col {
  text-align: right;
  flex-shrink: 0;
}
.challenge-pct {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}
.challenge-pct.complete {
  color: var(--accent);
}
.leaderboard-item.challenge-completed {
  border-left: 1px solid var(--accent);
}

.team-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── PROGRESS BAR ────────────────────────────────────────── */
.progress-bar-container {
  background: var(--bg-input);
  border-radius: 6px;
  height: 10px;
  overflow: hidden;
  margin-top: 8px;
}

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

/* ── BOTTOM NAV (mobile) ─────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(64px + var(--safe-area-bottom));
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  z-index: 100;
  align-items: center;
  justify-content: space-evenly;
  padding: 0 2px;
  padding-bottom: var(--safe-area-bottom);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 9px;
  cursor: pointer;
  padding: 6px 4px;
  transition: color 0.2s;
  flex: 1;
  min-width: 0;
  text-transform: uppercase;
}

.bottom-nav-item.active {
  color: var(--accent);
}

.bottom-nav-item span {
  font-weight: 500;
}

.public-bottom-nav,
.bottom-nav-exit {
  display: none;
}

.app-layout.public-mode .bottom-nav-item:not([data-page="leaderboard"]):not(.public-bottom-nav),
.app-layout.public-mode .bottom-nav-fab {
  display: none;
}

.app-layout.public-mode .bottom-nav-item.public-bottom-nav {
  display: flex;
}

.app-layout.public-mode .bottom-nav-exit {
  display: flex;
}

.app-layout.public-mode .bottom-nav {
  justify-content: space-evenly;
}

.app-layout.public-mode .bottom-nav-item,
.app-layout.public-mode .bottom-nav-exit {
  flex: 0 0 33.333%;
}

.bottom-nav-exit {
  width: 42px;
  height: 42px;
  min-width: 0;
  max-width: 42px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-top: 0;
  box-shadow: 0 4px 16px rgba(255, 68, 68, 0.4);
  transition: transform 0.2s, background 0.2s;
}

.bottom-nav-exit:active {
  transform: scale(0.92);
}

.bottom-nav-exit:hover {
  background: var(--accent-hover);
}

.bottom-nav-fab {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-top: 0;
  box-shadow: 0 4px 16px rgba(255, 68, 68, 0.4);
  transition: transform 0.2s, background 0.2s;
}

.bottom-nav-fab:active {
  transform: scale(0.92);
}

.bottom-nav-fab:hover {
  background: var(--accent-hover);
}

/* ── RÈGLEMENTS ─────────────────────────────────────────── */
.regl-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.regl-tab {
  flex: 1;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
}

.regl-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.reglements-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reglement-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.reglement-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  margin-top: 1px;
}

.reglement-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.reglement-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── DÉFIS ──────────────────────────────────────────────── */
.defis-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.defi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
}
.defi-card:hover {
  border-color: var(--accent);
}

.defi-card.status-active {
  border-color: var(--accent);
}

.defi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}

.defi-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  margin: 0;
}

.defi-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  white-space: nowrap;
}

.defi-status.status-active {
  background: rgba(63, 185, 80, 0.15);
  color: var(--success);
}

.defi-status.status-past {
  background: rgba(200, 37, 26, 0.15);
  color: var(--accent);
}

.defi-status.status-upcoming {
  background: rgba(240, 136, 62, 0.15);
  color: var(--accent-orange);
}
.defi-status.status-announced {
  background: rgba(240, 136, 62, 0.15);
  color: var(--accent-orange);
}
.defi-status.status-resolved {
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
}
.defi-card.status-announced {
  border-color: var(--accent-orange);
}
.defi-card.status-resolved {
  border-color: #ffd700;
}

.defi-subtitle {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.defi-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 8px;
  text-transform: uppercase;
}

.defi-rules {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin: 0 0 12px;
  text-transform: none;
}

.defi-rule-line {
  display: block;
}

.defi-winner {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #ffd700;
  text-transform: uppercase;
  text-align: center;
}

.defi-pending {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 12px;
  text-align: center;
}

.defi-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 13px;
  color: rgba(230, 237, 243, 0.9);
  margin-top: 10px;
  line-height: 1.45;
  text-transform: uppercase;
}

.defi-meta span {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
}

.defi-meta .defi-meta-pill {
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 215, 0, 0.28);
  background: rgba(255, 215, 0, 0.1);
  color: #ffd84d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.defi-meta .defi-meta-pill [data-lucide] {
  color: #ffd84d;
  stroke: #ffd84d;
}

.defi-meta span:last-child {
  color: rgba(230, 237, 243, 0.82);
}
.defi-meta [data-lucide],
.defi-meta .inline-icon {
  color: var(--accent);
  stroke: var(--accent);
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  margin-top: 1px;
  flex-shrink: 0;
}

.defi-meta .inline-icon-gift {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  margin-top: 0;
  margin-left: -1px;
}

.challenge-scope-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
}

.challenge-scope-tab {
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(230, 237, 243, 0.1);
  background:
    linear-gradient(180deg, rgba(30, 39, 56, 0.98) 0%, rgba(24, 31, 45, 0.98) 100%);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(138, 208, 255, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.challenge-scope-tab::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 18%, rgba(125, 202, 255, 0.18), transparent 34%),
    radial-gradient(circle at 86% -10%, rgba(200, 37, 26, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(138, 208, 255, 0.05) 0%, transparent 72%);
  pointer-events: none;
}

.challenge-scope-tab:hover {
  color: var(--text-primary);
  border-color: rgba(200, 37, 26, 0.74);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(200, 37, 26, 0.34),
    inset 0 1px 0 rgba(138, 208, 255, 0.1),
    inset 0 0 0 1px rgba(200, 37, 26, 0.08);
  transform: translateY(-1px);
}

.challenge-scope-tab.active {
  color: #fff;
  border-color: rgba(200, 37, 26, 0.46);
  background:
    linear-gradient(180deg, rgba(33, 42, 58, 0.98) 0%, rgba(24, 31, 45, 0.98) 100%);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 133, 118, 0.08),
    inset 0 0 0 1px rgba(200, 37, 26, 0.06);
}

.challenge-scope-test-banner {
  background:
    linear-gradient(180deg, rgba(30, 39, 56, 0.98) 0%, rgba(24, 31, 45, 0.98) 100%);
  border: 1px solid rgba(200, 37, 26, 0.44);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 0 0 12px;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 133, 118, 0.12),
    inset 0 0 0 1px rgba(200, 37, 26, 0.05);
  position: relative;
  overflow: hidden;
}

.challenge-scope-test-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 120, 94, 0.2), transparent 34%),
    radial-gradient(circle at 86% -8%, rgba(200, 37, 26, 0.13), transparent 38%),
    linear-gradient(180deg, rgba(255, 108, 88, 0.08) 0%, rgba(200, 37, 26, 0.04) 52%, transparent 78%);
  pointer-events: none;
}

.challenge-scope-test-banner > * {
  position: relative;
  z-index: 1;
}

.challenge-scope-test-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.challenge-scope-test-title [data-lucide] {
  color: var(--accent);
  stroke: var(--accent);
}

.challenge-scope-test-desc {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.global-test-banner {
  background:
    linear-gradient(180deg, rgba(30, 39, 56, 0.98) 0%, rgba(24, 31, 45, 0.98) 100%);
  border: 1px solid rgba(200, 37, 26, 0.44);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 0 0 12px;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 133, 118, 0.12),
    inset 0 0 0 1px rgba(200, 37, 26, 0.05);
}

.global-test-banner-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.global-test-banner-copy {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.defi-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.defi-tab {
  flex: 0 1 auto;
  max-width: 220px;
  min-height: 46px;
  padding: 10px 16px;
  background:
    linear-gradient(180deg, rgba(30, 39, 56, 0.98) 0%, rgba(24, 31, 45, 0.98) 100%);
  border: 1px solid rgba(230, 237, 243, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(138, 208, 255, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  position: relative;
  overflow: hidden;
}

.defi-tab::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 18%, rgba(125, 202, 255, 0.18), transparent 34%),
    radial-gradient(circle at 86% -10%, rgba(200, 37, 26, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(138, 208, 255, 0.05) 0%, transparent 72%);
  pointer-events: none;
}

.defi-tab:hover {
  color: var(--text-primary);
  border-color: rgba(200, 37, 26, 0.74);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(200, 37, 26, 0.34),
    inset 0 1px 0 rgba(138, 208, 255, 0.1),
    inset 0 0 0 1px rgba(200, 37, 26, 0.08);
  transform: translateY(-1px);
}

.defi-tab.active {
  color: #fff;
  border-color: rgba(200, 37, 26, 0.46);
  background:
    linear-gradient(180deg, rgba(33, 42, 58, 0.98) 0%, rgba(24, 31, 45, 0.98) 100%);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 133, 118, 0.08),
    inset 0 0 0 1px rgba(200, 37, 26, 0.06);
}

.defi-tab-label {
  display: block;
  line-height: 1.05;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  position: relative;
  z-index: 1;
}

/* Challenge leaderboard — member progress */
.challenge-detail-subtitle {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.challenge-detail-rules {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
  text-transform: none;
}
.qualifies-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 8px;
  border-radius: 999px;
  background: rgba(88, 166, 255, 0.22);
  border: 1px solid rgba(63, 185, 80, 0.4);
  color: #4ade80;
  vertical-align: middle;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.qualifies-check [data-lucide] {
  width: 12px;
  height: 12px;
  margin-right: 0;
  stroke-width: 2.5;
}
.member-progress-list {
  margin-top: 6px;
}
.member-progress {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 0;
  text-transform: none;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(72px + var(--safe-area-top));
  background: rgba(10, 22, 40, 0.72);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  z-index: 99;
  align-items: center;
  padding: var(--safe-area-top) 16px 0;
  gap: 12px;
}

.hamburger {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}
.mobile-page-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-primary);
  text-transform: uppercase;
  flex: 1;
  text-align: center;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

@media (max-width: 768px) {
  .challenge-scope-tabs {
    margin-bottom: 8px;
  }

  .challenge-scope-test-banner {
    margin-bottom: 12px;
    padding: 12px 14px;
  }

  .defi-tabs {
    margin-bottom: 12px;
    gap: 8px;
  }

  .defi-tab {
    flex: 1 1 calc(50% - 4px);
    max-width: none;
    min-height: 46px;
    padding: 9px 12px;
    font-size: 10px;
  }

  .mobile-header {
    display: flex;
  }

  .bottom-nav {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.active {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: calc(80px + var(--safe-area-top)) 16px calc(88px + var(--safe-area-bottom));
    max-width: 100vw;
    overflow-x: hidden;
  }

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

  .stat-card {
    padding: 12px;
  }

  .stat-card-value {
    font-size: 22px;
  }

  .stats-grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .stat-hero-value {
    font-size: 72px;
  }

  .stat-hero-card {
    padding: 18px 16px 16px;
  }

  .stat-hero-progress-track {
    height: 56px;
  }

  .challenge-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin-bottom: 10px;
  }

  .dashboard-top-row {
    width: 100%;
    padding-left: 16px;
    padding-right: 0;
  }

  #page-admin .page-header {
    margin-bottom: 16px;
  }

  .page-title {
    display: none;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .admin-chall-details {
    gap: 16px;
  }

  .admin-chall-actions {
    flex-direction: column;
  }

  .admin-chall-actions .btn {
    width: 100%;
    text-align: center;
  }

  .table-title {
    font-size: 14px;
  }

  .table-header .btn {
    font-size: 11px;
    padding: 6px 10px;
    white-space: nowrap;
  }

  .login-card {
    margin: 16px;
    padding: 32px 24px;
  }

  .toast {
    /* centered via top:50% + transform */
  }

  th {
    padding: 6px 4px;
    font-size: 9px;
  }

  td {
    padding: 8px 4px;
    font-size: 11px;
  }

  .badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  .btn-sm {
    padding: 5px 8px;
    font-size: 11px;
  }

  td .btn-sm {
    display: inline-flex;
    margin: 2px 0;
  }

  .table-header {
    padding: 12px 16px;
  }

  #page-team th:nth-child(1),
  #page-team td:nth-child(1) {
    width: 48px;
    padding-left: 10px;
    padding-right: 4px;
  }
  #page-team th:nth-child(3),
  #page-team td:nth-child(3) {
    width: 110px;
  }
  #page-team th:nth-child(4),
  #page-team td:nth-child(4) {
    width: 92px;
  }

  .stats-grid-3 {
    gap: 8px;
  }

  .stats-grid-3 .stat-card-value {
    font-size: 20px;
  }

  .stats-grid-3 .stat-card-label {
    font-size: 10px;
  }

  .challenge-empty-card {
    padding: 16px;
    gap: 12px;
  }

  .challenge-empty-card-title {
    font-size: 15px;
  }

  .challenge-empty-card-copy {
    font-size: 13px;
  }

  .challenge-empty-card-secondary {
    font-size: 11px;
  }
}

/* ── PAGE SECTIONS ───────────────────────────────────────── */
.page-section {
  display: none;
  max-width: 100%;
  overflow-x: hidden;
}

.page-section.active {
  display: block;
}

/* ── LOADING / SPINNER ───────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--text-secondary);
  gap: 12px;
}

/* ── TOAST ───────────────────────────────────────────────── */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(30, 37, 46, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 2000;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  color: var(--text-primary);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
}

.toast.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Desktop: center toast within main content area (right of sidebar) */
@media (min-width: 769px) {
  .toast {
    left: calc(var(--sidebar-width) + (100vw - var(--sidebar-width)) / 2);
  }
}

.toast.success {
  border-color: var(--accent-green);
  border-width: 1.5px;
}

.toast.error {
  border-color: #da3633;
  border-width: 1.5px;
}
.toast a {
  color: var(--accent-blue);
  text-decoration: underline;
  font-weight: 600;
}

/* Error banner — replaces sync bar on failure */
.sync-bar.sync-error {
  background: rgba(218, 54, 51, 0.12);
  border-color: #da3633;
}
.sync-bar.sync-error .sync-bar-label {
  color: #da3633;
}
.sync-bar.sync-error .sync-bar-track { display: none; }

/* Error toast with contact link — stays longer */
.toast.error-contact {
  border-color: #da3633;
  padding: 16px 20px;
  max-width: 340px;
  line-height: 1.5;
}
.toast.error-contact .error-toast-title {
  font-weight: 700;
  margin-bottom: 4px;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: #da3633;
}
.toast.error-contact .error-toast-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.toast.error-contact .error-toast-link:hover {
  text-decoration: underline;
}

/* ── EMERGENCY BANNER ────────────────────────────────────── */
#emergencyBanner {
  padding: 0 16px 16px;
}
#apiHealthBanner {
  padding: 0 16px 16px;
}
.emergency-banner-inner {
  background: rgba(200, 37, 26, 0.12);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.emergency-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.emergency-text {
  flex: 1;
  min-width: 200px;
}
.emergency-text strong {
  display: block;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 4px;
}
.emergency-text span {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.emergency-btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: background 0.2s;
}
.emergency-btn:hover {
  background: var(--accent-hover);
}
.api-health-banner-inner {
  position: relative;
  overflow: hidden;
  background: rgba(22, 31, 49, 0.94);
  border: 2px solid rgba(200, 37, 26, 0.9);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 12px 32px rgba(8, 13, 22, 0.22);
}
.api-health-banner-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(200, 37, 26, 0.16), transparent 48%),
    linear-gradient(90deg, rgba(200, 37, 26, 0.10), rgba(13, 27, 44, 0.04));
  pointer-events: none;
}
.api-health-banner-inner > * {
  position: relative;
  z-index: 1;
}
.api-health-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.api-health-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.api-health-copy strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.api-health-copy span {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}
.version-update-banner-inner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(48, 43, 47, 0.98) 0%, rgba(29, 35, 49, 0.98) 100%);
  border: 2px solid rgba(240, 136, 62, 0.88);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 12px 32px rgba(8, 13, 22, 0.22);
}
.version-update-banner-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% -10%, rgba(255, 180, 112, 0.16), transparent 36%),
    radial-gradient(circle at 10% 18%, rgba(240, 136, 62, 0.14), transparent 34%),
    linear-gradient(90deg, rgba(240, 136, 62, 0.12), rgba(13, 27, 44, 0.03));
  pointer-events: none;
}
.versionUpdateBanner,
#versionUpdateBanner {
  margin-bottom: 18px;
}
.version-update-banner-inner > * {
  position: relative;
  z-index: 1;
}
.version-update-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.version-update-copy strong {
  color: #ffe0c4;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
  white-space: nowrap;
}
.version-update-copy span {
  display: block;
  margin-top: 4px;
  color: rgba(230, 237, 243, 0.8);
  font-size: 12px;
  line-height: 1.45;
}
.version-update-banner-inner.is-help-only {
  justify-content: flex-start;
}
.version-update-banner-inner.is-help-only .version-update-copy strong {
  white-space: normal;
}
.version-update-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  min-width: 110px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(240, 136, 62, 0.62);
  background: rgba(125, 202, 255, 0.16);
  color: #ffe0c4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.version-update-btn:hover,
.version-update-btn:focus-visible {
  background: rgba(240, 136, 62, 0.22);
  border-color: rgba(240, 136, 62, 0.72);
  transform: translateY(-1px);
}
@media (max-width: 768px) {
  .emergency-banner-inner { flex-direction: column; text-align: center; }
  .emergency-btn { width: 100%; text-align: center; }
  .version-update-banner-inner {
    padding: 10px 12px;
    gap: 10px;
  }
  .version-update-btn {
    margin-left: auto;
    min-width: 96px;
    padding: 9px 12px;
  }
  .api-health-banner-inner {
    padding: 14px 16px;
  }
}

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

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.challenge-empty-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  margin-bottom: 12px;
  background: linear-gradient(180deg, rgba(30, 39, 56, 0.98) 0%, rgba(24, 31, 45, 0.98) 100%);
  border: 1px solid rgba(200, 37, 26, 0.34);
  border-radius: var(--radius);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 133, 118, 0.08),
    inset 0 0 0 1px rgba(200, 37, 26, 0.05);
}

.challenge-empty-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 999px;
  background: rgba(200, 37, 26, 0.14);
  color: var(--accent);
}

.challenge-empty-card-icon [data-lucide] {
  margin-right: 0;
}

.challenge-empty-card-body {
  min-width: 0;
}

.challenge-empty-card-title {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.challenge-empty-card-copy {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}

.challenge-empty-card-secondary {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.challenge-empty-card-actions {
  margin-top: 12px;
}

.text-accent { color: var(--accent); }
.text-green { color: var(--accent-green); }
.text-blue { color: var(--accent-blue); }
.text-muted { color: var(--text-muted); }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* Skeleton loading */
@keyframes skeletonPulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.3; }
}
.skeleton-list { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; }
.skeleton-item { background: var(--bg-card); border-radius: var(--radius); padding: 18px 16px; }
.skeleton-line { height: 14px; background: var(--border); border-radius: 6px; width: 75%; animation: skeletonPulse 1.2s ease-in-out infinite; }
.skeleton-item:nth-child(2) .skeleton-line { width: 60%; animation-delay: 0.15s; }
.skeleton-item:nth-child(3) .skeleton-line { width: 85%; animation-delay: 0.3s; }
.skeleton-item:nth-child(4) .skeleton-line { width: 50%; animation-delay: 0.45s; }

/* Sync bar — loading indicator */
@keyframes syncSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}
.sync-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.sync-bar-track {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.sync-bar-fill {
  position: absolute;
  width: 25%;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  animation: syncSlide 1.2s ease-in-out infinite;
}
.sync-bar-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  white-space: nowrap;
}
/* Sync overlay on submit button */
.btn-syncing {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}

.btn-syncing:disabled {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  cursor: progress;
}

.btn-syncing .sync-bar-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* ── Defi Ghost (terminé/résolu) ────────────────────────────── */
.defi-ghost {
  opacity: 0.45;
  border-color: var(--border) !important;
  transition: opacity 0.2s;
}
.defi-ghost:hover,
.defi-ghost:active,
.defi-ghost:focus-within {
  opacity: 1;
}

/* ── Log Restriction Banner ────────────────────────────────── */
.log-availability-banner {
  margin-bottom: 16px;
}

.log-availability-banner .log-restriction-banner-card {
  border-color: rgba(240, 136, 62, 0.44);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 190, 120, 0.14),
    inset 0 0 0 1px rgba(240, 136, 62, 0.06);
}

.log-availability-banner .log-restriction-banner-card:hover,
.log-availability-banner .log-restriction-banner-card:focus-within {
  border-color: rgba(240, 136, 62, 0.76);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(240, 136, 62, 0.3),
    inset 0 1px 0 rgba(255, 190, 120, 0.14),
    inset 0 0 0 1px rgba(240, 136, 62, 0.08);
}

.log-availability-banner .log-restriction-banner-card::before {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 196, 120, 0.2), transparent 34%),
    radial-gradient(circle at 86% -8%, rgba(240, 136, 62, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(255, 190, 120, 0.08) 0%, rgba(240, 136, 62, 0.04) 52%, transparent 78%);
}

.log-availability-banner .restriction-title {
  color: #ffe2c8;
}

.log-restriction-banner {
  display: grid;
  gap: 0;
  margin-bottom: 16px;
}

.log-restriction-banner-card {
  background:
    linear-gradient(180deg, rgba(30, 39, 56, 0.98) 0%, rgba(24, 31, 45, 0.98) 100%);
  border: 1px solid rgba(200, 37, 26, 0.44);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 133, 118, 0.12),
    inset 0 0 0 1px rgba(200, 37, 26, 0.05);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.log-restriction-banner-card + .log-restriction-banner-card {
  margin-top: 10px;
}
.log-restriction-banner-card:hover,
.log-restriction-banner-card:focus-within {
  border-color: rgba(200, 37, 26, 0.78);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(200, 37, 26, 0.42),
    inset 0 1px 0 rgba(255, 133, 118, 0.12),
    inset 0 0 0 1px rgba(200, 37, 26, 0.08);
}
.log-restriction-banner-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 120, 94, 0.2), transparent 34%),
    radial-gradient(circle at 86% -8%, rgba(200, 37, 26, 0.13), transparent 38%),
    linear-gradient(180deg, rgba(255, 108, 88, 0.08) 0%, rgba(200, 37, 26, 0.04) 52%, transparent 78%);
  pointer-events: none;
}
.log-restriction-banner-card > * {
  position: relative;
  z-index: 1;
}
.log-restriction-banner-card .restriction-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
}

.log-restriction-banner-card .restriction-title .inline-icon {
  flex-shrink: 0;
  transform: translateY(-1px);
}
.log-restriction-banner-card .restriction-desc {
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  color: var(--text-secondary);
}

.log-restriction-banner-card .restriction-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.88);
}

.log-restriction-banner-card .restriction-meta .inline-icon {
  flex-shrink: 0;
  transform: translateY(-1px);
}

.log-team-progress-banner {
  display: grid;
  gap: 0;
  margin-bottom: 18px;
}

.log-team-progress-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  box-shadow: none;
  transition: none;
}

.log-team-progress-card::before {
  display: none;
}

.log-team-progress-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.log-team-progress-metric {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.log-team-progress-label {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.74);
  text-transform: uppercase;
}

.log-team-progress-value {
  display: block;
  min-width: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  .log-team-progress-grid {
    grid-template-columns: 1fr;
  }

  .log-team-progress-value {
    font-size: 14px;
  }
}

/* ── Log Booster Banner ────────────────────────────────────── */
.log-booster-banner {
  background:
    linear-gradient(180deg, rgba(30, 39, 56, 0.98) 0%, rgba(24, 31, 45, 0.98) 100%);
  border: 1px solid rgba(63, 185, 80, 0.4);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  text-transform: uppercase;
  font-weight: 600;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(138, 208, 255, 0.14),
    inset 0 0 0 1px rgba(88, 166, 255, 0.08);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.log-booster-banner.is-muted {
  border-color: rgba(240, 136, 62, 0.34);
}
.log-booster-banner:hover,
.log-booster-banner:focus-within {
  border-color: rgba(200, 37, 26, 0.7);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(200, 37, 26, 0.38),
    inset 0 1px 0 rgba(138, 208, 255, 0.14),
    inset 0 0 0 1px rgba(200, 37, 26, 0.08);
}
.log-booster-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 18%, rgba(125, 202, 255, 0.26), transparent 36%),
    radial-gradient(circle at 84% -12%, rgba(200, 37, 26, 0.16), transparent 40%),
    radial-gradient(circle at 68% 120%, rgba(63, 185, 80, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(120, 194, 255, 0.08) 0%, rgba(63, 185, 80, 0.04) 46%, transparent 72%);
  pointer-events: none;
}
.log-booster-banner > * {
  position: relative;
  z-index: 1;
}
.log-booster-banner .booster-desc {
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  color: var(--text-secondary);
  margin-top: 4px;
}
.log-booster-banner .booster-meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 6px;
}

/* ── Daily Five Card ──────────────────────────────────────── */
.daily-five-log-card {
  background:
    linear-gradient(180deg, rgba(30, 39, 56, 0.98) 0%, rgba(24, 31, 45, 0.98) 100%);
  border: 1px solid rgba(200, 37, 26, 0.42);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 133, 118, 0.12),
    inset 0 0 0 1px rgba(200, 37, 26, 0.05);
}
.daily-five-log-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.daily-five-log-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffd2cb;
  text-transform: uppercase;
}
.daily-five-log-day {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.daily-five-log-copy {
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
}
.daily-five-log-note {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 768px) {
  .daily-five-preview-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .daily-five-log-card-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Admin Tabs ────────────────────────────────────────────── */
.admin-tabs-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.admin-tabs-row::-webkit-scrollbar {
  display: none;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.admin-tabs-utility {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
}

.admin-tabs-utility .btn {
  min-height: 42px;
  width: auto;
  white-space: nowrap;
}

.admin-tab {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.admin-tab:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}
.admin-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.admin-tab-utility {
  padding: 8px 16px;
  font-size: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.admin-tab-utility:not(.active):hover {
  border-color: rgba(200, 37, 26, 0.74);
  box-shadow: 0 0 0 1px rgba(200, 37, 26, 0.2);
}

.admin-panel { display: none; }
.admin-panel.active { display: block; }

@media (max-width: 700px) {
  .admin-tabs-row {
    gap: 10px;
  }

  .admin-password-head {
    flex-direction: column;
  }

  .admin-password-grid {
    grid-template-columns: 1fr;
  }

  .challenge-test-grid {
    grid-template-columns: 1fr;
  }

  .challenge-test-date-range {
    grid-template-columns: 1fr;
  }

  .challenge-test-date-sep {
    display: none;
  }
}

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

.admin-logging-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.admin-logging-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.admin-logging-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.admin-logging-copy,
.admin-logging-meta,
.admin-logging-window {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.admin-logging-window {
  margin-top: 10px;
}

.admin-logging-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.admin-logging-actions .btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.admin-logging-meta {
  margin-top: 12px;
}
.booster-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.booster-card-name {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-primary);
}
.booster-card-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.booster-card-badge.active { background: rgba(63,185,80,0.2); color: #3fb950; }
.booster-card-badge.inactive { background: rgba(139,148,158,0.2); color: #8b949e; }
.booster-card-badge.expired { background: rgba(200,37,26,0.2); color: #c8251a; }
.booster-card-details {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}
.booster-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
