@font-face {
  font-family: "Gramatika";
  src: url("/static/fonts/gramatika.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Gramatika";
  src: url("/static/fonts/gramatika.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}

@media (min-width: 1600px) {
  #changelist-form table#result_list {
    table-layout: auto !important;
    width: auto !important;
    min-width: 2000px;
  }
}

body, .content-wrapper, .module, .model-workorder {
  font-family: "Gramatika", Arial, sans-serif !important;
}

/* Buttons and links styling */
.accent-success .btn-link:hover,
.accent-success .nav-tabs .nav-link:hover,
.accent-success a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):not(.page-link):not(.btn):hover {
  color: #04181f !important;
}
.table-hover tbody tr:hover {
  background-color: #e5f6f6 !important;
  cursor: pointer !important;
}

.btn-default {
  background-color: #176091 !important;
  color: #ffffff !important;
}

.btn-success {
  color: #fff;
  background-color: #0e3c5b;
  border-color: #051c2c;
}

.btn-success:hover {
  color: #fff;
  background-color: #0f5a91;
  border-color: #0e3c5b;
}

a.inline-deletelink {
  background-color: #FF501EFF;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}
a.inline-deletelink:hover {
  background-color: #ff501e;
  border-color: #ff4711;
  color: #fff;
  padding: 3px 6px;
  border-radius: 3px;
}

/* Navbar and sidebar */
.navbar {
  background-color: #071c2a !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  text-transform: none;
  letter-spacing: 0.02rem;
}
body {
  color: #264447 !important;
}
.navbar a, .navbar .navbar-brand {
  color: #5baaaa !important;
}

.fa-circle-user:before,
.fa-user-circle:before {
  content: none !important;
}
.breadcrumb-item.active {
  color: #1ca7bd !important;
}

[class*=sidebar-dark-] {
  background-color: #04181f !important;
}
.sidebar {
  background-color: #07233500 !important;
}

.sidebar .nav-link,
.sidebar .nav-item a {
  color: #ffffff !important;
}

.sidebar .nav-link.active,
.sidebar .nav-item a.active {
  background-color: #0e3c5b !important;
  color: #ffffff !important;
}

.table thead th {
  color: #0f6674 !important;
}

.accent-info .btn-link,
.accent-info .nav-tabs .nav-link,
.accent-info a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):not(.page-link):not(.btn) {
  color: #0e525e !important;
}

.accent-info .btn-link:hover,
.accent-info .nav-tabs .nav-link:hover,
.accent-info a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):not(.page-link):not(.btn):hover {
  color: #1ca7bd !important;
}

.brand-text {
  font-size: 16px;
  line-height: 1;
  font-family: Verdana;
  font-weight: 800 !important;
}

.navbar-cyan {
  background-color: #ced4da !important;
  color: #022a32 !important;
}

img {
  vertical-align: middle;
  border-style: none;
  max-width: 80px;
  height: auto;
  max-height: 80px;
}

input[name="_addanother"] {
  display: none;
}

/* Search form */
#changelist-search .form-group {
  display: inline-block;
  margin-right: 10px;
  vertical-align: top;
  min-width: 200px;
}
#changelist-search input[type="text"] {
  width: 250px;
}
#changelist-search button {
  height: 38px;
}

/* Many-to-many widget width */
.select2-container {
  width: 500px !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: #e4e4e4;
  color: #000;
  border-radius: 4px;
  margin: 5px 5px 0 0;
  padding: 2px 8px;
  max-width: 98%;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
  cursor: default;
  padding-left: 25px;
  padding-right: 5px;
}

/* Reset table layout */
#changelist-form table {
  width: 100% !important;
  border-collapse: collapse !important;
}
#changelist-form table tr {
  height: 50px !important;
}
#changelist-form table input[type="checkbox"] {
  vertical-align: middle;
}

/* Apply fixed layout for predictable column widths */
/* #changelist-form table#result_list {
  table-layout: fixed !important;
  width: 100% !important;
} */

#changelist-form table#result_list {
  table-layout: auto !important;
  width: auto !important;
}

