:root,
[data-theme="light"] {
  --fch-bg: rgba(242,242,244,0.72);
  --fch-bg-scrolled: rgba(242,242,244,0.92);
  --fch-surface: #FFFFFF;
  --fch-surface-2: #FAFAFC;
  --fch-border: rgba(10,10,18,0.08);
  --fch-border-2: rgba(10,10,18,0.15);
  --fch-text: #0A0A12;
  --fch-text-2: rgba(10,10,18,0.66);
  --fch-logo-filter: invert(1);
  --fch-icon-sun: none;
  --fch-icon-moon: block;
  --fch-shadow: 0 1px 2px rgba(10,10,18,0.04);
  --fch-menu-shadow: 0 16px 40px -20px rgba(10,10,18,0.25);
  --fch-brand-gradient: linear-gradient(115deg, #2F62C4 0%, #4E8AE3 55%, #6FABEF 100%);
}

[data-theme="dark"] {
  --fch-bg: rgba(10,10,12,0.70);
  --fch-bg-scrolled: rgba(10,10,12,0.92);
  --fch-surface: #121216;
  --fch-surface-2: #17171D;
  --fch-border: rgba(255,255,255,0.09);
  --fch-border-2: rgba(255,255,255,0.17);
  --fch-text: #F5F5F7;
  --fch-text-2: rgba(245,245,247,0.68);
  --fch-logo-filter: none;
  --fch-icon-sun: block;
  --fch-icon-moon: none;
  --fch-shadow: 0 1px 2px rgba(0,0,0,0.4);
  --fch-menu-shadow: 0 16px 40px -20px rgba(0,0,0,0.8);
  --fch-brand-gradient: linear-gradient(115deg, #3E78D8 0%, #5B97E8 55%, #84B8F4 100%);
}

.fcoach-header.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 13px 0;
  border-bottom: 1px solid transparent;
  background: var(--fch-bg);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  backdrop-filter: blur(20px) saturate(1.3);
  transition: border-color .25s ease, background .25s ease, padding .25s ease;
}

.fcoach-header.nav.scrolled {
  padding: 10px 0;
  border-bottom-color: var(--fch-border);
  background: var(--fch-bg-scrolled);
}

.fcoach-header .container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.fcoach-header .nav-inner {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.fcoach-header .logo {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: var(--fch-text);
  text-decoration: none;
}

.fcoach-header .logo .wordmark {
  display: block;
  width: auto;
  height: 24px;
  max-width: none;
  filter: var(--fch-logo-filter);
}

.fcoach-header .nav-links {
  display: flex;
  gap: 6px;
  margin-left: auto;
  font-size: 13.5px;
  font-weight: 600;
}

.fcoach-header .nav-links a {
  padding: 7px 13px;
  border-radius: 99px;
  color: var(--fch-text-2);
  text-decoration: none;
  transition: color .15s ease, background .15s ease;
}

.fcoach-header .nav-links a:hover {
  color: var(--fch-text);
  background: var(--fch-surface);
}

.fcoach-header .nav-links a.active,
.fcoach-header .nav-links a[aria-current="page"] {
  color: var(--fch-text);
  background: var(--fch-surface);
  box-shadow: var(--fch-shadow);
}

.fcoach-header .nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fcoach-header .lang-switch {
  position: relative;
}

.fcoach-header .lang-switch summary {
  height: 36px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--fch-border);
  border-radius: 11px;
  color: var(--fch-text-2);
  background: transparent;
  font: 700 12.5px/1 'Inter', system-ui, sans-serif;
  letter-spacing: .04em;
  list-style: none;
  cursor: pointer;
  user-select: none;
  transition: color .15s ease, border-color .15s ease;
}

.fcoach-header .lang-switch summary::-webkit-details-marker { display: none; }
.fcoach-header .lang-switch summary:hover { color: var(--fch-text); border-color: var(--fch-border-2); }
.fcoach-header .lang-switch summary svg { width: 14px; height: 14px; opacity: .8; }

.fcoach-header .lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 110;
  min-width: 150px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--fch-border);
  border-radius: 13px;
  background: var(--fch-surface);
  box-shadow: var(--fch-menu-shadow);
}

