/* MonSportif platform design system — aligned with redesigned home */

:root {
  --ms-ink: #0c0f0d;
  --ms-panel: #121614;
  --ms-panel-2: #161b18;
  --ms-line: rgba(255, 255, 255, 0.1);
  --ms-text: #f4f7f2;
  --ms-mute: rgba(245, 247, 244, 0.62);
  --ms-mute-2: rgba(245, 247, 244, 0.42);
  --ms-lime: #22c55e;
  --ms-lime-hover: #4ade80;
  --ms-lime-ink: #041108;
  --ms-danger: #f43f5e;
  --ms-radius: 0.65rem;
  --ms-radius-lg: 1rem;
  --ms-font: "DM Sans", system-ui, sans-serif;
  --ms-display: "Syne", "DM Sans", system-ui, sans-serif;
  --ms-max: 1120px;
}

html { scroll-behavior: smooth; }

body,
body.h-full {
  font-family: var(--ms-font) !important;
  background: var(--ms-ink) !important;
  color: var(--ms-text) !important;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4,
.ms-brand,
.home-brand,
.home-hero-brand,
.home-h2,
.home-hero-title {
  font-family: var(--ms-display) !important;
  letter-spacing: -0.03em;
}

a { text-decoration: none; }

/* ── Buttons ─────────────────────────────────────────────── */
.ms-btn,
.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: var(--ms-radius);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.35rem;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  cursor: pointer;
}
.ms-btn:active,
.home-btn:active { transform: scale(0.98); }
.ms-btn-primary,
.home-btn-primary {
  background: var(--ms-lime);
  color: var(--ms-lime-ink);
}
.ms-btn-primary:hover,
.home-btn-primary:hover { background: var(--ms-lime-hover); color: var(--ms-lime-ink); }
.ms-btn-ghost,
.home-btn-ghost {
  background: transparent;
  color: var(--ms-text);
  border-color: rgba(255, 255, 255, 0.28);
}
.ms-btn-ghost:hover,
.home-btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.06);
}
.ms-btn-sm,
.home-btn-sm { padding: 0.6rem 1rem; font-size: 0.8rem; }
.ms-btn-block { width: 100%; }

/* Soften legacy primary CTAs across platform */
.bg-primary-500.text-black,
button.bg-primary-500,
a.bg-primary-500 {
  border-radius: var(--ms-radius) !important;
  box-shadow: none !important;
  font-family: var(--ms-font) !important;
  letter-spacing: 0.02em !important;
}
.rounded-full.bg-primary-500,
a.rounded-full.bg-primary-500,
button.rounded-full.bg-primary-500 {
  border-radius: var(--ms-radius) !important;
}

