
body, html {
  margin: 0;
  height: 100%;
}

body{
  overflow: hidden;
}

label, h3 {
  margin: 0px;
}

.container-fluid {
  margin: 0 auto;
  overflow: hidden;
}

table {
  border-collapse: collapse;
  width: 100%;
}

.table th{
   font-weight: normal;
   padding: 6px;
   background: #fff;
   position: sticky;
   top: 0;
   white-space: nowrap;
   z-index: 3;
   border-bottom: 1px solid #dee2e6;
}

.table td{
  padding: 6px;
  border-bottom: 1px solid #dee2e6;
}

.result > .col-md-2 {
  padding-right: 8px;
  padding-left: 8px;
}

.border_blue:hover {
  color: #0075ff;
  cursor: pointer;
}

  /* Стили для drag-item */
.drag-item {
  display: flex;
  align-items: center;
  padding: 8px;
  border: 1px solid #eee;
  background: #f8f8f8;
  margin: 4px 0;
  cursor: move;
}

/* Стили для содержимого */
.item-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.item-content .title {
  flex-grow: 1; /* Занимает всё доступное место слева */
}

.item-content i.fa-bars {
  margin-left: auto; /* Отправляет иконку вправо */
  cursor: move;
}

/* Ховер эффект */
.drag-item:hover {
  background: #e8e8e8;
}

.visibility-checkbox {
  margin-right: 5px; /* Отступ между чекбоксом и текстом */
}

.table-striped tbody tr:nth-child(odd) {
  background-color: #f8f8f8;
}

/* Подсветка строки при наведении */
.table-striped tbody tr:nth-child(even):hover {
  background-color: #e7eef7;
}

/* Подсветка для нечётных строк */
.table-striped tbody tr:nth-child(odd):hover {
  background-color: #e7eef7;
}

/* Подсветка найденного товара */
.table-striped tbody tr.found-good {
  background-color: #fff3cd !important;
  animation: highlight-found 2s ease-in-out;
}

