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

/* =============================================================
   FIVECLUB — DESIGN SYSTEM
   Mobile-first dark fitness UI · neon lime accent
   Layers: 1.tokens · 2.reset · 3.typo · 4.layout · 5.utilities ·
           6.primitives · 7.components · 8.views · 9.responsive
   ============================================================= */


/* =============================================================
   1. DESIGN TOKENS
   ============================================================= */
:root {
  /* — Fonts — */
  --font-display: "Sora", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-text: "Manrope", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* — Surfaces / backgrounds — */
  --bg-app: #050507;
  --bg-app-2: #08080b;
  --bg-surface: #0e0e12;
  --bg-elevated: #15151a;
  --bg-card: #1a1a20;
  --bg-card-2: #20202a;
  --bg-inset: rgba(8, 8, 12, 0.85);

  /* — Strokes — */
  --stroke: rgba(255, 255, 255, 0.06);
  --stroke-2: rgba(255, 255, 255, 0.10);
  --stroke-3: rgba(255, 255, 255, 0.16);

  /* — Ink (text) — */
  --ink: #f5f6f8;
  --ink-2: #b6b8be;
  --ink-3: #82858d;
  --ink-4: #5a5d65;

  /* — Accent (signature lime) — */
  --accent: #d3fb45;
  --accent-2: #c1f028;
  --accent-3: #a8d61b;
  --accent-ink: #0b0f04;
  --accent-soft: rgba(211, 251, 69, 0.10);
  --accent-glow: rgba(211, 251, 69, 0.28);

  /* — Secondary (violet for accents) — */
  --violet: #8b5cf6;
  --violet-soft: rgba(139, 92, 246, 0.18);

  /* — States — */
  --danger: #ff5d6c;
  --danger-soft: rgba(255, 93, 108, 0.12);
  --success: #a3e635;
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.12);

  /* — Radii — */
  --r-xs: 10px;
  --r-sm: 14px;
  --r-md: 18px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-2xl: 36px;
  --r-pill: 999px;

  /* — Spacing scale (4-pt) — */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 40px;

  /* — Shadows — */
  --shadow-1: 0 6px 18px rgba(0, 0, 0, 0.32);
  --shadow-2: 0 14px 40px rgba(0, 0, 0, 0.44);
  --shadow-3: 0 24px 60px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 10px 32px var(--accent-glow);
  --shadow-card: 0 8px 22px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.04);

  /* — Motion — */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 140ms;
  --t-base: 220ms;
  --t-slow: 360ms;

  /* — Layout — */
  --nav-h: 88px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}


/* =============================================================
   2. RESET / BASE
   ============================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
#app {
  margin: 0;
  min-height: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-text);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

button {
  font-family: inherit;
  color: inherit;
}

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

a {
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

/* Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}


/* =============================================================
   3. TYPOGRAPHY
   ============================================================= */
.title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}

.subtitle {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.5;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.muted {
  color: var(--ink-2);
}


/* =============================================================
   4. LAYOUT — app shell, view, section
   ============================================================= */
.app-bg {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(900px 480px at 110% -10%, rgba(211, 251, 69, 0.07), transparent 60%),
    radial-gradient(700px 420px at -10% 100%, rgba(139, 92, 246, 0.10), transparent 60%),
    linear-gradient(180deg, #050507 0%, #08080b 40%, #0b0b10 100%);
  overflow-x: hidden;
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: radial-gradient(#ffffff 0.5px, transparent 0.5px);
  background-size: 3px 3px;
  z-index: 0;
}

.phone-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0 0 calc(var(--nav-h) + var(--safe-bottom) + 16px);
}

.view {
  width: 100%;
  min-height: calc(100vh - var(--nav-h));
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding-bottom: 18px;
}

.section {
  padding: 16px 14px;
}


/* =============================================================
   5. UTILITIES
   ============================================================= */
.stack-4  { display: grid; gap: 4px; }
.stack-8  { display: grid; gap: 8px; }
.stack-10 { display: grid; gap: 10px; }
.stack-12 { display: grid; gap: 12px; }
.stack-16 { display: grid; gap: 16px; }
.stack-20 { display: grid; gap: 20px; }


/* =============================================================
   6. PRIMITIVES — card, button, field, avatar, chip, progress
   ============================================================= */

/* ---- 6.1 Card ---- */
.card {
  position: relative;
  background: linear-gradient(165deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--stroke);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
}

.card[class*="hero-card"] {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(211, 251, 69, 0.08), transparent 58%),
    radial-gradient(120% 100% at 0% 100%, rgba(139, 92, 246, 0.10), transparent 60%),
    linear-gradient(165deg, #1c1c22 0%, #131318 100%);
}

.card[class*="hero-card"]::before {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -42px;
  width: clamp(120px, 28vw, 200px);
  aspect-ratio: 1 / 1;
  background: url("../ressources/FC-LOGO%20%281%29.svg") center / contain no-repeat;
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.card[class*="hero-card"] > * {
  position: relative;
  z-index: 1;
}

/* ---- 6.2 Button ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--r-pill);
  padding: 12px 18px;
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out),
              opacity var(--t-fast) var(--ease-out),
              background var(--t-fast) var(--ease-out);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 10px 28px rgba(211, 251, 69, 0.28),
              inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 14px 36px rgba(211, 251, 69, 0.36),
              inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-dark {
  color: var(--ink);
  background: var(--bg-card-2);
  border: 1px solid var(--stroke-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.btn-dark:hover {
  background: var(--bg-card);
  border-color: var(--stroke-3);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

/* ---- 6.3 Field (inputs, textarea, select) ---- */
.field {
  width: 100%;
  border: 1px solid var(--stroke-2);
  background: var(--bg-inset);
  color: var(--ink);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 13px;
  outline: none;
  transition: border-color var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out),
              background var(--t-fast) var(--ease-out);
}

.field::placeholder {
  color: var(--ink-3);
}

.field:hover {
  border-color: var(--stroke-3);
}

.field:focus {
  border-color: var(--accent);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 4px rgba(211, 251, 69, 0.14);
}

select.field {
  min-height: 44px;
  line-height: 1.25;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='m2.25 4.5 3.75 3 3.75-3' stroke='%23b6b8be' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 12px;
  cursor: pointer;
}

@supports (-webkit-touch-callout: none) {
  select.field {
    font-size: 16px;
    min-height: 46px;
  }
}

textarea.field {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.error {
  color: var(--danger);
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}

/* ---- 6.4 Avatar ---- */
.fc-avatar {
  flex: 0 0 auto;
  position: relative;
  border-radius: var(--r-pill);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #2a2a32, #1a1a20);
  border: 2px solid rgba(211, 251, 69, 0.38);
  box-shadow: 0 0 0 4px rgba(211, 251, 69, 0.06),
              0 8px 22px rgba(0, 0, 0, 0.35);
}

.fc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fc-avatar span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05em;
  color: var(--ink);
  letter-spacing: -0.02em;
}

/* ---- 6.5 Brand lockup ---- */
.fc-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
}

.fc-brand-mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 4px 12px rgba(211, 251, 69, 0.25));
}

.fc-brand-wordmark {
  height: 18px;
  width: auto;
  max-width: min(56vw, 220px);
  object-fit: contain;
  opacity: 0.96;
}

.login-brand-lockup .fc-brand-mark {
  width: 44px;
  height: 44px;
}

.login-brand-lockup .fc-brand-wordmark {
  height: 22px;
}

.chip-logo {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent-ink);
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 24px var(--accent-glow);
}

/* ---- 6.6 Pill / Chip / Badge ---- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--r-pill);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-card-2);
  border: 1px solid var(--stroke-2);
  color: var(--ink-2);
  white-space: nowrap;
}

.pill-accent {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
}

/* ---- 6.7 Icon (Lucide) ---- */
.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  color: currentColor;
  stroke: currentColor;
}

.icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -0.15em;
}

