/* --- Числовые поля: свои кнопки вместо стрелок браузера ---------------------------
   Стрелки браузера прячутся у всех числовых полей; «−» и «+» дорисовывает num-step.js.
   Цвета — из темы (--accent, --accent-tint), так что в каждой теме свои. 16.10.2026. */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.nstep { position: relative; display: inline-flex; align-items: stretch; vertical-align: middle; min-width: 0; }
.nstep > input { padding-left: 30px !important; padding-right: 30px !important; text-align: center !important;
  font-variant-numeric: tabular-nums; }
.nstep__b {
  position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0; padding: 0; border: 0;
  display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  background: var(--accent-tint); color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
  transition: background .14s, color .14s, box-shadow .14s, transform .1s;
}
.nstep__b--minus { left: 5px; }
.nstep__b--plus { right: 5px; }
.nstep__b svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nstep__b:hover { background: var(--accent); color: #fff; box-shadow: 0 4px 10px -4px color-mix(in srgb, var(--accent) 70%, transparent); }
.nstep__b:active { transform: scale(.88); }
.nstep:has(input:disabled) .nstep__b { opacity: .35; pointer-events: none; }

/* Где поле стоит в колонке сетки фиксированной ширины, колонку расширяем на кнопки,
   и правила вида «input + подпись» переносим на обёртку. */
.planedit__row:has(.nstep) { grid-template-columns: minmax(0, 1fr) 150px; }
.planedit__row .nstep:has(input.is-wrong) + .planedit__fact { color: var(--alert); }
