/* ===== Слой выразительности: контраст, акценты и анимации для всех страниц ===== */
:root {
  --line: #E2DFD8;            /* границы заметнее на белом */
  --muted: #6A6A70;           /* серый текст темнее — лучше читается */
  --bg: #F3F2EE;              /* тёплый фон, белые карточки на нём не сливаются */
  --edge: #E6E1D6;            /* граница карточек */
  --lift: 0 2px 4px rgba(30, 20, 0, .04), 0 10px 26px rgba(30, 20, 0, .07);
  --lift-hover: 0 4px 10px rgba(30, 20, 0, .06), 0 18px 40px rgba(30, 20, 0, .12);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
body.appbody, .adm2, .lp, body { background-color: var(--bg); }
.lp { background: #FAF8F4; }

/* --- Карточки и панели: граница + тень, подъём при наведении --- */
.card, .panel, .kpi, .ocard, .rcard, .why-card, .why-l, .t-card, .faq-i, .dcard, .kc, .mo, .tariff, .empty, .auth-card, .modal, .lst-foot, .date-c {
  border: 1px solid var(--edge); box-shadow: var(--lift);
}
.ocard, .rcard, .why-card, .t-card, .dcard, .kpi, .mo, .kc, .qa, .qa2, .feed, .act, .rn, .ch-i, .subi {
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease), background-color .22s var(--ease);
}
.ocard:hover, .why-card:hover, .t-card:hover, .dcard:hover, .kpi:hover, .mo:hover, .kc:hover { transform: translateY(-3px); box-shadow: var(--lift-hover); border-color: #E3C27D; }
.rcard:hover { box-shadow: var(--lift-hover); border-color: #E3C27D; }
.ocard.top { border-color: #E8B04A; box-shadow: 0 0 0 1px #E8B04A, var(--lift); }
.ocard.top:hover { box-shadow: 0 0 0 1px #E8B04A, var(--lift-hover); }
.ocard .ph img, .mo-ph img, .t-img, .devices img { transition: transform .5s var(--ease); }
.ocard:hover .ph img, .mo:hover .mo-ph img { transform: scale(1.05); }
.devices:hover img { transform: translateY(-6px); }

/* --- Ключевые цифры и цены --- */
.price, .contact-card .price, .mo-p, .kc-v, .k-v b, .stat-i b, .t-price, .bal b { color: #141416; letter-spacing: -.01em; }
.ocard .price { font-size: 20px; }
.t-price { color: #141416; } .t-card.popular .t-price { color: var(--red); }
.stat-i b { background: linear-gradient(135deg, #1D1D1F 30%, #8A5A0B); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ok-badge, .st-g { box-shadow: inset 0 0 0 1px rgba(30, 155, 87, .25); }
.pro-badge { box-shadow: inset 0 0 0 1px rgba(200, 144, 30, .35); }

/* «Топ» — мягкий блеск; популярный тариф — свечение рамки */
.ph .tag.top, .badge-red { position: absolute; overflow: hidden; }
.badge-red { position: relative; }
.ph .tag.top::after, .t-badge::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); animation: shine 3.2s ease-in-out infinite; }
.t-badge { overflow: hidden; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.t-card.popular { animation: glow 2.8s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 10px 30px rgba(200, 140, 30, .15); } 50% { box-shadow: 0 10px 34px rgba(227, 160, 40, .38); } }

/* --- Кнопки: чёткие, с откликом --- */
.btn { transition: transform .15s var(--ease), box-shadow .2s var(--ease), background-color .2s, border-color .2s, color .2s; }
.btn:active:not([disabled]) { transform: translateY(1px) scale(.99); }
.btn-red { box-shadow: 0 4px 12px rgba(227, 6, 19, .22); }
.btn-red:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(227, 6, 19, .32); }
.btn-gold { box-shadow: 0 4px 12px rgba(200, 140, 30, .25); }
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(200, 140, 30, .38); filter: saturate(1.1); }
.btn-outline { border-width: 1.5px; }
.btn-outline:hover { background: var(--red); color: #fff; }
.btn-ghost { border-color: #D9D5CC; }
.btn-ghost:hover { border-color: #B9B3A6; background: #FDFCFA; }
.btn-ghost-gold { border-width: 1.5px; }
.btn-ghost-gold:hover { background: linear-gradient(135deg, #F4CB5E, #D9961C); color: #fff; border-color: transparent; }
.btn-white:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.fav, .fav2 { transition: transform .18s var(--ease), color .2s; }
.fav:hover, .fav2:hover { transform: scale(1.12); }
.fav.on svg, .fav2.on svg { animation: pop .35s var(--ease); }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* --- Поля ввода: видимые рамки и фокус --- */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=month], input[type=time], input[type=date], input[type=search], select, textarea {
  border-color: #D8D5CE; transition: border-color .2s, box-shadow .2s;
}
input:hover, select:hover, textarea:hover { border-color: #BDB8AD; }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(227, 6, 19, .14); }
.seg label, .multi label, .cats button, .ltabs a, .toolbar button, .ftabs button, .subtabs button, .pager button, .vtoggle button { transition: background-color .18s, color .18s, border-color .18s, box-shadow .18s, transform .15s; }
.seg label, .multi label { border-color: #D8D5CE; }
.seg label:hover, .multi label:hover, .cats button:hover, .ltabs a:hover:not(.on), .pager button:hover:not(.on) { border-color: var(--red); color: var(--red); }
.seg label:has(input:checked), .multi label:has(input:checked), .cats button.on { box-shadow: 0 4px 12px rgba(227, 6, 19, .22); }
.check input, input[type=checkbox] { accent-color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }

/* --- Навигация: подчёркивание при наведении --- */
.lp-head nav a, .foot-nav a, .a-head .tabs > a { position: relative; }
.lp-head nav a::after, .foot-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--red); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.lp-head nav a:hover::after, .foot-nav a:hover::after { transform: scaleX(1); }
.a-head .tabs > a:not(.on)::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 14px; height: 2px; background: var(--red); border-radius: 2px; transform: scaleX(0); transition: transform .25s var(--ease); }
.a-head .tabs > a:not(.on):hover::after { transform: scaleX(1); }
.a-head { box-shadow: 0 1px 0 var(--edge), 0 6px 20px rgba(30, 20, 0, .05); }
.lp-head { box-shadow: 0 1px 0 #EDE6D9, 0 6px 20px rgba(30, 20, 0, .05); }
.menu a, .cnav a, .cnav button, .qa, .qa2, .udd-menu a, .drawer a, #sbNav a { transition: background-color .18s, color .18s, padding-left .2s var(--ease), box-shadow .18s; }
.cnav a:hover:not(.on), .menu a:hover:not(.on), #sbNav a:hover:not(.on) { padding-left: 16px; }
.qa:hover, .qa2:hover { transform: translateX(3px); }
.cnav a.on, .menu a.on { font-weight: 700; }

/* --- Заголовки разделов: акцент --- */
.pg-t h1, .cab-h h1, .pg-h h1, .c-head h1 { position: relative; padding-bottom: 8px; }
.pg-t h1::after, .cab-h h1::after, .pg-h h1::after { content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--red), #E8A93A); }
.pnl h2, .panel .pn-h h2, .rc-h h3, .form-sec h2 { letter-spacing: -.005em; }
.lp h2 .brand-red, .brand-red { text-shadow: 0 6px 22px rgba(227, 6, 19, .18); }

/* --- Таблицы: подсветка строки --- */
table.t td, table.t2 td, table.t3 td { transition: background-color .15s; }
table.t tbody tr:hover td, table.t2 tbody tr:hover td, table.t3 tbody tr:hover td { background: #FBF8F2; }

/* --- Боковое меню админки --- */
#sbNav a.on { animation: slideIn .35s var(--ease); }
@keyframes slideIn { from { opacity: .4; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.k-ic, .kc-ic, .qa-ic, .pn-ic, .g-ic, .f-ic, .tg-ic { transition: transform .25s var(--ease); }
.kpi:hover .k-ic, .kc:hover .kc-ic, .qa:hover .qa-ic, .qa2:hover .qa-ic, .why-card:hover .g-ic, .stat-i:hover .g-ic { transform: scale(1.1) rotate(-4deg); }

/* --- Появление элементов --- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
#items > * { animation: fadeUp .45s var(--ease) both; }
#items > *:nth-child(2) { animation-delay: .05s; } #items > *:nth-child(3) { animation-delay: .1s; } #items > *:nth-child(4) { animation-delay: .15s; }
#items > *:nth-child(5) { animation-delay: .2s; } #items > *:nth-child(n+6) { animation-delay: .25s; }
.c4 > *, .kpis2 > *, .c3s > * { animation: fadeUp .45s var(--ease) both; }
.c4 > *:nth-child(2), .kpis2 > *:nth-child(2), .c3s > *:nth-child(2) { animation-delay: .06s; }
.c4 > *:nth-child(3), .kpis2 > *:nth-child(3), .c3s > *:nth-child(3) { animation-delay: .12s; }
.c4 > *:nth-child(4), .kpis2 > *:nth-child(4) { animation-delay: .18s; }
.kpis2 > *:nth-child(n+5) { animation-delay: .24s; }
.c2 > *, .c2b > *, .dash-row > *, .mo-grid > *, .dash-side > * { animation: fadeUp .5s var(--ease) both; animation-delay: .15s; }
.modal-back { animation: fadeIn .2s ease both; }
.modal { animation: scaleIn .25s var(--ease) both; }
.toast { animation: toastIn .3s var(--ease) both; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.udd-menu:not(.hidden), .kb[open] .kb-m, .pop, .dd-menu, .tb-dd[open] > div, .gs-res:not(.hidden), .dlist:not(.hidden) { animation: scaleIn .18s var(--ease) both; }
.upd-bar { animation: toastIn .4s var(--ease) both; }
.count, .sb-badge { animation: pop .4s var(--ease); }
.bell .count { animation: pop .4s var(--ease), ring 4s ease-in-out 1s infinite; }
@keyframes ring { 0%, 92%, 100% { transform: none; } 94% { transform: rotate(14deg); } 96% { transform: rotate(-12deg); } 98% { transform: rotate(8deg); } }

/* Загрузка */
.loader { width: 34px; height: 34px; margin: 40px auto; border-radius: 50%; border: 3px solid #EFE7D8; border-top-color: var(--red); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Главная: появление при прокрутке, живой фон --- */
.js-rv .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js-rv .reveal.in { opacity: 1; transform: none; }
.hero-text > * { animation: fadeUp .7s var(--ease) both; }
.hero-text > *:nth-child(2) { animation-delay: .08s; } .hero-text > *:nth-child(3) { animation-delay: .16s; } .hero-text > *:nth-child(4) { animation-delay: .24s; } .hero-text > *:nth-child(5) { animation-delay: .32s; }
.lp-card { animation: scaleIn .7s var(--ease) .2s both; box-shadow: 0 24px 60px rgba(60, 40, 0, .18); }
.lp-hero .city { animation: kenburns 24s ease-in-out infinite alternate; transform-origin: 60% 70%; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.07); } }
.why-l, .t-intro, .faq > div:first-child { position: relative; }
.why-card { background: #fff; }
.step .num { box-shadow: 0 6px 16px rgba(217, 150, 28, .35); transition: transform .25s var(--ease); }
.step:hover .num { transform: scale(1.1); }
.faq-i[open] { border-color: #E3C27D; box-shadow: 0 8px 22px rgba(200, 140, 30, .12); }
.faq-i[open] summary { color: #A8730F; }
.faq-i summary:hover { color: var(--red); }
.cta { box-shadow: 0 18px 44px rgba(196, 22, 28, .3); }
.cta .btn-white { animation: nudge 3s ease-in-out infinite; }
@keyframes nudge { 0%, 85%, 100% { transform: none; } 90% { transform: translateX(4px); } 95% { transform: translateX(-2px); } }
.p-chip { transition: color .2s, transform .2s; } .p-chip:hover { color: var(--red); transform: translateY(-2px); }
.socials a { transition: transform .2s var(--ease), box-shadow .2s; } .socials a:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(227, 6, 19, .35); }

/* --- Учёт настроек системы: без анимаций --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js-rv .reveal { opacity: 1; transform: none; }
}

/* Цвет текста кнопок не перекрашивается правилами для ссылок внутри блоков */
a.btn-red, button.btn-red, a.btn-red:hover, a.btn-red:visited, a.btn-gold, button.btn-gold, a.btn-gold:visited { color: #fff !important; }
a.btn-white, button.btn-white, a.btn-white:visited { color: var(--red) !important; }
a.btn-outline:not(:hover), a.btn-outline:visited:not(:hover) { color: var(--red); }
a.btn-ghost, a.btn-ghost:visited { color: var(--ink); }
a.btn-ghost-gold:not(:hover) { color: #A8730F; }

/* Золото с белым текстом — темнее, чтобы надпись читалась (контраст ≥ 3:1) */
.btn-gold, a.btn-gold, button.btn-gold { background: linear-gradient(135deg, #B9800F 0%, #8E5F08 100%) !important; color: #fff !important; border-color: transparent !important; text-shadow: 0 1px 1px rgba(0,0,0,.18); }
.btn-gold:hover { background: linear-gradient(135deg, #C88B12 0%, #9A680A 100%) !important; }
.t-badge, .ph .tag.gold, .t-tag, .mo-st.st-g, .r-director, .step .num, .s-steps .num { background: linear-gradient(135deg, #C08512, #93630A) !important; color: #fff !important; }
.ltabs a.on, .cats button.on, .seg label:has(input:checked) { color: #fff !important; }
