/* Модуль «Аналитика»: оживающий отчёт владельца, ИИ-аналитик, клубы сегодня, мини-виджеты.
   Разметка — resources/views/site/modules/analytics.blade.php, сценарий — analytics.js */
.an, .an-ai, .an-td, .anf {
    --c-fact: var(--accent); --c-plan: #a3a39e; --c-fc: #7b93e6;
    --c-up: #1f7a45; --c-down: #b23a3a; --c-base: #3d3d3a;
    --an-ease: cubic-bezier(.2, .7, .2, 1);
}
.an-head { max-width: 760px; }
.an-head .lead { margin-top: 18px; }

/* ── Окно отчёта ── */
.an-app { margin-top: 44px; background: #fff; border: 1px solid var(--line-card); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(20, 20, 19, .04), 0 30px 80px rgba(20, 20, 19, .10); font-size: 13px; }
.an-bar { display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--line); }
.an-crumbs { display: flex; align-items: center; gap: 7px; color: var(--muted); white-space: nowrap; min-width: 0; }
.an-crumbs i { font-style: normal; color: var(--ph); }
.an-crumbs b { color: var(--ink); font-weight: 600; }
.an-seg { margin-left: auto; display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--chip); }
.an-seg button { padding: 5px 12px; border-radius: 7px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; transition: background .2s, color .2s, box-shadow .2s; }
.an-seg button[aria-pressed='true'] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(20, 20, 19, .12); }
.an-clubs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 12px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.an-clubs > .i { margin-right: 2px; }
.an-clubs button { height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; transition: background .25s, color .25s, border-color .25s; }
.an-clubs button:hover { border-color: #cfcfca; }
.an-clubs button[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }
.an-auto { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--faint); transition: opacity .3s; }
.an-auto i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: an-spin 1.2s linear infinite; }
.an-auto.is-off { opacity: 0; }
@keyframes an-spin { to { transform: rotate(360deg); } }

.an-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.an-kpis > div { padding: 16px 20px; border-left: 1px solid var(--line); min-width: 0; }
.an-kpis > div:first-child { border-left: 0; }
.an-kpis > div > span { display: block; font-size: 12.5px; color: var(--muted); }
.an-kpis b { display: block; margin-top: 4px; font-size: 28px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.an-kpis b small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.an-kpis em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; color: var(--muted); }
.an-kpis em.is-ok { color: var(--ok); font-weight: 600; }
.an-kpis em.is-bad { color: var(--bad); font-weight: 600; }

