/* План продаж. Одна таблица на экран, числа выровнены по разряду,
   главное сравнение — колонка «Выполнение»: красная от −10%, зелёная от 0. */

.pl-toolbar { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; margin-bottom: 10px; }
.pl-months, .pl-stores { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-note { font-size: 12.5px; color: var(--text-muted); margin: 0 0 12px; line-height: 1.45; }
.rfm-card .pl-note { margin: 10px 0 0; }

.pl-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.pl-tile { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.pl-tile span { font-size: 12px; color: var(--text-muted); }
.pl-tile b { font-size: 20px; font-variant-numeric: tabular-nums; }
.pl-tile small { font-size: 12px; color: var(--text-secondary); }
.pl-tile--main { border-color: var(--green); box-shadow: inset 3px 0 0 var(--green); }

.pl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.pl-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pl-view { display: flex; gap: 4px; margin-right: 8px; }
.pl-status { font-size: 12.5px; margin-top: 2px; }
.pl-hint { font-size: 12.5px; background: var(--orange-light); border-left: 3px solid var(--orange); padding: 6px 10px; margin-bottom: 10px; }

.pl-scroll { overflow-x: auto; }
.pl-tbl { width: 100%; table-layout: auto; font-variant-numeric: tabular-nums; }
.pl-tbl th, .pl-tbl td { white-space: nowrap; overflow: visible; text-overflow: clip; padding-left: 9px; padding-right: 9px; }
.pl-tbl th { white-space: normal; vertical-align: bottom; line-height: 1.25; }
.pl-tbl th small, .pl-tbl td small { display: block; font-size: 10.5px; color: var(--text-muted); font-weight: 400; }
.pl-tbl tr.pl-row { cursor: pointer; }
.pl-tbl tr.pl-total td { font-weight: 700; border-top: 2px solid var(--text-primary); }
.pl-tbl tr.pl-sub td { font-size: 12.5px; color: var(--text-secondary); background: var(--bg-stripe); }
.pl-tbl tr.pl-sub td:first-child { padding-left: 34px; }
.pl-tbl tr.pl-div td { background: var(--orange-light); }
.pl-tog { border: 0; background: none; cursor: pointer; width: 20px; color: var(--text-muted); padding: 0; }
.pl-flag { display: inline-block; width: 15px; height: 15px; line-height: 15px; text-align: center; border-radius: 50%; background: var(--orange); color: #fff; font-size: 10px; font-weight: 700; }
.pl-buy { display: inline !important; color: var(--orange) !important; }
.pl-link { color: var(--blue); cursor: pointer; text-decoration: underline dotted; }
.pl-muted { color: var(--text-muted); }
.pl-good, .pl-tbl td.pl-good, .pl-tile small.pl-good { color: var(--green); }
.pl-bad, .pl-tbl td.pl-bad, .pl-tile small.pl-bad { color: var(--red); }

.pl-state { font-size: 12.5px; white-space: normal !important; }
.pl-state--calc { color: var(--orange); }
.pl-state--answered { color: var(--blue); }
.pl-state--approved { color: var(--green); }

.pl-edit { min-width: 120px; }
.pl-in { width: 90px; text-align: right; padding: 3px 6px; border: 1px solid var(--border); border-radius: 4px; font: inherit; }
.pl-in:focus { border-color: var(--border-focus); outline: none; }
.pl-why { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.pl-why[hidden] { display: none; }
.pl-why select, .pl-why input { font: inherit; font-size: 12px; padding: 2px 4px; border: 1px solid var(--border); border-radius: 4px; }

.modal:has(.pl-card) { width: min(720px, 94vw); max-width: none; }
.pl-card { width: 100%; table-layout: auto; margin-bottom: 12px; }
.pl-card th, .pl-card td { overflow: visible; text-overflow: clip; }
.pl-calc { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; line-height: 1.45; }
.pl-warn { background: var(--orange-light); border-left: 3px solid var(--orange); padding: 6px 10px; }

.pl-logcard { margin-top: 12px; }
.pl-log { font-size: 12.5px; color: var(--text-secondary); padding: 3px 0; border-bottom: 1px solid var(--border); }

@media (max-width: 760px) {
  .pl-tile b { font-size: 17px; }
  .pl-head { flex-direction: column; }
}

/* Три плашки расчёта (12.11): крупная цифра, под ней арифметика, ниже —
   что значит каждый множитель. Третья — план, выделена. */
.pl-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.pl-how__t { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.pl-how__t--plan { border-color: var(--green); box-shadow: inset 4px 0 0 var(--green); }
.pl-how__h { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.pl-how__big { font-size: 30px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pl-how__eq { font-size: 14px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.pl-how__s { font-size: 12px; color: var(--text-muted); line-height: 1.4; margin-top: auto; }
.pl-drag { background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--orange); border-radius: 8px;
  padding: 10px 14px; margin-bottom: 12px; font-size: 14px; line-height: 1.5; }
.pl-tiles--small .pl-tile b { font-size: 17px; }
.pl-howwrap { margin-top: 12px; }
.pl-howwrap summary { cursor: pointer; font-size: 13px; color: var(--blue); margin-bottom: 10px; }
@media (max-width: 900px) {
  .pl-how { grid-template-columns: 1fr; }
  .pl-how__big { font-size: 24px; }
}
