.commercial-workspace { min-width:0; color:var(--ds-text); }
.commercial-workspace *, .commercial-workspace *::before, .commercial-workspace *::after { box-sizing:border-box; }
.commercial-workspace .commercial-heading { margin-block-end:var(--ds-space-4); }
.commercial-workspace .commercial-heading h1 { margin-block:0 var(--ds-space-2); }
.commercial-workspace .commercial-muted { color:var(--ds-text-muted); }
.commercial-workspace .commercial-views { display:flex; flex-wrap:wrap; gap:var(--ds-space-2); margin-block-end:var(--ds-space-5); }
.commercial-workspace .commercial-views a { text-decoration:none; }
.commercial-workspace .commercial-views a[aria-current="page"] { color:var(--ds-accent); background:var(--ds-accent-soft); border-color:var(--ds-accent); }
.commercial-workspace .commercial-controls { padding:var(--ds-space-4); margin-block-end:var(--ds-space-5); background:var(--ds-surface); border:1px solid var(--ds-border); border-radius:var(--ds-radius-panel); }
.commercial-workspace .commercial-filters { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr)); gap:var(--ds-space-3); align-items:end; margin:0; }
.commercial-workspace .commercial-filters label { display:grid; gap:var(--ds-space-1); min-width:0; }
.commercial-workspace .commercial-filters input, .commercial-workspace .commercial-filters select { width:100%; min-width:0; }
.commercial-workspace .commercial-actions { display:flex; flex-wrap:wrap; gap:var(--ds-space-2); margin-block-end:var(--ds-space-3); }
.commercial-workspace .commercial-error { color:var(--ds-danger); grid-column:1/-1; margin:0; }
.commercial-workspace .commercial-calendar { display:grid; gap:var(--ds-space-5); }
.commercial-workspace .commercial-day { display:grid; grid-template-columns:155px minmax(0,1fr); gap:var(--ds-space-4); padding-block-end:var(--ds-space-5); border-block-end:1px solid var(--ds-border); }
.commercial-workspace .commercial-day > h2 { margin:var(--ds-space-2) 0; font-size:var(--ds-h2-size); }
.commercial-workspace .commercial-day-events { display:grid; gap:var(--ds-space-2); min-width:0; }
.commercial-workspace .commercial-event { display:grid; grid-template-columns:145px minmax(0,1fr) auto; gap:var(--ds-space-4); padding:var(--ds-space-4); align-items:start; }
.commercial-workspace .commercial-event-time { display:grid; justify-items:start; gap:var(--ds-space-2); font-variant-numeric:tabular-nums; }
.commercial-workspace .commercial-event-body { min-width:0; overflow-wrap:anywhere; }
.commercial-workspace .commercial-event h3 { margin:0; font-size:var(--ds-body-size); }
.commercial-workspace .commercial-event p { margin:var(--ds-space-1) 0 0; }
.commercial-workspace .commercial-next { padding-block-start:var(--ds-space-1); }
.commercial-workspace .commercial-undated { margin-block-start:var(--ds-space-5); }
.commercial-workspace .commercial-undated .commercial-event { margin-block-start:var(--ds-space-2); }
.commercial-workspace .commercial-dealers { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); gap:var(--ds-space-4); }
.commercial-workspace .commercial-dealer { padding:var(--ds-space-4); }
.commercial-workspace .commercial-dealer h2 { margin-block-start:0; }
.commercial-workspace .commercial-team-table { min-width:790px; }
.commercial-workspace .commercial-team-table small { display:block; margin-block-start:var(--ds-space-1); color:var(--ds-text-muted); font-weight:var(--ds-body-weight); }
.commercial-workspace .commercial-pagination { display:flex; align-items:center; flex-wrap:wrap; gap:var(--ds-space-3); margin-block-start:var(--ds-space-4); }
.commercial-workspace .commercial-content { min-width:0; }
.commercial-workspace .commercial-content > details { margin-block-start:0; }
.commercial-workspace .commercial-content > details > summary { font-size:var(--ds-h2-size); }
@media (max-width:900px) {
  .commercial-workspace .commercial-day { grid-template-columns:1fr; gap:var(--ds-space-2); }
  .commercial-workspace .commercial-event { grid-template-columns:130px minmax(0,1fr); }
  .commercial-workspace .commercial-event > button { grid-column:2; justify-self:start; }
}
@media (max-width:520px) {
  .commercial-workspace .commercial-views { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .commercial-workspace .commercial-views a { min-height:var(--ds-control-height-touch); text-align:center; overflow-wrap:anywhere; }
  .commercial-workspace .commercial-event { grid-template-columns:1fr; gap:var(--ds-space-3); }
  .commercial-workspace .commercial-event-time { display:flex; align-items:center; flex-wrap:wrap; }
  .commercial-workspace .commercial-event > button { grid-column:1; min-height:var(--ds-control-height-touch); }
  .commercial-workspace .commercial-filters { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion:reduce) {
  .commercial-workspace *, .commercial-workspace *::before, .commercial-workspace *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}

/* Streamlined Commercial Director Kit Revenue Plan */
.commercial-plan-card { gap:var(--ds-space-4); }
.commercial-plan-header { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:var(--ds-space-3); }
.commercial-plan-title-group { display:grid; gap:var(--ds-space-1); min-width:0; flex:1 1 260px; }
.commercial-plan-title-group .ds-help { margin:0; }
.commercial-plan-month-nav { display:inline-flex; flex-wrap:wrap; align-items:center; gap:var(--ds-space-2); }
.commercial-plan-month-label { min-width:9.5rem; text-align:center; font-weight:600; font-size:var(--ds-body-size); color:var(--ds-text); font-variant-numeric:tabular-nums; }
.commercial-plan-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,185px),1fr)); gap:var(--ds-space-3); }
.commercial-plan-kpi { display:grid; gap:var(--ds-space-1); padding:var(--ds-space-3) var(--ds-space-4); border:1px solid var(--ds-border); border-radius:var(--ds-radius-panel); background:var(--ds-surface-soft); min-width:0; }
.commercial-plan-kpi-label { font-size:var(--ds-caption-size); font-weight:600; color:var(--ds-text-muted); }
.commercial-plan-kpi-value { font-size:var(--ds-h2-size); line-height:1.2; font-weight:700; color:var(--ds-text); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.commercial-plan-kpi-sub { font-size:var(--ds-caption-size); color:var(--ds-text-muted); }
.commercial-plan-meter { width:100%; height:6px; border:0; border-radius:999px; overflow:hidden; background:var(--ds-border); accent-color:var(--ds-accent); appearance:none; }
.commercial-plan-meter::-webkit-progress-bar { background:var(--ds-border); border-radius:999px; }
.commercial-plan-meter::-webkit-progress-value { background:var(--ds-accent); border-radius:999px; }
.commercial-plan-meter::-moz-progress-bar { background:var(--ds-accent); border-radius:999px; }
.commercial-plan-meter--met { accent-color:var(--ds-success); }
.commercial-plan-meter--met::-webkit-progress-value { background:var(--ds-success); }
.commercial-plan-meter--met::-moz-progress-bar { background:var(--ds-success); }
.commercial-plan-meter--row { width:4.5rem; height:5px; }
.commercial-plan-filters { border:1px solid var(--ds-border); border-radius:var(--ds-radius-control); background:var(--ds-surface-soft); padding:var(--ds-space-2) var(--ds-space-3); }
.commercial-plan-filters > summary { cursor:pointer; display:flex; align-items:center; flex-wrap:wrap; gap:var(--ds-space-2); font-size:var(--ds-label-size); font-weight:600; color:var(--ds-text-muted); list-style:none; }
.commercial-plan-filters > summary::-webkit-details-marker { display:none; }
.commercial-plan-filters > summary::before { content:"▸"; font-size:var(--ds-caption-size); transition:transform .12s ease; }
.commercial-plan-filters[open] > summary::before { transform:rotate(90deg); }
.commercial-plan-filters-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr)); gap:var(--ds-space-3); align-items:end; margin-block-start:var(--ds-space-3); }
.commercial-plan-filters-grid label { display:grid; gap:var(--ds-space-1); margin:0; min-width:0; }
.commercial-plan-filters-actions { display:flex; flex-wrap:wrap; gap:var(--ds-space-2); margin-block-start:var(--ds-space-3); }
.commercial-plan-table .commercial-plan-input { width:10.5rem; max-width:100%; text-align:right; font-variant-numeric:tabular-nums; margin-inline-start:auto; }
.commercial-plan-kit-cell { display:flex; align-items:center; flex-wrap:wrap; gap:var(--ds-space-2); }
.commercial-plan-progress-cell { display:inline-flex; align-items:center; justify-content:flex-end; gap:var(--ds-space-2); }
.commercial-plan-table tfoot td { background:var(--ds-surface-soft); border-block-start:2px solid var(--ds-border); font-weight:600; }
.commercial-plan-actions { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:var(--ds-space-3); }
.commercial-plan-secondary { padding:var(--ds-space-3) var(--ds-space-4); }
.commercial-plan-secondary > summary { cursor:pointer; font-weight:600; color:var(--ds-text); }
.commercial-plan-extra-actions { display:flex; align-items:flex-start; flex-wrap:wrap; gap:var(--ds-space-3); }