/* Checkbox column (col 1) */
#changelist-form table#result_list th.djn-checkbox-select-all,
#changelist-form table#result_list td.dgrid-selector,
#changelist-form table#result_list col.djn-checkbox-select-all {
  width: 100px !important;
  min-width: 100px !important;
  max-width: 150px !important;
}

/* Описание мероприятия (col 7) */
#changelist-form table#result_list th:nth-child(7),
#changelist-form table#result_list td:nth-child(7) {
  width: 300px !important;
  min-width: 300px !important;
  max-width: 300px !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}

/* Planned end date (col 8): wrap */
#changelist-form table#result_list th:nth-child(8),
#changelist-form table#result_list td:nth-child(8) {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  min-width: 250px;

}

/* Indicator (col 9): wider 360px */
#changelist-form table#result_list th:nth-child(9),
#changelist-form table#result_list td:nth-child(9) {
  width: 360px !important;
  min-width: 360px !important;
  max-width: 360px !important;
  /* overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important; */
}

/* Expected result (col 10): wrap */
#changelist-form table#result_list th:nth-child(10),
#changelist-form table#result_list td:nth-child(10) {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* 2. Номер — чуть уже */
#changelist-form table#result_list th:nth-child(2),
#changelist-form table#result_list td:nth-child(2) {
  width: 120px !important;
  min-width: 100px !important;
  max-width: 120px !important;
}

/* 3. Статус (“изм.”) — узкая, без переноса */
#changelist-form table#result_list th:nth-child(3),
#changelist-form table#result_list td:nth-child(3) {
  width: 200px !important;
  min-width: 100px !important;
  max-width: 400px !important;
}

/* 4. Ведомство — вдвое шире */
#changelist-form table#result_list th:nth-child(4),
#changelist-form table#result_list td:nth-child(4) {
  width: 300px !important;
  min-width: 160px !important;
}

/* 5. Ответственный — чуть шире */
#changelist-form table#result_list th:nth-child(5),
#changelist-form table#result_list td:nth-child(5) {
  width: 250px !important;
  min-width: 200px !important;
}


/* 5. Ответственный — чуть шире */
#changelist-form table#result_list th:nth-child(6),
#changelist-form table#result_list td:nth-child(6) {
  width: 350px !important;
  min-width: 350px !important;
}

/* 10. Ожидаемый результат — как описание мероприятия */
#changelist-form table#result_list th:nth-child(10),
#changelist-form table#result_list td:nth-child(10) {
  width: 300px !important;
  min-width: 300px !important;
}

/* 11–13. Заказчик, Исполнитель, Соисполнитель — вдвое шире */
#changelist-form table#result_list th:nth-child(11),
#changelist-form table#result_list td:nth-child(11),
#changelist-form table#result_list th:nth-child(12),
#changelist-form table#result_list td:nth-child(12),
#changelist-form table#result_list th:nth-child(13),
#changelist-form table#result_list td:nth-child(13) {
  width: 300px !important;
  min-width: 300px !important;
}

/* 15. Приоритет — слово помещается целиком */
#changelist-form table#result_list th:nth-child(15),
#changelist-form table#result_list td:nth-child(15) {
  width: 120px !important;
  min-width: 100px !important;
  white-space: nowrap !important;
}

/* 18. Комментарий к отчёту — не обрезаем слова */
#changelist-form table#result_list th:nth-child(18),
#changelist-form table#result_list td:nth-child(18) {
  white-space: normal !important;
}

.card-body>.table>thead>tr>td,
.card-body>.table>thead>tr>th {
  border-top-width: 0;
  vertical-align: middle;
}

#changelist-form .card-body {
  overflow-x: auto;
}

.elevation-3 {
  box-shadow: none !important;
}

.table td, .table th {
    vertical-align: text-top;
    padding: .75rem;
    border-top: 1px solid rgba(0, 0, 0, .05);
}

.search-help {
  font-size: 1.1em;
  color: #182c2e;
  background: #e5f6f6;
  border-radius: 4px;
}

.change-list .results th,
.change-list .results td {
  white-space: normal !important;
  word-wrap: break-word !important;
}