.fcoach-header .lang-menu a {
  padding: 8px 11px;
  border-radius: 9px;
  color: var(--fch-text-2);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}

.fcoach-header .lang-menu a:hover,
.fcoach-header .lang-menu a[aria-current="true"] {
  color: var(--fch-text);
  background: var(--fch-surface-2);
}

.fcoach-header .theme-toggle {
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--fch-border);
  border-radius: 11px;
  color: var(--fch-text-2);
  background: transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

.fcoach-header .theme-toggle:hover {
  color: var(--fch-text);
  border-color: var(--fch-border-2);
  transform: none;
}

.fcoach-header .theme-toggle .sun { display: var(--fch-icon-sun); }
.fcoach-header .theme-toggle .moon { display: var(--fch-icon-moon); }
.fcoach-header .theme-toggle::before { content: none; }

.fcoach-header .btn {
  width: auto;
  flex: 0 0 auto;
  min-height: 42px;
  padding: 11px 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .18s cubic-bezier(.2,.6,.3,1), filter .18s ease, box-shadow .18s ease;
}

.fcoach-header .btn-primary {
  color: #FFFFFF;
  background: var(--fch-brand-gradient);
  box-shadow: 0 6px 18px -8px rgba(62,120,216,.55);
}

.fcoach-header .btn-primary:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px -10px rgba(62,120,216,.65);
}

.fcoach-header .btn-primary:active { transform: translateY(0) scale(.98); }

.fcoach-header .fcoach-mobile-trigger {
  width: 40px;
  height: 40px;
  padding: 0;
  display: none;
  place-items: center;
  border: 1px solid var(--fch-border);
  border-radius: 12px;
  color: var(--fch-text);
  background: transparent;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.fcoach-header .fcoach-mobile-trigger:hover {
  border-color: var(--fch-border-2);
  background: var(--fch-surface);
}

.fcoach-header .mobile-grid-icon {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  box-shadow:
    -6px -6px currentColor, 0 -6px currentColor, 6px -6px currentColor,
    -6px 0 currentColor, 6px 0 currentColor,
    -6px 6px currentColor, 0 6px currentColor, 6px 6px currentColor;
}

.fcoach-mobile-layer {
  position: fixed;
  inset: 0;
  z-index: 300;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear .28s;
}

.fcoach-mobile-layer.open {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.fcoach-mobile-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(5, 7, 12, .46);
  opacity: 0;
  cursor: default;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: opacity .25s ease;
}

.fcoach-mobile-layer.open .fcoach-mobile-backdrop { opacity: 1; }

.fcoach-mobile-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(88vw, 380px);
  height: 100vh;
  height: 100dvh;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--fch-border);
  background: var(--fch-surface);
  box-shadow: -26px 0 64px -34px rgba(0,0,0,.56);
  transform: translate3d(100%, 0, 0);
  transition: transform .28s cubic-bezier(.22,.72,.2,1);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.fcoach-mobile-layer.open .fcoach-mobile-drawer { transform: translate3d(0, 0, 0); }

.fcoach-mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 2px 18px;
  border-bottom: 1px solid var(--fch-border);
}

.fcoach-mobile-drawer-logo { display: inline-flex; align-items: center; }
.fcoach-mobile-drawer-logo img { width: 106px; height: auto; filter: var(--fch-logo-filter); }

.fcoach-mobile-close {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--fch-border);
  border-radius: 12px;
  color: var(--fch-text);
  background: transparent;
  cursor: pointer;
}

.fcoach-mobile-close::before,
.fcoach-mobile-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 1.5px;
  border-radius: 99px;
  background: currentColor;
}