.icon-circle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(211, 251, 69, 0.18);
  flex: 0 0 auto;
}

.icon-circle.muted {
  background: var(--bg-elevated);
  color: var(--ink-2);
  border-color: var(--stroke-2);
}

.icon-circle.danger {
  background: rgba(255, 93, 108, 0.10);
  color: var(--danger);
  border-color: rgba(255, 93, 108, 0.22);
}

.icon-circle.warning {
  background: rgba(251, 191, 36, 0.10);
  color: var(--warning);
  border-color: rgba(251, 191, 36, 0.22);
}

.icon-circle.violet {
  background: rgba(139, 92, 246, 0.10);
  color: #b794f4;
  border-color: rgba(139, 92, 246, 0.22);
}

.emoji-fallback {
  display: inline-flex;
  font-style: normal;
  font-size: inherit;
  line-height: 1;
}

/* ---- 6.8 Progress ---- */
.fc-progress-wrap {
  margin-top: 10px;
}

.fc-progress-track {
  height: 8px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.fc-progress-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 0 12px var(--accent-glow);
  transition: width 0.6s var(--ease-out);
}


/* =============================================================
   6.9 PHOTO HERO SYSTEM
   Background-image + dark gradient overlay pour cards/views.
   Toutes les images sont sous /ressources/img/init-img/ et sont
   chargees via background-image (donc lazy par defaut: ne se
   charge que quand l'element existe dans le DOM, ce qui est
   automatique avec Vue Router single-view-mounted-at-a-time).

   Usage:
     <article class="card hero-photo hero-photo--card hero-img-menu">
       ...content...
     </article>

   Layers (de bas en haut):
     1. ::before  -> photo (background-size: cover)
     2. ::after   -> dark gradient (degrade pour lisibilite)
     3. children  -> contenu textuel
   ============================================================= */
.hero-photo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* L'image va sur l'element lui-meme (pas un pseudo) pour eviter
   les conflits avec d'autres ::before deja definis sur les cards
   (watermark logo, etc.). On utilise .card.hero-photo en double-class
   pour avoir une specificity superieure et battre les cards qui
   declarent deja leur propre background.

   background-clip: padding-box est CRUCIAL: la border de la card est
   semi-transparente (rgba blanc 10%), si l'image s'etend jusqu'au
   border-box, elle est visible a travers la border en clair (anneau
   de 1px tout autour). Avec padding-box clip, l'image s'arrete a
   l'interieur de la border, et celle-ci laisse voir le bg de la
   page (sombre) -> stroke uniforme et propre comme les cards normales. */
.card.hero-photo,
.hero-photo {
  background-color: var(--bg-card);
  background-image: var(--hero-img, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: padding-box;
}

/* On masque les ::before existants (notamment le watermark logo
   sur .card[class*="hero-card"]) quand une photo est active. */
.card.hero-photo::before {
  display: none;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(5, 5, 7, 0.20) 0%,
      rgba(5, 5, 7, 0.55) 45%,
      rgba(5, 5, 7, 0.92) 100%),
    radial-gradient(120% 80% at 50% 100%, rgba(211, 251, 69, 0.08), transparent 60%);
  z-index: 0;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease-out);
}

.hero-photo > * {
  position: relative;
  z-index: 1;
}

/* — Variant : hero card classique (taille naturelle, contenu en bas) — */
.hero-photo--card {
  border: 1px solid var(--stroke-2);
  background: var(--bg-card);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px 18px;
}

/* — Variant : hero full-bleed (login, onboarding) — */
.hero-photo--full {
  border-radius: var(--r-2xl);
  min-height: 56vh;
  max-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 22px;
}

.hero-photo--full::after {
  background:
    linear-gradient(180deg,
      rgba(5, 5, 7, 0.05) 0%,
      rgba(5, 5, 7, 0.30) 35%,
      rgba(5, 5, 7, 0.75) 75%,
      rgba(5, 5, 7, 0.96) 100%),
    radial-gradient(80% 60% at 100% 0%, rgba(211, 251, 69, 0.10), transparent 60%);
}

/* — Variant : photo discrete en arriere-plan (contenu lisible prime).
     Overlay quasi-opaque (94-97% noir) avec une legere variation
     verticale pour donner de la profondeur. Les accents colores
     sont places au CENTRE/BAS (jamais sur les bords) pour eviter
     d'eclaircir les coins ou se trouvent les titres. — */
.hero-photo--bg-soft {
  border: 1px solid var(--stroke-2);
}

.hero-photo--bg-soft::after {
  background:
    linear-gradient(180deg,
      rgba(8, 8, 12, 0.96) 0%,
      rgba(12, 12, 18, 0.90) 45%,
      rgba(8, 8, 12, 0.96) 100%),
    radial-gradient(80% 60% at 50% 100%, rgba(211, 251, 69, 0.06), transparent 65%),
    radial-gradient(60% 50% at 30% 100%, rgba(139, 92, 246, 0.08), transparent 60%);
}

/* — Mapping image -> classe utilitaire (CSS var) — */
.hero-img-login     { --hero-img: url("../ressources/img/init-img/FC_06-09-23%20%285%29.webp"); }
.hero-img-home      { --hero-img: url("../ressources/img/init-img/insta%20soleil%20%281%29.webp"); }
.hero-img-menu      { --hero-img: url("../ressources/img/init-img/FC_06-09-23%20%2813%29.webp"); }
.hero-img-profile   { --hero-img: url("../ressources/img/init-img/10.webp"); }
.hero-img-notifs    { --hero-img: url("../ressources/img/init-img/insta%20soleil%20%288%29.webp"); }
.hero-img-referral  { --hero-img: url("../ressources/img/init-img/FC_06-09-23%20%2814%29.webp"); }
.hero-img-settings  { --hero-img: url("../ressources/img/init-img/3.webp"); }
.hero-img-coach     { --hero-img: url("../ressources/img/init-img/FC_06-09-23%20%2814%29.webp"); }
.hero-img-exercises { --hero-img: url("../ressources/img/init-img/FC_06-09-23%20%2810%29.webp"); }
.hero-img-qr        { --hero-img: url("../ressources/img/init-img/FC_06-09-23%20%2816%29.webp"); }
.hero-img-stats     { --hero-img: url("../ressources/img/init-img/12.webp"); }


/* =============================================================
   7. COMPONENTS — profile, stats, message, qr, mobile-nav, menu
   ============================================================= */

/* ---- 7.1 Profile header (home greeting card) ---- */
.fc-profile-card {
  padding: 16px 14px;
  border-radius: var(--r-xl);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(211, 251, 69, 0.06), transparent 56%),
    linear-gradient(165deg, #1c1c22 0%, #131318 100%);
  border: 1px solid var(--stroke-2);
  position: relative;
  overflow: hidden;
}

.fc-profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.fc-profile-text {
  min-width: 0;
  flex: 1;
}

.fc-profile-brand {
  display: flex;
  align-items: center;
  min-height: 22px;
  margin-bottom: 4px;
}

.fc-profile-wordmark {
  height: 16px;
  width: auto;
  max-width: min(52vw, 210px);
  object-fit: contain;
  opacity: 0.7;
}

.fc-user-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 5.6vw, 26px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  margin: 0;
}

