/* GEN-26 (ТЗ 2026-11, этап 6): телефон байера, 390×844. Грузится последним — после glass.css.
   · нижняя панель «Сегодня · Пульт · Консоль · Комментарии · поиск» (templates/ui/tabbar.html);
   · поля ввода — 16 px: меньше — iPhone приближает страницу при фокусе;
   · цели касания — не меньше 44 px (кнопки, вкладки, пункты меню, отметки строк);
   · «Связки» — компактные строки вместо карточки на весь экран; Консоль, Кабинеты, Фармы — строки карточками
     (.ui-table--stack, подписи ячеек — из заголовков колонок, ui.js). */

.shell-tabbar { display:none; }

@media (max-width:640px) {
  /* нижняя панель */
  .shell-tabbar { display:flex; position:fixed; left:0; right:0; bottom:0; z-index:28; justify-content:space-around; align-items:stretch;
    padding:4px 4px calc(4px + env(safe-area-inset-bottom, 0px)); background:var(--surface-solid, var(--surface)); border-top:1px solid var(--border);
    box-shadow:0 -6px 18px rgba(0, 0, 0, .12); }
  .shell-tabbar__item { flex:1 1 0; min-width:0; min-height:48px; display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:2px; padding:4px 2px; border:0; border-radius:var(--radius); background:none; color:var(--muted); text-decoration:none;
    font:500 11px/1.1 var(--font); cursor:pointer; }
  .shell-tabbar__item span { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .shell-tabbar__item .icon { width:20px; height:20px; }
  .shell-tabbar__item.is-active { color:var(--accent); }
  .shell-tabbar__item:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
  .shell-main .container { padding-bottom:calc(72px + env(safe-area-inset-bottom, 0px)); }
  .ui-bulkbar { bottom:calc(64px + env(safe-area-inset-bottom, 0px)); }      /* панель действий — над нижней панелью */

  /* поля ввода — 16 px, иначе iOS приближает страницу */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea, .ui-input, .ui-select { font-size:16px !important; }
  .ui-input, .ui-select { min-height:44px; }

  /* цели касания — 44 px */
  [data-skin] :is(.ui-btn, .ui-btn--sm, .btn, .btn-sm), .ui-tab, .ui-menu__item, .nav-link, .ui-chip a,
  .shell-top .ui-icon-btn { min-height:44px; }                              /* [data-skin] — сильнее правил стекла */
  .ui-icon-btn { min-width:44px; min-height:44px; }
  .ui-btn--sm { padding-left:12px; padding-right:12px; }
  .ui-toggle { min-height:44px; }
  td.con-check, th.con-check, td.inf-check, th.inf-check { min-width:44px; }
  .con-check input[type="checkbox"], .inf-check input[type="checkbox"], .acc-check, .row-check, .farm-check { width:22px; height:22px; }

  /* строки карточками: отметка — в правом верхнем углу карточки, меню действий — внизу справа; второстепенные
     колонки (.m-hide) — только на широком экране; длинные названия переносятся, а не уезжают за карточку */
  .ui-table--stack tr { position:relative; }
  .ui-table--stack td { height:auto; min-height:0; white-space:normal; overflow-wrap:anywhere; padding:4px 0; }
  .ui-table--stack td > * { min-width:0; }
  .ui-table--stack .m-hide { display:none !important; }
  .ui-table--stack td.con-check, .ui-table--stack td.inf-check { position:absolute; top:4px; right:4px; width:auto; padding:0; display:flex;
    align-items:center; justify-content:center; min-height:44px; }
  .ui-table--stack td.con-check::before, .ui-table--stack td.inf-check::before { content:none; }
  [data-skin] .ui-table--stack td.is-sticky-end { position:static; justify-content:flex-end; background:none; box-shadow:none; }
  .ui-table--stack td.m-title { display:block; text-align:left; font-size:15px; }   /* название — заголовок карточки */
  .ui-table--stack td.m-title::before { content:none; }
  .ui-table--stack td.is-sticky-end::before { content:none; }
  .ui-table--stack td:nth-child(2) { padding-right:48px; }                 /* название не под отметкой */
  .ui-table--stack .con-status { justify-content:flex-end; flex-wrap:wrap; }

  /* «Связки»: компактная строка — светофор и название, под ними расход · профит · ROI и CPL · апрув */
  .pv-board tr { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:4px 10px; padding:8px 10px; }
  .pv-board td { display:block; padding:0; text-align:left; font-size:13px; }
  .pv-board td::before { display:block; font-size:11px; line-height:1.2; }
  .pv-board td:nth-child(1) { grid-column:1 / -1; order:-2; }
  .pv-board td:nth-child(1)::before { content:none; }
  .pv-board td:nth-child(2) { grid-column:1 / -1; order:-1; font-weight:600; }
  .pv-board td:nth-child(2)::before { content:none; }
  .pv-board td:nth-child(7), .pv-board td:nth-child(8) { grid-column:span 1; }
  .pv-board td:nth-child(5), .pv-board td:nth-child(9) { display:none; }    /* искорка и «ждут статуса» — на странице связки */
  .pv-board td:nth-child(10), .pv-board td:nth-child(11) { grid-column:1 / -1; }
  .pv-board td:nth-child(10):empty, .pv-board td:nth-child(11):empty { display:none; }
}
