/* «План-факт продаж»: всё поверх общего app.css (как в «Качестве заполнения сделок» и «Лояльности») */
.frbs-apps-btn { border: 0; background: transparent; color: var(--ink-2); font-size: 13px; padding: 6px 10px; border-radius: 8px; display: inline-flex; align-items: center; gap: 7px; }
.frbs-apps-btn:hover { background: var(--chip-bg); color: var(--ink); }
.view { display: flex; flex-direction: column; gap: 20px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cols2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; }
select.input { appearance: auto; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick .tp-chip { cursor: pointer; }
.qrow { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.qrow-main { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.mlist { display: flex; flex-direction: column; }
.mline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.mline:first-child { border-top: 0; }
.addq { background: var(--chip-bg); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.top-aux { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.guide-link { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--info-ink); text-decoration: none; padding: 7px 14px 7px 10px; border-radius: 999px; white-space: nowrap; background: var(--accent-soft); border: 1px solid #b6e9f8; box-shadow: 0 1px 2px rgba(11,142,182,.08); }
.guide-link::before { content: '?'; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.guide-link:hover { background: #d3f3fd; border-color: var(--accent); }
.page-head.with-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; }
.page-head.with-actions > * { grid-column: 1; }
.page-head.with-actions > .page-actions { grid-column: 2; grid-row: 1 / span 3; align-self: start; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.role-strip { background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 9px 14px; font-size: 14px; }
.cta-chat { margin: 0; max-width: 820px; padding: 9px 12px 9px 10px; border-radius: 10px; color: #fff; background: linear-gradient(120deg, #4aa3ff 0%, #1269d3 100%); box-shadow: 0 3px 10px rgba(30,136,255,.2); }
.cta-main { display: flex; align-items: center; gap: 10px; }
.cta-ico { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 16px; line-height: 1; }
.cta-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13px; color: rgba(255,255,255,.92); }
.cta-title { font-size: 14px; font-weight: 600; color: #fff; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; }
.cta-free { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: #ffe066; color: #5c4400; border-radius: 5px; padding: 1px 6px; }
.cta-act { flex: none; display: flex; align-items: center; }
.btn.cta-btn { height: 30px; padding: 0 14px; background: #fff; color: #1265c7; border: 0; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
@media (max-width: 720px) { .page-head.with-actions { grid-template-columns: 1fr; } .page-head.with-actions > .page-actions { grid-column: 1; grid-row: auto; justify-content: flex-start; margin-top: 10px; } .cta-main { flex-wrap: wrap; } }
.money-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--info-bg); border-radius: 10px; padding: 12px 14px; }
.money-row b { font-weight: 600; }
.found { background: var(--info-bg); color: var(--info-ink); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
/* быстрый старт */
.onb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.onb-grid .tcard { min-height: 100px; gap: 6px; box-shadow: none; border: 1px solid var(--line-strong); }
.onb-grid .tcard[aria-pressed="true"] { border-color: var(--accent); background: var(--info-bg); box-shadow: inset 0 0 0 1px var(--accent); }
.onb-grid .tcard .tick { margin-left: auto; color: var(--accent); }
.onb-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; margin-right: 10px; }
.onb-foot { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
/* показатели */
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.mcard { display: flex; flex-direction: column; gap: 10px; }
.mcard .card-head { margin-bottom: 0; align-items: center; }
.mname { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.mname i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.mrule { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.mcard .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; }
.mnew { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: transparent; color: var(--link); font-weight: 500; min-height: 150px; }
.mnew:hover { border-color: var(--accent); background: var(--surface); }
.wz { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 20px; align-items: start; }
.wz-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.adv > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.adv > summary::-webkit-details-marker { display: none; }
.adv > summary h2::after { content: " ›"; color: var(--muted); display: inline-block; transition: transform .2s; }
.adv[open] > summary h2::after { transform: rotate(90deg); }
.adv-blk { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.adv-blk h3 { margin: 0; font-size: 15px; font-weight: 600; }
.rules { width: 100%; }
.rules td { border: 0; padding: 4px 8px 4px 0; vertical-align: middle; }
.rules td:first-child { width: 70px; font-weight: 600; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; border: 0; }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px currentColor; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check-row input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; }
.wz-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.summary .card { display: flex; flex-direction: column; gap: 10px; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpi-top b { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kpi-top b i { width: 10px; height: 10px; border-radius: 50%; }
.kpi-num { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.kpi-num .big { font-size: clamp(28px, 3vw, 38px); white-space: nowrap; }
.kpi-num .u { color: var(--muted); font-size: 17px; }
.kpi-num .pct { margin-left: auto; font-size: 20px; font-weight: 600; }
.formula { font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.formula b { color: var(--ink); font-weight: 600; }
table.sample { font-size: 13px; }
table.sample th, table.sample td { padding: 8px 10px; }
.sample .rec { font-weight: 500; white-space: nowrap; }
.sample .rec small, .person small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.sample .how { color: var(--muted); font-size: 12px; line-height: 1.45; }
.sample .how .m { color: var(--warn-ink); }
.sample tr.skip td { opacity: .45; }
.miss-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid rgba(138, 90, 0, .18); font-size: 13px; }
.miss-row:first-child { border-top: 0; }
.miss-row a { white-space: nowrap; font-weight: 500; text-decoration: none; }
/* дашборд */
.dfilters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dfilters select { width: auto; min-width: 170px; }
.dfilters .slice { margin-left: auto; font-size: 13px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; gap: 8px; }
.kfoot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.kfoot b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; margin-top: 3px; white-space: nowrap; }
.kfoot b.ok { color: var(--ok-ink); } .kfoot b.err { color: var(--err-ink); }
.dash2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.chart svg { width: 100%; display: block; }
.fc-big { font-size: 34px; font-weight: 600; line-height: 1; }
.person { display: flex; align-items: center; gap: 10px; }
.ava { width: 30px; height: 30px; border-radius: 50%; background: var(--info-bg); color: var(--info-ink); display: grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; }
table.team th.grp { text-align: center; border-left: 1px solid var(--line-strong); }
table.team td.gs, table.team th.gs { border-left: 1px solid var(--line); }
table.team tfoot td { font-weight: 600; background: var(--chip-bg); }
.ptiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.ptiles .tile { box-shadow: none; background: var(--chip-bg); }
dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(760px, 94vw); box-shadow: 0 20px 60px rgba(20, 24, 30, .25); color: var(--ink); }
dialog::backdrop { background: rgba(20, 24, 30, .35); }
.dlg { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
/* планы */
table.plans { min-width: 1500px; font-size: 13px; }
table.plans th, table.plans td { padding: 6px 6px; }
table.plans th:first-child, table.plans td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 190px; padding-left: 14px; }
table.plans thead th:first-child { background: var(--chip-bg); }
table.plans input { width: 100%; min-width: 108px; text-align: right; min-height: 32px; padding: 4px 6px; font-variant-numeric: tabular-nums; font-size: 13px; }
table.plans input.past { color: var(--muted); }
table.plans tr.dept td { background: var(--chip-bg); font-weight: 600; }
table.plans tr.dept td:first-child { background: var(--chip-bg); }
table.plans tfoot td { font-weight: 600; background: var(--chip-bg); }
table.plans tfoot td:first-child { background: var(--chip-bg); }
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.tool { background: var(--chip-bg); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.tool b { font-weight: 600; font-size: 14px; }
.tool .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tool .input { width: auto; flex: 1; min-width: 110px; }
table.plans2 { min-width: 560px; }
table.plans2 td, table.plans2 th { vertical-align: middle; }
table.plans2 th.num { text-align: right; }
.pcell { width: 240px; text-align: right; }
.pcell input { text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; }
.pcell small.split { color: var(--ink-2); }
.pcell small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; white-space: nowrap; }
table.plans2 tr.sub td { background: var(--chip-bg); font-weight: 600; }
table.plans2 tfoot td { font-weight: 600; background: var(--chip-bg); }
.plan-nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.savebar { position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 18px; font-size: 14px; color: var(--muted); }
.savebar.dirty { background: var(--warn-bg); color: var(--warn-ink); font-weight: 500; box-shadow: 0 6px 24px rgba(20,24,30,.14); }
.savebar .row { display: flex; gap: 8px; }
.save-st { font-size: 13px; color: var(--ok-ink); background: var(--ok-bg); border-radius: 6px; padding: 3px 9px; }
.save-st.flash { animation: flash .8s; }
@keyframes flash { from { background: var(--cta); } }
.plan-nav h2 { min-width: 200px; text-align: center; }
.plan-help { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 14px 18px; font-size: 14px; color: var(--ink-2); }
/* настройки */
.vis-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 8px 14px; align-items: center; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--strong); color: var(--on-strong); padding: 11px 18px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 50; }
.toast.show { opacity: 1; }
@media (max-width: 1050px) { .wz, .dash2, .two-col { grid-template-columns: minmax(0, 1fr); } .summary { position: static; } }
@media (max-width: 640px) { .cols2, .list-grid { grid-template-columns: minmax(0, 1fr); } .kfoot { grid-template-columns: 1fr 1fr; } .vis-row { grid-template-columns: 1fr; } .dfilters select { min-width: 0; flex: 1; } }
@media (prefers-reduced-motion: reduce) { .toast, .bar i { transition: none; } }
.toast.bad { background: var(--err-ink); }
.note { border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.note.err { background: var(--err-bg); color: var(--err-ink); }
.note.ok { background: var(--ok-bg); color: var(--ok-ink); }
.err-line { color: var(--err-ink); font-size: 13px; }
.sync-line { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