.fc-user-handle {
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- 7.2 User message card ---- */
.fc-message-card {
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(80% 100% at 0% 0%, rgba(211, 251, 69, 0.05), transparent 56%),
    linear-gradient(165deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  padding: 18px;
}

.fc-message-card .title {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-text);
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fc-message-card .subtitle {
  margin-top: 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}

/* ---- 7.3 User stats card (today stats grid) ---- */
.fc-stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.fc-stats-head .title {
  font-size: 15px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.fc-badge {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 10px;
  background: transparent;
  padding: 0;
  flex: 0 0 auto;
}

.fc-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fc-stat-item {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  padding: 12px 12px 10px;
  background: var(--bg-elevated);
  display: grid;
  gap: 3px;
  position: relative;
  transition: border-color var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out);
}

.fc-stat-item:hover {
  border-color: var(--stroke-3);
}

.fc-stat-item .subtitle {
  margin: 0;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fc-stat-item strong {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}

.fc-stat-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--ink-3);
  opacity: 0.85;
  display: inline-flex;
}

/* ---- 7.4 Menu grid (sub-tiles) ---- */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.menu-link {
  text-decoration: none;
  color: var(--ink);
  padding: 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(211, 251, 69, 0.05), transparent 60%),
    linear-gradient(160deg, var(--bg-card-2) 0%, var(--bg-elevated) 100%);
  transition: transform var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out);
  display: grid;
  gap: 4px;
}

.menu-link:hover {
  transform: translateY(-1px);
  border-color: var(--accent-soft);
}

.menu-link strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.menu-link.disabled {
  opacity: 0.55;
  pointer-events: none;
}

/* ---- 7.5 QR ---- */
.qr-box {
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--bg-inset);
  border: 1px dashed var(--stroke-3);
  min-height: 220px;
  padding: 14px;
}

.qr-image {
  width: 100%;
  max-width: 240px;
  border-radius: 14px;
  background: #ffffff;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ---- 7.6 Bottom mobile nav (floating dock) ---- */
.bottom-nav {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(var(--safe-bottom) + 14px);
  width: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 10px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 14, 18, 0.78);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow:
    0 -4px 16px rgba(0, 0, 0, 0.18),
    0 24px 60px rgba(0, 0, 0, 0.55);
  z-index: 40;
}

.nav-item {
  position: relative;
  text-decoration: none;
  color: var(--ink-2);
  border-radius: 22px;
  padding: 12px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: color var(--t-fast) var(--ease-out),
              background var(--t-base) var(--ease-out),
              transform var(--t-fast) var(--ease-out);
  min-height: 56px;
}

.nav-item:active {
  transform: scale(0.96);
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.nav-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.nav-label {
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.nav-item.active {
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 22px var(--accent-glow),
              inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.nav-item.active .nav-icon,
.nav-item.active .nav-label {
  color: var(--accent-ink);
  opacity: 1;
}


/* =============================================================
   8. VIEWS — page-specific styles
   ============================================================= */


/* ============= 8.1 LOGIN ============= */
.login-view {
  padding-bottom: 40px;
}

.login-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-hero .login-brand-lockup {
  align-self: flex-start;
}

.login-hero-text {
  display: grid;
  gap: 10px;
}

.login-hero .title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 10vw, 50px);
  letter-spacing: -0.045em;
  line-height: 0.92;
  text-transform: uppercase;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.55);
}

.login-hero .subtitle {
  font-size: 14px;
  margin-top: 6px;
  max-width: 36ch;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.login-hero .eyebrow {
  color: var(--accent);
  text-shadow: 0 2px 10px rgba(211, 251, 69, 0.35);
}

.login-card {
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(211, 251, 69, 0.06), transparent 56%),
    linear-gradient(165deg, var(--bg-card) 0%, var(--bg-surface) 100%);
}

.login-help-card {
  border-color: var(--stroke);
  background: var(--bg-elevated);
}

.login-remember-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}

.login-remember-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1.5px solid var(--stroke-3);
  background: var(--bg-inset);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all var(--t-fast) var(--ease-out);
}

.login-remember-row input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 4px 10px var(--accent-glow);
}

.login-remember-row input[type="checkbox"]:checked::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--accent-ink);
  border-bottom: 2px solid var(--accent-ink);
  transform: rotate(-45deg) translate(1px, -1px);
}

/* ---- Home access card / sections ---- */
.home-access-card {
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(211, 251, 69, 0.10), transparent 56%),
    radial-gradient(110% 100% at 0% 100%, rgba(139, 92, 246, 0.10), transparent 60%),
    linear-gradient(165deg, var(--bg-card-2) 0%, var(--bg-card) 100%);
}

.home-access-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.icon-tile,
.home-access-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(211, 251, 69, 0.24);
  box-shadow: 0 6px 18px var(--accent-glow),
              inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.icon-tile.sm {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.home-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.home-section-link {
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  padding: 4px 8px;
  border-radius: var(--r-pill);
  transition: background var(--t-fast) var(--ease-out);
}

.home-section-link:hover {
  background: var(--accent-soft);
}


/* ============= 8.2 CHALLENGES ============= */
.challenges-view {
  padding-bottom: 24px;
}

.challenge-profile-card {
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(211, 251, 69, 0.06), transparent 56%),
    radial-gradient(80% 100% at 0% 100%, rgba(139, 92, 246, 0.10), transparent 60%),
    linear-gradient(165deg, var(--bg-card) 0%, var(--bg-surface) 100%);
}

.challenge-profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.challenge-profile-actions {
  display: flex;
  gap: 8px;
}

.challenge-inline-btn {
  padding: 9px 14px;
  font-size: 12px;
}

.challenge-inline-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.challenge-avatar {
  width: 70px;
  height: 70px;
}

.challenge-user-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.challenge-level-pill {
  flex: 0 0 auto;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke-3);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.challenge-level-meta {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 600;
}

.challenge-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.challenge-quick-item {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  padding: 12px;
  background: var(--bg-elevated);
  display: grid;
  gap: 6px;
}

.challenge-quick-item span {
  font-size: 16px;
}

.challenge-quick-item strong {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}

.challenge-quick-item small {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.challenge-filters-row {
  display: grid;
  gap: 12px;
}

.challenge-category-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.challenge-category-filters::-webkit-scrollbar {
  display: none;
}

.challenge-filter-chip {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-pill);
  background: var(--bg-elevated);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  padding: 9px 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}

.challenge-filter-chip:hover {
  border-color: var(--stroke-3);
  color: var(--ink);
}

.challenge-filter-chip.active {
  color: var(--accent-ink);
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 16px var(--accent-glow);
}

.challenge-status-select {
  width: 100%;
}

.challenge-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.challenge-stats-item {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  padding: 12px;
  background: var(--bg-elevated);
  display: grid;
  gap: 4px;
}

.challenge-stats-item strong {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}

.challenge-stats-item small {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.challenge-card-v2 {
  width: 100%;
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-lg);
  padding: 14px;
  background:
    radial-gradient(110% 110% at 100% 0%, rgba(139, 92, 246, 0.06), transparent 60%),
    linear-gradient(160deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out);
}

.challenge-card-v2:hover {
  transform: translateY(-1px);
  border-color: var(--stroke-3);
}

.challenge-card-v2.completed-today {
  border-color: rgba(211, 251, 69, 0.5);
  background:
    radial-gradient(110% 110% at 100% 0%, rgba(211, 251, 69, 0.10), transparent 56%),
    linear-gradient(160deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  box-shadow: inset 0 0 0 1px rgba(211, 251, 69, 0.2);
}

.challenge-card-v2.already-completed {
  border-color: var(--stroke-3);
  opacity: 0.92;
}

.challenge-card-v2.in-progress {
  border-color: rgba(139, 92, 246, 0.4);
}

.challenge-card-v2.never-completed {
  border-color: var(--stroke-2);
}

.challenge-card-left {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.challenge-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  border: 1px solid var(--stroke-2);
  background: var(--bg-elevated);
}

.challenge-icon.cat-facile { border-color: rgba(132, 204, 22, 0.35); background: rgba(132, 204, 22, 0.08); }
.challenge-icon.cat-moyen { border-color: rgba(139, 92, 246, 0.35); background: rgba(139, 92, 246, 0.08); }
.challenge-icon.cat-difficile { border-color: rgba(249, 115, 22, 0.35); background: rgba(249, 115, 22, 0.08); }
.challenge-icon.cat-extreme { border-color: rgba(220, 38, 38, 0.35); background: rgba(220, 38, 38, 0.08); }

.challenge-info {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.challenge-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.challenge-title-row h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.challenge-status-dot {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
}

.challenge-info p {
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.4;
}

.challenge-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.challenge-progress-row span {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--ink-2);
  min-width: 44px;
  text-align: right;
  font-weight: 700;
}

.challenge-progress-track {
  flex: 1;
  height: 6px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.challenge-progress-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--violet), #b794f4);
  transition: width 0.25s var(--ease-out);
}

