/* These styles are generated from project.scss. */

html {
  /* 2560px -> 16px (100%), 1920px -> 12.8px (80%) */
  font-size: clamp(12px, calc(3.2px + 0.5vw), 16px);
}

.alert-debug {
  color: black;
  background-color: white;
  border-color: #d6e9c6;
}

.alert-error {
  color: #b94a48;
  background-color: #f2dede;
  border-color: #eed3d7;
}

.navbar-nav .nav-link {
  font-size: 1.3rem;
}

.content-bg {
  background-color: var(--content-bg-color, #74787b);
}

.machine-ops-list {
  max-height: 180px;
  overflow-y: auto;
  background-color: #fff;
}

.machine-ops-item {
  padding: 2px 4px;
  border-radius: 4px;
}

.machine-ops-item:hover {
  background-color: #f1f3f5;
}

.machine-ops-item .form-check-input {
  margin: 0;
}

.modal.modal-dimmed .modal-content {
  filter: brightness(0.7);
  transition: filter 0.15s ease-in-out;
}

.modal.nested-modal {
  z-index: 1065;
}

.modal-backdrop.nested-modal-backdrop {
  z-index: 1060;
}

.order-modal-body {
  max-height: calc(100vh - 12rem);
  overflow-y: auto;
}

.order-modal-tab-content {
  min-height: 0;
}

.order-modal-tab-content > .tab-pane:not(.active) {
  display: none;
}

.dictionary-cell-value {
  display: inline-block;
  max-width: 100%;
  word-break: break-word;
}

.dictionary-modal-form label:not(.form-check-label) {
  display: block;
  margin-bottom: 0.25rem;
}

[data-dictionaries-page] .card-header {
  min-height: 3.25rem;
}

[data-dictionaries-page] .pagination-controls {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

[data-dictionaries-page] .pagination-per-page-select {
  width: auto;
  min-width: 4.5rem;
}

[data-dictionaries-page] .dictionary-toolbar .pagination-controls {
  justify-content: flex-end;
}

[data-dictionaries-page] [data-dictionary-add-actions] {
  min-height: 2rem;
}

[data-dictionaries-page] .dictionary-toolbar .record-filters__form {
  grid-template-columns: minmax(260px, 420px) auto auto;
  justify-content: end;
}

[data-dictionaries-page] .dictionary-toolbar .record-filters__group--search {
  grid-column: auto;
}

[data-dictionaries-page] .dictionary-toolbar {
  margin-bottom: 0.5rem !important;
}

[data-dictionaries-page] .card-body > .card {
  margin-top: 0.5rem !important;
}

[data-dictionaries-page] .card-body > .card > .card-header {
  padding-bottom: 0.35rem;
}

[data-dictionaries-page] .card-body > .card > .card-body {
  padding-top: 0.35rem;
}

.fc .fc-event {
  cursor: pointer;
}


/* Обёртка, чтобы карточка не прилипала к верху */
.auth-wrapper {
  min-height: 60vh;
  align-items: center; /* вертикальное центрирование для d-flex */
}

/* Карточка логина/регистрации */
.auth-card {
  border-radius: 6px;
}

/* Лейблы для обычных полей*/
.auth-card label:not(.form-check-label) {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

/* Поля ввода — прямоугольные, во всю ширину */
.auth-card input[type="text"],
.auth-card input[type="password"],
.auth-card input[type="email"] {
  width: 100%;
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  font-size: 0.95rem;
}

.auth-card input[type="text"]:focus,
.auth-card input[type="password"]:focus,
.auth-card input[type="email"]:focus {
  outline: none;
  border-color: #74787b;
  box-shadow: 0 0 0 0.15rem rgba(11, 80, 150, 0.15);
}

.auth-card .form-check-label {
  display: inline-block;
  font-weight: 400;
  margin-bottom: 0;
}

.auth-card .btn {
  border-radius: 4px;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.nav-pills .nav-link {
  border-radius: 4px !important;
}

:root {
  --bs-primary: #0b5096;
  --bs-primary-rgb: 11, 80, 150;
  --bs-secondary: #74787b;
  --bs-secondary-rgb: 116, 120, 123;
  --bs-link-color: #0b5096;
  --bs-link-hover-color: #0b5096;
  --bs-gray: #74787b;
  --bs-gray-600: #74787b;
  --bs-gray-700: #74787b;
  --brand-primary: #0b5096;
  --brand-primary-hover: #0b5096;
  --brand-primary-active: #0b5096;
  --brand-secondary: #0b5096;
  --brand-secondary-hover: #0b5096;
  --brand-danger: #dc3545;
  --brand-danger-hover: #bb2d3b;
  --brand-light: #f8f9fa;
  --brand-text: #ffffff;
  --brand-nav-text: #74787b;
}

.btn-primary {
  color: var(--brand-text);
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--brand-primary-hover);
  border-color: var(--brand-primary-hover);
  color: var(--brand-text);
}

.btn-primary:active {
  background-color: var(--brand-primary-active);
  border-color: var(--brand-primary-active);
  color: var(--brand-text);
}

.btn-outline-primary {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
  background-color: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  color: var(--brand-text);
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.btn-outline-primary:active {
  color: var(--brand-text);
  background-color: var(--brand-primary-active);
  border-color: var(--brand-primary-active);
}

.btn-outline-secondary {
  color: var(--brand-secondary);
  border-color: var(--brand-secondary);
  background-color: transparent;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  color: var(--brand-text);
  background-color: var(--brand-secondary);
  border-color: var(--brand-secondary);
}

.btn-outline-secondary:active {
  color: var(--brand-text);
  background-color: var(--brand-primary-active);
  border-color: var(--brand-primary-active);
}

.btn-outline-danger {
  color: var(--brand-danger);
  border-color: var(--brand-danger);
  background-color: transparent;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
  color: var(--brand-text);
  background-color: var(--brand-danger);
  border-color: var(--brand-danger);
}

.btn-outline-danger:active {
  color: var(--brand-text);
  background-color: var(--brand-danger-hover);
  border-color: var(--brand-danger-hover);
}

.btn-danger {
  color: var(--brand-text);
  background-color: var(--brand-danger);
  border-color: var(--brand-danger);
}

.btn-danger:hover,
.btn-danger:focus {
  background-color: var(--brand-danger-hover);
  border-color: var(--brand-danger-hover);
  color: var(--brand-text);
}

.btn {
  border-radius: 4px !important;
}

.btn-danger:active {
  background-color: var(--brand-danger-hover);
  border-color: var(--brand-danger-hover);
  color: var(--brand-text);
}

.nav-pills .nav-link.active {
  background-color: var(--brand-primary);
  color: var(--brand-text);
  border-color: var(--brand-primary);
}

.nav-pills .nav-link {
  color: var(--brand-nav-text);
}

.text-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  line-height: 1.25;
  max-height: 2.5em;
}

@media (min-width: 992px) {
  .navbar .dropdown-hover:hover > .dropdown-menu,
  .navbar .dropdown-hover:focus-within > .dropdown-menu {
    display: block;
  }
}

.dropdown-hover .dropdown-menu.show {
  display: block;
}

.nav-pills .nav-link:hover {
  color: var(--brand-primary-hover);
}

.nav-pills .nav-link.active:hover {
  color: var(--brand-text);
}

.dropdown-item:active {
  background-color: var(--brand-primary-active);
  color: var(--brand-text);
}

.form-check-input:checked {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(11, 80, 150, 0.25);
  border-color: var(--brand-primary-hover);
}

.form-switch .form-check-input:checked {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.form-control,
.form-select {
  border-radius: 4px;
}

.testing-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem;
  border: 1px solid rgba(11, 80, 150, 0.25);
  border-radius: 999px;
  background: #f2f7fc;
}

.testing-mode-toggle__btn {
  border: 1px solid transparent;
  border-radius: 999px !important;
  background: transparent;
  color: #0b5096;
  font-weight: 600;
  padding: 0.3rem 0.9rem;
  line-height: 1.1;
  transition: all 0.15s ease-in-out;
}

.testing-mode-toggle__btn:hover {
  border-color: rgba(11, 80, 150, 0.35);
  background: rgba(11, 80, 150, 0.08);
  color: #0b5096;
}

.btn-check:checked + .testing-mode-toggle__btn {
  background: #0b5096;
  border-color: #0b5096;
  color: #fff;
  box-shadow: 0 2px 6px rgba(11, 80, 150, 0.25);
}

.btn-check:focus + .testing-mode-toggle__btn {
  box-shadow: 0 0 0 0.2rem rgba(11, 80, 150, 0.2);
}

.pagination .page-link {
  color: #0b5096;
}

.modern-pagination {
  gap: 0.12rem;
}

.modern-pagination .page-link {
  min-width: 1.65rem;
  height: 1.65rem;
  padding: 0 0.35rem;
  border: 1px solid #d4dbe2;
  border-radius: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  font-weight: 500;
  font-size: 0.8rem;
  line-height: 1;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.modern-pagination .page-link:hover {
  background-color: #f6f9fc;
  border-color: #0b5096;
  color: #0b5096;
}

.offers-main-table {
  table-layout: fixed;
}

.offer-meta-hint {
  width: 1.4rem;
  height: 1.4rem;
  border: 1px solid #cdd4dc;
  border-radius: 999px;
  background: #fff;
  color: #74787b;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.offer-meta-hint:hover,
.offer-meta-hint:focus {
  border-color: #0b5096;
  color: #0b5096;
}

.offer-meta-tooltip .tooltip-inner {
  max-width: 520px;
  white-space: nowrap;
  text-align: left;
}

input[data-request-item-vat],
input[data-offer-amount-without-vat],
input[data-offer-amount-vat] {
  -moz-appearance: textfield;
}

input[data-request-item-vat]::-webkit-outer-spin-button,
input[data-request-item-vat]::-webkit-inner-spin-button,
input[data-offer-amount-without-vat]::-webkit-outer-spin-button,
input[data-offer-amount-without-vat]::-webkit-inner-spin-button,
input[data-offer-amount-vat]::-webkit-outer-spin-button,
input[data-offer-amount-vat]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.offers-main-table th.offers-main-meta,
.offers-main-table td.offers-main-meta {
  padding-left: 0.28rem;
  padding-right: 0.28rem;
}

.pagination .page-item.active .page-link {
  color: #fff;
  background-color: #0b5096;
  border-color: #0b5096;
  box-shadow: 0 1px 2px rgba(11, 80, 150, 0.15);
}

.pagination .page-item.active .page-link:focus {
  box-shadow: 0 0 0 0.2rem rgba(11, 80, 150, 0.25);
}

.pagination .page-item.disabled .page-link {
  color: #74787b;
}

.modern-pagination .page-item.disabled .page-link {
  background-color: #f6f8fa;
  border-color: #e1e5e8;
}

.modern-pagination .pagination-ellipsis .page-link {
  border-color: transparent;
  background: transparent;
  color: #74787b;
  min-width: 1.05rem;
  padding: 0;
}

.pagination-controls {
  min-height: 24px;
  padding: 0.15rem 0.3rem;
  border: 1px solid #e6ebf0;
  border-radius: 0.45rem;
  background-color: #fafbfd;
}

.pagination-per-page-form .pagination-per-page-label {
  font-size: 0.72rem;
  letter-spacing: 0.01em;
}

.pagination-per-page-form .pagination-per-page-select {
  width: 56px;
  min-width: 56px;
  height: 1.65rem;
  font-size: 0.78rem;
  padding: 0 1.1rem 0 0.35rem;
  text-align: center;
  border-radius: 0.35rem;
  border-color: #d4dbe2;
}

.modern-pagination .page-item:first-child .page-link,
.modern-pagination .page-item:last-child .page-link {
  font-size: 0.95rem;
  font-weight: 600;
}

/* Переключатель видимости пароля внутри поля */
.password-wrap {
  position: relative;
}

.password-wrap input[type="password"],
.password-wrap input[type="text"] {
  padding-right: 2.5rem;
}

.password-wrap input.form-control-sm {
  height: 2.1rem;
  border-radius: 4px;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #74787b;
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle-btn:focus {
  outline: none;
  color: #74787b;
}

.record-filters {
  border: 1px solid #e3e7eb;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.65rem 0.75rem;
}

.record-filters__form {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(190px, 230px) minmax(150px, 180px) auto auto;
  gap: 0.55rem;
  align-items: end;
  justify-content: end;
}

.record-filters__group {
  min-width: 0;
}

.record-filters__group .form-control,
.record-filters__group .form-select {
  width: 100%;
}

.record-filters__label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  color: #74787b;
}

.record-filters__btn {
  min-width: 110px;
  white-space: nowrap;
}

.multi-check-filter {
  width: 100%;
}

.multi-check-filter__button {
  position: relative;
  width: 100%;
  min-height: 31px;
  overflow: hidden;
  padding-right: 1.8rem;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-check-filter__button::after {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  transform: translateY(-50%);
}

.multi-check-filter__menu {
  max-height: 260px;
  min-width: 100%;
  overflow-y: auto;
  padding: 0.35rem;
}

.multi-check-filter__item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 0.35rem;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.25;
  white-space: normal;
}

.record-filters__form--admin-log {
  grid-template-columns:
    minmax(220px, 320px)
    minmax(190px, 260px)
    minmax(150px, 190px)
    minmax(130px, 170px)
    auto
    auto;
}

@media (max-width: 992px) {
  .record-filters__form {
    grid-template-columns: 1fr 1fr;
  }

  [data-dictionaries-page] .dictionary-toolbar .record-filters__form {
    grid-template-columns: 1fr;
  }

  .record-filters__form--admin-log {
    grid-template-columns: 1fr 1fr;
  }

  .record-filters__group--search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 576px) {
  .record-filters__form {
    grid-template-columns: 1fr;
  }

  .record-filters__btn {
    width: 100%;
  }
}
