/* NEO app bridge: puts the React app pages (demo, pricing, auth, help...) into the v4 look.
   Active only when <html> has .neo-bridged (set by the inline script in app.html). */
html.neo-bridged .neo-landing > nav,
html.neo-bridged .neo-landing > footer,
html.neo-bridged #root > div > nav.fixed,
html.neo-bridged #root > div > footer { display: none !important; }
html.neo-bridged .neo-landing { background: #fff !important; }
html.neo-bridged #main-content > section:first-child { padding-top: clamp(40px, 6vw, 72px) !important; background: linear-gradient(180deg, #f5f9ff 0%, #ffffff 100%) !important; }
html.neo-bridged #demo { background: linear-gradient(180deg, #eef5ff 0%, #ffffff 100%) !important; border-color: #dfe5ee !important; }
html.neo-bridged #demo h1, html.neo-bridged #demo h2, html.neo-bridged #demo h3 { color: #0e1b33 !important; }
html.neo-bridged #demo [class*="bg-clip-text"], html.neo-bridged #demo [class*="text-transparent"] { background-image: linear-gradient(95deg, #2350f5, #1f8bff 55%, #14c2f0) !important; -webkit-background-clip: text !important; background-clip: text !important; color: transparent !important; -webkit-text-fill-color: transparent !important; }
html.neo-bridged .neo-lit { box-shadow: 0 1px 2px rgba(14,27,51,.05), 0 18px 44px -20px rgba(35,80,245,.28) !important; }
html.neo-bridged input.neo-lit, html.neo-bridged textarea.neo-lit { box-shadow: none !important; }
html.neo-bridged #main-content button[class*="bg-[#1687f8]"], html.neo-bridged #main-content a[class*="bg-[#2459df]"] { background: linear-gradient(95deg, #2350f5, #1f8bff 50%, #14c2f0) !important; }
html:not(.neo-bridged) .n-app-chrome { display: none !important; }
.n-app-chrome .n-header { position: sticky; top: 0; }
html.neo-bridged #demo::before, html.neo-bridged #demo::after, html.neo-bridged #demo > div.pointer-events-none, html.neo-bridged #demo > .absolute { display: none !important; }
html.neo-bridged #demo, html.neo-bridged #demo > * { background-image: none !important; }
html.neo-bridged #demo { background: linear-gradient(180deg, #eef5ff 0%, #ffffff 100%) !important; }
html.neo-bridged body { padding-top: 0 !important; }

/* ---------- v4.1: no dark flash on load / refresh ---------- */
html.neo-bridged, html.neo-bridged body { background: #ffffff !important; }
/* the app's default theme tokens are navy; on bridged pages they become the light NEO tokens */
html.neo-bridged {
  --background: 0 0% 100%; --foreground: 220 57% 13%;
  --card: 0 0% 100%; --card-foreground: 220 57% 13%;
  --popover: 0 0% 100%; --popover-foreground: 220 57% 13%;
  --secondary: 214 70% 96%; --secondary-foreground: 220 57% 13%;
  --muted: 214 60% 97%; --muted-foreground: 218 24% 33%;
  --accent: 214 90% 95%; --accent-foreground: 220 57% 13%;
  --border: 216 30% 90%; --input: 216 30% 88%;
}
@keyframes neo-show { to { opacity: 1; } }
html.neo-bridged #root { opacity: 0; animation: neo-show .01s 1.6s forwards; }
html.neo-bridged.neo-ready #root { opacity: 1; transition: opacity .22s ease; }
html.neo-bridged.neo-leaving #root { opacity: 0 !important; transition: opacity .12s ease; }

/* ---------- v4.1: sign-in page ---------- */
html.neo-r-auth .n-app-chrome > .n-footer { display: none !important; }
html.neo-bridged.neo-r-auth body #root .neo-auth-page {
  background:
    radial-gradient(48% 42% at 8% 12%, rgba(20,194,240,.20), transparent 70%),
    radial-gradient(42% 40% at 96% 8%, rgba(35,80,245,.16), transparent 70%),
    radial-gradient(40% 40% at 60% 105%, rgba(18,192,143,.12), transparent 70%),
    linear-gradient(180deg, #f2f7ff 0%, #ffffff 75%) !important;
  color: #0e1b33 !important; min-height: calc(100dvh - 64px) !important;
}
html.neo-bridged.neo-r-auth body #root .neo-auth-page > .pointer-events-none, html.neo-bridged.neo-r-auth body #root .neo-auth-toolbar { display: none !important; }
html.neo-bridged.neo-r-auth body #root .neo-auth-shell { padding-top: clamp(20px, 4vw, 52px) !important; padding-bottom: clamp(24px, 4vw, 56px) !important; min-height: 0 !important; }
html.neo-bridged.neo-r-auth body #root .neo-auth-area > div {
  background: #ffffff !important; border: 1px solid #dfe5ee !important; border-radius: 32px !important;
  box-shadow: 0 1px 2px rgba(14,27,51,.05), 0 44px 100px -44px rgba(35,80,245,.5) !important; backdrop-filter: none !important;
}
html.neo-bridged.neo-r-auth body #root section[class*="neo-auth-form"] { border-color: #e8eef7 !important; background: transparent !important; }
html.neo-bridged.neo-r-auth body #root .neo-auth-form-inner h1 { color: #0e1b33 !important; font-family: var(--f-head) !important; font-weight: 800 !important; letter-spacing: -0.025em !important; font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem) !important; }
html.neo-bridged.neo-r-auth body #root .neo-auth-form-inner p, html.neo-bridged.neo-r-auth body #root .neo-auth-form-inner label { color: #3f4e68 !important; }
html.neo-bridged.neo-r-auth body #root .neo-auth-form-inner input {
  background: #f7faff !important; border: 1px solid #d9e2ef !important; border-radius: 12px !important; color: #0e1b33 !important;
  min-height: 48px !important; box-shadow: none !important; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease !important;
}
html.neo-bridged.neo-r-auth body #root .neo-auth-form-inner input::placeholder { color: #8a97ad !important; }
html.neo-bridged.neo-r-auth body #root .neo-auth-form-inner input:focus { background: #fff !important; border-color: #1f8bff !important; box-shadow: 0 0 0 4px rgba(31,139,255,.16) !important; outline: none !important; }
html.neo-bridged.neo-r-auth body #root .neo-auth-form-inner form button[type="submit"] {
  background: linear-gradient(95deg, #2350f5, #1f8bff 55%, #14c2f0) !important; color: #fff !important; border: 0 !important;
  border-radius: 12px !important; min-height: 50px !important; font-family: var(--f-head) !important; font-weight: 700 !important;
  box-shadow: 0 14px 30px -14px rgba(35,80,245,.75) !important; background-size: 160% 100% !important; transition: background-position .4s ease, transform .15s ease, box-shadow .2s ease !important;
}
html.neo-bridged.neo-r-auth body #root .neo-auth-form-inner form button[type="submit"]:hover { background-position: 100% 0 !important; transform: translateY(-1px); box-shadow: 0 18px 36px -14px rgba(35,80,245,.85) !important; }
html.neo-bridged.neo-r-auth body #root .neo-auth-form-inner div.space-y-3 > button:not([type="submit"]) {
  background: #ffffff !important; color: #0e1b33 !important; border: 1px solid #d9e2ef !important; border-radius: 12px !important; min-height: 46px !important;
}
html.neo-bridged.neo-r-auth body #root .neo-auth-form-inner div.space-y-3 > button:not([type="submit"]):hover { border-color: #9cc4ff !important; background: #f5f9ff !important; }
html.neo-bridged.neo-r-auth body #root .neo-auth-form-inner a, html.neo-bridged.neo-r-auth body #root .neo-auth-form-inner button[class*="text-primary"] { color: #1a5fd0 !important; }
html.neo-bridged.neo-r-auth body #root .neo-auth-form-inner .relative.my-5 span { background: #ffffff !important; color: #8a97ad !important; }
html.neo-bridged.neo-r-auth body #root .neo-auth-form-inner .relative.my-5 > div:first-child * { border-color: #e6ecf5 !important; }
html.neo-bridged.neo-r-auth body #root .neo-auth-story-pane.neo-art-on { padding: 10px !important; }
html.neo-bridged.neo-r-auth body #root .neo-auth-story-pane.neo-art-on > *:not(.n-auth-art) { display: none !important; }
html.neo-bridged.neo-r-auth body #root .neo-auth-story-pane.neo-art-on > .n-auth-art { display: flex !important; }