.challenge-progress-fill.completed {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 8px var(--accent-glow);
}

.challenge-meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--ink-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.challenge-card-right {
  flex: 0 0 auto;
  min-width: 70px;
  display: grid;
  gap: 6px;
  justify-items: end;
}

.challenge-points {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.challenge-badge-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke-3);
  background: var(--bg-elevated);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
}

.challenge-badge-mini .icon {
  color: var(--accent);
}

.challenge-empty-state {
  border: 1px dashed var(--stroke-3);
  border-radius: var(--r-lg);
  padding: 28px 18px;
  text-align: center;
  background: var(--bg-inset);
}

.challenge-empty-icon {
  font-size: 32px;
  line-height: 1;
}

.challenge-empty-state h3 {
  margin: 12px 0 6px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.challenge-empty-state p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
}

/* ---- Modal (challenge / info / common) ---- */
.challenge-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(3, 4, 8, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: end center;
  padding: 16px;
  animation: fadeIn 220ms var(--ease-out);
}

.challenge-modal {
  width: 100%;
  max-width: 560px;
  border-radius: var(--r-2xl) var(--r-2xl) var(--r-xl) var(--r-xl);
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(110% 100% at 100% 0%, rgba(139, 92, 246, 0.10), transparent 56%),
    linear-gradient(165deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  box-shadow: var(--shadow-3);
  padding: 22px 20px 24px;
  position: relative;
  display: grid;
  gap: 12px;
  animation: slideUp 320ms var(--ease-out);
}

.challenge-modal::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.challenge-modal.completed {
  border-color: rgba(211, 251, 69, 0.5);
}

.challenge-modal-close {
  position: absolute;
  top: 16px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke-2);
  background: var(--bg-elevated);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.challenge-modal-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  font-size: 28px;
  border: 1px solid var(--stroke-2);
  background: var(--bg-elevated);
  margin-top: 8px;
}

.challenge-modal h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.challenge-modal p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
}

.challenge-modal-progress-head {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 700;
}

.challenge-modal-progress-track {
  height: 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.challenge-modal-progress-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--violet), #b794f4);
}

.challenge-modal-progress-fill.completed {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent-glow);
}

.challenge-modal-stats {
  margin-top: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.challenge-modal-stats > div {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  padding: 12px;
  background: var(--bg-elevated);
  display: grid;
  gap: 4px;
}

.challenge-modal-stats strong {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.challenge-modal-stats small {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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


/* ============= 8.3 STATISTIQUES ============= */
.stats-view {
  padding-bottom: 24px;
}

.stats-main-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.stats-main-tabs::-webkit-scrollbar {
  display: none;
}

.stats-main-tab {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-pill);
  background: var(--bg-elevated);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  padding: 10px 16px;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}

.stats-main-tab:hover {
  border-color: var(--stroke-3);
  color: var(--ink);
}

.stats-main-tab.active {
  color: var(--accent-ink);
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 16px var(--accent-glow);
}

.stats-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stats-overview-card {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  padding: 14px;
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(211, 251, 69, 0.04), transparent 58%),
    linear-gradient(165deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  display: grid;
  gap: 6px;
}

.stats-overview-card.level-card {
  grid-column: 1 / -1;
  gap: 10px;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(211, 251, 69, 0.10), transparent 58%),
    radial-gradient(80% 100% at 0% 100%, rgba(139, 92, 246, 0.10), transparent 60%),
    linear-gradient(165deg, var(--bg-card-2) 0%, var(--bg-card) 100%);
  border-color: var(--stroke-3);
}

.stats-label {
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.stats-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}

.stats-sub {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
}

.stats-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stats-calendar-actions {
  display: flex;
  gap: 6px;
}

.stats-cal-btn {
  padding: 9px 14px;
  font-size: 12px;
}

.stats-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.stats-calendar-day-header {
  text-align: center;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 0;
}

.stats-calendar-cell {
  min-height: 56px;
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-sm);
  padding: 8px 7px;
  background: var(--bg-elevated);
  display: grid;
  align-content: space-between;
  transition: all var(--t-fast) var(--ease-out);
}

.stats-calendar-cell span {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.stats-calendar-cell small {
  font-size: 10px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.stats-calendar-cell.muted {
  opacity: 0.36;
}

.stats-calendar-cell.active {
  border-color: rgba(211, 251, 69, 0.4);
  background: rgba(211, 251, 69, 0.08);
}

.stats-calendar-cell.today {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(211, 251, 69, 0.4);
}

.stats-calendar-cell.today span {
  color: var(--accent);
}

.stats-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stats-summary-item {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  padding: 12px 14px;
  background: var(--bg-elevated);
  display: grid;
  gap: 4px;
}

.stats-summary-item span {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stats-summary-item strong {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.stats-challenge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stats-completed-list {
  display: grid;
  gap: 10px;
}

.stats-completed-card {
  width: 100%;
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-lg);
  padding: 14px;
  background:
    radial-gradient(110% 110% at 100% 0%, rgba(139, 92, 246, 0.06), transparent 60%),
    linear-gradient(160deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  color: var(--ink);
  display: flex;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}

.stats-completed-card:hover {
  border-color: var(--stroke-3);
  transform: translateY(-1px);
}

.stats-completed-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(211, 251, 69, 0.32);
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.stats-completed-body {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.stats-completed-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.stats-completed-body p {
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.4;
}

.stats-completed-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.stats-completed-meta span {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-pill);
  padding: 3px 8px;
  font-size: 10px;
  color: var(--ink-2);
  font-weight: 700;
  background: var(--bg-elevated);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stats-position-card {
  border: 1px solid rgba(211, 251, 69, 0.32);
  border-radius: var(--r-md);
  padding: 14px;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(211, 251, 69, 0.10), transparent 58%),
    linear-gradient(160deg, var(--bg-card-2) 0%, var(--bg-card) 100%);
  display: grid;
  gap: 4px;
}

.stats-position-card span {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stats-position-card strong {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--accent);
}

.stats-position-card small {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}

.stats-leaderboard-list {
  display: grid;
  gap: 8px;
}

.stats-leaderboard-row {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  padding: 12px 14px;
  background: var(--bg-elevated);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  transition: all var(--t-fast) var(--ease-out);
}

.stats-leaderboard-row.current {
  border-color: rgba(211, 251, 69, 0.5);
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(211, 251, 69, 0.08), transparent 58%),
    var(--bg-elevated);
  box-shadow: inset 0 0 0 1px rgba(211, 251, 69, 0.18);
}

.stats-leaderboard-rank {
  min-width: 48px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.stats-leaderboard-user {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.stats-leaderboard-user strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-leaderboard-user small {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
}

.stats-leaderboard-values {
  text-align: right;
  display: grid;
  gap: 2px;
}

.stats-leaderboard-values strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.stats-leaderboard-values small {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
}

.stats-comparative-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stats-empty {
  border: 1px dashed var(--stroke-3);
  border-radius: var(--r-md);
  padding: 22px 14px;
  text-align: center;
  color: var(--ink-2);
  background: var(--bg-inset);
  font-size: 13px;
  font-weight: 600;
}

.stats-timeline-list {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  display: grid;
  gap: 1px;
  overflow: hidden;
}

.stats-timeline-row {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-card);
}

.stats-timeline-row span {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}

.stats-timeline-row strong {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}


/* ============= 8.4 ACCESS QR MODAL ============= */
.access-qr {
  display: grid;
  gap: 6px;
  width: 100%;
}

.access-qr > .btn {
  width: 100%;
}

.access-qr-hint {
  margin: 6px 0 0;
}

.access-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(3, 4, 8, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: end center;
  padding: 16px;
  animation: fadeIn 220ms var(--ease-out);
}

.access-modal {
  width: 100%;
  max-width: 560px;
  border-radius: var(--r-2xl) var(--r-2xl) var(--r-xl) var(--r-xl);
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(211, 251, 69, 0.12), transparent 58%),
    radial-gradient(110% 100% at 0% 100%, rgba(139, 92, 246, 0.14), transparent 62%),
    linear-gradient(165deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  box-shadow: var(--shadow-3);
  padding: 22px 20px 24px;
  display: grid;
  gap: 12px;
  position: relative;
  animation: slideUp 320ms var(--ease-out);
}

.access-modal::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.access-modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.access-modal-close {
  position: absolute;
  top: 16px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke-2);
  background: var(--bg-elevated);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.access-modal-qr {
  min-height: 270px;
}

.access-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.access-modal-actions .btn {
  flex: 1;
}


/* ============= 8.5 MENU ============= */
.menu-view {
  padding-bottom: 24px;
}

.menu-hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(211, 251, 69, 0.10), transparent 56%),
    radial-gradient(110% 100% at 0% 100%, rgba(139, 92, 246, 0.14), transparent 62%),
    linear-gradient(165deg, var(--bg-card-2) 0%, var(--bg-card) 100%);
  padding: 20px 16px;
}

.menu-hero-card::before {
  content: none;
}

.menu-brand-lockup {
  position: relative;
  z-index: 2;
}

.menu-brand-lockup .fc-brand-wordmark {
  height: 18px;
  opacity: 0.7;
}

.menu-hero-watermark {
  position: absolute;
  right: -36px;
  bottom: -42px;
  width: clamp(120px, 36vw, 200px);
  height: auto;
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
}

.menu-hero-title {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 6.4vw, 32px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}

.menu-hero-subtitle {
  position: relative;
  z-index: 2;
  margin: 0;
  color: var(--ink-2);
}

.menu-page-grid {
  display: grid;
  gap: 10px;
}

.menu-page-link {
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  padding: 14px 16px;
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(211, 251, 69, 0.04), transparent 58%),
    linear-gradient(160deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: transform var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out),
              background var(--t-fast) var(--ease-out);
}

.menu-page-link strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.2;
}