/* Two-Channel Sales-Structure Plan (БОКС / Розница + ДИЛЕРЫ) */
.commercial-sales-grid { display:grid; grid-template-columns:1fr; gap:var(--ds-space-4); }
.commercial-sales-channel { border:1px solid var(--ds-border); border-radius:var(--ds-radius-panel); background:var(--ds-surface); overflow:hidden; min-width:0; }
.commercial-sales-channel-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--ds-space-2); padding:var(--ds-space-3) var(--ds-space-4); border-block-end:1px solid var(--ds-border); }
.commercial-sales-channel-head--retail { background:var(--ds-success-soft); }
.commercial-sales-channel-head--dealer { background:var(--ds-danger-soft); }
.commercial-sales-channel-title { display:flex; align-items:center; flex-wrap:wrap; gap:var(--ds-space-2); margin:0; font-size:var(--ds-h3-size, var(--ds-body-size)); font-weight:700; color:var(--ds-text); }
.commercial-sales-table-wrap { border:0; border-radius:0; }
.commercial-sales-table .commercial-sales-total-row td { background:var(--ds-surface-soft); font-weight:700; border-block-end:2px solid var(--ds-border); }
.commercial-sales-input-orders { width:5.5rem; max-width:100%; text-align:right; font-variant-numeric:tabular-nums; margin-inline-start:auto; }
.commercial-sales-input-money { width:8.5rem; max-width:100%; text-align:right; font-variant-numeric:tabular-nums; margin-inline-start:auto; }
.commercial-sales-fact-cell { display:grid; justify-items:end; gap:2px; font-variant-numeric:tabular-nums; }
.commercial-sales-fact-meta { font-size:var(--ds-caption-size); color:var(--ds-text-muted); }