/* motion panel */
.neo-auth-story-pane .n-auth-art {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 18px; width: 100%; min-height: 600px;
  padding: 44px clamp(28px, 3.4vw, 48px); border-radius: 24px; overflow: hidden; isolation: isolate; color: #fff;
  background-color: #1f6ff0; background-image: linear-gradient(155deg, #2350f5 0%, #1f8bff 52%, #14c2f0 100%);
  font-family: var(--f-body);
}
.n-aa__blob { position: absolute; z-index: -1; border-radius: 50%; filter: blur(40px); opacity: .55; animation: n-aa-drift 14s ease-in-out infinite alternate; }
.n-aa__blob--a { width: 340px; height: 340px; left: -90px; top: -110px; background: #7fe3ff; }
.n-aa__blob--b { width: 300px; height: 300px; right: -100px; bottom: -120px; background: #4dffc4; opacity: .35; animation-duration: 18s; animation-direction: alternate-reverse; }
@keyframes n-aa-drift { to { transform: translate(60px, 40px) scale(1.15); } }
.n-aa__head { display: flex; align-items: center; gap: 14px; }
.n-aa__orb { position: relative; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: 0 10px 30px -8px rgba(8,30,90,.5); }
.n-aa__orb img { width: 40px; height: 40px; border-radius: 50%; }
.n-aa__orb::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: conic-gradient(from 0deg, rgba(255,255,255,.95), rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%, rgba(255,255,255,.95)); -webkit-mask: radial-gradient(circle, transparent 30px, #000 31px); mask: radial-gradient(circle, transparent 30px, #000 31px); animation: n-aa-spin 3.2s linear infinite; }
.n-aa__orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); animation: n-aa-ping 2.4s ease-out infinite; }
@keyframes n-aa-spin { to { transform: rotate(360deg); } }
@keyframes n-aa-ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.9); opacity: 0; } }
.n-aa__live { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); font: 650 .8125rem/1 var(--f-head); }
.n-aa__live .n-live-dot { background: #4dffc4; }
.n-aa__h { margin: 8px 0 0; font: 800 clamp(2rem, 1.4rem + 1.6vw, 2.75rem)/1.08 var(--f-head); letter-spacing: -0.03em; color: #fff; max-width: 12em; }
.n-aa__p { margin: 0; max-width: 30em; color: rgba(255,255,255,.86); font-size: 1rem; line-height: 1.55; }
.n-aa__feed { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.n-aa__row, .n-aa__typing { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.26); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; animation: n-aa-in .7s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(.2s + var(--i) * .32s); }
@keyframes n-aa-in { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
/* after the entrance, a highlight walks down the feed: each event "arrives" again in turn */
.n-aa__row::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; border: 1.5px solid rgba(255,255,255,.95); box-shadow: 0 0 0 4px rgba(255,255,255,.14), 0 16px 34px -16px rgba(8,30,90,.6); opacity: 0; animation: n-aa-glow 8s ease-in-out infinite; animation-delay: calc(2.2s + var(--i) * 2s); pointer-events: none; }
@keyframes n-aa-glow { 0%, 100% { opacity: 0; } 5% { opacity: 1; } 20% { opacity: 0; } }
.n-aa__row time { animation: n-aa-tick 8s ease-in-out infinite; animation-delay: calc(2.2s + var(--i) * 2s); }
@keyframes n-aa-tick { 0%, 20%, 100% { color: rgba(255,255,255,.75); } 5% { color: #fff; } }
.n-aa__typing { width: max-content; padding: 10px 16px 10px 10px; }
.n-aa__typing .n-aa__ico { width: 30px; height: 30px; border-radius: 50%; }
.n-aa__typing .n-aa__ico img { border-radius: 50%; }
.n-aa__dots { display: inline-flex; gap: 5px; }
.n-aa__dots i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: n-aa-dot 1.2s ease-in-out infinite; }
.n-aa__dots i:nth-child(2) { animation-delay: .15s; } .n-aa__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes n-aa-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.n-aa__ico { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #fff; }
.n-aa__ico svg { width: 20px; height: 20px; }
.n-aa__row--phone .n-aa__ico { color: #2350f5; } .n-aa__row--cal .n-aa__ico { color: #0a9e74; } .n-aa__row--lead .n-aa__ico { color: #e08e00; } .n-aa__row--chat .n-aa__ico { color: #1f8bff; }
.n-aa__txt { display: grid; gap: 2px; min-width: 0; }
.n-aa__txt b { font: 700 .9375rem/1.25 var(--f-head); color: #fff; }
.n-aa__txt span { font-size: .8125rem; color: rgba(255,255,255,.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n-aa__row time { margin-left: auto; font: 600 .75rem/1 var(--f-head); color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; }
.n-aa__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.n-aa__stats div { padding: 12px; border-radius: 14px; background: rgba(8,30,90,.16); }
.n-aa__stats b { display: block; font: 800 1.25rem/1.1 var(--f-head); color: #fff; }
.n-aa__stats span { font-size: .75rem; color: rgba(255,255,255,.8); line-height: 1.3; }
.n-aa__note { margin: 0; font-size: .75rem; color: rgba(255,255,255,.7); }
@media (prefers-reduced-motion: reduce) {
  .n-auth-art *, .n-auth-art *::before, .n-auth-art *::after { animation: none !important; }
  .n-aa__row, .n-aa__typing { opacity: 1; }
}

/* ---------- v5.1: header on app pages ---------- */
/* the header lives in its own wrapper, so the wrapper is what sticks to the top */
.n-app-chrome--head { position: sticky; top: 0; z-index: 60; }
/* the React app's CSS shrinks and hides "header nav a" at some widths; our header must look the same everywhere */
html.neo-bridged body .n-app-chrome .n-header .n-nav a,
html.neo-bridged body .n-app-chrome .n-header .n-mobile-nav a {
  display: block !important; font-size: .9375rem !important; line-height: 1 !important; letter-spacing: normal !important; white-space: nowrap !important;
}
html.neo-bridged body .n-app-chrome .n-header .n-mobile-nav a { font-size: 1.0625rem !important; line-height: 1.2 !important; }
