/* «Оформленные продажи» и компактное меню (15.10.2026), к sales-plus.js */
#cards .sp-cmp{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;margin:2px 0 4px;font-size:12px}
#cards .sp-cmp .kpi-delta{margin:0}
#cards .sp-cmp small{color:var(--muted)}
.sp-d{font-weight:600;white-space:nowrap}.sp-d.up{color:var(--good,#3fbf7f)}.sp-d.down{color:var(--bad,#e05252)}
#cards .card .value small{font-size:13px;color:var(--muted);font-weight:500}
#cards .sp-click{cursor:pointer}
#forecastCards.sp-no-cancel .cancellation-card{display:none}
#forecastCards.sp-no-cancel.cols-3{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.sp-signals{display:flex;flex-direction:column;gap:6px;margin:10px 0}
.sp-sig{padding:8px 12px;border-radius:8px;border:1px solid var(--line,#354153);font-size:13px;border-left-width:4px}
.sp-sig.bad{border-left-color:var(--bad,#e05252);background:color-mix(in srgb,var(--bad,#e05252) 8%,transparent)}
.sp-sig.warn{border-left-color:var(--warn,#d8a33a);background:color-mix(in srgb,var(--warn,#d8a33a) 8%,transparent)}
.sp-sig.good{border-left-color:var(--good,#3fbf7f);background:color-mix(in srgb,var(--good,#3fbf7f) 8%,transparent)}
.sp-sig.info{border-left-color:var(--muted,#8d9cb0)}
.sp-panel{margin-top:14px}
.sp-panel h3{margin:0 0 10px;font-size:16px}.sp-panel h4{margin:10px 0 6px;font-size:13px}
.sp-grid2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:18px}
.sp-t{border-collapse:collapse;width:100%;font-size:13px}
.sp-t th,.sp-t td{padding:5px 8px;border-bottom:1px solid var(--line-soft,#2a3443);text-align:right;vertical-align:top}
.sp-t th:first-child,.sp-t td:first-child,.sp-t td.sp-l{text-align:left}
.sp-t th{font-size:11px;color:var(--muted);font-weight:600}
.sp-dyn th[data-sp-sort]{cursor:pointer;user-select:none}.sp-dyn th.asc::after{content:' ▲'}.sp-dyn th.desc::after{content:' ▼'}
.sp-movers ol{margin:0;padding-left:18px;font-size:13px}.sp-movers li{margin:3px 0;display:flex;flex-wrap:wrap;gap:4px 8px;align-items:baseline}
.sp-movers li .sp-d{margin-left:auto}
.sp-mut{color:var(--muted)}.sp-bad{color:var(--bad,#e05252);font-weight:600}
.sp-plan{margin-top:12px;padding-top:10px;border-top:1px solid var(--line-soft,#2a3443)}
.sp-bar{height:10px;border-radius:5px;background:var(--line-soft,#2a3443);overflow:hidden;max-width:640px}
.sp-bar i{display:block;height:100%;background:var(--good,#3fbf7f)}
.sp-plan-edit{display:inline-flex;gap:6px;align-items:center;font-size:12px;color:var(--muted);margin-top:6px}
.sp-plan-edit input{width:140px}
.sp-dyn-bar{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;margin-bottom:8px}
.sp-dyn-bar input{min-width:260px;min-height:32px}
.sp-map-toggle{margin:6px 0 10px}
#dashboardSalesMapPanel.sp-map-collapsed>*:not(h2):not(h3):not(.sp-map-toggle){display:none!important}
#dashboard details>summary{font-size:12px;color:var(--muted)}
/* Компактное меню разделов на компьютере: одна-две строки вместо четырёх рядов плиток */
@media(min-width:701px){
  nav{display:flex!important;flex-wrap:wrap!important;gap:4px!important;padding:6px!important}
  nav .nav-group{display:contents!important}
  nav .nav-group>small{display:none!important}
  nav button{flex:0 0 auto!important;width:auto!important;min-height:30px!important;height:auto!important;padding:4px 10px!important;font-size:12px!important;line-height:1.2!important}
}
@media(max-width:700px){
  .sp-grid2{grid-template-columns:1fr}
  .sp-dyn-bar input{min-width:0;width:100%}
  .sp-filters{margin:6px 0 10px}.sp-filters>summary{font-size:13px;color:var(--text);padding:8px 10px;border:1px solid var(--line,#354153);border-radius:8px}
  #mobileRefreshHint{display:none}
  .sp-t{font-size:12px}.sp-t th,.sp-t td{padding:4px 5px}
}

/* Телефон (15.10.2026, по просьбе владельца): карточки показателей и прогноза друг под другом во всю ширину, компактные */
@media(max-width:700px){
  #dashboard #cards,#dashboard #forecastCards,#dashboard #forecastCards.sp-no-cancel.cols-3{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
  #dashboard #forecastCards .card{width:auto!important;min-width:0!important}
  #dashboard #cards .card{padding:10px 10px 8px!important;min-height:0!important}
  #dashboard #cards .card .value{font-size:20px!important;line-height:1.2!important}
  #dashboard #cards .card .label{font-size:11px!important}
  #dashboard #cards .card details{display:none}
  #dashboard #cards .sp-cmp{font-size:11px}
  #dashboard #cards .card>.kpi-delta.na{display:none}
}
/* Свёрнутые панели внизу страницы продаж: виден только заголовок, нажатие раскрывает */
.sp-collapsible>h3{cursor:pointer;user-select:none;margin-bottom:0!important}
.sp-collapsible>h3::before{content:'▸ ';color:var(--muted)}
.sp-collapsible.sp-open>h3{margin-bottom:10px!important}
.sp-collapsible.sp-open>h3::before{content:'▾ '}
.sp-collapsible:not(.sp-open)>*:not(h3){display:none!important}
/* Телефон, «Сводка» (15.10.2026, владелец): раскрыта и симметрична — две одинаковые плитки рядом */
@media(max-width:700px){
  #mobileOverview[open] #mobileOverviewValue{display:none!important}
  html #mobileQuickNav,html.theme-light #mobileQuickNav{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;align-items:stretch!important;margin:10px 0 4px!important}
  html #mobileQuickNav>button,html.theme-light #mobileQuickNav>button,html #mobileQuickNav>button.mobile-orders,html.theme-light #mobileQuickNav .mobile-orders{min-height:0!important;height:100%!important;width:100%!important;padding:12px 12px 10px!important;display:flex!important;flex-direction:column!important;justify-content:flex-start!important;align-items:stretch!important;text-align:left!important;border-radius:14px!important;gap:0!important;font-size:14px!important}
  html #mobileQuickNav>button:first-child small{font-size:14px!important;display:flex!important;flex-direction:column!important;margin:0!important;color:var(--text)!important}
  html #mobileQuickNav>button:first-child small>span:first-child,html #mobileQuickNav button.mobile-orders>span:first-child{font-size:11px!important;font-weight:700!important;letter-spacing:.06em!important;text-transform:uppercase!important;color:var(--muted)!important;margin:0 0 8px!important;line-height:1.2!important}
  html #mobileQuickNav>button:first-child small .mobile-revenue-value{font-size:clamp(21px,6.6vw,30px)!important;line-height:1.1!important;margin:0 0 8px!important;white-space:nowrap!important;color:var(--text)!important}
  html #mobileQuickNav .mobile-sales-secondary{font-size:12px!important;margin:4px 0 0!important;line-height:1.25!important;color:var(--muted)!important;font-weight:600!important}
  html #mobileQuickNav .mobile-order-line{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:1px!important;min-height:0!important;margin:0!important;padding:5px 0!important;font-size:11px!important;line-height:1.2!important;font-weight:600!important}
  html #mobileQuickNav .mobile-order-line+.mobile-order-line{border-top:1px solid var(--line-soft,rgba(120,145,175,.22))!important;padding-top:5px!important}
  html #mobileQuickNav .mobile-order-line strong{font-size:13px!important;text-align:left!important;white-space:nowrap!important}
  html #mobileQuickNav .mobile-order-line .mo-n{font-size:20px!important;font-weight:800!important}
  html #mobileQuickNav .mobile-order-line .mo-u{font-size:11px!important;font-weight:600!important;color:var(--muted)!important}
}@media(max-width:700px){
  html #mobileQuickNav .mobile-order-line[style*="display:none"],html #mobileQuickNav .mobile-order-line[style*="display: none"]{display:none!important}
  html #mobileQuickNav .mo-extra{display:flex!important;flex-direction:column!important;margin-top:auto!important;padding-top:8px!important;border-top:1px solid var(--line-soft,rgba(120,145,175,.22))!important}
  html #mobileQuickNav .mo-row{display:flex!important;flex-direction:column!important;padding:4px 0!important;font-size:11px!important;line-height:1.2!important}
  html #mobileQuickNav .mo-row i{font-style:normal!important;color:var(--muted)!important;font-weight:600!important}
  html #mobileQuickNav .mo-row b{font-size:14px!important;color:var(--text)!important;font-weight:800!important;white-space:nowrap!important}
}
/* Телефон, «Сводка» (15.10.2026, владелец): плитки друг под другом и крупнее */
@media(max-width:700px){
  html #mobileQuickNav,html.theme-light #mobileQuickNav{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
  html #mobileQuickNav>button,html.theme-light #mobileQuickNav>button,html #mobileQuickNav>button.mobile-orders,html.theme-light #mobileQuickNav .mobile-orders{padding:16px 18px 14px!important;height:auto!important}
  html #mobileQuickNav>button:first-child small>span:first-child,html #mobileQuickNav button.mobile-orders>span:first-child{font-size:13px!important;margin-bottom:10px!important}
  html #mobileQuickNav>button:first-child small .mobile-revenue-value{font-size:clamp(34px,11vw,48px)!important;margin-bottom:10px!important}
  html #mobileQuickNav .mobile-sales-secondary{font-size:15px!important}
  html #mobileQuickNav .mo-extra{margin-top:10px!important;padding-top:10px!important}
  html #mobileQuickNav .mo-row{flex-direction:row!important;justify-content:space-between!important;align-items:baseline!important;gap:10px!important;padding:6px 0!important;font-size:14px!important}
  html #mobileQuickNav .mo-row b{font-size:18px!important}
  html #mobileQuickNav .mobile-order-line{flex-direction:row!important;justify-content:space-between!important;align-items:center!important;padding:10px 0!important;font-size:16px!important}
  html #mobileQuickNav .mobile-order-line+.mobile-order-line{padding-top:10px!important}
  html #mobileQuickNav .mobile-order-line strong{text-align:right!important}
  html #mobileQuickNav .mobile-order-line .mo-n{font-size:30px!important}
  html #mobileQuickNav .mobile-order-line .mo-u{font-size:13px!important}
}
/* Телефон, «Сводка» (15.10.2026, владелец): мелко «месяц назад» под каждой цифрой; плитка заказов — три цветные ячейки */
@media(max-width:700px){
  html #mobileQuickNav #mobileSalesOrdersValue{display:none!important}
  html #mobileQuickNav .mo-rev-was{display:block!important;margin:-4px 0 10px!important}
  html #mobileQuickNav .mo-was{display:block!important;width:100%!important;font-size:12px!important;font-weight:600!important;color:var(--muted)!important;text-align:right!important;margin-top:2px!important}
  html #mobileQuickNav .mo-rev-was .mo-was{text-align:left!important;font-size:13px!important}
  html #mobileQuickNav .mo-row{flex-wrap:wrap!important}
  html #mobileQuickNav .mo-row+.mo-row{border-top:1px dashed var(--line-soft,rgba(120,145,175,.22))!important}
  html #mobileQuickNav button.mobile-orders,html.theme-light #mobileQuickNav .mobile-orders{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;align-content:start!important}
  html #mobileQuickNav button.mobile-orders>span:first-child{grid-column:1/-1!important;margin-bottom:2px!important}
  html #mobileQuickNav .mobile-order-line,html #mobileQuickNav .mobile-order-line+.mobile-order-line{display:flex!important;flex-direction:column-reverse!important;align-items:center!important;justify-content:flex-end!important;text-align:center!important;gap:6px!important;padding:12px 6px 10px!important;margin:0!important;border:1px solid var(--line-soft,rgba(120,145,175,.22))!important;border-top:4px solid var(--muted)!important;border-radius:12px!important;background:var(--bg,#fff)!important;font-size:12px!important;line-height:1.2!important;font-weight:700!important;color:var(--muted)!important;min-height:0!important}
  html #mobileQuickNav .mobile-order-line.not-packed{border-top-color:var(--bad,#e05252)!important}
  html #mobileQuickNav .mobile-order-line.not-packed-current{border-top-color:#9aa5b1!important}
  html #mobileQuickNav .mobile-order-line.packed{border-top-color:var(--warn,#d8a33a)!important}
  html #mobileQuickNav .mobile-order-line.overdue-24h{grid-column:1/-1!important;border-top-color:#ff4747!important}
  html #mobileQuickNav .mobile-order-line strong{display:flex!important;flex-direction:column!important;align-items:center!important;text-align:center!important}
  html #mobileQuickNav .mobile-order-line .mo-n{font-size:34px!important;line-height:1!important}
  html #mobileQuickNav .mobile-order-line .mo-u{font-size:11px!important;margin-top:3px!important}
}
@media(max-width:700px){
  html #mobileQuickNav .mobile-order-line[style*="display:none"],html #mobileQuickNav .mobile-order-line[style*="display: none"],html #mobileQuickNav .mobile-order-line+.mobile-order-line[style*="display:none"],html #mobileQuickNav .mobile-order-line+.mobile-order-line[style*="display: none"]{display:none!important}
  html #mobileQuickNav>button:first-child small .mo-was,html #mobileQuickNav .mo-was{color:var(--muted)!important;font-size:12px!important;font-weight:600!important}
  html #mobileQuickNav .mo-was .sp-d{font-weight:800!important;white-space:nowrap!important}
  html #mobileQuickNav .sp-d.up{color:var(--good,#236b49)!important}html #mobileQuickNav .sp-d.down{color:var(--bad,#a63d32)!important}
}
/* 15.10.2026 (владелец): карточки показателей читаемее — крупное значение, сравнение двумя частями
   (цветной бейдж изменения + серое «месяц назад: …»). Откат: git-тег backup-before-cards-readable-20261015. */
#cards .sp-cmp{display:flex;flex-direction:column;gap:4px}
#cards .sp-cmp-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px}
#cards .sp-cmp-row .sp-d{font-size:14px;font-weight:800;padding:1px 8px;border-radius:10px;background:color-mix(in srgb,currentColor 12%,transparent)}
#cards .sp-prev{font-size:13px;color:var(--muted);font-weight:500}
@media(max-width:700px){
  #dashboard #cards .card{padding:14px 16px 12px!important}
  #dashboard #cards .card .label{font-size:13px!important;font-weight:700!important;letter-spacing:.05em!important}
  #dashboard #cards .card .value{font-size:32px!important;font-weight:800!important;line-height:1.15!important;margin:4px 0 6px!important}
  #dashboard #cards .card .value small{font-size:16px!important}
  #dashboard #cards .sp-cmp-row .sp-d{font-size:15px!important}
  #dashboard #cards .sp-prev{font-size:14px!important}
}
/* 15.10.2026 (владелец): плитки «Сводки» в цветах карточек показателей. Откат: тег backup-before-overview-colors-20261015 */
@media(max-width:700px){
  html.theme-light #mobileQuickNav>button,html.theme-light #mobileQuickNav>button.mobile-orders,html.theme-light #mobileQuickNav .mobile-orders{border:1px solid rgb(78,77,77)!important;border-left:1px solid rgb(78,77,77)!important;border-radius:22px!important}
  html.theme-light #mobileQuickNav>button:first-child{background:radial-gradient(circle at 0% 0%,rgb(203,215,246) 0%,rgb(220,228,250) 36%,rgb(246,243,241) 78%)!important}
  html.theme-light #mobileQuickNav>button.mobile-orders{background:radial-gradient(circle at 0% 0%,rgb(244,207,157) 0%,rgb(247,223,189) 36%,rgb(246,243,241) 78%)!important}
  html.theme-light #mobileQuickNav .mobile-order-line,html.theme-light #mobileQuickNav .mobile-order-line+.mobile-order-line{background:rgba(255,255,255,.72)!important}
  html #mobileQuickNav .mo-was .sp-d,html #mobileQuickNav .mo-rev-was .sp-d{padding:1px 8px!important;border-radius:10px!important;background:color-mix(in srgb,currentColor 12%,transparent)!important;margin-left:4px!important}
  html.theme-light #mobileQuickNav .mo-row+.mo-row{border-top-color:rgba(78,77,77,.18)!important}
  html.theme-light #mobileQuickNav .mo-extra{border-top-color:rgba(78,77,77,.2)!important}
}