/* Executive Financial Summary Strip & Visual Plan-vs-Fact SVG Charts */
.commercial-fin-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:var(--ds-space-3); }
.commercial-fin-card { display:grid; gap:var(--ds-space-1); align-content:start; padding:var(--ds-space-3) var(--ds-space-4); border:1px solid var(--ds-border); border-radius:var(--ds-radius-panel); background:var(--ds-surface); min-width:0; }
.commercial-fin-value { font-size:1.1rem; line-height:1.25; font-weight:700; color:var(--ds-text); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.commercial-pf-visual { display:grid; gap:var(--ds-space-4); padding:var(--ds-space-4); border:1px solid var(--ds-border); border-radius:var(--ds-radius-panel); background:var(--ds-surface-soft); }
.commercial-pf-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--ds-space-3); }
.commercial-pf-title-wrap { display:grid; gap:var(--ds-space-1); }
.commercial-pf-title { margin:0; font-size:var(--ds-body-size); font-weight:700; color:var(--ds-text); }
.commercial-pf-legend { display:flex; flex-wrap:wrap; gap:var(--ds-space-3); font-size:var(--ds-caption-size); color:var(--ds-text-muted); }
.commercial-pf-legend-item { display:inline-flex; align-items:center; gap:var(--ds-space-1); }
.commercial-pf-swatch { display:inline-block; width:0.75rem; height:0.45rem; border-radius:999px; }
.commercial-pf-swatch--plan { background:var(--ds-text-muted); opacity:0.55; }
.commercial-pf-swatch--fact { background:var(--ds-accent); }
.commercial-pf-swatch--met { background:var(--ds-success); }
.commercial-pf-scopes { display:inline-flex; flex-wrap:wrap; gap:var(--ds-space-1); padding:3px; border:1px solid var(--ds-border); border-radius:var(--ds-radius-control); background:var(--ds-surface); }
.commercial-pf-scope-btn { min-height:2rem; padding:var(--ds-space-1) var(--ds-space-3); border:1px solid transparent; border-radius:var(--ds-radius-control); background:transparent; color:var(--ds-text-muted); font-size:var(--ds-caption-size); font-weight:600; cursor:pointer; }
.commercial-pf-scope-btn.is-active { border-color:var(--ds-accent); background:var(--ds-accent-soft); color:var(--ds-accent); }
.commercial-pf-grid { display:grid; grid-template-columns:minmax(0,0.9fr) minmax(0,1.25fr); gap:var(--ds-space-4); }
.commercial-pf-panel { display:grid; gap:var(--ds-space-3); align-content:start; padding:var(--ds-space-3) var(--ds-space-4); border:1px solid var(--ds-border); border-radius:var(--ds-radius-control); background:var(--ds-surface); min-width:0; }
.commercial-pf-panel-title { margin:0; font-size:var(--ds-label-size); font-weight:700; color:var(--ds-text); }
.commercial-pf-rows { display:grid; gap:var(--ds-space-3); }
.commercial-pf-row { display:grid; gap:4px; }
.commercial-pf-row--total { padding-block-start:var(--ds-space-2); border-block-start:1px solid var(--ds-border); }
.commercial-pf-row-top { display:flex; align-items:center; justify-content:space-between; gap:var(--ds-space-2); font-size:var(--ds-label-size); }
.commercial-pf-row-label { display:inline-flex; align-items:baseline; flex-wrap:wrap; gap:var(--ds-space-2); min-width:0; }
.commercial-pf-share { font-size:var(--ds-caption-size); color:var(--ds-text-muted); font-variant-numeric:tabular-nums; }
.commercial-pf-svg { display:block; width:100%; height:20px; }
.commercial-pf-track { fill:var(--ds-surface-soft); stroke:var(--ds-border); stroke-width:0.5; }
.commercial-pf-bar-plan { fill:var(--ds-text-muted); opacity:0.55; }
.commercial-pf-bar-fact { fill:var(--ds-accent); }
.commercial-pf-bar-met { fill:var(--ds-success); }
.commercial-pf-row-meta { display:flex; flex-wrap:wrap; justify-content:space-between; gap:var(--ds-space-2); font-size:var(--ds-caption-size); color:var(--ds-text-muted); font-variant-numeric:tabular-nums; }

@media (max-width:1050px) {
  .commercial-fin-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .commercial-pf-grid { grid-template-columns:1fr; }
}
@media (max-width:640px) {
  .commercial-fin-strip { grid-template-columns:1fr; }
  .commercial-plan-month-nav { width:100%; justify-content:space-between; }
  .commercial-plan-table .commercial-plan-input { width:8.5rem; }
  .commercial-sales-input-orders { width:4.5rem; }
  .commercial-sales-input-money { width:7.2rem; }
  .commercial-plan-meter--row { display:none; }
}
