/* ARS-X 3.5 — филиал и юрлицо в шапке, нижняя панель на телефоне, экраны «Юрлица и филиалы» и «Приложение на телефоне». */
.arsx35-ctx { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; }
.arsx35-ctx span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arsx35-ctx .ico { width: 16px; height: 16px; }
.arsx35-ctx-modal { width: min(460px, 100%); }
.arsx35-ctx-modal .field small { display: block; margin-top: 4px; }
.arsx35-ctx-modal .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.arsx35-tabbar { display: none; }
@media (max-width: 760px) {
  .arsx35-tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--surface); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(16, 24, 40, .06); }
  .arsx35-tabbar button { display: grid; justify-items: center; gap: 2px; background: none; border: 0; color: var(--muted); font: inherit; font-size: 11px;
    padding: 6px 2px; border-radius: 10px; min-height: 48px; cursor: pointer; }
  .arsx35-tabbar button .ico { width: 22px; height: 22px; }
  .arsx35-tabbar button.active { color: var(--brand); background: var(--nav-hover, transparent); font-weight: 600; }
  .shell .content { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .arsx35-ctx span { display: none; }
  .arsx35-ctx { padding-left: 9px; padding-right: 9px; }
  /* крупнее элементы для пальца */
  .btn, button.btn, .icon-btn { min-height: 40px; }
  input, select, textarea { font-size: 16px; } /* iPhone не увеличивает страницу при вводе */
  .table-wrap, .next-root table { overflow-x: auto; }
}
@media (display-mode: standalone) { .topbar { padding-top: max(8px, env(safe-area-inset-top)); } }

/* экраны 3.5 */
.ent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ent-card { display: grid; gap: 8px; align-content: start; }
.ent-card h3 { margin: 0; font-size: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ent-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; font-size: 13.5px; }
.ent-card dt { color: var(--muted); }
.ent-card dd { margin: 0; word-break: break-word; }
.ent-card .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.ent-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 14px; }
.ent-form .wide { grid-column: 1 / -1; }
.ent-summary { overflow-x: auto; }
.ent-summary table { width: 100%; border-collapse: collapse; }
.ent-summary th, .ent-summary td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.ent-summary .num { text-align: right; font-variant-numeric: tabular-nums; }
.ent-summary tfoot td { font-weight: 700; border-bottom: 0; }
.ent-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; max-height: 260px; overflow: auto; padding: 4px 0; }
.ent-members label { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.mobile-steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.mobile-steps ol { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.mobile-status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.next-modal.size-md { width: min(760px, 100%); }
.next-modal input[type=checkbox] { width: auto; min-height: 0; flex: 0 0 auto; margin: 0; }
.ent-members label, .ent-form label.check { display: flex; gap: 8px; align-items: center; justify-content: flex-start; }
