/* Партнёрский сайт NutriTrack: лендинг + вход + кабинеты. Поверх styles.css и partner.css. Префикс .amb- */
body.amb-body { padding: 0; min-height: 100vh; }
.amb-nav { position: sticky; top: 0; z-index: 40; background: rgba(248,247,242,.94); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.amb-nav-in { max-width: 1180px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 28px; }
.amb-nav .brand { display: flex; align-items: center; gap: 10px; }
.amb-nav .brand-logo { height: 30px; width: auto; }
.brand-tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green-2); background: var(--sage); padding: 4px 9px; border-radius: 99px; }
.amb-links { display: flex; gap: 22px; margin-left: 8px; flex: 1; }
.amb-links a { font-size: 14px; font-weight: 500; color: var(--ink); opacity: .82; }
.amb-links a:hover { opacity: 1; color: var(--green-2); }
.amb-nav-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.amb-cta-head { padding: 11px 22px; font-size: 14.5px; white-space: nowrap; }
body.in-cab .amb-links { display: none; }
@media (max-width: 900px) { .amb-links { display: none; } .brand-tag { display: none; } .amb-nav-in { padding: 10px 16px; } .cab-who { display: none; } }

main#app { display: block; }
.amb-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.amb-section { padding: 84px 0; scroll-margin-top: 70px; }
.amb-section.alt { background: #eef2e9; }
.amb-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #62765e; margin-bottom: 14px; display: block; }
.amb-h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.12; letter-spacing: -.03em; margin: 0 0 14px; max-width: 760px; }
.amb-lead { color: var(--muted); font-size: 17px; line-height: 1.65; max-width: 620px; margin: 0 0 38px; }

/* hero */
.amb-hero { background: radial-gradient(ellipse at 80% 40%, #e3eedd 0, transparent 55%), radial-gradient(ellipse at 0% 100%, rgba(233,207,139,.25) 0, transparent 50%), #f8f7f2; padding: 70px 0 64px; overflow: hidden; }
.amb-hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.amb-hero h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.06; letter-spacing: -.04em; margin: 0 0 20px; color: var(--green); }
.amb-hero p.sub { font-size: 18px; line-height: 1.65; color: var(--muted); max-width: 560px; margin: 0 0 30px; }
.amb-hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.amb-hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 40px; max-width: 620px; }
.amb-fact { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px 16px 14px; box-shadow: var(--shadow-sm); }
.amb-fact b { display: block; font-family: 'Montserrat', sans-serif; font-weight: 800; color: var(--green); font-size: 17px; line-height: 1.25; margin-bottom: 4px; }
.amb-fact span { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.amb-hero-img { position: relative; display: flex; justify-content: center; }
.amb-hero-img img { width: min(100%, 400px); border-radius: 34px; box-shadow: var(--shadow-lg); }
.amb-hero-img .chip { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow); font-size: 13.5px; font-weight: 600; color: var(--green); }
.amb-hero-img .chip small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.amb-hero-img .c1 { left: -4px; top: 18%; } .amb-hero-img .c2 { right: -4px; bottom: 16%; }
@media (max-width: 900px) { .amb-hero-grid { grid-template-columns: 1fr; } .amb-hero-img { order: -1; } .amb-hero-img img { width: min(70%, 280px); } .amb-hero-facts { grid-template-columns: 1fr; } .amb-hero-img .c1, .amb-hero-img .c2 { display: none; } .amb-hero { padding: 36px 0 44px; } }

/* карточки */
.amb-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .amb-grid3 { grid-template-columns: 1fr; } }
.amb-card { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 28px 26px; box-shadow: var(--shadow-sm); }
.amb-card .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--sage); display: grid; place-items: center; margin-bottom: 16px; color: var(--green-2); }
.amb-card .ic svg { width: 24px; height: 24px; }
.amb-card h3 { font-size: 18px; margin-bottom: 8px; }
.amb-card p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; }
.amb-card.dark { background: linear-gradient(150deg, #0E241A 0%, #17432F 60%, #2B6B50 100%); color: #fff; border: 0; }
.amb-card.dark h3, .amb-card.dark p { color: #fff; } .amb-card.dark p { opacity: .85; }
.amb-card.dark .ic { background: rgba(255,255,255,.12); color: #F8DC84; }

/* шаги */
.amb-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
@media (max-width: 900px) { .amb-steps { grid-template-columns: 1fr; } }
.amb-step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 30px 26px; }
.amb-step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--gold-grad); color: #1b3a2a; font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 19px; margin-bottom: 16px; }
.amb-step h3 { font-size: 18px; margin-bottom: 8px; } .amb-step p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; }

/* условия */
.amb-terms { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 40px; max-width: 980px; }
@media (max-width: 800px) { .amb-terms { grid-template-columns: 1fr; } }
.amb-term { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-top: 1px solid rgba(20,39,29,.12); }
.amb-term i { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--mint); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 14px; font-weight: 800; margin-top: 2px; }
.amb-term b { display: block; font-size: 16.5px; margin-bottom: 3px; } .amb-term span { color: var(--muted); font-size: 14.5px; line-height: 1.55; }