.menu-page-link .subtitle {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--ink-3);
}

.menu-page-link:hover {
  transform: translateY(-1px);
  border-color: rgba(211, 251, 69, 0.32);
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(211, 251, 69, 0.07), transparent 58%),
    linear-gradient(160deg, var(--bg-card) 0%, var(--bg-surface) 100%);
}

.menu-page-arrow {
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
  font-size: 14px;
  flex: 0 0 auto;
  transition: transform var(--t-fast) var(--ease-out);
}

.menu-page-link:hover .menu-page-arrow {
  transform: translateX(2px);
}


/* ============= 8.6 ATTENDANCE / FREQUENTATION ============= */
.attendance-view {
  padding-bottom: 24px;
}

.attendance-main-card {
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(211, 251, 69, 0.06), transparent 56%),
    radial-gradient(110% 100% at 0% 100%, rgba(139, 92, 246, 0.10), transparent 60%),
    linear-gradient(165deg, var(--bg-card-2) 0%, var(--bg-card) 100%);
}

.attendance-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.attendance-info-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke-2);
  background: var(--bg-elevated);
  color: var(--ink-2);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

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

.attendance-gauge-wrap {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.attendance-gauge {
  width: 200px;
  height: 200px;
  border-radius: var(--r-pill);
  background:
    conic-gradient(var(--gauge-color) var(--gauge-value), rgba(255, 255, 255, 0.06) var(--gauge-value) 100%);
  display: grid;
  place-items: center;
  padding: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.attendance-gauge-inner {
  width: 100%;
  height: 100%;
  border-radius: var(--r-pill);
  background:
    radial-gradient(80% 100% at 50% 0%, rgba(211, 251, 69, 0.06), transparent 56%),
    var(--bg-surface);
  border: 1px solid var(--stroke-2);
  display: grid;
  place-items: center;
  text-align: center;
  gap: 4px;
}

.attendance-gauge-inner strong {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}

.attendance-gauge-inner span {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.attendance-gauge-inner small {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
}

.attendance-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.attendance-kpi-item {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  padding: 14px;
  background: var(--bg-elevated);
  display: grid;
  gap: 6px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}

.attendance-kpi-item:hover {
  border-color: var(--stroke-3);
}

.attendance-kpi-item span {
  color: var(--ink-3);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.attendance-kpi-item strong {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.attendance-kpi-item small {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
}

.attendance-kpi-full {
  grid-column: 1 / -1;
}

.trend-up,
.trend-stable,
.trend-down {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trend-up {
  color: #f97316;
}

.trend-stable {
  color: var(--accent);
}

.trend-down {
  color: #16a34a;
}

.attendance-forecast-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.attendance-forecast-card {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  padding: 14px;
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(211, 251, 69, 0.04), transparent 58%),
    linear-gradient(165deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  display: grid;
  gap: 8px;
}

.attendance-forecast-card strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.attendance-forecast-count {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.attendance-forecast-level {
  display: inline-flex;
  width: fit-content;
  border-radius: var(--r-pill);
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.attendance-forecast-level.very-calm  { background: rgba(34, 197, 94, 0.16); color: #22c55e; }
.attendance-forecast-level.calm        { background: rgba(132, 204, 22, 0.16); color: #84cc16; }
.attendance-forecast-level.moderate    { background: rgba(250, 204, 21, 0.16); color: #facc15; }
.attendance-forecast-level.busy        { background: rgba(249, 115, 22, 0.16); color: #f97316; }
.attendance-forecast-level.very-busy   { background: rgba(220, 38, 38, 0.18); color: #f87171; }

.attendance-heatmap-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.attendance-heatmap-grid {
  min-width: 320px;
  display: grid;
  grid-template-columns: 32px repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.attendance-heatmap-day {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 0;
}

.attendance-heatmap-label {
  text-align: right;
  padding-right: 6px;
  font-size: 9px;
  color: var(--ink-3);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 16px;
}

.attendance-heatmap-cell {
  min-height: 16px;
  border-radius: 3px;
  transition: opacity var(--t-fast);
}

.attendance-heatmap-cell:hover {
  opacity: 0.8;
}

.attendance-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 92;
  background: rgba(3, 4, 8, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: end center;
  padding: 16px;
  animation: fadeIn 220ms var(--ease-out);
}

.attendance-modal {
  width: 100%;
  max-width: 560px;
  border-radius: var(--r-2xl) var(--r-2xl) var(--r-xl) var(--r-xl);
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(110% 100% at 100% 0%, rgba(139, 92, 246, 0.10), transparent 56%),
    linear-gradient(165deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  box-shadow: var(--shadow-3);
  padding: 22px 20px 24px;
  position: relative;
  animation: slideUp 320ms var(--ease-out);
}

.attendance-modal::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.attendance-modal-close {
  position: absolute;
  top: 16px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke-2);
  background: var(--bg-elevated);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}


/* ============= 8.7 SUGGESTIONS ============= */
.suggestions-view {
  padding-bottom: 24px;
}

.suggestions-propose-btn {
  width: 100%;
}

.suggestions-success {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.suggestions-filters {
  display: grid;
  gap: 12px;
}

.suggestions-chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.suggestions-chip-row::-webkit-scrollbar {
  display: none;
}

.suggestions-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-pill);
  background: var(--bg-elevated);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  padding: 9px 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}

.suggestions-chip:hover {
  border-color: var(--stroke-3);
  color: var(--ink);
}

.suggestions-chip.active {
  color: var(--accent-ink);
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 16px var(--accent-glow);
}

.suggestions-select-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.suggestions-list-v2 {
  display: grid;
  gap: 12px;
}

.suggestion-card-v2 {
  border: 1px solid var(--stroke-2);
  cursor: pointer;
  transition: transform var(--t-base) var(--ease-out),
              border-color var(--t-base) var(--ease-out);
}

.suggestion-card-v2:hover {
  transform: translateY(-2px);
  border-color: var(--stroke-3);
}

.suggestion-card-v2.in-progress {
  border-color: rgba(139, 92, 246, 0.4);
}

.suggestion-card-v2.completed {
  border-color: rgba(211, 251, 69, 0.4);
}

.suggestion-head-v2 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.suggestion-badges-v2 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.suggestion-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-pill);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  background: var(--bg-elevated);
}

.suggestion-badge .icon {
  color: var(--accent);
}

.suggestion-badge.status .icon {
  color: var(--ink-2);
}

.suggestion-badge.status {
  color: var(--ink-2);
}

.suggestion-votes-v2 {
  text-align: right;
  display: grid;
  gap: 2px;
}

.suggestion-votes-v2 strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--accent);
}

.suggestion-votes-v2 small {
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.suggestion-desc-v2 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

.suggestion-foot-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.suggestion-vote-btn {
  padding: 9px 14px;
  font-size: 12px;
}

.suggestion-vote-btn.voted {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.suggestions-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 94;
  background: rgba(3, 4, 8, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: end center;
  padding: 16px;
  animation: fadeIn 220ms var(--ease-out);
}

.suggestions-modal {
  width: 100%;
  max-width: 560px;
  border-radius: var(--r-2xl) var(--r-2xl) var(--r-xl) var(--r-xl);
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(110% 100% at 100% 0%, rgba(139, 92, 246, 0.10), transparent 56%),
    linear-gradient(165deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  box-shadow: var(--shadow-3);
  padding: 22px 20px 24px;
  position: relative;
  display: grid;
  gap: 12px;
  animation: slideUp 320ms var(--ease-out);
}

.suggestions-modal::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.suggestions-modal-close {
  position: absolute;
  top: 16px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke-2);
  background: var(--bg-elevated);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.suggestions-textarea {
  min-height: 140px;
  resize: vertical;
}

.suggestions-char-count {
  color: var(--ink-3);
  font-size: 11px;
  text-align: right;
  font-weight: 600;
}

.suggestions-char-count.warning {
  color: var(--warning);
}

.suggestions-char-count.error {
  color: var(--danger);
}


/* ============= 8.8 SETTINGS / REGLAGES ============= */
.settings-view {
  padding-bottom: 24px;
}

.settings-hero-card {
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(211, 251, 69, 0.10), transparent 56%),
    radial-gradient(110% 100% at 0% 100%, rgba(139, 92, 246, 0.14), transparent 62%),
    linear-gradient(165deg, var(--bg-card-2) 0%, var(--bg-card) 100%);
  padding: 20px 16px;
}

.settings-hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 6.4vw, 32px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}

.settings-hero-subtitle {
  margin: 0;
  color: var(--ink-2);
}

.settings-list {
  display: grid;
  gap: 10px;
}

.settings-link {
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  padding: 14px 16px;
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(211, 251, 69, 0.04), transparent 58%),
    linear-gradient(160deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: transform var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out),
              background var(--t-fast) var(--ease-out);
}

.settings-link strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.2;
}

.settings-link .subtitle {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--ink-3);
}

.settings-link:hover {
  transform: translateY(-1px);
  border-color: rgba(211, 251, 69, 0.32);
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(211, 251, 69, 0.07), transparent 58%),
    linear-gradient(160deg, var(--bg-card) 0%, var(--bg-surface) 100%);
}

.settings-link-arrow {
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
  font-size: 14px;
  flex: 0 0 auto;
  transition: transform var(--t-fast) var(--ease-out);
}

.settings-link:hover .settings-link-arrow {
  transform: translateX(2px);
}

.settings-logout-card {
  border-color: rgba(255, 93, 108, 0.22);
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(255, 93, 108, 0.06), transparent 58%),
    linear-gradient(165deg, var(--bg-card) 0%, var(--bg-surface) 100%);
}

.settings-logout-btn {
  text-align: center;
  text-decoration: none;
  border-color: rgba(255, 93, 108, 0.32);
  color: #ffd0d4;
}

.settings-logout-btn:hover {
  border-color: var(--danger);
  background: var(--danger-soft);
}


/* ============= 8.9 PROFIL ============= */
.profile-view {
  padding-bottom: 24px;
}

.profile-hero-card {
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(211, 251, 69, 0.10), transparent 56%),
    radial-gradient(110% 100% at 0% 100%, rgba(139, 92, 246, 0.14), transparent 62%),
    linear-gradient(165deg, var(--bg-card-2) 0%, var(--bg-card) 100%);
  padding: 18px 14px;
}

.profile-head-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.profile-head-row .fc-avatar {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 5px rgba(211, 251, 69, 0.10),
              0 16px 40px rgba(0, 0, 0, 0.5);
}

.profile-head-text {
  min-width: 0;
  flex: 1;
}

.profile-hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 6vw, 28px);
  letter-spacing: -0.03em;
  line-height: 1.04;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.profile-status-label {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-weight: 600;
}

.profile-photo-btn {
  width: 100%;
  white-space: normal;
  line-height: 1.25;
}

.profile-form-card {
  border-color: var(--stroke-2);
}

.profile-field-label {
  font-weight: 700;
  color: var(--ink-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

.profile-pseudo-input {
  font-size: 16px;
}

.profile-char-count {
  margin: 0;
  text-align: right;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
}

.profile-char-count.warning {
  color: var(--warning);
}

.profile-char-count.error {
  color: var(--danger);
}

.profile-help-text {
  margin: 0;
  line-height: 1.5;
  color: var(--ink-2);
  font-size: 12px;
}

.profile-privacy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-switch {
  flex: 0 0 auto;
  width: 56px;
  height: 32px;
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-pill);
  background: var(--bg-inset);
  display: inline-flex;
  align-items: center;
  padding: 3px;
  cursor: pointer;
  transition: background var(--t-base) var(--ease-out),
              border-color var(--t-base) var(--ease-out);
}

.profile-switch.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 6px 16px var(--accent-glow);
}

.profile-switch-knob {
  width: 24px;
  height: 24px;
  border-radius: var(--r-pill);
  background: #ffffff;
  transition: transform var(--t-base) var(--ease-out);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.profile-switch.active .profile-switch-knob {
  transform: translateX(22px);
}

.profile-anonymous-preview {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  padding: 12px 14px;
  background: var(--bg-inset);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.profile-anonymous-preview strong {
  color: var(--ink-2);
  font-weight: 700;
}

.profile-success {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.profile-save-btn {
  width: 100%;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
}

.profile-upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 96;
  background: rgba(3, 4, 8, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: end center;
  padding: 16px;
  animation: fadeIn 220ms var(--ease-out);
}

.profile-upload-modal {
  width: 100%;
  max-width: 560px;
  border-radius: var(--r-2xl) var(--r-2xl) var(--r-xl) var(--r-xl);
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(110% 100% at 100% 0%, rgba(139, 92, 246, 0.10), transparent 56%),
    linear-gradient(165deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  box-shadow: var(--shadow-3);
  padding: 22px 20px 24px;
  position: relative;
  display: grid;
  gap: 12px;
  animation: slideUp 320ms var(--ease-out);
}

.profile-upload-modal::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.profile-upload-close {
  position: absolute;
  top: 16px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke-2);
  background: var(--bg-elevated);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.profile-upload-input {
  display: none;
}

.profile-upload-drop {
  border: 1.5px dashed var(--stroke-3);
  border-radius: var(--r-md);
  padding: 18px;
  background: var(--bg-inset);
  color: var(--ink);
  text-align: left;
  display: grid;
  gap: 6px;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}

.profile-upload-drop:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.profile-upload-drop strong {
  font-size: 14px;
  font-weight: 700;
}

.profile-upload-drop small {
  color: var(--ink-2);
  font-size: 12px;
  word-break: break-word;
}

.profile-upload-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}


/* ============= 8.10 NOTIFICATIONS ============= */
.notifications-view {
  padding-bottom: 24px;
}

.notifications-hero-card {
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(211, 251, 69, 0.10), transparent 56%),
    radial-gradient(110% 100% at 0% 100%, rgba(139, 92, 246, 0.14), transparent 62%),
    linear-gradient(165deg, var(--bg-card-2) 0%, var(--bg-card) 100%);
  padding: 20px 16px;
}

.notifications-hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 6.4vw, 32px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}

.notifications-hero-subtitle {
  margin: 0;
  color: var(--ink-2);
}

.notifications-status-card {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-elevated);
}

.notifications-status-card.enabled {
  border-color: rgba(211, 251, 69, 0.32);
  background: rgba(211, 251, 69, 0.05);
}

.notifications-status-card.disabled {
  border-color: rgba(255, 93, 108, 0.32);
  background: rgba(255, 93, 108, 0.05);
}

.notifications-status-card.unknown {
  border-color: rgba(251, 191, 36, 0.32);
  background: rgba(251, 191, 36, 0.05);
}

.notifications-status-card.unavailable {
  border-color: var(--stroke-2);
  background: var(--bg-elevated);
}

.notifications-status-icon {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke-2);
  display: grid;
  place-items: center;
  font-size: 22px;
  background: var(--bg-card);
}

.notifications-full-btn {
  width: 100%;
  white-space: normal;
  line-height: 1.25;
}

.notifications-player-id-box {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  padding: 12px 14px;
  background: var(--bg-inset);
}

.notifications-player-id-label {
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.notifications-player-id-value {
  margin-top: 8px;
  color: var(--ink);
  font-size: 13px;
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.5;
}

.notifications-success {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}


/* ============= 8.11 ADVANCED SETTINGS ============= */
.advanced-settings-view {
  padding-bottom: 24px;
}

.advanced-settings-hero-card {
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(211, 251, 69, 0.10), transparent 56%),
    radial-gradient(110% 100% at 0% 100%, rgba(139, 92, 246, 0.14), transparent 62%),
    linear-gradient(165deg, var(--bg-card-2) 0%, var(--bg-card) 100%);
  padding: 20px 16px;
}

.advanced-settings-hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 6.4vw, 32px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}

.advanced-settings-hero-subtitle {
  margin: 0;
  color: var(--ink-2);
}

.advanced-settings-current-value {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  padding: 14px;
  background: var(--bg-inset);
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: 13px;
}

.advanced-settings-password-strength {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.advanced-settings-password-strength.weak {
  color: var(--danger);
}

.advanced-settings-password-strength.medium {
  color: var(--warning);
}

.advanced-settings-password-strength.strong {
  color: var(--accent);
}

.advanced-settings-password-rules {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  padding: 12px 14px;
  background: var(--bg-inset);
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
}

.advanced-settings-password-rules > div {
  position: relative;
  padding-left: 20px;
  transition: color var(--t-fast) var(--ease-out);
}

.advanced-settings-password-rules > div::before {
  content: "○";
  position: absolute;
  left: 4px;
  color: var(--ink-3);
}

.advanced-settings-password-rules .valid {
  color: var(--accent);
}

.advanced-settings-password-rules .valid::before {
  content: "●";
  color: var(--accent);
}

.advanced-settings-btn {
  width: 100%;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
}

.advanced-settings-success {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}


/* ============= 8.12 REFERRAL / PARRAINAGE ============= */
.referral-view {
  padding-bottom: 24px;
}

.referral-hero-card {
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(211, 251, 69, 0.10), transparent 56%),
    radial-gradient(110% 100% at 0% 100%, rgba(139, 92, 246, 0.14), transparent 62%),
    linear-gradient(165deg, var(--bg-card-2) 0%, var(--bg-card) 100%);
  padding: 20px 16px;
}

.referral-hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 6.4vw, 32px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}