.an-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; padding: 16px; background: #fafaf9; }
.an-card { background: #fff; border: 1px solid var(--line-card); border-radius: 12px; padding: 14px 16px 16px; min-width: 0; }
.an-ch { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 10px; }
.an-ch b { font-size: 13.5px; font-weight: 600; }
.an-lg { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.an-lg i { width: 14px; height: 3px; border-radius: 2px; margin-left: 6px; }
.an-lg .lg-fact { background: var(--c-fact); }
.an-lg .lg-plan { background: repeating-linear-gradient(90deg, var(--c-plan) 0 4px, transparent 4px 7px); }
.an-lg .lg-fc { background: repeating-linear-gradient(90deg, var(--c-fc) 0 2px, transparent 2px 4px); }

.an-svg { display: block; width: 100%; height: 230px; overflow: visible; }
.an-svg .grid { stroke: #efefec; stroke-width: 1; }
.an-svg .ax { font-size: 10.5px; fill: var(--faint); font-family: var(--font); }
.an-svg .plan { fill: none; stroke: var(--c-plan); stroke-width: 1.6; stroke-dasharray: 6 5; }
.an-svg .fact { fill: none; stroke: var(--c-fact); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.an-svg .area { fill: url(#an-grad); }
.an-svg .fc { fill: none; stroke: var(--c-fc); stroke-width: 2; stroke-dasharray: 2 4; stroke-linecap: round; }
.an-svg .band { fill: var(--c-fc); opacity: .12; }
.an-svg .today { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; opacity: .45; }
.an-svg .tlbl { font-size: 10.5px; fill: var(--ink-2); font-weight: 600; font-family: var(--font); }
.an-svg .dot { fill: #fff; stroke: var(--c-fact); stroke-width: 2.4; }
.an-svg .pdot { fill: var(--c-fc); }
.an-svg .end { font-size: 11px; font-weight: 600; fill: var(--c-fc); font-family: var(--font); }

/* Когорты */
.an-heat { display: grid; grid-template-columns: 34px repeat(6, minmax(0, 1fr)); gap: 3px; font-size: 11px; }
.an-heat small { color: var(--faint); text-align: center; line-height: 20px; }
.an-heat span { color: var(--muted); line-height: 26px; }
.an-heat i { font-style: normal; height: 26px; border-radius: 5px; display: grid; place-items: center; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); background: rgba(47, 91, 216, var(--a, 0)); opacity: 0; transform: scale(.6); transition: opacity .35s var(--dl, 0s), transform .45s var(--an-ease) var(--dl, 0s), background .5s; }
.an-heat i.is-hi { color: #fff; }
.an-heat i.is-on { opacity: 1; transform: none; }
.an-heat i.is-empty { background: transparent; }

/* Воронка */
.an-funnel { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.an-fs { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: 'l v p' 'bar bar bar'; gap: 5px 8px; align-items: baseline; }
.an-fs > span { grid-area: l; } .an-fs b { grid-area: v; } .an-fs small { grid-area: p; }
.an-fs > span { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-fs b { font-size: 15px; font-variant-numeric: tabular-nums; }
.an-fs small { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.an-fbar { grid-area: bar; height: 14px; border-radius: 6px; background: var(--chip); overflow: hidden; }
.an-fbar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #2f5bd8, #6f8ff0); transition: width 1s var(--an-ease); }
.an-fs:nth-child(3) .an-fbar i { background: linear-gradient(90deg, #1f7a45, #3fb070); }

/* Загрузка по часам */
.an-bars { display: grid; grid-template-columns: repeat(18, minmax(0, 1fr)); gap: 4px; align-items: end; height: 170px; padding: 20px 0 18px; position: relative; }
.an-hb { position: relative; height: 100%; display: flex; align-items: flex-end; }
.an-hb i { display: block; width: 100%; height: var(--v, 0%); border-radius: 4px 4px 2px 2px; background: #c8d4f7; transition: height .9s var(--an-ease) var(--dl, 0s), background .3s; }
.an-hb.is-peak i { background: #7b93e6; }
.an-hb.is-now i { background: var(--accent); box-shadow: 0 0 0 3px rgba(47, 91, 216, .15); }
.an-hb small { position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%); font-size: 10.5px; color: var(--faint); }
.an-hb.is-now::after { content: attr(data-now); position: absolute; left: 50%; top: -20px; transform: translateX(-50%); font-size: 10.5px; font-weight: 600; color: #fff; background: var(--accent); padding: 1px 7px; border-radius: 999px; white-space: nowrap; z-index: 2; }

/* ── ИИ-аналитик ── */
.an-ai { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; align-items: center; }
.an-ai-text .lead { margin-top: 18px; }
.an-pick { margin: 28px 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.an-qs { display: flex; flex-direction: column; gap: 8px; }
.an-qs button { position: relative; display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: #fff; text-align: left; font-size: 15px; overflow: hidden; transition: border-color .2s, background .2s, box-shadow .2s; }
.an-qs button .i { color: var(--accent); }
.an-qs button:hover { border-color: #c6d3f5; }
.an-qs button[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(47, 91, 216, .1); }
.an-qs button > i { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.an-qs button.is-timer > i { animation: an-timer var(--t, 9s) linear forwards; }
@keyframes an-timer { to { transform: none; } }

.an-chat { display: flex; flex-direction: column; height: 600px; border: 1px solid var(--line-card); border-radius: 16px; background: #fff; overflow: hidden; box-shadow: 0 1px 2px rgba(20, 20, 19, .04), 0 30px 80px rgba(20, 20, 19, .10); }
.an-chat-bar { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.an-chat-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2f5bd8, #8b5cf6); }
.an-ro { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--chip); color: var(--ink-2); font-size: 12px; }
.an-chat-body { flex: 1; min-height: 0; overflow: hidden; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; background: #fafaf9; }
.an-chat-body > * { flex: none; }
.an-uq { align-self: flex-end; max-width: 85%; padding: 10px 14px; border-radius: 14px 14px 4px 14px; background: var(--ink); color: #fff; font-size: 14px; line-height: 1.4; }
.an-uq.is-new { animation: an-in .45s var(--an-ease); }
.an-uq:empty { display: none; }
@keyframes an-in { from { opacity: 0; transform: translateY(10px); } }
.an-steps { display: flex; flex-direction: column; gap: 5px; }
.an-steps li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); animation: an-in .35s var(--an-ease); }
.an-steps li .i { color: var(--faint); }
.an-steps li.is-wait .i { animation: an-spin 1s linear infinite; color: var(--accent); }
.an-steps li.is-done .i { color: var(--ok); }
.an-ans { padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line-card); box-shadow: 0 2px 10px rgba(20, 20, 19, .04); opacity: 0; transform: translateY(10px); transition: opacity .4s, transform .5s var(--an-ease); }
.an-ans.is-on { opacity: 1; transform: none; }
.an-ans p { font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.an-ans p b { color: var(--ink); font-weight: 650; background: linear-gradient(transparent 62%, #fff1c2 62%); }
.an-ans-foot { display: flex; gap: 8px; margin-top: 12px; }
.an-ans-foot span { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong); font-size: 12px; color: var(--ink-2); }
.an-input { display: flex; align-items: center; gap: 4px; margin: 12px; min-height: 46px; padding: 0 6px 0 14px; border: 1px solid var(--line-strong); border-radius: 12px; font-size: 14px; }
.an-input.is-focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 91, 216, .12); }
.an-input em { font-style: normal; color: var(--ph); }
.an-caret { width: 1.5px; height: 18px; background: var(--accent); opacity: 0; }
.an-input.is-focus .an-caret { animation: an-caret 1s steps(1) infinite; }
@keyframes an-caret { 50% { opacity: 1; } }
.an-send { margin-left: auto; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--chip); color: var(--ph); transition: background .2s, color .2s, transform .12s; flex: none; }
.an-send.is-ready { background: var(--ink); color: #fff; }
.an-send.is-press { transform: scale(.88); }

/* Мини-графики ответа */
.an-mini { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.an-mlg { display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); }
.an-mlg span { display: inline-flex; align-items: center; gap: 5px; }
.an-mlg i { width: 9px; height: 9px; border-radius: 3px; background: #c9c9c3; }
.an-mlg span:nth-child(2) i { background: var(--accent); }
.an-mr { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 2px 10px; align-items: center; font-size: 12px; }
.an-mr > span { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; grid-row: span 2; }
.an-mr.is-one > span { grid-row: auto; }
.an-mb { position: relative; display: flex; align-items: center; gap: 6px; }
.an-mb i { display: block; height: 8px; width: 0; border-radius: 4px; background: #c9c9c3; transition: width .9s var(--an-ease) var(--dl, 0s); }
.an-mb.is-b i { background: var(--accent); }
.an-mb.is-bad i { background: #e08a8a; }
.an-mb.is-good i { background: #3fb070; }
.an-mb b { font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .4s .6s; }
.an-mini.is-on .an-mb b { opacity: 1; }
.an-mb.is-hl b { color: var(--bad); }
.an-rent { position: absolute; top: -3px; bottom: -3px; border-left: 1.5px dashed var(--ink-2); }

/* ── Клубы сегодня ── */
.an-td-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 56px; align-items: end; }
.an-td-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.an-club { padding: 18px; border-radius: 16px; border: 1px solid var(--line-card); background: #fff; min-width: 0; }
.an-club-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.an-club-h b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-live-dot, .an-td-live i { width: 8px; height: 8px; border-radius: 50%; background: #22a35a; flex: none; animation: an-pulse 1.6s infinite; }
@keyframes an-pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 163, 90, .5); } 70% { box-shadow: 0 0 0 7px rgba(34, 163, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 163, 90, 0); } }
.an-club-n { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; }
.an-club-n > b { font-size: 40px; font-weight: 650; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.an-club-n > span { color: var(--muted); font-size: 14px; }
.an-club-n em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .3s; }
.an-club-n em.is-on { opacity: 1; }
.an-club-n em.is-up { color: var(--ok); } .an-club-n em.is-down { color: var(--muted); }
.an-club-load { margin-top: 12px; }
.an-club-load > div { height: 8px; border-radius: 999px; background: var(--chip); overflow: hidden; }
.an-club-load i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #22a35a, #f2b84b 70%, #e06464); background-size: 300px 100%; transition: width .8s var(--an-ease); }
.an-club-load span { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
.an-club-load b { color: var(--ink); font-variant-numeric: tabular-nums; }
.an-spark { display: block; width: 100%; height: 44px; margin-top: 10px; overflow: visible; }
.an-spark path.l { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.an-spark path.a { fill: rgba(47, 91, 216, .1); }
.an-club-rows { margin-top: 10px; border-top: 1px solid var(--row); }
.an-club-rows li { display: flex; align-items: center; gap: 8px; padding: 8px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.3; }
.an-club-rows li .i { color: var(--muted); }
.an-club-rows li b { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink); }
.an-club-rows li.is-ok .i { color: var(--ok); }
.an-club-rows li.is-warn { color: var(--warn); }
.an-club-rows li.is-warn .i { color: #c88a1c; }
.an-td-live { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--muted); }

/* ── Особенности: мини-виджеты ── */
.anf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.anf-card { border: 1px solid var(--line-card); border-radius: 16px; background: #fff; overflow: hidden; padding-bottom: 22px; }
.anf-flow { grid-column: span 2; }
.anf-card h3 { display: flex; align-items: center; gap: 8px; margin: 20px 20px 6px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.anf-card h3 .i { color: var(--accent); }
.anf-card > p { margin: 0 20px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.anf-vis {
    position: relative; height: 210px; padding: 18px; overflow: hidden; border-bottom: 1px solid var(--line); font-size: 13px;
    background-color: #fafaf9; background-image: radial-gradient(circle, #e0e0db 1px, transparent 1.3px); background-size: 16px 16px;
}
.anf .anf-vis *, .anf .anf-vis *::after { animation-play-state: paused; }
.anf.is-on .anf-vis *, .anf.is-on .anf-vis *::after { animation-play-state: running; }

/* Водопад */
.anf-wf { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; height: 100%; }
.anf-wc { display: flex; flex-direction: column; min-width: 0; }
.anf-wcol { position: relative; flex: 1; }
.anf-wcol i { position: absolute; left: 10%; right: 10%; bottom: var(--b); height: var(--h); border-radius: 5px; background: var(--c-base); transform: scaleY(0); transform-origin: bottom; transition: transform .8s var(--an-ease) var(--d); }
.anf-wc[data-k='up'] .anf-wcol i { background: #3fb070; }
.anf-wc[data-k='down'] .anf-wcol i { background: #e06464; transform-origin: top; }
.anf-wcol b { position: absolute; left: 0; right: 0; bottom: calc(var(--b) + var(--h) + 4px); text-align: center; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .4s calc(var(--d) + .6s); }
.anf-wc[data-k='up'] b { color: var(--ok); } .anf-wc[data-k='down'] b { color: var(--bad); }
.anf-wc > span { margin-top: 6px; text-align: center; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.anf.is-seen .anf-wcol i { transform: none; }
.anf.is-seen .anf-wcol b { opacity: 1; }

/* Ушедшие */
.anf-scroll { height: 174px; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent); }
.anf-scroll-in { display: flex; flex-direction: column; gap: 6px; animation: anf-up 18s linear infinite; }
@keyframes anf-up { to { transform: translateY(calc(-50% - 3px)); } }
.anf-gr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 8px; padding: 7px 10px; border-radius: 9px; background: #fff; border: 1px solid var(--line-card); }
.anf-gr b { font-weight: 600; }
.anf-gr small { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.anf-gr span { grid-column: 1 / -1; justify-self: start; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--chip); color: var(--ink-2); }
.anf-gr span[data-r='refund'] { background: var(--bad-soft); color: var(--bad); }
.anf-gr span[data-r='sub'] { background: var(--warn-soft); color: var(--warn); }
.anf-gr span[data-r='club'] { background: #eeebfc; color: #5b47c4; }

/* Сигналы риска */
.anf-risk .anf-vis { display: flex; flex-direction: column; gap: 7px; }
.anf-rr { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line-card); animation: anf-rr 6s var(--d) infinite; }
.anf-rr > i { width: 8px; height: 8px; border-radius: 50%; background: #e06464; flex: none; box-shadow: 0 0 0 3px #fbe3e3; }
.anf-rr div { min-width: 0; flex: 1; }
.anf-rr div { display: flex; align-items: baseline; gap: 8px; }
.anf-rr b { font-weight: 600; white-space: nowrap; }
.anf-rr small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.anf-rk { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; animation: anf-rk 6s var(--d) infinite; }
@keyframes anf-rr { 0%, 40% { transform: none; border-color: var(--line-card); } 48%, 90% { transform: translateX(6px); border-color: #c4e3cf; } 100% { transform: none; } }
@keyframes anf-rk { 0%, 42% { opacity: 0; transform: scale(.4); } 50%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.anf-to { align-self: flex-end; margin-top: auto; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 500; }

/* Воронка приложения */
.anf-app .anf-vis { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.anf-as { display: grid; grid-template-columns: 74px minmax(0, 1fr) 38px; align-items: center; gap: 8px; }
.anf-as span { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.anf-as > div { height: 22px; border-radius: 6px; background: #ecece8; overflow: hidden; }
.anf-as i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #6a4fd0, #9a85ea); transition: width 1s var(--an-ease) var(--d); }
.anf-as:last-child i { background: linear-gradient(90deg, #1f7a45, #3fb070); }
.anf-as b { text-align: right; font-variant-numeric: tabular-nums; }
.anf.is-seen .anf-as i { width: calc(var(--w) * 1%); }

/* План по клубам */
.anf-plan .anf-vis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; align-items: center; }
.anf-ring { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.anf-ring svg { width: 100%; max-width: 76px; transform: rotate(-90deg); }
.anf-ring .r-bg { fill: none; stroke: #ecece8; stroke-width: 7; }
.anf-ring .r-fg { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray 1.2s var(--an-ease) var(--d); }
.anf-ring[data-over='1'] .r-fg { stroke: #22a35a; }
.anf.is-seen .anf-ring .r-fg { stroke-dasharray: var(--p) 100; }
.anf-ring > b { position: absolute; top: 0; height: 76px; max-height: 100%; display: grid; place-items: center; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; width: 100%; }
.anf-ring span { margin-top: 6px; font-weight: 600; font-size: 12.5px; }
.anf-ring small { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Ночные снимки */
.anf-snap .anf-vis { display: flex; flex-direction: column; justify-content: center; gap: 14px; background-color: #1d2033; background-image: radial-gradient(circle, rgba(255, 255, 255, .12) 1px, transparent 1.3px); }
.anf-snap-t { display: flex; align-items: center; gap: 7px; color: #f2d78a; font-weight: 600; }
.anf-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.anf-days div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 9px 0; border-radius: 9px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.anf-days span { color: rgba(255, 255, 255, .7); font-size: 11.5px; }
.anf-days i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #22a35a; color: #fff; animation: anf-snap 4.2s var(--d) infinite both; }
@keyframes anf-snap { 0% { opacity: .15; transform: scale(.6); background: rgba(255, 255, 255, .2); } 12%, 100% { opacity: 1; transform: none; background: #22a35a; } }

/* Права */
.anf-acc .anf-vis { display: flex; flex-direction: column; justify-content: center; }
.anf-mx { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 5px; align-items: center; }
.anf-mx small { text-align: center; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.anf-mx b { font-size: 12px; padding-right: 4px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.anf-mx i { height: 30px; border-radius: 8px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line-card); color: var(--ph); animation: anf-mx 5s var(--d) infinite both; }
.anf-mx i[data-on='1'] { background: var(--ok-soft); border-color: #c4e3cf; color: var(--ok); }
@keyframes anf-mx { 0% { opacity: 0; transform: scale(.6); } 10%, 100% { opacity: 1; transform: none; } }
.anf-csv { position: absolute; right: 16px; bottom: 12px; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; font-size: 12px; font-weight: 600; color: var(--ink-2); }

@media (max-width: 1279px) {
    .an-grid { grid-template-columns: minmax(0, 1fr); }
    .an-ai { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .an-td-grid, .anf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .an-auto { display: none; }
}
@media (max-width: 767px) {
    .an-app { margin-top: 28px; border-radius: 14px; }
    .an-bar { padding: 0 10px 0 14px; }
    .an-crumbs > span, .an-crumbs > i { display: none; }
    .an-seg button { padding: 5px 9px; }
    .an-clubs { flex-wrap: nowrap; overflow-x: auto; padding: 10px 14px; scrollbar-width: none; }
    .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .an-kpis > div { padding: 12px 14px; }
    .an-kpis > div:nth-child(3) { border-left: 0; }
    .an-kpis > div:nth-child(n+3) { border-top: 1px solid var(--line); }
    .an-kpis b { font-size: 22px; }
    .an-grid { padding: 10px; gap: 10px; }
    .an-card { padding: 12px; }
    .an-svg { height: 190px; }
    .an-bars { gap: 2px; }
    .an-chat { height: 600px; }
    .an-qs button { font-size: 14px; padding: 11px 13px; }
    .an-td-head { grid-template-columns: minmax(0, 1fr); }
    .an-td-grid, .anf-grid { grid-template-columns: minmax(0, 1fr); }
    .an-td-grid { margin-top: 28px; }
    .anf-flow { grid-column: auto; }
    .anf-wf { gap: 6px; }
    .anf-wcol b { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
    .anf-vis *, .anf-vis *::after, .an-live-dot, .an-td-live i, .an-auto i { animation: none !important; }
    .anf-scroll-in { transform: none; }
}
.anf-flow .anf-vis { padding-top: 30px; }