/* менеджерам */
.amb-mgr { display: grid; grid-template-columns: 1.1fr .9fr; gap: 30px; align-items: center; background: linear-gradient(150deg, #0E241A 0%, #17432F 55%, #2B6B50 100%); border-radius: 34px; padding: 50px 48px; color: #fff; position: relative; overflow: hidden; }
.amb-mgr::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(233,207,139,.25); pointer-events: none; }
.amb-mgr h2 { color: #fff; font-size: clamp(26px, 3.2vw, 38px); letter-spacing: -.03em; margin: 0 0 14px; }
.amb-mgr p { color: rgba(255,255,255,.85); font-size: 16.5px; line-height: 1.65; margin: 0 0 22px; }
.amb-mgr ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.amb-mgr li { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 14px 16px; font-size: 15px; display: flex; gap: 12px; align-items: center; }
.amb-mgr li::before { content: '✓'; color: #F8DC84; font-weight: 800; }
@media (max-width: 900px) { .amb-mgr { grid-template-columns: 1fr; padding: 32px 22px; } }

/* FAQ */
.amb-faq { max-width: 820px; display: grid; gap: 10px; }
.amb-faq details { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 0; overflow: hidden; }
.amb-faq summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 600; font-size: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.amb-faq summary::-webkit-details-marker { display: none; }
.amb-faq summary::after { content: '+'; font-size: 22px; color: var(--green-2); transition: transform .2s; }
.amb-faq details[open] summary::after { transform: rotate(45deg); }
.amb-faq details p { padding: 0 22px 18px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }

.amb-final { text-align: center; padding: 84px 24px; }
.amb-final h2 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -.03em; margin: 0 0 14px; }
.amb-final p { color: var(--muted); font-size: 17px; margin: 0 auto 26px; max-width: 540px; }

/* подвал */
.amb-foot { background: var(--dark); color: rgba(255,255,255,.8); padding: 38px 0; margin-top: 0; }
.amb-foot-in { max-width: 1180px; margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; font-size: 14px; }
.amb-foot b { color: #fff; font-size: 17px; } .amb-foot p { margin: 6px 0 0; max-width: 380px; line-height: 1.6; }
.amb-foot-links { display: grid; gap: 8px; } .amb-foot-links a { color: rgba(255,255,255,.85); text-decoration: underline; text-underline-offset: 3px; }

/* вход / регистрация */
.amb-auth { min-height: calc(100vh - 62px - 150px); padding: 48px 20px 70px; background: radial-gradient(800px 380px at 85% -60px, rgba(82,183,136,.16), transparent 70%), var(--bg); }
.amb-auth .cab-login { margin: 0 auto; max-width: 480px; text-align: left; }
.amb-auth .cab-login h1 { text-align: center; } .amb-auth .cab-login > p { text-align: center; }
.amb-tabs { display: flex; background: var(--sage); border-radius: 99px; padding: 4px; margin: 0 0 22px; }
.amb-tabs button { flex: 1; padding: 10px 12px; border-radius: 99px; font-weight: 600; font-size: 14.5px; color: var(--green-2); }
.amb-tabs button.on { background: #fff; box-shadow: var(--shadow-sm); color: var(--green); }
.amb-auth label.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 14px 0 6px; }
.amb-auth .cab-field { margin: 0; }
.amb-auth .cab-field.code { text-transform: uppercase; letter-spacing: .08em; }
.amb-auth .cab-err { text-align: center; }
.amb-auth .cab-code { margin-top: 6px; }
.amb-demo { margin-top: 18px; font-size: 12.5px; color: var(--muted); background: #fff8e3; border: 1px dashed #e5c765; border-radius: 12px; padding: 10px 12px; line-height: 1.55; }
.amb-demo b { color: #7a5c0b; }
.amb-ok { text-align: center; padding: 6px 0 0; }
.amb-ok .ico { font-size: 44px; margin-bottom: 8px; }

/* кабинет */
.amb-cab { max-width: 1120px; margin: 0 auto; padding: 32px 24px 70px; display: grid; gap: 26px; }
.amb-cab-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.amb-cab-head h1 { font-size: clamp(26px, 3.4vw, 36px); margin: 0; }
.amb-role-tabs { display: inline-flex; background: var(--sage); border-radius: 99px; padding: 4px; }
.amb-role-tabs button { padding: 9px 18px; border-radius: 99px; font-weight: 600; font-size: 14.5px; color: var(--green-2); }
.amb-role-tabs button.on { background: #fff; color: var(--green); box-shadow: var(--shadow-sm); }
.m-tot { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.m-bl-name { font-weight: 600; } .m-bl-sub { font-size: 12.5px; color: var(--muted); }
.cab-pay.m-tbl td:last-child, .cab-pay.m-tbl th:last-child { text-align: right; }
.cab-pay.m-tbl th, .cab-pay.m-tbl td { padding-right: 12px; }
.cab-pay.m-tbl tfoot td { border-top: 2px solid var(--line); font-weight: 700; padding-top: 14px; }
.amb-ldr { position: fixed; inset: 0; z-index: 70; background: rgba(248,247,242,.78); backdrop-filter: blur(6px); display: grid; place-items: center; }
.amb-spin { width: 54px; height: 54px; border-radius: 50%; border: 5px solid var(--sage); border-top-color: var(--mint); animation: ambs 0.9s linear infinite; }
@keyframes ambs { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .amb-spin { animation-duration: 2.4s; } }
.amb-hide { display: none !important; }

/* суммы в KPI не переносят знак ₽ */
.p-kpi b { white-space: nowrap; font-size: clamp(19px, 2vw, 24px); }

/* кабинет: сетка не растягивается под широкие таблицы (они скроллятся внутри .tbl-wrap) */
.amb-cab { grid-template-columns: minmax(0, 1fr); }
.amb-cab > * { min-width: 0; }
@media (max-width: 560px) { .amb-cab { padding: 22px 16px 54px; } .amb-cab-head { align-items: flex-start; } }