.referral-hero-subtitle {
  margin: 0;
  color: var(--ink-2);
}

.referral-balance {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--accent);
}

.referral-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.referral-kpi-item {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  padding: 14px;
  background: var(--bg-elevated);
  display: grid;
  gap: 6px;
}

.referral-kpi-item span {
  color: var(--ink-3);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.referral-kpi-item strong {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.referral-claim-btn,
.referral-submit-btn {
  width: 100%;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
}

.referral-invite-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.referral-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.referral-filters::-webkit-scrollbar {
  display: none;
}

.referral-filter-btn {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-pill);
  background: var(--bg-elevated);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  padding: 9px 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}

.referral-filter-btn:hover {
  border-color: var(--stroke-3);
  color: var(--ink);
}

.referral-filter-btn.active {
  color: var(--accent-ink);
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 16px var(--accent-glow);
}

.referral-history-list {
  display: grid;
  gap: 10px;
}

.referral-history-item {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  padding: 14px;
  background: var(--bg-elevated);
  display: grid;
  gap: 5px;
}

.referral-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.referral-history-head strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.referral-status-badge {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-pill);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.referral-success {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}


/* ============= 8.13 COACH IA ============= */
.coach-ia-view {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--nav-h));
  padding-bottom: 260px;
}

.coach-ia-shell {
  flex: 1;
  padding-bottom: 14px;
}