@keyframes highlight-found {
  0% { background-color: #fff3cd; }
  50% { background-color: #ffeaa7; }
  100% { background-color: #fff3cd; }
}

.col-auto {
  padding-left: 8px;
  padding-right: 0px;
  padding-top: 0px;
  padding-bottom: 0px;
}

.tree>.tree-root {
    padding: 0px !important;
}

.tree-anchor {
    padding: 0px !important;
    margin: 0px !important;
}

/* Первый уровень */
.tree-content {
    padding-left: 0px !important;
}

/* Второй уровень */
.tree-children .tree-content {
    padding-left: 0px !important;
}

/* Третий уровень */
.tree-children .tree-children .tree-content {
    padding-left: 10px !important;
}

/* Четвертый уровень */
.tree-children .tree-children .tree-children .tree-content {
    padding-left: 20px !important;
}

/* Пятый уровень */
.tree-children .tree-children .tree-children .tree-children .tree-content {
    padding-left: 30px !important;
}

.tree-content[data-color="red"] {
  background-color: rgba(255, 68, 68, 0.2) !important;
}

.tree-content[data-color="yellow"] {
  background-color: rgba(255, 235, 59, 0.2) !important;
}

.tree-content[data-color="green"] {
  background-color: rgba(76, 175, 80, 0.2) !important;
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  animation: fade-in-out 3s ease-in-out;
}

.toast-success {
  background-color: #4CAF50;
}

.toast-error {
  background-color: #F44336;
}

.toast-info {
  background-color: #2196F3;
}

@keyframes fade-in-out {
  0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
  10% { opacity: 1; transform: translateX(-50%) translateY(0); }
  90% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

.col-name {
  width: 60%;
}

.name-with-action {
    position: relative;
    display: inline-block;
    padding-right: 25px;
    z-index: 1;
}

.name-action-button {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 2px 5px;
    font-size: 14px;
    z-index: 1;
}

.name-action-button:hover {
    color: #1890ff;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.events-popover {
  position: absolute;
  top: 28px;
  right: 0;
  width: 360px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  z-index: 2000;
  border: 1px solid #e0e0e0;
  animation: fade-in-popover 0.2s;
}
@keyframes fade-in-popover {
  from { opacity: 0; transform: translateY(-10px);}
  to   { opacity: 1; transform: translateY(0);}
}

/* Events tabs styles */
.events-tab-btn {
  transition: all 0.2s ease;
}

.events-tab-btn:hover {
  background-color: #f8f9fa;
}

.events-tab-btn.active {
  background-color: #f8f9fa;
}

.events-tab-btn.active:first-child {
  border-bottom: 1px solid #dc3545 !important; /* Красный для "Важно" */
}

.events-tab-btn.active:last-child {
  border-bottom: 1px solid #fd7e14 !important; /* Оранжевый для "Требует внимания" */
}

/* Events list styles */
.event-item {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  background: #f8f9fa;
  transition: all 0.2s ease;
}

.event-item:hover {
  background: #e9ecef;
  border-color: #dee2e6;
}

.event-clickable {
  cursor: pointer;
}

.event-clickable:hover {
  background: #e2e6ea !important;
  border-color: #adb5bd !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.event-articul {
  font-weight: 600;
  color: #495057;
  font-size: 14px;
}

.event-count {
  background: #dc3545;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.event-product {
  font-weight: 500;
  color: #212529;
  margin-bottom: 4px;
  font-size: 13px;
}

.event-client {
  color: #6c757d;
  font-size: 12px;
  margin-bottom: 6px;
}

.event-description {
  color: #dc3545;
  font-size: 11px;
  font-style: italic;
  background: #f8d7da;
  padding: 4px 8px;
  border-radius: 4px;
  border-left: 3px solid #dc3545;
}

/* Events header buttons */
.events-popover .fa-refresh:hover,
.events-popover .fa-cogs:hover {
  color: #495057 !important;
  transform: scale(1.1);
  transition: all 0.2s ease;
}

.events-popover .fa-refresh:hover {
  animation: spin 0.5s linear;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.modal-mask {
  position: fixed;
  z-index: 3000;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-wrapper {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-container {
  background: #fff;
  margin: 0px auto;
  border-radius: 1px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.33);
  padding: 0;
  min-width: 300px;
  max-width: 550px;
  width: 100%;
}

.modal-header {
  padding: 8px 20px 8px 20px;
  border-bottom: 1px solid #eee;
}

.modal-body {
  padding: 12px 20px;
}

.modal-footer {
  padding: 8px 20px 8px 20px;
  border-top: 1px solid #eee;
}

.articul-search-popover {
    position: absolute;
    left: 0;
    top: 36px;
    z-index: 3000;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.articul-search-popover input[type="text"] {
  border: none;
  outline: none;
  box-shadow: none;
  background: transparent;
  min-width: 250px;
}

/* Стили для кастомного мультиселект */
.custom-multiselect-container {
  position: relative;
  width: 100%;
}

.custom-multiselect {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 25px;
  height: auto;
  padding: 0 8px;
  border: 1px solid #000000;
  border-radius: 2px;
  background-color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
}

.custom-multiselect-display {
  flex: 1;
  overflow: visible;
  white-space: normal;
}

.custom-multiselect-display .placeholder {
  color: #000000;
}

.custom-multiselect-display .selected-count {
  font-weight: normal;
}

.custom-multiselect-arrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #6c757d;
  transition: transform 0.2s ease;
  margin-left: 8px;
}

.custom-multiselect.open .custom-multiselect-arrow {
  transform: rotate(180deg);
}

.custom-multiselect-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200%;
  max-height: 200px;
  overflow-y: auto;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.custom-multiselect-option {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.4;
  border-bottom: 1px solid #f8f9fa;
}

.custom-multiselect-option:last-child {
  border-bottom: none;
}

.custom-multiselect-option:hover {
  background-color: #0075ff;
  color: white;
}

.custom-multiselect-option input[type="checkbox"] {
  margin: 0;
  margin-right: 8px;
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: #0075ff;
}

.custom-multiselect-option .option-text {
  flex: 1;
  white-space: normal;
  overflow: visible;
}

/* Pagination styles */
.pagination-container {
  padding: 8px 0;
  border-top: 1px solid #dee2e6;
  background-color: #f8f9fa;
}

.pagination-info {
  font-size: 14px;
  color: #6c757d;
}

.pagination .page-link {
  color: #0075ff;
  background-color: #fff;
  border: 1px solid #dee2e6;
  padding: 0.375rem 0.75rem;
  font-size: 14px;
}

.pagination .page-link:hover {
  color: #0075ff;
  background-color: #e9ecef;
  border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
  background-color: #0075ff;
  border-color: #0075ff;
  color: white;
}

.pagination .page-item.disabled .page-link {
  color: #6c757d;
  background-color: #fff;
  border-color: #dee2e6;
  cursor: not-allowed;
}

.form-select-sm {
  padding: 0.25rem 0.5rem;
  font-size: 14px;
  border-radius: 0.2rem;
}

/* Стили для размещения "Показывать" и пагинации на одной линии */
.pagination-controls-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.page-size-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.pagination-nav {
  flex-shrink: 0;
}

/* Стили для модального окна товара */
.product-modal-container {
  max-width: 600px;
  width: 90%;
}

.product-modal-title h4 {
  margin: 0;
  color: #333;
  font-weight: 600;
}

.product-modal-title small {
  font-size: 0.875rem;
}

.close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6c757d;
  padding: 0;
  margin-left: 1rem;
}

.close:hover {
  color: #000;
}

.nav-tabs {
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 1rem;
}

.nav-tabs .nav-link {
  border: 1px solid transparent;
  border-top-left-radius: 0.375rem;
  border-top-right-radius: 0.375rem;
  padding: 0.5rem 1rem;
  color: #495057;
  background: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
  border-color: #e9ecef #e9ecef #dee2e6;
  isolation: isolate;
}

.nav-tabs .nav-link.active {
  color: #495057;
  background-color: #fff;
  border-color: #dee2e6 #dee2e6 #fff;
}

.tab-content {
  min-height: 200px;
}

.tab-content-placeholder {
  padding: 2rem;
  text-align: center;
}

/* Стили для формы параметров заказа */
.order-params-form {
  padding: 1.5rem;
}

.order-params-form .form-group {
  margin-bottom: 1.5rem;
}

.order-params-form .form-check {
  margin-bottom: 0.5rem;
}

.order-params-form .form-check-label {
  font-weight: 400;
  color: #495057;
}

.order-params-form .form-label {
  font-weight: 400;
  color: #495057;
  margin-bottom: 0.5rem;
}

.order-params-form .form-control {
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

.order-params-form .form-control:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.order-params-form .form-check-input:checked {
  background-color: #007bff;
  border-color: #007bff;
}

.order-params-form .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.order-params-form hr {
  margin: 1.5rem 0;
  border-top: 1px solid #dee2e6;
}

.order-params-form .spinner-border {
  width: 2rem;
  height: 2rem;
  color: #007bff;
}

.tab-pane {
  display: none;
}

.tab-pane.show.active {
  display: block;
}

/* Стили для кликабельных наименований товаров */
.product-name-link {
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
}

.product-name-link:hover {
  text-decoration: underline;
}

