/* Hub «К»: уведомления + план на день — в стиле shell-модалок zootech */

/* —— Размер модалки «План на день» —— */
.modal.wesp-shell-modal .modal-dialog.modal-dialog--shell-plan {
  max-width: min(1240px, calc(100vw - 2rem));
}

/* —— Размер модалки «Уведомления» —— */
.modal.wesp-shell-modal .modal-dialog.modal-dialog--shell-notify {
  max-width: min(680px, calc(100vw - 1.5rem));
}

.modal.wesp-shell-modal.zt-k-hub--notify .modal-content.wesp-shell-bsmodal {
  max-height: min(92vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal.wesp-shell-modal.zt-k-hub--notify .zt-k-hub-modal__header {
  flex-shrink: 0;
}

.modal.wesp-shell-modal.zt-k-hub--notify .zt-k-hub-modal__body {
  flex: 1;
  min-height: 0;
  max-height: none;
  min-height: 280px;
}

.modal.wesp-shell-modal.zt-k-hub--plan .modal-content.wesp-shell-bsmodal {
  max-height: min(94vh, 900px);
  padding: 1.15rem 1.35rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.modal.wesp-shell-modal.zt-k-hub--plan .zt-k-hub-modal__header {
  flex-shrink: 0;
}

.zt-k-hub-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.zt-k-hub-modal__header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.zt-k-hub-modal__header-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.zt-k-hub-modal__title {
  margin: 0;
}

.zt-k-hub-modal__back {
  border: none;
  background: transparent;
  color: var(--primary-color, #2196f3);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.25rem 0.35rem;
  cursor: pointer;
}

.zt-k-hub-modal__body {
  min-height: 160px;
  max-height: min(52vh, 380px);
  overflow: auto;
}

.zt-k-hub-modal__body--plan {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.zt-k-hub-plan-mount {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* —— Hub-карточки (как zt-notify-item / zt-card) —— */
.zt-k-hub__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

@media (min-width: 420px) {
  .zt-k-hub__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.zt-k-hub-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.85rem;
  box-shadow: none;
}

.zt-k-hub-card.zt-card {
  background: var(--surface-muted, #f2f5f9);
  border-color: var(--border-light, #e2e8f0);
}

.zt-k-hub-card.zt-card--interactive:hover {
  background: var(--surface, #fff);
  box-shadow: none;
  border-color: rgba(var(--primary-rgb, 33, 150, 243), 0.35);
}

.zt-k-hub-card__icon {
  flex-shrink: 0;
  width: 1.75rem;
  margin-top: 0.1rem;
  color: var(--muted, #64748b);
  font-size: 0.95rem;
  line-height: 1;
}

.zt-k-hub-card__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.zt-k-hub-card__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text, #1e293b);
  margin: 0;
}

.zt-k-hub-card__desc {
  font-size: 0.75rem;
  color: var(--muted, #64748b);
  line-height: 1.35;
}

/* —— План на день —— */
.zt-k-hub-plan {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.zt-k-hub-plan__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.zt-k-hub-plan__field {
  flex: 1 1 160px;
  min-width: 0;
  max-width: 220px;
}

.zt-k-hub-plan__field .form-label {
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
}

.zt-k-hub-plan__pdf {
  flex-shrink: 0;
}

.zt-k-hub-plan__content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.zt-k-hub-plan__split {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 0.85rem;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

@media (max-width: 860px) {
  .zt-k-hub-plan__split {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    min-height: 0;
  }
}

.zt-k-hub-plan__totals-col,
.zt-k-hub-plan__trips-col {
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: var(--zt-radius-lg, 8px);
  background: var(--surface-muted, #f2f5f9);
  overflow: hidden;
}

.zt-k-hub-plan__trips-col {
  min-width: 0;
}

.zt-k-hub-plan__col-title {
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 0;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
  color: var(--text, #1e293b);
  flex-shrink: 0;
}

.zt-k-hub-plan__col-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0.65rem 0.65rem;
  overscroll-behavior: contain;
}

.zt-k-hub-plan__col-empty {
  padding: 0.65rem 0.75rem;
  margin: 0;
  font-size: 0.8125rem;
}

.zt-k-hub-plan__period {
  margin-bottom: 0.85rem;
}

.zt-k-hub-plan__period:last-child {
  margin-bottom: 0;
}

.zt-k-hub-plan__period-title {
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 0 0 0.45rem;
  color: var(--text, #1e293b);
}

.zt-k-hub-plan__trips {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.zt-k-hub-plan-trip {
  padding: 0.55rem 0.65rem;
  box-shadow: none;
  background: var(--surface, #fff);
}

.zt-k-hub-plan-trip__title {
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
}

.zt-k-hub-plan-trip__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.zt-k-hub-plan-trip__head .zt-k-hub-plan-trip__title {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.zt-k-hub-plan-trip__skip {
  flex-shrink: 0;
}

.zt-k-hub-plan-table__actions {
  width: 2rem;
  text-align: right;
  vertical-align: middle;
  padding-right: 0 !important;
}

.zt-k-hub-plan-row__skip-dot {
  display: inline-block;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.zt-k-hub-plan-row--skipped td {
  color: var(--text-muted, #64748b);
}

.zt-k-hub-plan-cell--hint {
  cursor: help;
  position: relative;
  overflow: visible;
}

.zt-k-hub-plan-cell--hint:hover {
  z-index: 30;
}

.zt-k-hub-plan-cell--hint:hover::after {
  content: attr(data-hint);
  position: absolute;
  left: 50%;
  top: calc(100% + 0.4rem);
  bottom: auto;
  transform: translateX(-50%);
  z-index: 1000;
  max-width: none;
  padding: 0.45rem 0.7rem;
  border-radius: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  font-style: normal;
  white-space: nowrap;
  color: #1e293b;
  background: #fffbeb;
  border: 1px solid #d97706;
  box-shadow:
    0 8px 24px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(217, 119, 6, 0.12);
  pointer-events: none;
  opacity: 1;
}

html[data-theme="dark"] .zt-k-hub-plan-cell--hint:hover::after {
  color: #fef3c7;
  background: #422006;
  border-color: #f59e0b;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(245, 158, 11, 0.25);
}

.zt-k-hub-plan-skipped__item .recipe-skip-badge__dot {
  margin-right: 0.35rem;
}

.zt-k-hub-plan-skipped {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-light, #e2e8f0);
}

.zt-k-hub-plan-skipped__title {
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 0 0 0.45rem;
  color: var(--danger, #dc3545);
}

.zt-k-hub-plan-skipped__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.zt-k-hub-plan-skipped__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8125rem;
  padding: 0.35rem 0.5rem;
  background: rgba(220, 53, 69, 0.06);
  border-radius: 0.35rem;
}

.zt-k-hub-plan__undo-toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.8125rem;
  background: var(--surface, #fff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 0.35rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.zt-k-hub-plan__undo-btn {
  font-size: 0.8125rem;
  padding: 0;
  text-decoration: none;
  white-space: nowrap;
}

.zt-k-hub-plan-trip__sub {
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0.45rem 0 0.2rem;
  color: var(--muted, #64748b);
}

.zt-k-hub-plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.zt-k-hub-plan-table th,
.zt-k-hub-plan-table td {
  border: 1px solid var(--border-light, #e2e8f0);
  padding: 0.28rem 0.4rem;
  text-align: left;
}

.zt-k-hub-plan-table th {
  background: var(--surface, #fff);
  font-weight: 600;
}

.zt-k-hub-plan-table--totals td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.zt-k-hub-plan__empty {
  text-align: center;
  color: var(--muted, #64748b);
  padding: 2rem 1rem;
}

.zt-k-hub-plan__empty i {
  font-size: 2rem;
  margin-bottom: 0.65rem;
  opacity: 0.45;
}

.zt-k-hub-plan__loading {
  padding: 1.5rem 0;
}

/* Тёмная тема — как shell-модалки и zt-notify-item */
html[data-theme="dark"] .zt-k-hub-card.zt-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--dm-border, rgba(255, 255, 255, 0.12));
}

html[data-theme="dark"] .zt-k-hub-card.zt-card--interactive:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

html[data-theme="dark"] .zt-k-hub-card__icon {
  color: var(--dm-muted, #a8b0b8);
}

html[data-theme="dark"] .zt-k-hub-card__title,
html[data-theme="dark"] .zt-k-hub-plan__period-title,
html[data-theme="dark"] .zt-k-hub-plan__col-title {
  color: var(--dm-text, #f5f5f5);
}

html[data-theme="dark"] .zt-k-hub-plan__totals-col,
html[data-theme="dark"] .zt-k-hub-plan__trips-col {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--dm-border, rgba(255, 255, 255, 0.12));
}

html[data-theme="dark"] .zt-k-hub-plan__col-title {
  border-bottom-color: var(--dm-border, rgba(255, 255, 255, 0.12));
}

html[data-theme="dark"] .zt-k-hub-plan-trip {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--dm-border, rgba(255, 255, 255, 0.12));
}

html[data-theme="dark"] .zt-k-hub-plan-table th,
html[data-theme="dark"] .zt-k-hub-plan-table td {
  border-color: var(--dm-border, rgba(255, 255, 255, 0.12));
}

html[data-theme="dark"] .zt-k-hub-plan-table th {
  background: rgba(255, 255, 255, 0.06);
}

.zt-k-hub-plan-skip-duration,
.zt-k-hub-plan-replace,
.zt-k-hub-plan-norms {
  /* legacy hooks — sizing lives on __dialog */
}

/* Затемнение поверх hub-модалки (монтируется на .modal.wesp-shell-modal) */
.modal.wesp-shell-modal > .zt-k-hub-plan-overlay {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.62);
}

.zt-k-hub-plan-overlay {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.62);
}

.zt-k-hub-plan-subdialog {
  width: min(100%, 28rem);
  background: #fff;
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 0.75rem;
  padding: 1.25rem 1.35rem 1.15rem;
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.zt-k-hub-plan-subdialog__title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 1rem;
  color: var(--text-primary, #0f172a);
}

.zt-k-hub-plan-subdialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-bottom: 0.65rem;
}

.zt-k-hub-plan-subdialog__header .zt-k-hub-plan-subdialog__title {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.zt-k-hub-plan-subdialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1rem;
}

.zt-k-hub-plan-skip-duration__options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.zt-k-hub-plan-skip-duration__option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  margin: 0;
  cursor: pointer;
}

.zt-k-hub-plan-skip-duration__option input[type="radio"] {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

.zt-k-hub-plan-skip-duration__option--date {
  flex-wrap: wrap;
}

.zt-k-hub-plan-skip-duration__option--date input[type="date"] {
  flex: 1 1 100%;
  margin-left: 1.6rem;
  margin-top: 0.35rem;
  font-size: 0.9375rem;
}

.zt-k-hub-plan-replace__dialog {
  width: min(100%, 34rem);
  max-height: min(88vh, 36rem);
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.zt-k-hub-plan-replace__lead {
  margin: 0 0 0.85rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-secondary, #64748b);
}

.zt-k-hub-plan-replace__search-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.45rem;
  color: var(--text-secondary, #334155);
}

.zt-k-hub-plan-replace__search {
  font-size: 1rem;
  padding: 0.55rem 0.75rem;
  margin-bottom: 1rem;
}

.zt-k-hub-plan-replace__section + .zt-k-hub-plan-replace__section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light, #e2e8f0);
}

.zt-k-hub-plan-replace__section-title {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
  margin: 0 0 0.55rem;
}

.zt-k-hub-plan-replace__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.zt-k-hub-plan-replace__pick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 0.5rem;
  background: #f8fafc;
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.zt-k-hub-plan-replace__pick:hover,
.zt-k-hub-plan-replace__pick:focus-visible {
  border-color: var(--bs-primary, #0d6efd);
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
  outline: none;
}

.zt-k-hub-plan-replace__pick-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary, #0f172a);
}

.zt-k-hub-plan-replace__pick-meta {
  font-size: 0.875rem;
  color: var(--text-secondary, #475569);
}

.zt-k-hub-plan-replace__empty {
  font-size: 0.9375rem;
  color: var(--text-muted, #64748b);
  margin: 0;
  padding: 0.35rem 0;
}

html[data-theme="dark"] .zt-k-hub-plan-overlay {
  background: rgba(0, 0, 0, 0.72);
}

html[data-theme="dark"] .zt-k-hub-plan-subdialog {
  background: var(--dm-surface, #1e293b);
  border-color: var(--dm-border, rgba(255, 255, 255, 0.14));
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .zt-k-hub-plan-subdialog__title,
html[data-theme="dark"] .zt-k-hub-plan-replace__pick-name {
  color: var(--dm-text, #f1f5f9);
}

html[data-theme="dark"] .zt-k-hub-plan-replace__pick {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--dm-border, rgba(255, 255, 255, 0.14));
}

html[data-theme="dark"] .zt-k-hub-plan-replace__pick:hover,
html[data-theme="dark"] .zt-k-hub-plan-replace__pick:focus-visible {
  background: rgba(13, 110, 253, 0.18);
}

html[data-theme="dark"] .zt-k-hub-plan-replace__section + .zt-k-hub-plan-replace__section {
  border-top-color: var(--dm-border, rgba(255, 255, 255, 0.12));
}
.zt-k-hub-plan-table__total-row th,
.zt-k-hub-plan-table__total-row td {
  font-weight: 700;
  border-top: 2px solid var(--border-light, #e2e8f0);
  background: rgba(15, 23, 42, 0.03);
}

.zt-k-hub-plan-table__actions--multi {
  white-space: nowrap;
}

.zt-k-hub-plan-table__actions--multi .btn + .btn {
  margin-left: 0.15rem;
}

.zt-k-hub-plan-row--replaced td:first-child {
  color: inherit;
}

.zt-k-hub-plan-trip__title .recipe-skip-badge {
  margin-left: 0.35rem;
  vertical-align: middle;
  font-size: 0.6875rem;
}

.zt-k-hub-plan-row--adjusted td:first-child {
  color: var(--bs-warning, #ffc107);
}

.zt-k-hub-plan-row__adjust-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #d97706;
  margin-right: 0.35rem;
  vertical-align: middle;
  flex-shrink: 0;
}

/* —— Коррекция норм (тот же overlay/subdialog, что замена и skip) —— */
.zt-k-hub-plan-norms-btn {
  margin-right: 0.5rem;
  white-space: nowrap;
}

.recipe-adjust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #d97706;
  white-space: nowrap;
}

.zt-k-hub-plan-trip__title .recipe-adjust-badge {
  margin-left: 0.35rem;
  vertical-align: middle;
}

.zt-k-hub-plan-trip__title .recipe-adjust-badge .zt-k-hub-plan-row__adjust-dot {
  margin-right: 0;
}

.zt-k-hub-plan-norms.zt-k-hub-plan-overlay {
  padding: 0.65rem;
  align-items: stretch;
  justify-content: stretch;
}

.modal.wesp-shell-modal > .zt-k-hub-plan-norms.zt-k-hub-plan-overlay {
  z-index: 1075;
}

.modal.wesp-shell-modal > .zt-k-hub-plan-replace.zt-k-hub-plan-overlay {
  z-index: 1085;
}

.modal.wesp-shell-modal > .zt-k-hub-plan-skip-duration.zt-k-hub-plan-overlay {
  z-index: 1095;
}

body > .zt-k-hub-plan-norms.zt-k-hub-plan-overlay {
  z-index: 3200;
}

body > .zt-k-hub-plan-replace.zt-k-hub-plan-overlay {
  z-index: 3210;
}

body > .zt-k-hub-plan-skip-duration.zt-k-hub-plan-overlay {
  z-index: 3220;
}

.zt-k-hub-plan-norms__dialog {
  width: 100%;
  max-width: min(98rem, calc(100vw - 1.25rem));
  height: calc(100vh - 1.25rem);
  max-height: calc(100vh - 1.25rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem 1rem;
}

.zt-k-hub-plan-norms__dialog .zt-k-hub-plan-subdialog__header .zt-k-hub-plan-subdialog__title {
  font-size: 1.25rem;
}

.zt-k-hub-plan-norms__dialog .zt-k-hub-plan-replace__section-title {
  margin-bottom: 0.35rem;
}

.zt-k-hub-plan-norms__dialog .zt-k-hub-plan-replace__search-label {
  margin-bottom: 0.35rem;
}

.zt-k-hub-plan-norms__dialog .zt-k-hub-plan-replace__search {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.zt-k-hub-plan-norms__filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-secondary, #475569);
  cursor: pointer;
  user-select: none;
}

.zt-k-hub-plan-norms__filter-text {
  line-height: 1.35;
}

.zt-k-hub-plan-norms__filter .zt-checkbox {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
}

.zt-k-hub-plan-norms__filter .zt-checkbox__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.zt-k-hub-plan-norms__filter .zt-checkbox__box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border: 1.5px solid var(--border-light, #cbd5e1);
  border-radius: 4px;
  background: var(--surface, #fff);
  color: #fff;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  pointer-events: none;
}

.zt-k-hub-plan-norms__filter .zt-checkbox__box::after {
  content: "";
  display: block;
  width: 0.28rem;
  height: 0.5rem;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  margin-top: -0.12rem;
  transition: transform 0.12s ease;
}

.zt-k-hub-plan-norms__filter .zt-checkbox__input:checked + .zt-checkbox__box {
  background: var(--primary-color, #2196f3);
  border-color: var(--primary-color, #2196f3);
}

.zt-k-hub-plan-norms__filter .zt-checkbox__input:checked + .zt-checkbox__box::after {
  transform: rotate(45deg) scale(1);
}

.zt-k-hub-plan-norms__filter .zt-checkbox__input:focus-visible + .zt-checkbox__box {
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 33, 150, 243), 0.22);
}

html[data-theme="dark"] .zt-k-hub-plan-norms__filter {
  color: var(--dm-muted, #a8b0b8);
}

html[data-theme="dark"] .zt-k-hub-plan-norms__filter .zt-checkbox__box {
  background: var(--dm-field, #2c3338);
  border-color: rgba(255, 255, 255, 0.22);
}

html[data-theme="dark"] .zt-k-hub-plan-norms__filter .zt-checkbox__input:checked + .zt-checkbox__box {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.zt-k-hub-plan-norms__lead {
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--text-muted, #64748b);
  margin: -0.35rem 0 0.65rem;
}

.zt-k-hub-plan-norms__hint {
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--text-secondary, #475569);
  margin: 0 0 0.65rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: #f8fafc;
  border: 1px solid var(--border-light, #e2e8f0);
}

.zt-k-hub-plan-norms__table-wrap {
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0;
  -webkit-overflow-scrolling: touch;
}

.zt-k-hub-plan-norms__empty {
  padding: 1.25rem 0.75rem;
}

/* Data grid — как в редакторе рецептов */
.zt-k-hub-plan-norms__dialog .zt-data-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: min(100%, 52rem);
  width: 100%;
}

.zt-k-hub-plan-norms__dialog .zt-data-grid__body {
  display: flex;
  flex-direction: column;
}

.zt-k-hub-plan-norms__dialog .zt-data-grid__head,
.zt-k-hub-plan-norms__dialog .zt-data-grid__row {
  display: grid;
  grid-template-columns: var(--zt-data-grid-cols);
  min-width: min(100%, 52rem);
}

.zt-k-hub-plan-norms__dialog .zt-data-grid--norms {
  --zt-data-grid-actions-col: 8.75rem;
  --zt-data-grid-cols: minmax(0, 1.25fr) minmax(5.5rem, 0.85fr) minmax(6.25rem, 1fr) minmax(6.25rem, 1fr) var(--zt-data-grid-actions-col);
}

.zt-k-hub-plan-norms__dialog .zt-data-grid__cell {
  min-width: 0;
  padding: 0.5rem 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-subtle);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-numeric, inherit);
  background: var(--surface, #fff);
}

.zt-k-hub-plan-norms__dialog .zt-data-grid__cell--head {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  font-family: inherit;
  font-variant-numeric: normal;
  position: sticky;
  top: 0;
  z-index: 2;
}

.zt-k-hub-plan-norms__dialog .zt-data-grid__cell--num {
  text-align: center;
  overflow: hidden;
}

.zt-k-hub-plan-norms__dialog .zt-data-grid__cell--actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.5rem 0.625rem;
  text-align: right;
  overflow: hidden;
  flex-shrink: 0;
}

.zt-k-hub-plan-norms__dialog .zt-data-grid__cell--head.zt-data-grid__cell--actions {
  justify-content: center;
  text-align: center;
}

.zt-k-hub-plan-norms__dialog .zt-data-grid__body .zt-data-grid__row:last-child .zt-data-grid__cell {
  border-bottom: none;
}

.zt-k-hub-plan-norms__dialog .zt-data-grid__body .zt-data-grid__row:hover .zt-data-grid__cell {
  background: rgba(var(--primary-rgb), 0.05);
}

.zt-k-hub-plan-norms__dialog .zt-data-grid .form-control {
  width: 100%;
  max-width: 100%;
  min-height: 2.25rem;
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
  box-sizing: border-box;
}

.zt-k-hub-plan-norms-input {
  text-align: center;
}

.zt-k-hub-plan-norms-input--locked {
  color: var(--text-muted, #94a3b8);
  background: rgba(220, 53, 69, 0.05);
  border-color: rgba(220, 53, 69, 0.22);
  cursor: not-allowed;
  opacity: 0.92;
  pointer-events: auto;
}

.zt-k-hub-plan-norms-input--locked:focus {
  outline: none;
  box-shadow: none;
}

.zt-k-hub-plan-norms__name-row {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
}

.zt-k-hub-plan-norms__weight-lock {
  flex-shrink: 0;
  margin-top: 0.15rem;
  font-size: 0.6875rem;
  color: var(--danger, #dc3545);
  opacity: 0.75;
}

.zt-k-hub-plan-norms__meta--weight {
  font-size: 0.6875rem;
  line-height: 1.25;
  color: rgba(220, 53, 69, 0.75);
}

.zt-k-hub-plan-norms__weight-hint {
  display: block;
  font-size: 0.625rem;
  line-height: 1.25;
  color: rgba(220, 53, 69, 0.72);
  text-align: center;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.2s ease, opacity 0.2s ease, margin 0.2s ease;
  margin-top: 0;
}

.zt-k-hub-plan-norms__weight-hint.is-visible {
  max-height: 2.5rem;
  opacity: 1;
  margin-top: 0.15rem;
}

.zt-k-hub-plan-norms__dialog .ingredient-row--weight-locked .zt-data-grid__cell {
  background: rgba(220, 53, 69, 0.06);
}

.zt-k-hub-plan-norms__dialog .ingredient-row--weight-locked:hover .zt-data-grid__cell {
  background: rgba(220, 53, 69, 0.09);
}

.zt-k-hub-plan-norms__dm-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  min-width: 0;
}

.zt-k-hub-plan-norms__base {
  font-size: 0.6875rem;
  line-height: 1.25;
  color: var(--text-secondary, #64748b);
  text-align: center;
  white-space: nowrap;
}

.zt-k-hub-plan-norms-preview {
  color: var(--text-secondary, #475569);
}

.zt-k-hub-plan-norms-preview-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  line-height: 1.3;
  font-size: 0.875rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.zt-k-hub-plan-norms-preview-cell--compare {
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  min-height: 2.75rem;
  padding: 0.15rem 0;
}

.zt-k-hub-plan-norms-preview--compare {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-align: center;
}

.zt-k-hub-plan-norms-preview__was {
  font-size: 0.6875rem;
  color: var(--text-muted, #94a3b8);
  text-decoration: line-through;
  line-height: 1.2;
  max-width: 100%;
}

.zt-k-hub-plan-norms-preview__now {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary, #0f172a);
  line-height: 1.25;
  max-width: 100%;
}

.zt-k-hub-plan-norms__dialog .zt-data-grid .text-cell.zt-k-hub-plan-norms-preview-cell {
  display: flex;
  line-height: 1.3;
  min-height: 2.25rem;
  font-size: inherit;
}

.zt-k-hub-plan-norms__dialog .zt-data-grid input[type="number"] {
  -moz-appearance: textfield;
}

.zt-k-hub-plan-norms__dialog .zt-data-grid input[type="number"]::-webkit-outer-spin-button,
.zt-k-hub-plan-norms__dialog .zt-data-grid input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.zt-k-hub-plan-norms__dialog .recipe-table-row-actions {
  gap: 0.375rem;
  justify-content: flex-end;
  width: 100%;
  max-width: 100%;
}

.zt-k-hub-plan-norms__dialog .recipe-table-delete-btn {
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.25rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.zt-k-hub-plan-norms__name {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
  flex: 1;
  min-width: 0;
}

.zt-k-hub-plan-norms__meta {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  line-height: 1.3;
}

html[data-theme="dark"] .zt-k-hub-plan-norms__meta {
  color: var(--dm-muted, #a8b0b8);
}

.zt-k-hub-plan-norms__component-cell {
  align-items: flex-start !important;
}

.zt-k-hub-plan-norms__component {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  width: 100%;
}

.zt-k-hub-plan-norms__dialog .ingredient-row--adjusted .zt-k-hub-plan-norms-input {
  border-color: #d97706;
  background: #fffbeb;
}

html[data-theme="dark"] .zt-k-hub-plan-norms-preview {
  color: var(--dm-muted, #a8b0b8);
}

html[data-theme="dark"] .zt-k-hub-plan-norms-preview__was {
  color: var(--dm-muted, #a8b0b8);
}

html[data-theme="dark"] .zt-k-hub-plan-norms-preview__now {
  color: var(--dm-text, #f1f5f9);
}

html[data-theme="dark"] .zt-k-hub-plan-norms__base {
  color: var(--dm-muted, #a8b0b8);
}

html[data-theme="dark"] .zt-k-hub-plan-norms-input--locked {
  color: var(--dm-muted, #a8b0b8);
  background: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.28);
}

html[data-theme="dark"] .zt-k-hub-plan-norms__weight-lock {
  color: #f87171;
  opacity: 0.85;
}

html[data-theme="dark"] .zt-k-hub-plan-norms__meta--weight,
html[data-theme="dark"] .zt-k-hub-plan-norms__weight-hint {
  color: rgba(248, 113, 113, 0.78);
}

html[data-theme="dark"] .zt-k-hub-plan-norms__dialog .ingredient-row--weight-locked .zt-data-grid__cell {
  background: rgba(220, 53, 69, 0.1);
}

html[data-theme="dark"] .zt-k-hub-plan-norms__dialog .ingredient-row--weight-locked:hover .zt-data-grid__cell {
  background: rgba(220, 53, 69, 0.14);
}

html[data-theme="dark"] .zt-k-hub-plan-norms__dialog .ingredient-row--adjusted .zt-k-hub-plan-norms-input {
  border-color: #d97706;
  background: rgba(217, 119, 6, 0.12);
}

html[data-theme="dark"] .zt-k-hub-plan-norms__hint {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--dm-border, rgba(255, 255, 255, 0.14));
  color: var(--dm-muted, #a8b0b8);
}

html[data-theme="dark"] .zt-k-hub-plan-norms__dialog .zt-data-grid__cell--head {
  background: var(--dm-field, #334155);
}

/* Зоотех-мастер (lab) в K-hub */
.zt-k-hub-lab__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 10px;
}

.zt-k-hub-lab__field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.78rem;
  margin: 0;
}

.zt-k-hub-lab__field .form-select {
  min-width: 120px;
  max-width: 200px;
}

.zt-k-hub-lab__subtitle {
  font-size: 0.85rem;
  color: var(--bs-secondary-color, #6c757d);
  margin-bottom: 8px;
}

.zt-k-hub-lab__table {
  margin-bottom: 10px;
}

.zt-k-hub-lab__table .form-select {
  min-width: 140px;
}

.zt-k-hub-lab__indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