.coach-ia-hero-card {
  overflow: hidden;
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(82% 92% at 100% 0%, rgba(211, 251, 69, 0.10), transparent 58%),
    radial-gradient(70% 100% at 0% 100%, rgba(139, 92, 246, 0.14), transparent 64%),
    linear-gradient(160deg, var(--bg-card-2) 0%, var(--bg-card) 100%);
  padding: 20px 16px;
}

.coach-ia-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(211, 251, 69, 0.22);
}

.coach-ia-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 6.4vw, 32px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}

.coach-ia-subtitle {
  max-width: 36ch;
  color: var(--ink-2);
}

.coach-ia-status-row {
  display: grid;
  gap: 8px;
}

.coach-ia-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: rgba(255, 93, 108, 0.10);
  border: 1px solid rgba(255, 93, 108, 0.22);
  color: #ffb3b9;
  font-size: 12px;
  font-weight: 700;
}

.coach-ia-status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.coach-ia-status-pill.live {
  background: var(--accent-soft);
  border-color: rgba(211, 251, 69, 0.32);
  color: var(--accent);
}

.coach-ia-disclaimer {
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-3);
}

.coach-ia-card-head {
  display: grid;
  gap: 4px;
}

.coach-ia-quick-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.coach-ia-prompt-chip {
  width: 100%;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(100% 100% at 100% 0%, rgba(211, 251, 69, 0.04), transparent 60%),
    linear-gradient(160deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  line-height: 1.4;
  transition: all var(--t-fast) var(--ease-out);
}

.coach-ia-prompt-chip:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(211, 251, 69, 0.32);
  background:
    radial-gradient(100% 100% at 100% 0%, rgba(211, 251, 69, 0.08), transparent 60%),
    linear-gradient(160deg, var(--bg-card) 0%, var(--bg-surface) 100%);
}

.coach-ia-prompt-chip:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.coach-ia-chat-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 14px;
}

.coach-ia-transcript {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  min-height: 0;
  padding: 6px 2px 12px;
  max-height: none;
  overflow-y: auto;
}

.coach-ia-empty-state {
  display: grid;
  gap: 14px;
  align-content: center;
  min-height: min(36vh, 320px);
  padding: 22px;
  border-radius: var(--r-md);
  border: 1.5px dashed var(--stroke-3);
  background: var(--bg-inset);
}

