/* ============================================================
   styles.css — ЗМК Мегаполис Финансовая модель v4.0
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f7fa;
  color: #1a202c;
  font-size: 14px;
  line-height: 1.5;
}

/* --- Sticky top --- */
.sticky-top {
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* --- Header --- */
header {
  background: linear-gradient(135deg, #1e3a5f, #2c5282);
  color: #fff;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.header-content { flex: 1; }
header h1 { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
header .subtitle { font-size: 12px; color: #bee3f8; }

/* --- Глобальные параметры --- */
.global-params {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
}
.global-params label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #bee3f8;
}
.global-params input {
  width: 54px;
  padding: 3px 5px;
  border: 1px solid #63b3ed;
  border-radius: 4px;
  background: #ebf8ff;
  color: #1a202c;
  font-size: 12px;
  text-align: center;
}

/* --- Сценарий --- */
.scenario-switch {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.scenario-btn {
  padding: 6px 16px;
  border: 2px solid #63b3ed;
  border-radius: 6px;
  background: transparent;
  color: #bee3f8;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
}
.scenario-btn.active {
  background: #ebf8ff;
  color: #1e3a5f;
  border-color: #ebf8ff;
}
.scenario-btn:hover:not(.active) {
  background: rgba(255,255,255,0.1);
}

/* --- Метрики --- */
.metrics-bar {
  background: #fff;
  border-bottom: 2px solid #e2e8f0;
  padding: 10px 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.metric-card {
  flex: 1;
  min-width: 160px;
  background: #f7fafc;
  border-radius: 8px;
  padding: 8px 14px;
  border-left: 4px solid #2c5282;
}
.metric-card .label {
  font-size: 10px;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.metric-card .value {
  font-size: 20px;
  font-weight: 700;
  margin-top: 2px;
}
.metric-card .value.positive { color: #16a34a; }
.metric-card .value.negative { color: #dc2626; }
.metric-card .value.neutral { color: #1a202c; }

/* --- Навигация (табы) --- */
.nav-bar {
  background: #fff;
  padding: 0 24px;
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e2e8f0;
  overflow-x: auto;
}
.nav-tab {
  padding: 10px 18px;
  border: none;
  background: transparent;
  color: #718096;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}
.nav-tab:hover { color: #2c5282; }
.nav-tab.active {
  color: #2c5282;
  border-bottom-color: #2c5282;
}
.nav-tab.disabled {
  color: #cbd5e0;
  cursor: default;
}

/* --- Основной контент --- */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 24px;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* --- Секции --- */
section {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  margin-bottom: 16px;
  overflow: hidden;
}
.section-header {
  background: #edf2f7;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
}
.section-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: #2c5282;
}
.section-body {
  padding: 12px 16px;
  overflow-x: auto;
}

/* --- Таблицы --- */
table { width: 100%; border-collapse: collapse; }
th {
  background: #edf2f7;
  color: #4a5568;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 6px 8px;
  text-align: center;
  white-space: nowrap;
  border-bottom: 2px solid #e2e8f0;
}
td {
  padding: 5px 8px;
  text-align: center;
  border-bottom: 1px solid #edf2f7;
}
td:first-child { text-align: left; }
tr:hover td { background: #f7fafc; }

/* --- Инпуты --- */
input[type=number], input[type=text], select {
  padding: 5px 8px;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
}
input[type=number] {
  text-align: right;
  width: 100%;
}
input[type=text] {
  text-align: left;
  width: 100%;
}
select {
  text-align: left;
  width: 100%;
}
input:focus, select:focus {
  outline: none;
  border-color: #4299e1;
  box-shadow: 0 0 0 2px rgba(66,153,225,0.2);
}

/* --- Кнопки --- */
.btn {
  padding: 5px 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-primary { background: #2c5282; color: #fff; }
.btn-primary:hover { background: #1e3a5f; }
.btn-danger { background: #fed7d7; color: #c53030; }
.btn-danger:hover { background: #feb2b2; }
.btn-sm { padding: 2px 8px; font-size: 12px; }

/* --- Авто-значения --- */
.auto-val {
  font-weight: 600;
  color: #2c5282;
  white-space: nowrap;
}
.fixed-val {
  background: #edf2f7;
  color: #4a5568;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 5px 8px;
  text-align: right;
  font-size: 13px;
}

/* --- Итоговая строка --- */
.total-row td {
  background: #edf2f7;
  font-weight: 700;
  border-top: 2px solid #cbd5e0;
}

/* --- Режимы (радио-группа как табы) --- */
.mode-switch {
  display: flex;
  gap: 4px;
  margin: 8px 0;
}
.mode-switch label {
  padding: 5px 14px;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #4a5568;
  transition: all 0.15s;
  user-select: none;
}
.mode-switch input[type=radio] { display: none; }
.mode-switch input[type=radio]:checked + label {
  background: #2c5282;
  color: #fff;
  border-color: #2c5282;
}

/* --- Подсказки --- */
.hint {
  font-size: 11px;
  color: #718096;
  margin-top: 4px;
}

/* --- Два столбца --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
}

/* --- ФОТ detail --- */
.fot-detail {
  font-size: 11px;
  color: #718096;
  line-height: 1.4;
  padding: 8px 12px;
  background: #f7fafc;
  border-radius: 4px;
  margin-top: 8px;
}
.fot-detail span { margin-right: 12px; }

/* --- Fund bar (ИТР) --- */
.fund-bar {
  background: #f7fafc;
  border: 2px solid #e2e8f0;
  border-left: 5px solid #2c5282;
  border-radius: 8px;
  padding: 14px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.fund-bar-main {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.fund-bar-label {
  font-size: 11px;
  font-weight: 700;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.fund-bar-value {
  font-size: 24px;
  font-weight: 700;
  color: #2c5282;
}
.fund-bar-hint {
  font-size: 11px;
  color: #a0aec0;
}
.fund-bar-detail {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #4a5568;
  align-items: center;
  flex-wrap: wrap;
}
.fund-bar-usage {
  color: #2d3748;
}
.fund-bar-usage.over-limit {
  color: #dc2626;
  font-weight: 600;
}

/* --- Info-box --- */
.info-box {
  background: #ebf8ff;
  border-left: 4px solid #4299e1;
  padding: 8px 12px;
  border-radius: 0 4px 4px 0;
  font-size: 12px;
  color: #2a4365;
  margin: 8px 0;
}

/* --- Summary card --- */
.summary-card {
  background: linear-gradient(135deg, #ebf4ff, #f7fafc);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid #bee3f8;
}
.summary-card h3 {
  font-size: 14px;
  color: #2c5282;
  margin-bottom: 10px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 13px;
}
.summary-row.total {
  border-top: 2px solid #bee3f8;
  margin-top: 6px;
  padding-top: 6px;
  font-weight: 700;
  font-size: 15px;
}
.summary-val { font-weight: 600; font-variant-numeric: tabular-nums; }

/* --- P&L таблица --- */
.pnl-table { border-collapse: collapse; }
.pnl-table td { padding: 6px 12px; }
.pnl-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; min-width: 140px; }
.pnl-header td {
  background: #e2e8f0;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #2d3748;
  padding: 8px 12px;
}
.pnl-item td { font-size: 13px; color: #4a5568; }
.pnl-item td:first-child { padding-left: 20px; }
.pnl-subtotal td {
  font-weight: 700;
  font-size: 13px;
  border-top: 1px solid #cbd5e0;
  background: #f7fafc;
}
.pnl-big td {
  font-size: 18px;
  font-weight: 800;
  padding: 10px 12px;
}
.pnl-big.positive td { color: #16a34a; background: #f0fff4; }
.pnl-big.negative td { color: #dc2626; background: #fff5f5; }

/* --- Таблица мотивации --- */
.motiv-table { border-collapse: collapse; }
.motiv-table th {
  background: #edf2f7;
  padding: 6px 10px;
  font-size: 11px;
}
.motiv-table td {
  padding: 5px 10px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.motiv-table td:not(:first-child) { text-align: right; }
.motiv-table .total-row td { background: #edf2f7; font-weight: 700; border-top: 2px solid #cbd5e0; }

/* ============================================================
   Order Card Layout
   ============================================================ */
.order-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: box-shadow 0.15s;
}
.order-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf2f7;
}
.order-card-number { font-size: 15px; font-weight: 700; color: #2c5282; }

.order-collapse-btn {
  background: none;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  padding: 2px 10px;
  cursor: pointer;
  font-size: 12px;
  color: #718096;
  transition: all 0.15s;
}
.order-collapse-btn:hover { background: #edf2f7; color: #2d3748; }

.order-card--collapsed .order-section,
.order-card--collapsed .order-card-top { display: none; }
.order-card--collapsed .order-card-header { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.order-card--collapsed .order-card-footer { margin-top: 8px; border-top: none; padding-top: 0; }

.order-card-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.order-field { display: flex; flex-direction: column; gap: 4px; }
.order-field-label {
  font-size: 11px;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.order-processing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin: 8px 0;
}
.order-proc-field { display: flex; flex-direction: column; gap: 2px; }
.order-proc-label { font-size: 11px; color: #718096; }
.order-proc-field input { width: 100%; }

.order-section {
  margin: 12px 0;
  padding: 10px;
  background: #f7fafc;
  border-radius: 6px;
  border: 1px solid #edf2f7;
}
.order-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.order-section-summary {
  margin-top: 8px;
  font-size: 13px;
  color: #4a5568;
  padding-top: 6px;
  border-top: 1px solid #e2e8f0;
}

.order-peripheral-header {
  display: grid;
  grid-template-columns: 28px 1fr 110px 110px 100px;
  gap: 8px;
  font-size: 11px;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 4px;
}
.order-peripheral-row {
  display: grid;
  grid-template-columns: 28px 1fr 110px 110px 100px;
  gap: 8px;
  align-items: center;
  padding: 3px 0;
  font-size: 13px;
}
.order-peripheral-row.disabled { opacity: 0.45; }
.order-peripheral-row input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; }
.order-peripheral-row input[type=number] { width: 100%; }
.periph-label { font-weight: 500; color: #2d3748; }

.order-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 2px solid #e2e8f0;
  font-size: 13px;
  color: #4a5568;
}
.order-card-footer strong { font-size: 14px; }

.orders-summary-toggle {
  background: #edf2f7;
  color: #4a5568;
  border: 1px solid #cbd5e0;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.orders-summary-toggle.active { background: #2c5282; color: #fff; border-color: #2c5282; }

@media (max-width: 700px) {
  .order-card-top { grid-template-columns: 1fr; }
  .order-peripheral-header, .order-peripheral-row {
    grid-template-columns: 24px 1fr 80px 80px 70px;
    gap: 4px;
  }
  .order-processing-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
}

/* --- Справочные таблицы (Комиссии) --- */
.ref-table {
  border-collapse: collapse;
  font-size: 12px;
  margin: 4px 0;
}
.ref-table th {
  background: #edf2f7;
  padding: 4px 10px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #4a5568;
  border-bottom: 2px solid #e2e8f0;
}
.ref-table td {
  padding: 3px 10px;
  border-bottom: 1px solid #edf2f7;
  font-variant-numeric: tabular-nums;
}
.ref-table tr.ref-active td {
  background: #ebf8ff;
  font-weight: 700;
  color: #2c5282;
}

/* --- Комиссии: блоки --- */
.comm-block {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.comm-block h3 {
  font-size: 14px;
  color: #2c5282;
  margin-bottom: 8px;
}
.comm-total {
  font-size: 16px;
  font-weight: 700;
  color: #2c5282;
  margin-bottom: 4px;
}
.comm-formula {
  font-size: 11px;
  color: #718096;
  margin-bottom: 8px;
}
.comm-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: #4a5568;
  padding: 8px 12px;
  background: #fff;
  border-radius: 4px;
  border: 1px solid #edf2f7;
}

/* --- Login Overlay --- */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #1e3a5f, #2c5282);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-box {
  background: #fff;
  border-radius: 12px;
  padding: 40px 36px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  max-width: 360px;
  width: 90%;
}
.login-box h2 {
  font-size: 20px;
  color: #1e3a5f;
  margin-bottom: 6px;
}
.login-box p {
  font-size: 13px;
  color: #718096;
  margin-bottom: 20px;
}
.login-box input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #cbd5e0;
  border-radius: 6px;
  font-size: 15px;
  text-align: center;
  margin-bottom: 12px;
}
.login-box input:focus {
  outline: none;
  border-color: #2c5282;
  box-shadow: 0 0 0 3px rgba(44,82,130,0.2);
}
.login-box .btn {
  width: 100%;
  padding: 10px;
  font-size: 15px;
}
.login-error {
  color: #dc2626;
  font-size: 13px;
  margin-top: 10px;
  font-weight: 600;
}

/* --- Modal Overlay --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-box {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  max-width: 480px;
  width: 92%;
  max-height: 80vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #e2e8f0;
}
.modal-header h3 {
  font-size: 16px;
  color: #1e3a5f;
}
.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #718096;
  padding: 0 4px;
}
.modal-close:hover { color: #1a202c; }
.modal-body {
  padding: 16px 20px;
}

/* --- Persistence buttons --- */
.persistence-btns {
  display: flex;
  gap: 4px;
}
.persist-btn {
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
  color: #bee3f8;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}
.persist-btn:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.persist-btn--danger:hover {
  background: rgba(220,38,38,0.3);
  color: #fed7d7;
}

/* --- Slot list in modal --- */
.slot-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #edf2f7;
}
.slot-item:last-child { border-bottom: none; }
.slot-info { flex: 1; }
.slot-name { font-weight: 600; color: #1a202c; font-size: 14px; }
.slot-date { font-size: 11px; color: #718096; }
.slot-actions { display: flex; gap: 6px; }

/* --- Save form in modal --- */
.save-form { display: flex; flex-direction: column; gap: 10px; }
.save-form input {
  padding: 8px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  font-size: 14px;
}
.save-form .btn { align-self: flex-start; }

/* ============================================================
   MOBILE RESPONSIVE (< 768px)
   ============================================================ */
@media (max-width: 768px) {

  /* --- Убрать sticky на мобильном — шапка скроллится вместе с контентом --- */
  .sticky-top {
    position: relative;
    box-shadow: none;
  }

  /* --- Header: компактный --- */
  header {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 10px;
    gap: 6px;
  }
  header h1 { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  header .subtitle { display: none; }

  .global-params {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
    margin-top: 4px;
  }
  .global-params label { font-size: 10px; white-space: nowrap; }
  .global-params input { width: 40px; font-size: 11px; padding: 2px 4px; }

  header > div:last-child {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between;
    gap: 6px !important;
  }
  .scenario-switch { margin-left: 0; gap: 4px; }
  .scenario-btn { padding: 3px 8px; font-size: 11px; }

  .persistence-btns { gap: 3px; }
  .persist-btn { font-size: 9px; padding: 2px 6px; }

  /* --- Метрики: 2×2 сетка, компактные --- */
  .metrics-bar {
    padding: 6px 8px;
    gap: 6px;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .metric-card {
    min-width: unset;
    padding: 4px 8px;
    border-left-width: 3px;
  }
  .metric-card .label { font-size: 8px; }
  .metric-card .value { font-size: 14px; }

  /* --- Навигация: компактные табы, скролл --- */
  .nav-bar {
    padding: 0 6px;
    -webkit-overflow-scrolling: touch;
  }
  .nav-tab {
    padding: 6px 8px;
    font-size: 11px;
  }

  /* --- Основной контент --- */
  main {
    padding: 8px;
  }

  /* --- Секции --- */
  .section-header {
    padding: 8px 10px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .section-header h2 { font-size: 13px; }
  .section-body {
    padding: 8px 10px;
  }

  /* --- Таблицы: уменьшить шрифт, горизонтальный скролл --- */
  th { font-size: 10px; padding: 4px 5px; }
  td { padding: 4px 5px; font-size: 12px; }
  input[type=number], input[type=text], select { font-size: 12px; padding: 4px 6px; }

  /* --- P&L таблица --- */
  .pnl-table td { padding: 4px 6px; font-size: 12px; }
  .pnl-table td:last-child { min-width: 100px; }
  .pnl-header td { font-size: 10px; padding: 6px; }
  .pnl-item td { font-size: 12px; }
  .pnl-item td:first-child { padding-left: 10px; }
  .pnl-big td { font-size: 15px; padding: 8px 6px; }

  /* --- Fund bar --- */
  .fund-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 12px;
  }
  .fund-bar-main { flex-wrap: wrap; gap: 6px; }
  .fund-bar-value { font-size: 20px; }
  .fund-bar-detail { font-size: 11px; flex-direction: column; gap: 4px; }

  /* --- Summary cards --- */
  .summary-card { padding: 10px; }
  .summary-card h3 { font-size: 12px; }
  .summary-row { font-size: 12px; }
  .summary-row.total { font-size: 13px; }

  /* --- Карточки заказов --- */
  .order-card { padding: 10px; margin-bottom: 10px; }
  .order-card-top {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .order-processing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .order-peripheral-header,
  .order-peripheral-row {
    grid-template-columns: 24px 1fr 80px 80px;
    gap: 4px;
    font-size: 11px;
  }
  /* Скрыть колонку "экономия" на мобильном */
  .order-peripheral-header > :nth-child(5),
  .order-peripheral-row > :nth-child(5) { display: none; }

  .order-card-footer {
    gap: 8px;
    font-size: 12px;
    flex-direction: column;
  }
  .order-card-footer strong { font-size: 12px; }

  /* --- Комиссии: справочники --- */
  .ref-table { font-size: 11px; }
  .ref-table th { font-size: 9px; padding: 3px 6px; }
  .ref-table td { padding: 2px 6px; }

  /* --- Info box --- */
  .info-box { font-size: 11px; padding: 6px 8px; }

  /* --- FOT detail --- */
  .fot-detail { font-size: 10px; padding: 6px 8px; }
  .fot-detail span { margin-right: 8px; display: inline-block; }

  /* --- Two-col always single --- */
  .two-col { grid-template-columns: 1fr !important; }

  /* --- Motiv table --- */
  .motiv-table th { font-size: 10px; padding: 4px 6px; }
  .motiv-table td { font-size: 11px; padding: 4px 6px; }

  /* --- Mode switch --- */
  .mode-switch { flex-wrap: wrap; }
  .mode-switch label { font-size: 11px; padding: 4px 10px; }

  /* --- Comm blocks --- */
  .comm-block { padding: 8px 10px; }
  .comm-total { font-size: 14px; }
}