.fcoach-mobile-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.fcoach-mobile-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.fcoach-mobile-close:hover { border-color: var(--fch-border-2); background: var(--fch-surface-2); }

.fcoach-mobile-drawer-links {
  display: grid;
  gap: 4px;
  padding: 18px 0;
}

.fcoach-mobile-drawer-links a {
  padding: 12px 13px;
  border-radius: 11px;
  color: var(--fch-text-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.fcoach-mobile-drawer-links a:hover,
.fcoach-mobile-drawer-links a.active,
.fcoach-mobile-drawer-links a[aria-current="page"] {
  color: var(--fch-text);
  background: var(--fch-surface-2);
}

.fcoach-mobile-drawer-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: start;
  gap: 9px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--fch-border);
}

.fcoach-mobile-drawer .lang-switch { position: relative; }
.fcoach-mobile-drawer .lang-switch summary {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--fch-border);
  border-radius: 12px;
  color: var(--fch-text-2);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.fcoach-mobile-drawer .lang-switch summary::-webkit-details-marker { display: none; }
.fcoach-mobile-drawer .lang-switch summary svg { width: 15px; height: 15px; }
.fcoach-mobile-drawer .lang-menu {
  position: static;
  margin-top: 7px;
  padding: 6px;
  display: grid;
  gap: 2px;
  border: 1px solid var(--fch-border);
  border-radius: 12px;
  background: var(--fch-surface-2);
}
.fcoach-mobile-drawer .lang-menu a {
  padding: 8px 9px;
  border-radius: 8px;
  color: var(--fch-text-2);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.fcoach-mobile-drawer .lang-menu a:hover,
.fcoach-mobile-drawer .lang-menu a[aria-current="true"] { color: var(--fch-text); background: var(--fch-surface); }

.fcoach-mobile-drawer .theme-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--fch-border);
  border-radius: 12px;
  color: var(--fch-text-2);
  background: transparent;
  cursor: pointer;
}
.fcoach-mobile-drawer .theme-toggle:hover { color: var(--fch-text); border-color: var(--fch-border-2); }
.fcoach-mobile-drawer .theme-toggle::before { content: none; }
.fcoach-mobile-drawer .theme-toggle .sun { display: var(--fch-icon-sun); }
.fcoach-mobile-drawer .theme-toggle .moon { display: var(--fch-icon-moon); }

.fcoach-mobile-drawer .btn-primary {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 44px;
  padding: 10px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #FFFFFF;
  background: var(--fch-brand-gradient);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 22px -11px rgba(62,120,216,.65);
}

body.fcoach-drawer-open { overflow: hidden; }

.fcoach-header a:focus-visible,
.fcoach-header button:focus-visible,
.fcoach-header summary:focus-visible {
  outline: 2px solid #4E8AE3;
  outline-offset: 2px;
  border-radius: 6px;
}

@media (max-width: 760px) {
  .fcoach-header .container { padding: 0 20px; }
  .fcoach-header .nav-inner { gap: 12px; }
  .fcoach-header .nav-inner > .nav-links,
  .fcoach-header .nav-inner > .nav-cta { display: none; }
  .fcoach-header .fcoach-mobile-trigger { display: grid; margin-left: auto; }
  .fcoach-header .logo .wordmark { width: 94px; height: auto; }
}

@media (max-width: 380px) {
  .fcoach-header .container { padding-left: 16px; padding-right: 16px; }
  .fcoach-header .nav-inner { gap: 9px; }
  .fcoach-header .logo .wordmark { width: 90px; }
  .fcoach-mobile-drawer { width: min(92vw, 360px); padding-left: 15px; padding-right: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .fcoach-header, .fcoach-header * { transition-duration: .01ms !important; }
}

body.auth-page.has-fcoach-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 24px 24px;
}

body.auth-page.has-fcoach-header > .card { margin: auto; }