.coach-ia-empty-copy {
  margin: 0;
  color: var(--ink-2);
  text-align: center;
  font-size: 13px;
  line-height: 1.55;
}

.coach-ia-bubble-row {
  display: flex;
}

.coach-ia-bubble-row.user {
  justify-content: flex-end;
}

.coach-ia-bubble {
  width: min(100%, 88%);
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke-2);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

.coach-ia-bubble.assistant {
  border-top-left-radius: 6px;
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(139, 92, 246, 0.10), transparent 60%),
    linear-gradient(160deg, var(--bg-card) 0%, var(--bg-surface) 100%);
}

.coach-ia-bubble.user {
  border-top-right-radius: 6px;
  background:
    linear-gradient(135deg, rgba(211, 251, 69, 0.18), rgba(168, 214, 27, 0.10));
  border-color: rgba(211, 251, 69, 0.28);
  color: var(--ink);
}

.coach-ia-bubble.pending {
  opacity: 0.78;
}

.coach-ia-bubble-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.coach-ia-bubble.user .coach-ia-bubble-label {
  color: var(--accent);
}

.coach-ia-bubble-text {
  margin: 6px 0 0;
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 14px;
}

.coach-ia-quick-grid-inline {
  margin-top: 4px;
}

.coach-ia-composer {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(var(--safe-bottom) + var(--nav-h) + 14px);
  z-index: 35;
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-xl);
  border: 1px solid var(--stroke-2);
  background: rgba(14, 14, 18, 0.86);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

.coach-ia-textarea {
  min-height: 92px;
  max-height: 180px;
  resize: none;
  background: var(--bg-inset);
}

.coach-ia-send-btn {
  width: 100%;
}


/* ============= 8.14 EXERCISES ============= */
.exercises-shell {
  max-width: 860px;
  margin: 0 auto;
}

.exercises-hero-card {
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(88% 100% at 100% 0%, rgba(139, 92, 246, 0.12), transparent 62%),
    radial-gradient(70% 90% at 0% 100%, rgba(211, 251, 69, 0.08), transparent 60%),
    linear-gradient(160deg, var(--bg-card-2) 0%, var(--bg-card) 100%);
  padding: 20px 16px;
}

.exercises-hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 6.4vw, 32px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}

.exercise-filters-head {
  display: grid;
  gap: 12px;
}

.exercise-chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.exercise-chip-row::-webkit-scrollbar {
  display: none;
}

.exercise-filter-chip,
.exercise-favorite-toggle,
.exercise-favorite-btn {
  border: 1px solid var(--stroke-2);
  background: var(--bg-elevated);
  color: var(--ink-2);
  border-radius: var(--r-pill);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}

.exercise-filter-chip {
  padding: 10px 14px;
  white-space: nowrap;
}

.exercise-filter-chip:hover {
  border-color: var(--stroke-3);
  color: var(--ink);
}

.exercise-filter-chip.active,
.exercise-favorite-toggle.active,
.exercise-favorite-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  border-color: transparent;
  box-shadow: 0 6px 16px var(--accent-glow);
}

.exercise-favorite-toggle {
  width: 100%;
  padding: 13px 16px;
}

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

.exercise-card.exercise-card-compact {
  position: relative;
  padding: 0;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--stroke-2);
  background: linear-gradient(160deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3);
  transition: transform var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out);
}

.exercise-card.exercise-card-compact:hover {
  transform: translateY(-2px);
  border-color: rgba(211, 251, 69, 0.32);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
}

.exercise-card-link {
  display: grid;
  gap: 0;
  color: inherit;
}

.exercise-card-image-wrap,
.exercise-media-shell {
  overflow: hidden;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke-2);
  background: var(--bg-inset);
  position: relative;
}

.exercise-card-image-wrap-compact {
  border: 0;
  border-radius: 0;
  background: #06080c;
}

.exercise-card-image-wrap-compact::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
}

.exercise-card-image,
.exercise-detail-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease-out);
}

.exercise-card.exercise-card-compact:hover .exercise-card-image {
  transform: scale(1.04);
}

.exercise-card-image-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
}

.exercise-card-image-placeholder span {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.exercise-card-copy {
  padding: 12px 12px 14px;
  display: grid;
  gap: 5px;
}

.exercise-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ink);
}

.exercise-card-category {
  margin: 0;
  font-size: 10px;
  line-height: 1.2;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.exercise-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exercise-category-pill,
.exercise-difficulty-pill {
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-pill);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.exercise-category-pill {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(211, 251, 69, 0.22);
}

.exercise-difficulty-pill {
  color: #ffd07a;
  background: rgba(251, 191, 36, 0.10);
  border: 1px solid rgba(251, 191, 36, 0.22);
}

.exercise-card-stats {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-3);
}

.exercise-card-actions,
.exercise-detail-topbar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.exercise-inline-link {
  flex: 1;
}

.exercise-favorite-btn {
  min-width: 96px;
  padding: 12px 16px;
}

.exercise-favorite-btn-compact {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  min-width: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  font-size: 14px;
  background: rgba(8, 8, 12, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.exercise-favorite-btn-compact.active {
  box-shadow: 0 6px 16px var(--accent-glow);
}

.exercise-detail-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 6vw, 28px);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.exercise-video-wrap {
  overflow: hidden;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke-2);
  background: #06080c;
}

.exercise-video-wrap iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.exercise-instructions-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 12px;
  line-height: 1.55;
  color: var(--ink);
}

.exercise-instructions-list li::marker {
  color: var(--accent);
  font-weight: 700;
}

.exercise-warning-box {
  padding: 16px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 93, 108, 0.22);
  background: rgba(255, 93, 108, 0.06);
  line-height: 1.55;
  color: #ffd1d4;
  font-size: 13px;
}


/* =============================================================
   9. RESPONSIVE
   ============================================================= */
@media (max-width: 460px) {
  .suggestions-select-row,
  .referral-invite-grid,
  .referral-kpi-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .fc-brand-mark {
    width: 30px;
    height: 30px;
  }

  .fc-brand-wordmark {
    height: 16px;
    max-width: 62vw;
  }

  .login-brand-lockup .fc-brand-mark {
    width: 38px;
    height: 38px;
  }

  .login-brand-lockup .fc-brand-wordmark {
    height: 20px;
  }

  .profile-upload-actions {
    grid-template-columns: 1fr;
  }

  .profile-hero-title {
    font-size: 26px;
  }

  .nav-label {
    display: none;
  }

  .nav-icon,
  .nav-icon svg {
    width: 24px;
    height: 24px;
  }

  .nav-item {
    padding: 14px 4px;
  }
}

@media (max-width: 380px) {
  .attendance-forecast-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 16px 14px;
  }
}

@media (max-width: 520px) {
  .coach-ia-quick-grid {
    grid-template-columns: 1fr;
  }

  .coach-ia-bubble {
    width: 100%;
  }

  .exercise-card-actions,
  .exercise-detail-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .exercise-favorite-btn {
    width: 100%;
  }

  .exercise-favorite-btn-compact {
    width: 36px;
  }

  .exercise-card-stats {
    flex-direction: column;
  }
}

@media (min-width: 768px) {
  .coach-ia-view {
    padding-bottom: 230px;
  }

  .coach-ia-shell {
    max-width: 760px;
    margin: 0 auto;
  }

  .coach-ia-composer {
    left: 50%;
    right: auto;
    width: min(calc(100% - 28px), 760px);
    transform: translateX(-50%);
  }

  .bottom-nav {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(calc(100% - 28px), 520px);
  }
}

/* ========================================================================
   DEV GATE OVERLAY (login view)
   ======================================================================== */

.dev-gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 11, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.dev-gate-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card, #14161c);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  background-clip: padding-box;
}

.dev-gate-card .eyebrow {
  margin: 0;
}
.dev-gate-card .title {
  margin: 0;
  font-size: 18px;
}
.dev-gate-card .subtitle {
  margin: 0 0 4px;
}