/* ── Forms ───────────────────────────────────────────────── */
.ms-input,
.ms-auth input[type="email"],
.ms-auth input[type="password"],
.ms-auth input[type="text"],
.ms-auth input[type="tel"],
.ms-auth select,
.ms-auth textarea {
  width: 100%;
  background: var(--ms-ink) !important;
  border: 1px solid var(--ms-line) !important;
  color: var(--ms-text) !important;
  border-radius: var(--ms-radius) !important;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.ms-input:focus,
.ms-auth input:focus,
.ms-auth select:focus,
.ms-auth textarea:focus {
  border-color: rgba(34, 197, 94, 0.55) !important;
}
.ms-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--ms-mute-2);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Public shell ────────────────────────────────────────── */
.ms-public {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ms-ink);
  color: var(--ms-text);
}
.ms-public-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 15, 13, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ms-line);
}
.ms-public-nav-inner {
  max-width: var(--ms-max);
  margin: 0 auto;
  padding: 0.95rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.ms-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ms-text) !important;
  font-weight: 800;
  font-size: 1.1rem;
}
.ms-brand img {
  height: 2rem;
  width: auto;
  border-radius: 0.4rem;
  object-fit: cover;
}
.ms-brand span { color: var(--ms-lime); }
.ms-public-links {
  display: none;
  align-items: center;
  gap: 1.5rem;
}
.ms-public-links a {
  color: rgba(244, 247, 242, 0.72);
  font-size: 0.82rem;
  font-weight: 600;
}
.ms-public-links a:hover,
.ms-public-links a.is-active { color: #fff; }
.ms-public-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.ms-link-quiet {
  display: none;
  color: rgba(244, 247, 242, 0.78);
  font-size: 0.82rem;
  font-weight: 600;
}
.ms-link-quiet:hover { color: #fff; }
/* .ms-menu-btn shares .ms-hamburger look; hidden on desktop via media query */
.ms-public-main {
  flex: 1;
  width: 100%;
  max-width: var(--ms-max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}
.ms-public-main.ms-wide { max-width: 1200px; }
.ms-kicker {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--ms-lime);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.ms-page-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: #fff;
}
.ms-lead {
  max-width: 36rem;
  margin: 0 0 1.75rem;
  color: var(--ms-mute);
  font-size: 1.05rem;
  line-height: 1.55;
  font-weight: 500;
}
.ms-panel {
  background: var(--ms-panel);
  border: 1px solid var(--ms-line);
  border-radius: var(--ms-radius-lg);
  padding: 1.5rem;
}
.ms-footer {
  max-width: var(--ms-max);
  margin: 0 auto;
  width: 100%;
  padding: 2.5rem 1.25rem 3rem;
  display: grid;
  gap: 1.35rem;
  border-top: 1px solid var(--ms-line);
}
.ms-footer-meta {
  color: var(--ms-mute-2);
  font-size: 0.78rem;
  font-weight: 500;
  margin: 0.5rem 0 0;
}
.ms-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.35rem;
}
.ms-footer-links a {
  color: rgba(244, 247, 242, 0.55);
  font-size: 0.82rem;
  font-weight: 600;
}
.ms-footer-links a:hover { color: #fff; }

@media (min-width: 768px) {
  .ms-link-quiet { display: inline-flex; }
  .ms-footer {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}
@media (min-width: 1024px) {
  .ms-public-links { display: flex; }
  .ms-public-nav .ms-hamburger,
  .ms-public-nav .ms-menu-btn { display: none; }
}

/* ── Auth pages ──────────────────────────────────────────── */
.ms-auth {
  box-sizing: border-box;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(1rem, env(safe-area-inset-top, 0px))
    clamp(0.85rem, 4vw, 1.5rem)
    max(1.25rem, env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(ellipse 60% 50% at 10% 20%, rgba(34, 197, 94, 0.1), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(34, 197, 94, 0.06), transparent 50%),
    var(--ms-ink);
}
.ms-auth-shell {
  width: 100%;
  max-width: 26rem;
  margin-inline: auto;
}
.ms-auth-shell.ms-auth-wide { max-width: 32rem; }
.ms-auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.35rem;
}
.ms-auth-brand a {
  display: inline-flex;
  line-height: 0;
}
.ms-auth-brand img {
  display: block;
  width: min(9.75rem, 52vw);
  height: auto;
  max-width: 100%;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  margin: 0;
  /* logo_transparent is mint; lift slightly for ink backgrounds */
  filter: brightness(1.08) saturate(1.05);
}
.ms-auth-brand h1 {
  margin: 0.85rem 0 0;
  font-family: Syne, "DM Sans", system-ui, sans-serif;
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}
.ms-auth-brand h1 span { color: var(--ms-lime); }
.ms-auth-brand p {
  margin: 0.45rem 0 0;
  color: var(--ms-mute-2);
  font-size: clamp(0.78rem, 3.2vw, 0.88rem);
  font-weight: 500;
  max-width: 22rem;
  line-height: 1.4;
}
.ms-auth-card {
  background: var(--ms-panel);
  border: 1px solid var(--ms-line);
  border-radius: var(--ms-radius-lg);
  padding: clamp(1.1rem, 3.5vw, 1.75rem);
  width: 100%;
  box-sizing: border-box;
}
.ms-auth-card h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.15rem, 4.2vw, 1.35rem);
  font-weight: 700;
  color: #fff;
}
.ms-auth-card .ms-auth-sub {
  margin: 0 0 1.2rem;
  color: var(--ms-mute);
  font-size: clamp(0.84rem, 3.2vw, 0.92rem);
  line-height: 1.45;
}
.ms-auth-card .ms-btn {
  white-space: normal;
  line-height: 1.25;
  min-height: 2.85rem;
}
.ms-auth-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.15rem;
  color: var(--ms-mute-2);
  font-size: 0.82rem;
  font-weight: 600;
}
.ms-auth-back:hover { color: #fff; }

@media (max-width: 420px) {
  .ms-auth {
    align-items: flex-start;
    padding-top: max(1.25rem, env(safe-area-inset-top, 0px));
  }
  .ms-auth-brand { margin-bottom: 1.1rem; }
  .ms-auth .grid.grid-cols-2 {
    grid-template-columns: 1fr !important;
  }
  .ms-auth-card .flex.items-center.justify-between {
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
  }
}

@media (max-height: 700px) and (max-width: 480px) {
  .ms-auth { align-items: flex-start; }
  .ms-auth-brand img { width: min(7.5rem, 46vw); }
}

/* ── Home page extras ────────────────────────────────────── */
.home-page { background: var(--ms-ink); color: var(--ms-text); overflow-x: hidden; }
@keyframes home-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes home-ken {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}
@keyframes home-line-draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.home-rise { animation: home-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
.home-rise-d1 { animation-delay: 0.12s; }
.home-rise-d2 { animation-delay: 0.24s; }
.home-rise-d3 { animation-delay: 0.36s; }
.home-hero-media { animation: home-ken 18s ease-out forwards; }
.home-accent-line {
  transform-origin: left center;
  animation: home-line-draw 1s 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  width: 4.5rem;
  height: 3px;
  background: var(--ms-lime);
  margin-bottom: 1.35rem;
}
.home-nav,
.home-nav.ms-public-nav {
  position: absolute !important;
  inset: 0 0 auto 0;
  z-index: 30;
  background: linear-gradient(to bottom, rgba(12, 15, 13, 0.72), transparent) !important;
  border-bottom: 0 !important;
  backdrop-filter: none !important;
}
.home-nav .ms-public-nav-inner { background: transparent; }
.home-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.home-hero-bg { position: absolute; inset: 0; z-index: 0; }
.home-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.home-hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(8, 12, 10, 0.92) 0%, rgba(8, 12, 10, 0.72) 42%, rgba(8, 12, 10, 0.35) 100%),
    linear-gradient(to top, rgba(8, 12, 10, 0.95) 0%, transparent 42%);
}
.home-hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: var(--ms-max);
  margin: 0 auto;
  padding: 7.5rem 1.25rem 4.5rem;
}
.home-hero-brand {
  font-size: clamp(2.8rem, 9vw, 5.6rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
  margin: 0 0 1.1rem;
  color: #fff;
}
.home-hero-brand span { color: var(--ms-lime); }
.home-hero-title {
  max-width: 18ch;
  font-size: clamp(1.55rem, 3.6vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0 0 1rem;
  color: #fff;
}
.home-hero-copy {
  max-width: 34rem;
  margin: 0 0 1.75rem;
  color: var(--ms-mute);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.55;
  font-weight: 500;
}
.home-cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.home-section {
  max-width: var(--ms-max);
  margin: 0 auto;
  padding: 5.5rem 1.25rem;
}
.home-feature-list { margin-top: 3rem; border-top: 1px solid var(--ms-line); }
.home-feature {
  display: grid;
  gap: 0.75rem 2rem;
  padding: 1.65rem 0;
  border-bottom: 1px solid var(--ms-line);
}
.home-feature h3 { margin: 0; font-size: 1.2rem; font-weight: 700; color: #fff; }
.home-feature p { margin: 0; color: var(--ms-mute); font-size: 0.98rem; line-height: 1.55; }
.home-roles { display: grid; gap: 2.5rem; margin-top: 3rem; }
.home-role h3 { margin: 0 0 0.45rem; font-size: 1.35rem; font-weight: 700; }
.home-role p { margin: 0 0 1rem; color: var(--ms-mute); line-height: 1.55; }
.home-role ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.45rem; }
.home-role li {
  color: rgba(244, 247, 242, 0.82);
  font-size: 0.92rem;
  padding-left: 1rem;
  position: relative;
}
.home-role li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4rem;
  height: 0.4rem;
  background: var(--ms-lime);
}
.home-steps {
  display: grid;
  gap: 1.75rem;
  margin-top: 3rem;
  counter-reset: step;
}
.home-step {
  display: grid;
  gap: 0.55rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ms-line);
  counter-increment: step;
}
.home-step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--ms-display);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--ms-lime);
}
.home-step h3 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.home-step p { margin: 0; color: var(--ms-mute); line-height: 1.5; font-size: 0.96rem; }
.home-pricing-grid { display: grid; gap: 1rem; margin-top: 3rem; }
.home-plan {
  background: var(--ms-panel);
  border: 1px solid var(--ms-line);
  border-radius: var(--ms-radius-lg);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.home-plan.is-popular {
  border-color: rgba(34, 197, 94, 0.55);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.08), var(--ms-panel) 38%);
}
.home-plan-tag {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--ms-lime);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.home-plan h3 { margin: 0 0 0.4rem; font-size: 1.35rem; font-weight: 700; }
.home-plan-desc { margin: 0 0 1.25rem; color: var(--ms-mute); font-size: 0.92rem; line-height: 1.45; }
.home-plan-price { margin-bottom: 1.35rem; }
.home-plan-price strong {
  display: block;
  font-family: var(--ms-display);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
}
.home-plan-price span { display: block; margin-top: 0.35rem; color: var(--ms-mute); font-size: 0.85rem; }
.home-plan ul { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.55rem; flex-grow: 1; }
.home-plan li {
  color: rgba(244, 247, 242, 0.8);
  font-size: 0.9rem;
  padding-left: 1rem;
  position: relative;
}
.home-plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.35rem;
  height: 0.35rem;
  background: var(--ms-lime);
}
.home-plan button {
  width: 100%;
  border: 0;
  cursor: pointer;
  border-radius: var(--ms-radius);
  padding: 0.85rem 1rem;
  font-weight: 700;
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.home-plan.is-popular button { background: var(--ms-lime); color: var(--ms-lime-ink); }
.home-faq { margin-top: 2.5rem; border-top: 1px solid var(--ms-line); }
.home-faq-item { border-bottom: 1px solid var(--ms-line); }
.home-faq-item button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  background: transparent;
  border: 0;
  color: #fff;
  text-align: left;
  cursor: pointer;
  font-family: var(--ms-display);
  font-size: 1.05rem;
  font-weight: 700;
}
.home-faq-item button svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.45);
  transition: transform 0.2s ease;
}
.home-faq-item.is-open button svg { transform: rotate(180deg); }
.home-faq-item .answer {
  padding: 0 0 1.25rem;
  color: var(--ms-mute);
  font-size: 0.98rem;
  line-height: 1.55;
}
.home-final {
  border-top: 1px solid var(--ms-line);
  border-bottom: 1px solid var(--ms-line);
  background:
    radial-gradient(ellipse 70% 80% at 15% 20%, rgba(34, 197, 94, 0.14), transparent 55%),
    var(--ms-ink);
}
@media (min-width: 768px) {
  .home-feature { grid-template-columns: 0.9fr 1.4fr; align-items: baseline; }
  .home-roles { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .home-steps { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
  .home-step { border-top: 0; border-left: 1px solid var(--ms-line); padding: 0 0 0 1.25rem; }
  .home-pricing-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .home-hero-content { padding: 8.5rem 1.25rem 5.5rem; }
}

/* ── Dashboard chrome (all roles) ────────────────────────── */
.manager-dark,
.member-dark,
.gestionnaire-dark,
.employee-dark,
.coach-dark,
.admin-dark {
  font-family: var(--ms-font);
}

/* Top navbars shared look */
nav.sticky.top-0.z-50 {
  background: rgba(12, 15, 13, 0.92) !important;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ms-line) !important;
  box-shadow: none !important;
}
nav.sticky.top-0.z-50 h1,
nav.sticky.top-0.z-50 .font-black {
  font-family: var(--ms-display) !important;
  letter-spacing: -0.03em;
}
nav.sticky.top-0.z-50 .text-emerald-100,
nav.sticky.top-0.z-50 .text-primary-400 {
  color: var(--ms-lime) !important;
}

/* Dropdown menus */
nav.sticky .absolute.bg-\[\#121614\],
nav .w-64.bg-\[\#121614\],
nav.sticky .absolute.bg-\[\#141414\],
nav .w-64.bg-\[\#141414\] {
  border-radius: var(--ms-radius-lg) !important;
  border-color: var(--ms-line) !important;
  box-shadow: none !important;
  background: var(--ms-panel) !important;
}

/* layout.html sidebar */
#sidebar {
  background: var(--ms-panel) !important;
  border-color: var(--ms-line) !important;
}
#sidebar h1 {
  font-family: var(--ms-display) !important;
}
.sidebar-nav-item.active {
  background: rgba(34, 197, 94, 0.12) !important;
  color: var(--ms-lime) !important;
  border-color: rgba(34, 197, 94, 0.28) !important;
}

/* Page titles in dashboards */
.manager-dark h1,
.manager-dark h2,
.member-dark h1,
.member-dark h2,
.gestionnaire-dark h1,
.gestionnaire-dark h2,
.employee-dark h1,
.employee-dark h2,
.coach-dark h1,
.coach-dark h2 {
  font-family: var(--ms-display) !important;
}

/* Soften card chrome */
.rounded-\[30px\],
.rounded-\[28px\],
.rounded-\[40px\],
.rounded-3xl {
  border-radius: var(--ms-radius-lg) !important;
}

/* Legal content */
.legal-content h2 {
  font-family: var(--ms-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin: 2rem 0 0.75rem;
}
.legal-content h3 {
  font-family: var(--ms-display);
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  margin: 1.5rem 0 0.5rem;
}
.legal-content p,
.legal-content li {
  color: var(--ms-mute);
  line-height: 1.8;
}
.legal-content a { color: var(--ms-lime); }

/* ── Dashboard page surfaces (all roles) ─────────────────── */
.manager-dark,
.member-dark,
.gestionnaire-dark,
.employee-dark,
.coach-dark {
  background: var(--ms-ink) !important;
}

.manager-dark .bg-\[\#141414\],
.member-dark .bg-\[\#141414\],
.gestionnaire-dark .bg-\[\#141414\],
.employee-dark .bg-\[\#141414\],
.coach-dark .bg-\[\#141414\],
.manager-dark .bg-\[\#0F0F0F\],
.member-dark .bg-\[\#0F0F0F\] {
  background-color: var(--ms-panel) !important;
}

/* Primary action buttons in dashboards */
.manager-dark button.bg-primary-500,
.member-dark button.bg-primary-500,
.gestionnaire-dark button.bg-primary-500,
.employee-dark button.bg-primary-500,
.coach-dark button.bg-primary-500,
.manager-dark a.bg-primary-500,
.member-dark a.bg-primary-500 {
  border-radius: var(--ms-radius) !important;
  font-weight: 700 !important;
}

/* Form controls consistency */
.manager-dark input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
.manager-dark select,
.manager-dark textarea,
.member-dark input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
.member-dark select,
.member-dark textarea,
.gestionnaire-dark input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
.gestionnaire-dark select,
.gestionnaire-dark textarea,
.employee-dark input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
.employee-dark select,
.employee-dark textarea,
.coach-dark input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
.coach-dark select,
.coach-dark textarea {
  border-radius: var(--ms-radius) !important;
}

/* ── Dashboard layout helpers ────────────────────────────── */
.ms-dash {
  min-height: 100vh;
  background: var(--ms-ink);
  color: var(--ms-text);
}
.ms-dash-main {
  flex: 1;
  padding: 1.25rem 1.25rem 2.5rem;
  overflow-y: auto;
}
@media (min-width: 640px) {
  .ms-dash-main { padding: 1.75rem 2rem 3rem; }
}
.ms-dash-wrap {
  max-width: 1120px;
  margin: 0 auto;
}
.ms-dash-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.ms-dash-header h1 {
  margin: 0;
  font-family: var(--ms-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #fff;
}
.ms-dash-header p {
  margin: 0.3rem 0 0;
  color: var(--ms-mute);
  font-size: 0.9rem;
}
.ms-stat {
  background: var(--ms-panel);
  border: 1px solid var(--ms-line);
  border-radius: var(--ms-radius-lg);
  padding: 1.25rem 1.35rem;
  transition: border-color 0.2s ease;
}
.ms-stat:hover { border-color: rgba(34, 197, 94, 0.28); }
.ms-stat-label {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ms-mute-2);
}
.ms-stat-value {
  margin: 0.45rem 0 0;
  font-family: var(--ms-display);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
}
.ms-stat-meta {
  margin: 0.55rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ms-lime);
}
.ms-stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--ms-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.12);
  color: var(--ms-lime);
  border: 1px solid rgba(34, 197, 94, 0.22);
  flex-shrink: 0;
}
.ms-dash-panel {
  background: var(--ms-panel);
  border: 1px solid var(--ms-line);
  border-radius: var(--ms-radius-lg);
  padding: 1.35rem;
}
.ms-dash-panel h3,
.ms-dash-panel h4 {
  margin: 0 0 1rem;
  font-family: var(--ms-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.ms-quick-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem;
  border-radius: var(--ms-radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
  color: inherit;
}
.ms-quick-link:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(34, 197, 94, 0.25);
  color: inherit;
}
.ms-quick-link p { margin: 0; }
.ms-quick-link .title { font-size: 0.9rem; font-weight: 700; color: #fff; }
.ms-quick-link .sub { font-size: 0.75rem; color: var(--ms-mute-2); margin-top: 0.15rem; }
.ms-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--ms-radius);
  border: 1px solid var(--ms-line);
  font-size: 0.88rem;
  font-weight: 500;
}
.ms-alert-danger { background: rgba(244, 63, 94, 0.1); border-color: rgba(244, 63, 94, 0.22); color: #fecdd3; }
.ms-alert-warning { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.22); color: #fde68a; }
.ms-alert-info { background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.22); color: #bbf7d0; }
.ms-seg {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.2rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ms-line);
  border-radius: var(--ms-radius);
}
.ms-seg button {
  border: 0;
  background: transparent;
  color: var(--ms-mute);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: calc(var(--ms-radius) - 2px);
  cursor: pointer;
}
.ms-seg button.is-on {
  background: var(--ms-lime);
  color: var(--ms-lime-ink);
}

/* Flatten heavy shadows across all dashboards */
.manager-dark .shadow-sm,
.manager-dark .shadow-md,
.manager-dark .shadow-lg,
.manager-dark .shadow-xl,
.manager-dark .shadow-2xl,
.member-dark .shadow-sm,
.member-dark .shadow-md,
.member-dark .shadow-lg,
.gestionnaire-dark .shadow-sm,
.gestionnaire-dark .shadow-md,
.gestionnaire-dark .shadow-lg,
.employee-dark .shadow-sm,
.employee-dark .shadow-md,
.coach-dark .shadow-sm,
.coach-dark .shadow-md {
  box-shadow: none !important;
}

/* Chart.js dark axes */
.manager-dark canvas,
.member-dark canvas,
.gestionnaire-dark canvas {
  max-width: 100%;
}

/* ── App hamburger drawer ────────────────────────────────── */
html.ms-drawer-open {
  overflow: hidden;
}

.ms-hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.ms-hamburger:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}
.ms-hamburger:active { transform: scale(0.96); }
.ms-hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease, width 0.2s ease;
  transform-origin: center;
}
.ms-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ms-hamburger.is-open span:nth-child(2) { opacity: 0; width: 60%; }
.ms-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.ms-drawer-portal {
  /* wrapper for Alpine teleport; children are position:fixed */
  display: contents;
}

.ms-drawer-overlay {
  position: fixed !important;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.58);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.ms-drawer-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ms-drawer {
  position: fixed !important;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 9999;
  width: min(20.5rem, 88vw);
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  background: #0e1210;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 18px 0 50px rgba(0, 0, 0, 0.45);
  transform: translate3d(-105%, 0, 0);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s;
  will-change: transform;
}
.ms-drawer.is-open {
  transform: translate3d(0, 0, 0);
  visibility: visible;
  pointer-events: auto;
}

.ms-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #0c0f0d;
}
.ms-drawer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.ms-drawer-brand img {
  height: 2rem;
  width: auto;
  border-radius: 0.45rem;
  object-fit: cover;
}
.ms-drawer-brand strong {
  display: block;
  font-family: Syne, "DM Sans", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.ms-drawer-brand strong span { color: var(--ms-lime, #22c55e); }
.ms-drawer-brand small {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(34, 197, 94, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 11rem;
}
.ms-drawer-close {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}
.ms-drawer-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ms-drawer-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.65rem 0.7rem 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.ms-drawer-section {
  margin: 0.85rem 0.45rem 0.35rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.ms-drawer-link,
.ms-drawer-group > button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.72rem 0.85rem;
  border-radius: 0.75rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  font-weight: 650;
  text-align: left;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.ms-drawer-link:hover,
.ms-drawer-group > button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.ms-drawer-link.is-accent {
  color: #86efac;
}
.ms-drawer-link.is-accent:hover {
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
}
.ms-drawer-link svg,
.ms-drawer-group > button svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  opacity: 0.45;
}
.ms-drawer-group { margin-bottom: 0.15rem; }
.ms-drawer-sub {
  margin: 0.15rem 0 0.35rem 0.55rem;
  padding-left: 0.55rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 0.1rem;
}
.ms-drawer-sub a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 0.55rem;
  color: rgba(255, 255, 255, 0.68) !important;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none !important;
}
.ms-drawer-sub a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #86efac !important;
}

.ms-drawer-footer {
  padding: 0.85rem 1rem 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #0c0f0d;
}

/* Public nav: slide drawer instead of stacked drop */
.ms-public-nav .ms-drawer {
  background: #0c0f0d;
}
.ms-public-drawer-actions {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
  padding: 0;
}
.ms-public-drawer-actions .ms-drawer-link {
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}
.ms-public-drawer-actions .ms-btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
}
