/* ==========================================================================
   FamilyHealth — design system
   Bootstrap 5 is loaded first; everything here customizes it.
   ========================================================================== */

:root {
  --fh-primary: #6C63FF;
  --fh-primary-600: #574EF2;
  --fh-primary-700: #4A42D6;
  --fh-primary-50: #F1F0FF;
  --fh-primary-100: #E4E2FF;
  --fh-teal: #22B8A7;
  --fh-teal-600: #179C8D;
  --fh-teal-50: #E7F8F5;
  --fh-amber: #F59E0B;
  --fh-amber-50: #FFF6E5;
  --fh-pink: #EC4899;
  --fh-pink-50: #FDECF5;
  --fh-sky: #0EA5E9;
  --fh-sky-50: #E8F6FD;
  --fh-green: #10B981;
  --fh-green-50: #E7F8F1;
  --fh-red: #F43F5E;
  --fh-red-50: #FEECEF;
  --fh-bg: #F8FAFC;
  --fh-bg-sky: #F3F6FE;
  --fh-ink: #172033;
  --fh-ink-2: #2C3650;
  --fh-muted: #5B6478;
  --fh-muted-2: #8A93A6;
  --fh-line: #E6EAF2;
  --fh-white: #FFFFFF;
  --fh-radius: 20px;
  --fh-radius-sm: 14px;
  --fh-radius-lg: 28px;
  --fh-shadow-xs: 0 1px 2px rgba(23, 32, 51, .05);
  --fh-shadow-sm: 0 2px 8px rgba(23, 32, 51, .05), 0 1px 2px rgba(23, 32, 51, .04);
  --fh-shadow: 0 12px 32px -12px rgba(23, 32, 51, .14), 0 2px 6px rgba(23, 32, 51, .04);
  --fh-shadow-lg: 0 30px 60px -20px rgba(39, 34, 120, .25), 0 8px 20px -8px rgba(23, 32, 51, .10);
  --fh-grad: linear-gradient(135deg, #6C63FF 0%, #8B7BFF 45%, #22B8A7 100%);
  --fh-ease: cubic-bezier(.22, .8, .32, 1);

  --bs-body-font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--fh-ink);
  --bs-body-bg: var(--fh-white);
  --bs-primary: #6C63FF;
  --bs-primary-rgb: 108, 99, 255;
  --bs-link-color: #574EF2;
  --bs-link-color-rgb: 87, 78, 242;
  --bs-link-hover-color: #4A42D6;
  --bs-border-color: var(--fh-line);
  --bs-border-radius: 12px;
  --bs-border-radius-lg: 16px;
  --bs-focus-ring-color: rgba(108, 99, 255, .25);
}

html { scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body { font-family: var(--bs-body-font-family); color: var(--fh-ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, h5, h6 { color: var(--fh-ink); font-weight: 800; letter-spacing: -.02em; }
a { text-decoration: none; }
img { max-width: 100%; height: auto; }
::selection { background: var(--fh-primary-100); }
.fh-skip { position: absolute; left: 1rem; top: 1rem; z-index: 2000; background: #fff; padding: .5rem 1rem; border-radius: 10px; }
.text-muted { color: var(--fh-muted) !important; }

/* ---------- Buttons ---------- */
.btn { font-weight: 700; border-radius: 14px; padding: .7rem 1.25rem; transition: transform .2s var(--fh-ease), box-shadow .2s var(--fh-ease), background-color .2s, color .2s, border-color .2s; letter-spacing: -.005em; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn-lg { padding: .95rem 1.6rem; font-size: 1.02rem; border-radius: 16px; }
.btn-sm { padding: .45rem .85rem; font-size: .85rem; border-radius: 11px; }
.btn:focus-visible { box-shadow: 0 0 0 4px rgba(108, 99, 255, .25); }
.btn-fh { background: var(--fh-primary); color: #fff; border: 0; box-shadow: 0 8px 20px -8px rgba(108, 99, 255, .7), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-fh:hover, .btn-fh:focus { background: var(--fh-primary-600); color: #fff; transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(108, 99, 255, .75); }
.btn-fh:active { transform: translateY(0); background: var(--fh-primary-700) !important; color: #fff !important; }
.btn-fh .bi-arrow-right { transition: transform .2s var(--fh-ease); }
.btn-fh:hover .bi-arrow-right { transform: translateX(3px); }
.btn-fh-soft { background: var(--fh-primary-50); color: var(--fh-primary-700); border: 1px solid var(--fh-primary-100); }
.btn-fh-soft:hover { background: var(--fh-primary-100); color: var(--fh-primary-700); transform: translateY(-2px); }
.btn-fh-ghost { background: #fff; color: var(--fh-ink); border: 1px solid var(--fh-line); box-shadow: var(--fh-shadow-xs); }
.btn-fh-ghost:hover { border-color: var(--fh-primary-100); color: var(--fh-primary-700); transform: translateY(-2px); box-shadow: var(--fh-shadow-sm); }
.btn-fh-teal { background: var(--fh-teal); color: #fff; border: 0; }
.btn-fh-teal:hover { background: var(--fh-teal-600); color: #fff; transform: translateY(-2px); }
.btn-fh-white { background: #fff; color: var(--fh-primary-700); border: 0; box-shadow: 0 10px 30px -10px rgba(0,0,0,.3); }
.btn-fh-white:hover { color: var(--fh-primary-700); transform: translateY(-2px); background: #fff; }
.btn-fh-danger { background: var(--fh-red-50); color: #BE123C; border: 1px solid #FBD0D9; }
.btn-fh-danger:hover { background: #FBD0D9; color: #9F1239; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 11px; }

/* ---------- Icon tiles ---------- */
.fh-ico { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto; font-size: 1.05rem; }
.fh-ico-lg { width: 52px; height: 52px; border-radius: 16px; font-size: 1.4rem; }
.fh-ico-purple { background: var(--fh-primary-50); color: var(--fh-primary); }
.fh-ico-teal { background: var(--fh-teal-50); color: var(--fh-teal-600); }
.fh-ico-amber { background: var(--fh-amber-50); color: #D97706; }
.fh-ico-pink { background: var(--fh-pink-50); color: #DB2777; }
.fh-ico-sky { background: var(--fh-sky-50); color: #0284C7; }
.fh-ico-green { background: var(--fh-green-50); color: #059669; }
.fh-ico-red { background: var(--fh-red-50); color: #E11D48; }

/* ---------- Logo ---------- */
.fh-logo { display: inline-flex; align-items: center; gap: .6rem; color: var(--fh-ink); font-weight: 800; font-size: 1.2rem; letter-spacing: -.03em; }
.fh-logo:hover { color: var(--fh-ink); }
.fh-logo b { color: var(--fh-primary); font-weight: 800; }
.fh-logo-mark { flex: 0 0 auto; filter: drop-shadow(0 6px 10px rgba(108, 99, 255, .3)); }

/* ==========================================================================
   PUBLIC NAV
   ========================================================================== */
.fh-nav { position: sticky; top: 0; z-index: 1030; background: rgba(255, 255, 255, .72); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s, background .25s; }
.fh-nav.scrolled { border-bottom-color: var(--fh-line); box-shadow: 0 8px 24px -18px rgba(23, 32, 51, .25); background: rgba(255, 255, 255, .9); }
.fh-nav-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 1rem; }
.fh-menu { display: flex; align-items: center; gap: 2rem; flex: 1; justify-content: flex-end; }
.fh-links { list-style: none; display: flex; gap: .35rem; margin: 0 auto; padding: 0; }
.fh-links a { color: var(--fh-ink-2); font-weight: 600; font-size: .95rem; padding: .5rem .8rem; border-radius: 10px; transition: background .2s, color .2s; }
.fh-links a:hover { color: var(--fh-primary-700); background: var(--fh-primary-50); }
.fh-nav-cta { display: flex; align-items: center; gap: 1rem; }
.fh-login { color: var(--fh-ink); font-weight: 700; padding: .5rem .6rem; }
.fh-login:hover { color: var(--fh-primary); }
.fh-burger { width: 44px; height: 44px; border: 1px solid var(--fh-line); background: #fff; border-radius: 12px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.fh-burger span { display: block; width: 18px; height: 2px; background: var(--fh-ink); border-radius: 2px; transition: transform .3s var(--fh-ease), opacity .2s; }
.fh-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.fh-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.fh-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 991.98px) {
  .fh-menu { position: absolute; top: 76px; left: 12px; right: 12px; flex-direction: column; align-items: stretch; gap: 1rem; background: #fff; border: 1px solid var(--fh-line); border-radius: 20px; padding: 1rem; box-shadow: var(--fh-shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-10px) scale(.98); transform-origin: top; transition: opacity .25s var(--fh-ease), transform .3s var(--fh-ease), visibility .25s; }
  .fh-menu.open { opacity: 1; visibility: visible; transform: none; }
  .fh-links { flex-direction: column; margin: 0; width: 100%; }
  .fh-links a { display: block; padding: .8rem 1rem; font-size: 1.02rem; }
  .fh-nav-cta { flex-direction: column; align-items: stretch; border-top: 1px solid var(--fh-line); padding-top: 1rem; }
  .fh-nav-cta .btn { width: 100%; }
  .fh-login { text-align: center; }
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.fh-section { padding: 6rem 0; position: relative; }
.fh-section-sky { background: var(--fh-bg-sky); }
.fh-section-head { text-align: center; max-width: 680px; margin: 0 auto 3.25rem; }
.fh-section-head h2 { font-size: clamp(1.9rem, 1.2rem + 2.3vw, 2.9rem); line-height: 1.12; margin: .75rem 0 1rem; }
.fh-section-head p { color: var(--fh-muted); font-size: 1.08rem; line-height: 1.7; margin: 0; }
.fh-eyebrow { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--fh-primary); background: var(--fh-primary-50); border-radius: 999px; padding: .4rem .85rem; }
.fh-eyebrow-light { background: rgba(255,255,255,.1); color: #C9C5FF; }
@media (max-width: 767.98px) { .fh-section { padding: 4.25rem 0; } .fh-section-head { margin-bottom: 2.25rem; } }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--fh-ease), transform .6s var(--fh-ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ==========================================================================
   HERO
   ========================================================================== */
.fh-hero { position: relative; padding: 3.5rem 0 5rem; overflow: hidden; }
.fh-hero-bg { position: absolute; inset: 0; background:
  radial-gradient(600px 400px at 85% 15%, rgba(108, 99, 255, .13), transparent 70%),
  radial-gradient(500px 380px at 70% 85%, rgba(34, 184, 167, .13), transparent 70%),
  radial-gradient(500px 300px at 0% 0%, rgba(14, 165, 233, .07), transparent 70%),
  linear-gradient(180deg, #F7F8FF 0%, #FFFFFF 100%); }
.fh-badge { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; font-size: .88rem; color: var(--fh-primary-700); background: #fff; border: 1px solid var(--fh-primary-100); padding: .45rem 1rem .45rem .7rem; border-radius: 999px; box-shadow: var(--fh-shadow-xs); }
.fh-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fh-teal); box-shadow: 0 0 0 4px var(--fh-teal-50); animation: fhPulse 2.4s infinite; }
@keyframes fhPulse { 0%,100% { box-shadow: 0 0 0 4px rgba(34,184,167,.18); } 50% { box-shadow: 0 0 0 7px rgba(34,184,167,.06); } }
.fh-hero-title { font-size: clamp(2.5rem, 1.4rem + 4.2vw, 4.4rem); line-height: 1.04; letter-spacing: -.04em; margin: 1.4rem 0 1.3rem; }
.fh-grad-text { background: var(--fh-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fh-hero-lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.22rem); color: var(--fh-muted); line-height: 1.7; max-width: 540px; margin-bottom: 2rem; }
.fh-hero-ctas { display: flex; flex-wrap: wrap; gap: .85rem; }
.fh-hero-trust { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1.25rem; color: var(--fh-muted); font-size: .92rem; font-weight: 600; }
.fh-hero-trust i { color: var(--fh-teal); }
.fh-hero-proof { display: flex; align-items: center; gap: 1rem; margin-top: 2.25rem; padding-top: 1.75rem; border-top: 1px dashed var(--fh-line); max-width: 480px; }
.fh-hero-proof p { margin: 0; color: var(--fh-muted); font-size: .9rem; line-height: 1.45; }
.fh-face-stack { display: flex; }
.fh-face-stack img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; object-position: center 20%; border: 3px solid #fff; margin-left: -12px; box-shadow: var(--fh-shadow-sm); }
.fh-face-stack img:first-child { margin-left: 0; }

.fh-hero-visual { position: relative; max-width: 540px; margin: 0 auto; padding: 1.5rem 2.5rem 3rem 3rem; }
.fh-hero-blob { position: absolute; inset: 6% 4% 10% 10%; background: var(--fh-grad); border-radius: 42% 58% 54% 46% / 48% 40% 60% 52%; opacity: .16; filter: blur(2px); animation: fhBlob 14s ease-in-out infinite alternate; }
@keyframes fhBlob { to { border-radius: 58% 42% 40% 60% / 40% 58% 42% 60%; transform: rotate(6deg) scale(1.03); } }
.fh-hero-img { position: relative; display: block; border-radius: 32px; overflow: hidden; box-shadow: var(--fh-shadow-lg); aspect-ratio: 612 / 800; background: #EEF0FA; }
.fh-hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
.fh-hero-img2 { position: absolute; left: -4px; bottom: 6px; width: 34%; aspect-ratio: 1; object-fit: cover; object-position: center 25%; border-radius: 26px; border: 6px solid #fff; box-shadow: var(--fh-shadow-lg); z-index: 2; }

.fh-float { position: absolute; z-index: 3; background: rgba(255,255,255,.95); backdrop-filter: blur(10px); border: 1px solid rgba(230,234,242,.9); border-radius: 18px; box-shadow: var(--fh-shadow-lg); padding: .9rem 1rem; animation: fhFloat 6s ease-in-out infinite; font-size: .85rem; }
.fh-float small { color: var(--fh-muted); font-weight: 600; font-size: .74rem; display: block; }
.fh-float strong { display: block; font-size: .98rem; }
.fh-float-1 { top: 9%; left: -6%; width: 205px; animation-delay: -1s; }
.fh-float-2 { top: 44%; right: -4%; display: flex; align-items: center; gap: .7rem; animation-delay: -3s; }
.fh-float-3 { bottom: 0; right: 4%; width: 215px; animation-delay: -4.5s; }
.fh-float-head { display: flex; align-items: center; gap: .55rem; font-weight: 800; margin-bottom: .55rem; }
.fh-float-head .fh-ico { width: 28px; height: 28px; border-radius: 9px; font-size: .85rem; }
.fh-float-2 .fh-ico { width: 40px; height: 40px; }
.fh-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; font-weight: 600; color: var(--fh-ink-2); }
.fh-checks i { color: var(--fh-teal); margin-right: .25rem; }
.fh-float-label { font-weight: 700; color: var(--fh-ink-2); font-size: .8rem; }
.fh-float-value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.fh-float-value span { color: var(--fh-muted-2); font-size: 1.1rem; }
.fh-pill-ok { font-size: .68rem; font-weight: 800; color: #047857; background: var(--fh-green-50); border-radius: 999px; padding: .2rem .5rem; }
.fh-spark { width: 100%; height: 34px; margin-top: .25rem; display: block; }
@keyframes fhFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

@media (max-width: 991.98px) {
  .fh-hero { padding: 2rem 0 3.5rem; text-align: center; }
  .fh-hero-lead { margin-left: auto; margin-right: auto; }
  .fh-hero-ctas, .fh-hero-trust { justify-content: center; }
  .fh-hero-proof { margin-left: auto; margin-right: auto; justify-content: center; text-align: left; }
}
@media (max-width: 575.98px) {
  .fh-hero-ctas .btn { width: 100%; }
  .fh-hero-visual { padding: 1rem .5rem 2.5rem 1.25rem; }
  .fh-float { padding: .65rem .75rem; font-size: .76rem; border-radius: 14px; }
  .fh-float-1 { width: 165px; left: -2%; top: 4%; }
  .fh-float-2 { right: -1%; top: 40%; }
  .fh-float-2 .fh-ico { width: 32px; height: 32px; }
  .fh-float-3 { width: 170px; right: 0; }
  .fh-float-value { font-size: 1.25rem; }
  .fh-hero-img2 { width: 36%; border-width: 4px; border-radius: 18px; }
}

/* ---------- Trust bar ---------- */
.fh-trustbar { padding: 1.4rem 0; border-top: 1px solid var(--fh-line); border-bottom: 1px solid var(--fh-line); background: #fff; }
.fh-trust-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.fh-trust-list li { display: flex; align-items: center; justify-content: center; gap: .7rem; font-weight: 700; color: var(--fh-ink-2); }
@media (max-width: 767.98px) { .fh-trust-list { grid-template-columns: repeat(2, 1fr); } .fh-trust-list li { justify-content: flex-start; font-size: .9rem; } }

/* ---------- Feature cards ---------- */
.fh-feature { height: 100%; background: #fff; border: 1px solid var(--fh-line); border-radius: var(--fh-radius); padding: 1.9rem; transition: transform .3s var(--fh-ease), box-shadow .3s var(--fh-ease), border-color .3s; position: relative; overflow: hidden; }
.fh-feature::after { content: ""; position: absolute; inset: auto -30% -60% auto; width: 220px; height: 220px; background: radial-gradient(circle, rgba(108,99,255,.08), transparent 70%); opacity: 0; transition: opacity .3s; }
.fh-feature:hover { transform: translateY(-6px); box-shadow: var(--fh-shadow); border-color: var(--fh-primary-100); }
.fh-feature:hover::after { opacity: 1; }
.fh-feature h3 { font-size: 1.2rem; margin: 1.25rem 0 .55rem; }
.fh-feature p { color: var(--fh-muted); margin: 0; line-height: 1.65; }
.fh-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.fh-chips span { font-size: .78rem; font-weight: 700; color: var(--fh-teal-600); background: var(--fh-teal-50); border-radius: 999px; padding: .28rem .65rem; }

/* ---------- Dashboard demo ---------- */
.fh-demo { background: #fff; border-radius: var(--fh-radius-lg); box-shadow: var(--fh-shadow-lg); border: 1px solid var(--fh-line); overflow: hidden; max-width: 1080px; margin: 0 auto; }
.fh-demo-bar { display: flex; align-items: center; gap: .45rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--fh-line); background: #FBFCFE; }
.fh-demo-bar > span:not(.fh-demo-tag) { width: 11px; height: 11px; border-radius: 50%; background: #FCA5A5; }
.fh-demo-bar > span:nth-child(2) { background: #FCD34D; }
.fh-demo-bar > span:nth-child(3) { background: #86EFAC; }
.fh-demo-url { margin: 0 auto; font-size: .8rem; color: var(--fh-muted); background: #fff; border: 1px solid var(--fh-line); border-radius: 999px; padding: .25rem 1rem; }
.fh-demo-url i { color: var(--fh-teal); }
.fh-demo-tag { font-size: .72rem; font-weight: 800; color: #B45309; background: var(--fh-amber-50); border-radius: 999px; padding: .25rem .6rem; }
.fh-demo-body { display: grid; grid-template-columns: 220px 1fr; min-height: 470px; }
.fh-demo-side { border-right: 1px solid var(--fh-line); padding: 1.2rem .8rem; background: #FCFCFF; }
.fh-demo-logo { display: flex; align-items: center; gap: .5rem; font-weight: 800; padding: 0 .5rem 1.1rem; }
.fh-demo-nav { display: flex; align-items: center; gap: .65rem; padding: .62rem .75rem; border-radius: 11px; color: var(--fh-muted); font-weight: 600; font-size: .9rem; }
.fh-demo-nav.active { background: var(--fh-primary-50); color: var(--fh-primary-700); }
.fh-demo-main { padding: 1.6rem; background: var(--fh-bg); min-width: 0; }
.fh-demo-top { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.4rem; }
.fh-demo-top small { color: var(--fh-muted); font-weight: 600; }
.fh-demo-top h3 { font-size: 1.5rem; margin: .15rem 0 0; }
.fh-demo-members { display: flex; gap: .5rem; flex-wrap: wrap; }
.fh-demo-member { display: flex; align-items: center; gap: .45rem; background: #fff; border: 1px solid var(--fh-line); border-radius: 999px; padding: .25rem .8rem .25rem .3rem; font-size: .83rem; font-weight: 700; }
.fh-demo-member span { width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; }
.fh-demo-member.active { border-color: var(--fh-primary); box-shadow: 0 0 0 3px var(--fh-primary-50); }
.fh-demo-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.fh-stat { background: #fff; border: 1px solid var(--fh-line); border-radius: 18px; padding: 1rem; display: grid; gap: .1rem; }
.fh-stat .fh-ico { margin-bottom: .55rem; }
.fh-stat small { color: var(--fh-muted); font-weight: 600; font-size: .8rem; }
.fh-stat strong { font-size: 1.45rem; letter-spacing: -.03em; }
.fh-stat em { font-style: normal; color: var(--fh-muted-2); font-size: .78rem; font-weight: 600; }
.fh-demo-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: .9rem; margin-top: .9rem; }
.fh-demo-card { background: #fff; border: 1px solid var(--fh-line); border-radius: 18px; padding: 1rem 1.1rem; font-size: .9rem; }
.fh-demo-chart svg { width: 100%; height: 130px; margin-top: .5rem; }
.fh-draw { stroke-dasharray: 600; stroke-dashoffset: 600; }
.in .fh-draw, .fh-demo.in .fh-draw { animation: fhDraw 1.6s .3s var(--fh-ease) forwards; }
@keyframes fhDraw { to { stroke-dashoffset: 0; } }
.fh-demo-item { display: flex; gap: .8rem; align-items: center; padding: .7rem 0; }
.fh-demo-item + .fh-demo-item { border-top: 1px solid var(--fh-line); }
.fh-demo-item small { display: block; color: var(--fh-muted); font-weight: 600; font-size: .75rem; }
.fh-demo-item b { display: block; }
.fh-demo-item em { font-style: normal; color: var(--fh-primary-700); font-weight: 600; font-size: .83rem; }
.fh-demo-bottomnav { display: none; }
.fh-demo-caption { text-align: center; color: var(--fh-muted-2); font-size: .85rem; margin-top: 1.25rem; }
@media (max-width: 991.98px) {
  .fh-demo-body { grid-template-columns: minmax(0, 1fr); }
  .fh-demo-side { display: none; }
  .fh-demo-stats { grid-template-columns: repeat(2, 1fr); }
  .fh-demo-grid { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
  .fh-demo { max-width: 380px; border-radius: 34px; border: 8px solid #1E2537; }
  .fh-demo-bar { display: none; }
  .fh-demo-main { padding: 1.1rem; }
  .fh-demo-top h3 { font-size: 1.25rem; }
  .fh-demo-members { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .fh-demo-stats { gap: .6rem; }
  .fh-stat { padding: .8rem; }
  .fh-stat strong { font-size: 1.2rem; }
  .fh-demo-bottomnav { display: flex; justify-content: space-around; border-top: 1px solid var(--fh-line); padding: .55rem .2rem .7rem; background: #fff; }
  .fh-demo-bottomnav span { display: flex; flex-direction: column; align-items: center; gap: .1rem; font-size: .66rem; font-weight: 700; color: var(--fh-muted-2); }
  .fh-demo-bottomnav span i { font-size: 1.1rem; }
  .fh-demo-bottomnav span.active { color: var(--fh-primary); }
}

/* ---------- AI section ---------- */
.fh-mini { background: #fff; border: 1px solid var(--fh-line); border-radius: 18px; padding: 1.15rem; height: 100%; transition: transform .25s var(--fh-ease), box-shadow .25s; }
.fh-mini:hover { transform: translateY(-4px); box-shadow: var(--fh-shadow); }
.fh-mini h3 { font-size: 1rem; margin: .8rem 0 .35rem; }
.fh-mini p { margin: 0; color: var(--fh-muted); font-size: .9rem; line-height: 1.55; }
.fh-disclaimer { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; color: #6B4E16; background: #FFF9EC; border: 1px solid #FCE7B6; border-radius: 14px; padding: .85rem 1rem; line-height: 1.55; }
.fh-disclaimer i { color: #D97706; font-size: 1.05rem; margin-top: .05rem; }
.fh-ai-visual { position: relative; max-width: 500px; margin: 0 auto; padding-bottom: 4rem; }
.fh-ai-visual > img { width: 82%; aspect-ratio: 4 / 4.6; object-fit: cover; border-radius: 30px; box-shadow: var(--fh-shadow-lg); }
.fh-chat { position: absolute; right: 0; bottom: 0; width: 72%; display: grid; gap: .6rem; }
.fh-chat-q { justify-self: end; background: var(--fh-primary); color: #fff; font-weight: 600; font-size: .88rem; padding: .65rem 1rem; border-radius: 16px 16px 4px 16px; box-shadow: var(--fh-shadow); }
.fh-chat-a { background: #fff; border: 1px solid var(--fh-line); border-radius: 18px 18px 18px 4px; padding: 1rem 1.1rem; box-shadow: var(--fh-shadow-lg); font-size: .87rem; }
.fh-chat-a p { margin: 0 0 .45rem; color: var(--fh-ink-2); line-height: 1.5; }
.fh-chat-a small { color: var(--fh-muted-2); font-size: .72rem; }
.fh-chat-head { display: flex; gap: .45rem; align-items: center; font-weight: 800; margin-bottom: .5rem; font-size: .85rem; }

/* ---------- Upload section ---------- */
.fh-upload { display: grid; grid-template-columns: 1fr auto 1.2fr; gap: 1.5rem; align-items: center; max-width: 1000px; margin: 0 auto; }
.fh-file-card, .fh-summary-card { background: #fff; border: 1px solid var(--fh-line); border-radius: var(--fh-radius); box-shadow: var(--fh-shadow); padding: 1.6rem; }
.fh-file-icon { width: 64px; height: 76px; border-radius: 14px; background: linear-gradient(160deg, #FFE4E6, #FECDD3); color: #E11D48; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin-bottom: 1.1rem; }
.fh-file-meta small { color: var(--fh-muted); font-weight: 600; font-size: .78rem; }
.fh-file-meta b { display: block; font-size: 1.05rem; word-break: break-all; }
.fh-file-meta span { color: var(--fh-muted); font-size: .85rem; }
.fh-progress { height: 8px; background: var(--fh-line); border-radius: 99px; overflow: hidden; margin: 1.1rem 0; }
.fh-progress span { display: block; height: 100%; width: 100%; background: var(--fh-grad); border-radius: 99px; transform-origin: left; transform: scaleX(.05); transition: transform 1.6s var(--fh-ease) .3s; }
.in .fh-progress span { transform: scaleX(1); }
.fh-file-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.fh-file-tags span { font-size: .76rem; font-weight: 700; background: var(--fh-bg); border: 1px solid var(--fh-line); border-radius: 999px; padding: .25rem .6rem; color: var(--fh-muted); }
.fh-upload-arrow { width: 56px; height: 56px; border-radius: 50%; background: var(--fh-grad); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; box-shadow: 0 10px 25px -8px rgba(108,99,255,.6); position: relative; }
.fh-upload-arrow::before, .fh-upload-arrow::after { content: ""; position: absolute; top: 50%; width: 22px; border-top: 2px dashed var(--fh-primary-100); }
.fh-upload-arrow::before { right: 100%; } .fh-upload-arrow::after { left: 100%; }
.fh-summary-head { display: flex; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.fh-summary-head small { display: block; color: var(--fh-muted); font-size: .78rem; font-weight: 600; }
.fh-summary-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; }
.fh-summary-list li { display: flex; gap: .8rem; align-items: flex-start; }
.fh-summary-list li > i { color: var(--fh-primary); background: var(--fh-primary-50); width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; font-size: .9rem; }
.fh-summary-list b { display: block; font-size: .92rem; }
.fh-summary-list span { color: var(--fh-muted); font-size: .86rem; }
.fh-summary-foot { margin: 1.1rem 0 0; padding-top: 1rem; border-top: 1px dashed var(--fh-line); font-size: .8rem; color: var(--fh-muted); }
@media (max-width: 991.98px) { .fh-upload { grid-template-columns: 1fr; } .fh-upload-arrow { margin: 0 auto; transform: rotate(90deg); } .fh-upload-arrow i { transform: rotate(-90deg); } }

/* ---------- Timeline ---------- */
.fh-filter { display: flex; flex-wrap: wrap; gap: .5rem; }
.fh-filter button { border: 1px solid var(--fh-line); background: #fff; color: var(--fh-ink-2); font-weight: 700; font-size: .9rem; border-radius: 999px; padding: .5rem 1.05rem; transition: all .2s; }
.fh-filter button:hover { border-color: var(--fh-primary-100); color: var(--fh-primary-700); }
.fh-filter button.active { background: var(--fh-ink); border-color: var(--fh-ink); color: #fff; }
.fh-timeline { list-style: none; margin: 0; padding: 0 0 0 .2rem; position: relative; }
.fh-timeline::before { content: ""; position: absolute; left: 19px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--fh-primary-100), var(--fh-teal-50)); }
.fh-timeline li { display: flex; gap: 1.1rem; align-items: flex-start; padding-bottom: 1rem; position: relative; transition: opacity .3s, transform .3s; }
.fh-timeline li.hide { display: none; }
.fh-timeline li > .fh-ico { border: 4px solid #fff; box-shadow: var(--fh-shadow-sm); width: 40px; height: 40px; }
.fh-tl-card { flex: 1; background: #fff; border: 1px solid var(--fh-line); border-radius: 16px; padding: .9rem 1.1rem; transition: box-shadow .25s, transform .25s; }
.fh-tl-card:hover { box-shadow: var(--fh-shadow); transform: translateX(3px); }
.fh-tl-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .2rem; }
.fh-tl-top time { color: var(--fh-muted); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.fh-tl-who { font-size: .74rem; font-weight: 800; color: var(--fh-primary-700); background: var(--fh-primary-50); border-radius: 999px; padding: .15rem .55rem; }
.fh-tl-card b { display: block; }
.fh-tl-card small { color: var(--fh-muted); }

/* ---------- Steps ---------- */
.fh-steps { position: relative; }
.fh-step { background: #fff; border: 1px solid var(--fh-line); border-radius: var(--fh-radius); padding: 2rem 1.75rem; height: 100%; position: relative; overflow: hidden; transition: transform .3s var(--fh-ease), box-shadow .3s; }
.fh-step:hover { transform: translateY(-5px); box-shadow: var(--fh-shadow); }
.fh-step-num { position: absolute; right: 1.25rem; top: .5rem; font-size: 4.2rem; font-weight: 800; letter-spacing: -.05em; color: var(--fh-primary-50); line-height: 1; }
.fh-step h3 { font-size: 1.2rem; margin: 1.3rem 0 .5rem; }
.fh-step p { color: var(--fh-muted); margin: 0; line-height: 1.65; }

/* ---------- Privacy ---------- */
.fh-privacy { background: #141B2E; color: #CBD3E4; padding: 6rem 0; position: relative; overflow: hidden; }
.fh-privacy::before { content: ""; position: absolute; width: 600px; height: 600px; right: -150px; top: -200px; background: radial-gradient(circle, rgba(108,99,255,.32), transparent 65%); }
.fh-privacy::after { content: ""; position: absolute; width: 500px; height: 500px; left: -200px; bottom: -250px; background: radial-gradient(circle, rgba(34,184,167,.22), transparent 65%); }
.fh-privacy .container { position: relative; z-index: 1; }
.fh-privacy h2 { color: #fff; font-size: clamp(1.9rem, 1.2rem + 2.3vw, 2.8rem); line-height: 1.12; margin: 1rem 0; }
.fh-privacy-lead { font-size: 1.08rem; line-height: 1.7; }
.fh-privacy-promise { display: flex; width: fit-content; max-width: 100%; align-items: center; gap: .55rem; color: #fff; font-weight: 700; background: rgba(34,184,167,.14); border: 1px solid rgba(34,184,167,.35); border-radius: 14px; padding: .8rem 1rem; margin: .5rem 0 1.5rem; }
.fh-privacy-promise i { color: #5EEAD4; font-size: 1.2rem; }
.fh-link-light { color: #C9C5FF; font-weight: 700; }
.fh-link-light:hover { color: #fff; }
.fh-privacy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.fh-privacy-item { display: flex; gap: .9rem; align-items: flex-start; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 18px; padding: 1.15rem; transition: background .25s, transform .25s; }
.fh-privacy-item:hover { background: rgba(255,255,255,.07); transform: translateY(-3px); }
.fh-privacy-item > i { width: 40px; height: 40px; border-radius: 12px; background: rgba(108,99,255,.2); color: #C9C5FF; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; flex: 0 0 auto; }
.fh-privacy-item b { color: #fff; display: block; margin-bottom: .15rem; }
.fh-privacy-item span { font-size: .88rem; line-height: 1.5; }
@media (max-width: 575.98px) { .fh-privacy-grid { grid-template-columns: 1fr; } .fh-privacy { padding: 4.25rem 0; } }

/* ---------- Pricing ---------- */
.fh-billing-toggle { display: flex; width: max-content; margin: 0 auto 2.5rem; background: #fff; border: 1px solid var(--fh-line); border-radius: 999px; padding: .3rem; box-shadow: var(--fh-shadow-xs); }
.fh-billing-toggle button { border: 0; background: transparent; font-weight: 700; color: var(--fh-muted); padding: .55rem 1.2rem; border-radius: 999px; transition: all .2s; display: inline-flex; align-items: center; gap: .45rem; }
.fh-billing-toggle button.active { background: var(--fh-ink); color: #fff; }
.fh-save { font-size: .7rem; font-weight: 800; color: #047857; background: var(--fh-green-50); border-radius: 999px; padding: .15rem .45rem; }
.fh-price { position: relative; background: #fff; border: 1px solid var(--fh-line); border-radius: var(--fh-radius-lg); padding: 2.1rem 1.9rem; height: 100%; transition: transform .3s var(--fh-ease), box-shadow .3s; }
.fh-price:hover { transform: translateY(-6px); box-shadow: var(--fh-shadow); }
.fh-price-popular { border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--fh-grad) border-box; box-shadow: var(--fh-shadow-lg); }
.fh-price-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--fh-grad); color: #fff; font-size: .78rem; font-weight: 800; padding: .35rem .9rem; border-radius: 999px; white-space: nowrap; box-shadow: 0 8px 18px -8px rgba(108,99,255,.7); }
.fh-price h3 { font-size: 1.25rem; margin: 0; }
.fh-price-tag { color: var(--fh-muted); margin: .25rem 0 1.25rem; font-size: .92rem; }
.fh-price-amount { display: flex; align-items: baseline; gap: .3rem; }
.fh-amt { font-size: 2.8rem; font-weight: 800; letter-spacing: -.04em; }
.fh-per { color: var(--fh-muted); font-weight: 600; }
.fh-price-billed { color: var(--fh-muted-2); font-size: .85rem; min-height: 1.3em; margin: .1rem 0 1.4rem; }
.fh-price-list { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .7rem; }
.fh-price-list li { display: flex; gap: .6rem; color: var(--fh-ink-2); font-weight: 500; font-size: .95rem; }
.fh-price-list i { color: var(--fh-teal); margin-top: .1rem; }
.fh-price-note { text-align: center; color: var(--fh-muted-2); font-size: .85rem; margin-top: 2rem; }

/* ---------- FAQ ---------- */
.fh-faq { --bs-accordion-border-color: transparent; --bs-accordion-btn-focus-box-shadow: 0 0 0 4px rgba(108,99,255,.15); --bs-accordion-active-bg: #fff; --bs-accordion-active-color: var(--fh-ink); display: grid; gap: .75rem; }
.fh-faq .accordion-item { border: 1px solid var(--fh-line) !important; border-radius: 18px !important; overflow: hidden; background: #fff; transition: box-shadow .25s; }
.fh-faq .accordion-item:has(.show) { box-shadow: var(--fh-shadow); border-color: var(--fh-primary-100) !important; }
.fh-faq .accordion-button { font-weight: 700; font-size: 1.02rem; padding: 1.2rem 1.4rem; border-radius: 18px !important; background: #fff; color: var(--fh-ink); }
.fh-faq .accordion-button::after { background-image: none; content: "\F64D"; font-family: "bootstrap-icons"; width: 30px; height: 30px; border-radius: 50%; background: var(--fh-primary-50); color: var(--fh-primary); display: flex; align-items: center; justify-content: center; font-size: 1rem; transform: none; transition: transform .3s var(--fh-ease); }
.fh-faq .accordion-button:not(.collapsed)::after { transform: rotate(45deg); background-image: none; }
.fh-faq .accordion-body { color: var(--fh-muted); line-height: 1.7; padding: 0 1.4rem 1.3rem; }

/* ---------- Final CTA ---------- */
.fh-final { padding: 2rem 0 6rem; }
.fh-final-card { position: relative; overflow: hidden; border-radius: 36px; background: var(--fh-grad); color: #fff; display: grid; grid-template-columns: 1.3fr 1fr; align-items: stretch; box-shadow: var(--fh-shadow-lg); }
.fh-final-card::before { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255,255,255,.07); left: -140px; bottom: -220px; }
.fh-final-copy { padding: 4rem; position: relative; z-index: 1; }
.fh-final-copy h2 { color: #fff; font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem); line-height: 1.1; margin-bottom: 1rem; }
.fh-final-copy p { font-size: 1.12rem; opacity: .92; max-width: 460px; margin-bottom: 2rem; }
.fh-final-copy small { display: block; margin-top: 1rem; opacity: .9; font-weight: 600; }
.fh-final-img { position: relative; }
.fh-final-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); }
@media (max-width: 991.98px) {
  .fh-final-card { grid-template-columns: 1fr; text-align: center; }
  .fh-final-copy { padding: 3rem 1.75rem 2rem; }
  .fh-final-copy p { margin-left: auto; margin-right: auto; }
  .fh-final-img { height: 280px; }
  .fh-final-img img { -webkit-mask-image: linear-gradient(180deg, transparent, #000 35%); mask-image: linear-gradient(180deg, transparent, #000 35%); }
}

/* ---------- Footer ---------- */
.fh-footer { background: #fff; border-top: 1px solid var(--fh-line); padding: 4.5rem 0 2rem; }
.fh-footer-desc { color: var(--fh-muted); margin: 1rem 0; max-width: 320px; line-height: 1.65; }
.fh-footer-note { font-size: .82rem; color: var(--fh-muted-2); max-width: 340px; line-height: 1.55; }
.fh-footer-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--fh-muted-2); font-weight: 800; margin-bottom: 1rem; }
.fh-footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.fh-footer-links a { color: var(--fh-ink-2); font-weight: 600; font-size: .95rem; }
.fh-footer-links a:hover { color: var(--fh-primary); }
.fh-footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; border-top: 1px solid var(--fh-line); margin-top: 3.5rem; padding-top: 1.75rem; color: var(--fh-muted); font-size: .9rem; }
.fh-footer-made i { color: var(--fh-pink); }

/* ==========================================================================
   CONTENT PAGES (legal, pricing, faq, blog, contact)
   ========================================================================== */
.fh-page-hero { padding: 4rem 0 3rem; background: radial-gradient(600px 300px at 80% 0%, rgba(108,99,255,.1), transparent 70%), linear-gradient(180deg, #F7F8FF, #fff); text-align: center; }
.fh-page-hero h1 { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.2rem); margin: .9rem 0 .7rem; }
.fh-page-hero p { color: var(--fh-muted); max-width: 640px; margin: 0 auto; font-size: 1.08rem; }
.fh-prose { max-width: 780px; margin: 0 auto; padding: 1rem 0 5rem; color: var(--fh-ink-2); line-height: 1.8; font-size: 1.02rem; }
.fh-prose h2 { font-size: 1.45rem; margin: 2.4rem 0 .8rem; }
.fh-prose h3 { font-size: 1.15rem; margin: 1.8rem 0 .6rem; }
.fh-prose ul { padding-left: 1.2rem; }
.fh-prose li { margin-bottom: .35rem; }
.fh-prose .fh-updated { color: var(--fh-muted); font-size: .9rem; }
.fh-callout { background: var(--fh-primary-50); border: 1px solid var(--fh-primary-100); border-radius: 16px; padding: 1.1rem 1.25rem; margin: 1.5rem 0; }
.fh-callout-warn { background: #FFF9EC; border-color: #FCE7B6; }
.fh-blog-card { display: block; background: #fff; border: 1px solid var(--fh-line); border-radius: var(--fh-radius); padding: 1.75rem; height: 100%; color: var(--fh-ink); transition: transform .3s var(--fh-ease), box-shadow .3s; }
.fh-blog-card:hover { transform: translateY(-5px); box-shadow: var(--fh-shadow); color: var(--fh-ink); }
.fh-blog-card h2 { font-size: 1.25rem; margin: .8rem 0 .6rem; }
.fh-blog-card p { color: var(--fh-muted); margin: 0 0 1rem; }
.fh-blog-meta { color: var(--fh-muted-2); font-size: .85rem; font-weight: 600; }

/* ==========================================================================
   AUTH PAGES
   ========================================================================== */
.fh-auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.fh-auth-side { position: relative; overflow: hidden; background: var(--fh-grad); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.fh-auth-side .fh-logo { color: #fff; }
.fh-auth-side .fh-logo b { color: #fff; }
.fh-auth-photo { position: relative; border-radius: 28px; overflow: hidden; max-width: 420px; margin: 2rem auto; box-shadow: 0 30px 60px -20px rgba(0,0,0,.35); aspect-ratio: 4 / 4.4; }
.fh-auth-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.fh-auth-quote { font-size: 1.35rem; font-weight: 700; line-height: 1.4; max-width: 460px; letter-spacing: -.01em; }
.fh-auth-quote small { display: block; font-size: .9rem; opacity: .8; font-weight: 600; margin-top: .75rem; }
.fh-auth-main { display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; }
.fh-auth-box { width: 100%; max-width: 420px; }
.fh-auth-box h1 { font-size: 2rem; margin: 2rem 0 .5rem; }
.fh-auth-box > p { color: var(--fh-muted); margin-bottom: 2rem; }
.fh-auth-foot { text-align: center; color: var(--fh-muted); margin-top: 1.75rem; }
.fh-divider { display: flex; align-items: center; gap: 1rem; color: var(--fh-muted-2); font-size: .85rem; margin: 1.25rem 0; }
.fh-divider::before, .fh-divider::after { content: ""; flex: 1; border-top: 1px solid var(--fh-line); }
.btn-google { background: #fff; border: 1px solid var(--fh-line); color: var(--fh-ink); width: 100%; }
.btn-google:hover { background: var(--fh-bg); }
.btn-google[disabled] { opacity: .6; }
@media (max-width: 991.98px) { .fh-auth { grid-template-columns: 1fr; } .fh-auth-side { display: none; } .fh-auth-box h1 { margin-top: 1.5rem; } }

/* ---------- Forms ---------- */
.form-label { font-weight: 700; font-size: .88rem; color: var(--fh-ink-2); margin-bottom: .4rem; }
.form-control, .form-select { border-radius: 12px; border: 1px solid #DCE2EC; padding: .72rem .95rem; font-size: .97rem; color: var(--fh-ink); background-color: #fff; transition: border-color .2s, box-shadow .2s; }
.form-control:focus, .form-select:focus { border-color: var(--fh-primary); box-shadow: 0 0 0 4px rgba(108,99,255,.14); }
.form-control::placeholder { color: #A3ABBC; }
.form-check-input:checked { background-color: var(--fh-primary); border-color: var(--fh-primary); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(108,99,255,.15); border-color: var(--fh-primary); }
.form-text { color: var(--fh-muted-2); }
.fh-pass { position: relative; }
.fh-pass .form-control { padding-right: 3rem; }
.fh-pass button { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--fh-muted); width: 38px; height: 38px; border-radius: 10px; }
.fh-pass button:hover { background: var(--fh-bg); }
.fh-alert { border-radius: 14px; border: 0; font-weight: 500; font-size: .93rem; }
.alert-success.fh-alert { background: var(--fh-green-50); color: #065F46; }
.alert-danger.fh-alert { background: var(--fh-red-50); color: #9F1239; }
.alert-info.fh-alert { background: var(--fh-sky-50); color: #075985; }
.alert-warning.fh-alert { background: #FFF9EC; color: #78350F; }

/* ==========================================================================
   APP SHELL (authenticated)
   ========================================================================== */
.fh-app { background: var(--fh-bg); min-height: 100vh; }
.fh-sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; background: #fff; border-right: 1px solid var(--fh-line); padding: 1.4rem 1rem; display: flex; flex-direction: column; z-index: 1035; }
.fh-sidebar .fh-logo { padding: 0 .6rem 1.6rem; }
.fh-side-nav { list-style: none; padding: 0; margin: 0; display: grid; gap: .2rem; }
.fh-side-nav a { display: flex; align-items: center; gap: .8rem; padding: .72rem .85rem; border-radius: 12px; color: var(--fh-muted); font-weight: 600; font-size: .95rem; transition: background .2s, color .2s; }
.fh-side-nav a i { font-size: 1.1rem; }
.fh-side-nav a:hover { background: var(--fh-bg); color: var(--fh-ink); }
.fh-side-nav a.active { background: var(--fh-primary-50); color: var(--fh-primary-700); }
.fh-side-nav a.active i { color: var(--fh-primary); }
.fh-side-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--fh-muted-2); padding: 1.2rem .85rem .4rem; }
.fh-side-upgrade { margin-top: auto; background: linear-gradient(150deg, var(--fh-primary-50), var(--fh-teal-50)); border-radius: 18px; padding: 1.1rem; font-size: .88rem; }
.fh-side-upgrade b { display: block; margin-bottom: .25rem; }
.fh-side-upgrade p { color: var(--fh-muted); margin: 0 0 .8rem; font-size: .82rem; }

.fh-app-main { margin-left: 260px; min-height: 100vh; display: flex; flex-direction: column; }
.fh-topbar { position: sticky; top: 0; z-index: 1020; background: rgba(248, 250, 252, .85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--fh-line); }
.fh-topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 2rem; }
.fh-topbar h1 { font-size: 1.3rem; margin: 0; }
.fh-topbar-actions { display: flex; align-items: center; gap: .6rem; }
.fh-member-switch { display: flex; align-items: center; gap: .55rem; background: #fff; border: 1px solid var(--fh-line); border-radius: 999px; padding: .3rem .9rem .3rem .35rem; font-weight: 700; font-size: .9rem; color: var(--fh-ink); }
.fh-member-switch:hover, .fh-member-switch:focus { border-color: var(--fh-primary-100); color: var(--fh-ink); }
.fh-member-switch::after { margin-left: .2rem; }
.fh-icon-btn { position: relative; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--fh-line); background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--fh-ink-2); font-size: 1.1rem; }
.fh-icon-btn:hover { color: var(--fh-primary); border-color: var(--fh-primary-100); }
.fh-dot { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--fh-red); border: 2px solid #fff; }
.fh-content { padding: 2rem; flex: 1; max-width: 1400px; width: 100%; }
.dropdown-menu { border: 1px solid var(--fh-line); border-radius: 16px; box-shadow: var(--fh-shadow-lg); padding: .5rem; }
.dropdown-item { border-radius: 10px; padding: .55rem .8rem; font-weight: 600; font-size: .92rem; display: flex; align-items: center; gap: .6rem; }
.dropdown-item.active, .dropdown-item:active { background: var(--fh-primary-50); color: var(--fh-primary-700); }
.fh-notif-menu { width: 340px; max-height: 420px; overflow-y: auto; }
.fh-notif { display: block; padding: .7rem .8rem; border-radius: 12px; color: var(--fh-ink); }
.fh-notif:hover { background: var(--fh-bg); color: var(--fh-ink); }
.fh-notif b { display: block; font-size: .9rem; }
.fh-notif small { color: var(--fh-muted); }
.fh-notif.unread { background: var(--fh-primary-50); }

.fh-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: var(--c, var(--fh-primary)); color: #fff; font-weight: 800; font-size: .9rem; flex: 0 0 auto; }
.fh-avatar-sm { width: 30px; height: 30px; font-size: .72rem; }
.fh-avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; border-radius: 20px; }
.fh-avatar-xl { width: 88px; height: 88px; font-size: 1.8rem; border-radius: 26px; }

.fh-card { background: #fff; border: 1px solid var(--fh-line); border-radius: var(--fh-radius); padding: 1.5rem; box-shadow: var(--fh-shadow-xs); }
.fh-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.fh-card-head h2, .fh-card-head h3 { font-size: 1.08rem; margin: 0; }
.fh-card-head a { font-weight: 700; font-size: .88rem; }
.fh-page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.fh-page-head h2 { font-size: 1.6rem; margin: 0; }
.fh-page-head p { color: var(--fh-muted); margin: .2rem 0 0; }

.fh-welcome { background: var(--fh-grad); color: #fff; border-radius: var(--fh-radius-lg); padding: 1.9rem 2rem; position: relative; overflow: hidden; }
.fh-welcome::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; border: 44px solid rgba(255,255,255,.08); }
.fh-welcome small { opacity: .85; font-weight: 600; }
.fh-welcome h2 { color: #fff; font-size: 1.75rem; margin: .2rem 0 .4rem; }
.fh-welcome p { margin: 0; opacity: .9; }
.fh-member-chips { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: none; }
.fh-member-chips::-webkit-scrollbar { display: none; }
.fh-member-chip { display: flex; align-items: center; gap: .55rem; background: #fff; border: 1px solid var(--fh-line); border-radius: 999px; padding: .3rem 1rem .3rem .3rem; font-weight: 700; font-size: .9rem; color: var(--fh-ink); white-space: nowrap; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.fh-member-chip.active { border-color: var(--fh-primary); box-shadow: 0 0 0 3px var(--fh-primary-50); }
.fh-member-chip small { display: block; font-size: .72rem; color: var(--fh-muted); font-weight: 600; line-height: 1.1; }
.fh-metric { background: #fff; border: 1px solid var(--fh-line); border-radius: 20px; padding: 1.2rem; height: 100%; transition: transform .25s var(--fh-ease), box-shadow .25s; display: block; color: var(--fh-ink); }
.fh-metric:hover { transform: translateY(-3px); box-shadow: var(--fh-shadow); color: var(--fh-ink); }
.fh-metric small { display: block; color: var(--fh-muted); font-weight: 600; font-size: .82rem; margin-top: .8rem; }
.fh-metric strong { font-size: 1.6rem; letter-spacing: -.03em; display: inline-block; }
.fh-metric em { font-style: normal; color: var(--fh-muted-2); font-weight: 600; font-size: .82rem; margin-left: .2rem; }
.fh-metric .fh-metric-date { display: block; color: var(--fh-muted-2); font-size: .75rem; margin-top: .2rem; }
.fh-list { list-style: none; margin: 0; padding: 0; }
.fh-list-item { display: flex; gap: .9rem; align-items: center; padding: .85rem 0; }
.fh-list-item + .fh-list-item { border-top: 1px solid var(--fh-line); }
.fh-list-item .fh-li-body { flex: 1; min-width: 0; }
.fh-list-item b { display: block; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fh-list-item small { color: var(--fh-muted); font-size: .83rem; }
.fh-empty { text-align: center; padding: 2.5rem 1rem; color: var(--fh-muted); }
.fh-empty .fh-ico { margin-bottom: 1rem; }
.fh-empty b { display: block; color: var(--fh-ink); margin-bottom: .3rem; }
.fh-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; }
.fh-quick a { display: flex; flex-direction: column; align-items: center; gap: .45rem; background: #fff; border: 1px solid var(--fh-line); border-radius: 18px; padding: .95rem .4rem; font-size: .8rem; font-weight: 700; color: var(--fh-ink-2); text-align: center; }
.fh-quick a:hover { border-color: var(--fh-primary-100); color: var(--fh-primary-700); }

.fh-badge-s { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 800; border-radius: 999px; padding: .22rem .6rem; white-space: nowrap; }
.fh-badge-active, .fh-badge-scheduled, .fh-badge-success { background: var(--fh-green-50); color: #047857; }
.fh-badge-paused, .fh-badge-limited { background: var(--fh-amber-50); color: #B45309; }
.fh-badge-completed { background: var(--fh-sky-50); color: #0369A1; }
.fh-badge-cancelled, .fh-badge-error, .fh-badge-emergency { background: var(--fh-red-50); color: #BE123C; }
.fh-badge-plan { background: var(--fh-primary-50); color: var(--fh-primary-700); }

.fh-tabs { display: flex; gap: .4rem; background: #fff; border: 1px solid var(--fh-line); padding: .3rem; border-radius: 14px; width: max-content; max-width: 100%; overflow-x: auto; }
.fh-tabs a, .fh-tabs button { border: 0; background: transparent; padding: .5rem 1rem; border-radius: 10px; font-weight: 700; font-size: .9rem; color: var(--fh-muted); white-space: nowrap; }
.fh-tabs a.active, .fh-tabs button.active { background: var(--fh-ink); color: #fff; }
.fh-tabs .count { opacity: .7; font-weight: 600; margin-left: .2rem; }

.table.fh-table { --bs-table-bg: transparent; margin: 0; }
.fh-table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--fh-muted-2); font-weight: 800; border-bottom: 1px solid var(--fh-line); padding: .8rem .9rem; white-space: nowrap; }
.fh-table td { padding: .9rem; border-color: var(--fh-line); vertical-align: middle; font-size: .93rem; }
.fh-table tbody tr:hover { background: #FBFCFE; }

.fh-member-card { background: #fff; border: 1px solid var(--fh-line); border-radius: var(--fh-radius); padding: 1.5rem; height: 100%; position: relative; transition: transform .25s var(--fh-ease), box-shadow .25s; }
.fh-member-card:hover { transform: translateY(-4px); box-shadow: var(--fh-shadow); }
.fh-member-card.active { border-color: var(--fh-primary); box-shadow: 0 0 0 4px var(--fh-primary-50); }
.fh-member-card h3 { font-size: 1.15rem; margin: 1rem 0 .15rem; }
.fh-member-meta { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 1.1rem 0; }
.fh-member-meta div { background: var(--fh-bg); border-radius: 12px; padding: .55rem .75rem; }
.fh-member-meta small { display: block; color: var(--fh-muted-2); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.fh-member-meta span { font-weight: 700; font-size: .9rem; }
.fh-active-flag { position: absolute; top: 1rem; right: 1rem; }

.fh-record-card { background: #fff; border: 1px solid var(--fh-line); border-radius: 18px; padding: 1.1rem; height: 100%; }
.fh-record-card strong { font-size: 1.35rem; letter-spacing: -.02em; }
.fh-chart-wrap { position: relative; height: 300px; }
@media (max-width: 575.98px) { .fh-chart-wrap { height: 230px; } }

.fh-ai-panel { background: #fff; border: 1px solid var(--fh-line); border-radius: var(--fh-radius); overflow: hidden; }
.fh-ai-modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.fh-ai-mode { text-align: left; background: #fff; border: 1px solid var(--fh-line); border-radius: 16px; padding: 1rem; transition: border-color .2s, box-shadow .2s; }
.fh-ai-mode:hover { border-color: var(--fh-primary-100); }
.fh-ai-mode.active { border-color: var(--fh-primary); box-shadow: 0 0 0 4px var(--fh-primary-50); }
.fh-ai-mode b { display: block; margin-top: .6rem; font-size: .95rem; }
.fh-ai-mode small { color: var(--fh-muted); font-size: .8rem; line-height: 1.4; display: block; }
.fh-ai-output { background: var(--fh-bg); border: 1px solid var(--fh-line); border-radius: 18px; padding: 1.4rem; line-height: 1.7; font-size: .97rem; }
.fh-ai-output h6.ai-h { font-weight: 800; font-size: 1rem; margin: 1rem 0 .4rem; }
.fh-ai-output ul { padding-left: 1.2rem; }
.fh-ai-output p:last-child { margin-bottom: 0; }
.fh-ai-emergency { background: var(--fh-red-50); border-color: #FBD0D9; color: #881337; }
.fh-typing { display: inline-flex; gap: 4px; }
.fh-typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--fh-primary); animation: fhType 1.2s infinite; }
.fh-typing span:nth-child(2) { animation-delay: .15s; } .fh-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes fhType { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }

.modal-content { border: 0; border-radius: 24px; box-shadow: var(--fh-shadow-lg); }
.modal-header { border-bottom: 1px solid var(--fh-line); padding: 1.2rem 1.5rem; }
.modal-title { font-weight: 800; font-size: 1.15rem; }
.modal-body { padding: 1.5rem; }
.modal-footer { border-top: 1px solid var(--fh-line); padding: 1rem 1.5rem; }
.modal-backdrop.show { opacity: .4; }

.fh-toast-wrap { position: fixed; z-index: 1090; right: 1.25rem; bottom: 1.25rem; display: grid; gap: .5rem; }
.fh-toast { background: var(--fh-ink); color: #fff; border-radius: 14px; padding: .8rem 1.1rem; font-weight: 600; font-size: .92rem; box-shadow: var(--fh-shadow-lg); display: flex; gap: .6rem; align-items: center; animation: fhToast .3s var(--fh-ease); }
.fh-toast.error { background: #BE123C; }
@keyframes fhToast { from { opacity: 0; transform: translateY(10px); } }

.fh-bottomnav { display: none; }
.fh-app-footer { padding: 1.25rem 2rem 2rem; color: var(--fh-muted-2); font-size: .82rem; }

/* ---------- Mobile app shell ---------- */
@media (max-width: 991.98px) {
  .fh-sidebar { display: none; }
  .fh-app-main { margin-left: 0; }
  .fh-topbar-inner { padding: .7rem 1rem; }
  .fh-topbar h1 { font-size: 1.1rem; }
  .fh-content { padding: 1rem 1rem 6.5rem; }
  .fh-app-footer { padding: 0 1rem 6.5rem; }
  .fh-bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; background: rgba(255,255,255,.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--fh-line); padding: .45rem .3rem calc(.45rem + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px -20px rgba(23,32,51,.3); }
  .fh-bottomnav a { display: flex; flex-direction: column; align-items: center; gap: .15rem; font-size: .7rem; font-weight: 700; color: var(--fh-muted-2); padding: .3rem 0; border-radius: 12px; }
  .fh-bottomnav a i { font-size: 1.25rem; transition: transform .2s var(--fh-ease); }
  .fh-bottomnav a.active { color: var(--fh-primary); }
  .fh-bottomnav a.active i { transform: translateY(-2px); }
  .fh-welcome { border-radius: 24px; padding: 1.4rem; }
  .fh-welcome h2 { font-size: 1.4rem; }
  .fh-card { padding: 1.15rem; border-radius: 18px; }
  .fh-page-head h2 { font-size: 1.35rem; }
  .fh-toast-wrap { left: 1rem; right: 1rem; bottom: 5.5rem; }
  .fh-member-switch .fh-ms-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fh-table-mobile-cards thead { display: none; }
  .fh-table-mobile-cards tr { display: block; border: 1px solid var(--fh-line); border-radius: 14px; margin-bottom: .6rem; padding: .4rem .2rem; background: #fff; }
  .fh-table-mobile-cards td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .35rem .8rem; }
  .fh-table-mobile-cards td::before { content: attr(data-label); font-weight: 700; color: var(--fh-muted-2); font-size: .8rem; }
}
@media (max-width: 575.98px) {
  .fh-quick { grid-template-columns: repeat(4, 1fr); gap: .5rem; }
  .fh-quick a { padding: .75rem .2rem; font-size: .7rem; border-radius: 14px; }
  .modal-dialog { margin: .5rem; }
  .fh-topbar .fh-topbar-title-sub { display: none; }
}
.fh-mobile-only { display: none; }
@media (max-width: 991.98px) { .fh-mobile-only { display: block; } .fh-desktop-only { display: none !important; } }

/* Keep Bootstrap's large gutters from overflowing narrow screens */
@media (max-width: 575.98px) { .row.g-5 { --bs-gutter-x: 1.5rem; --bs-gutter-y: 2.25rem; } }
body { overflow-x: clip; }
.fh-sticky { position: sticky; top: 100px; }
@media (max-width: 991.98px) { .fh-sticky { position: static; } }
.min-w-0 { min-width: 0; }
.fh-topbar-inner > div:first-child { flex: 1 1 auto; min-width: 0; }
.fh-topbar h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fh-topbar-actions { flex: 0 0 auto; }
@media (max-width: 420px) {
  .fh-ms-name { display: none; }
  .fh-member-switch { padding: .25rem .55rem .25rem .25rem; gap: .25rem; }
  .fh-topbar-actions { gap: .35rem; }
  .fh-icon-btn { width: 38px; height: 38px; }
}
