/* General Styles */
body {
    margin: 0;
    height: 100%;
    padding: 0;
    font-family: Verdana;
    background-color: #f4f4f9;
    color: #333;
    overflow: hidden; /* Убираем скроллинг всей страницы */
}

/* Header Styles */
.main-header {
    display: flex;
    flex-direction: column;
    background-color: #004080;  
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-panel {
    display: flex;
    justify-content: flex-start;
    padding: 8px 0px 8px 20px;
}

/*
.user-menu {
    position: relative;
    display: inline-block;
    margin-left: auto;
    margin-right: 20px;
}

*/

.user-icon {
    width: 32px;
    height: 26px;
    border-radius: 1%;
    cursor: pointer;
}


#user-button {
    background: none;
    border: none;
    padding: 0;
}


.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    overflow: hidden;
    z-index: 9200;
}

.dropdown-content a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: black;
    font-size: 14px;
    white-space: nowrap;
}

.dropdown-content a:hover {
    background-color: #f4f4f4;
}



/* Сервисная кнопка */
.service-button {
    background-color: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.service-button img {
    height: 30px;
    padding-right: 13px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.service-button:hover img {
    transform: scale(1.1);
}

.title-input {

    position: absolute;
    top: 8px; /* Регулируй, куда его поместить */
    right: 126px; /* Например, в верхний правый угол */
    background: rgba(255, 255, 255, 0.1);
    padding: 0px 10px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 35px;
    white-space: nowrap;
	width: 480px;
justify-content: space-between;
}

label {
    font-size: 16px;
  color: #c2d9f1;
}

        
.button-title {

width: 80px;
    text-align: center;
    margin: 4px 0px 4px 7px;
    padding: 3px 0px;
    background: #3498db;
    color: #c2d9f1;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
        }

.button-title:hover {
            background: #2980b9;
        }
    
.large-dock-panel {
        display: flex;
        flex-wrap: nowrap;
        background: #004080;
        gap: 10px;
        width: 1000px;
    }

    .filter-template-item {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px 15px;
        border-radius: 8px;
        font-size: 14px;
/*        white-space: nowrap; */
        cursor: pointer;
        transition: background 0.3s ease;
    }

    .dock-panel-filter-item { background-color: #3498db; color: #c2d9f1; }
    .template-item { background-color: #35948d; color: #c2d9f1; }

    .filter-template-item:hover {
        opacity: 0.8;
    }
.blink {
  animation: blink-animation 0.6s ease-in-out;
}

@keyframes blink-animation {
  0% { background-color: red; }
  50% { background-color: transparent; }
  100% { background-color: red; }
}






.filter-container {
    position: absolute;
    top: calc(8px + 40px); /* Под title-input */
    right: 120px;
    display: flex;
    flex-direction: column;
    gap: 10px; /* Отступ между элементами */
    width: 480px;
}

/* Общий стиль для новых элементов */
.filter-selection {
    background: rgba(255, 255, 255, 0.1);
    padding: 0px 10px; /* Как у title-input */
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    width: 480px; /* Чтобы ширина совпадала с title-input */
	justify-content: space-between; /* Разводим содержимое по краям */
}

/* Стилизация дропдаунов */
.dropdown-select {
    flex: 1; /* Занимает доступное пространство */
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #c2d9f1;
    font-size: 14px;
    cursor: pointer;
}

/* Делаем выпадающий список видимым */
.dropdown-select option {
    background: white;
    color: black;
}

/* Кнопка RESET в стиле кнопки из title-input */
.dropdown-reset {
width: 80px;
    text-align: center;
    margin: 4px 0px 4px 20px;
    padding: 3px 0px;
    background: #3498db;
    color: #c2d9f1;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.dropdown-reset:hover {
    background: #2980b9;
}



/* Навигация и фильтры */
.navigation {
    padding: 3px 20px;
    display: flex;
    justify-content: space-between;
}

.filters {
    display: flex;
    justify-content: space-start;
    width: 100%;
}

.filter-group {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 3px;
    padding-right: 10px;
}

.filter-item {
    width: 50px; /* Ширина одного спрайта */
    height: 36px; 
    background-image: url('/index/img/panes_Market.png'); 
    background-size: 707px 77px; 
    background-repeat: no-repeat;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.filter-item:hover {
    transform: scale(1.1);
}



/* Базовый стиль для кнопки */
.filter-item {
    position: relative;
    overflow: hidden;
}

/* Перечёркивание красным крестом при data-active="true" */
.filter-item[data-active="true"]::before,
.filter-item[data-active="true"]::after {
    content: '';
    position: absolute;
    width: 120%; /* Линия длиннее кнопки */
    height: 2px; /* Толщина линии */
    background-color: red;
    z-index: 2;
    top: 50%; /* Центрирование */
    left: -10%; /* Увеличенный отступ */
    transform-origin: center;
}

/* Первая линия креста */
.filter-item[data-active="true"]::before {
    transform: rotate(45deg);
}

/* Вторая линия креста */
.filter-item[data-active="true"]::after {
    transform: rotate(-45deg);
}




.filter-item-1 { background-position: 0px 0px; }
.filter-item-2 { background-position: -58px 0px; }
.filter-item-3 { background-position: -116px 0px; }
.filter-item-4 { background-position: 0px -41px; }
.filter-item-5 { background-position: -58px -41px; }
.filter-item-6 { background-position: -116px -41px; }
.filter-item-7 { background-position: -181px 0px; }
.filter-item-8 { background-position: -240px 0px; }
.filter-item-9 { background-position: -298px 0px; }
.filter-item-10 { background-position: -182px -41px; }
.filter-item-11 { background-position: -240px -41px; }
.filter-item-12 { background-position: -298px -41px; }
.filter-item-13 { background-position: -364px 0px; }
.filter-item-14 { background-position: -422px -19px; }
.filter-item-15 { background-position: -480px 0px; }
.filter-item-16 { background-position: -364px -41px; }
.filter-item-17 { background-position: -422px -19px; }
.filter-item-18 { background-position: -480px -41px; }

/* Кастомный фильтр */
.custom-filter {
    width: 50px;
    height: 36px;
    background-color: #f4f4f9;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: all 0.3s ease;  
}

.custom-filter.active {
    background-color: #444;
    color: #fff;
    border: 1px solid white;
    transform: scale(0.9);
    opacity: 0.4;
}

.custom-filter:hover {
    background-color: #d6eaff;
}




.custom-multiselect {
  z-index: 1500;
  width: 130px;
  font-family: sans-serif;
  display: flex; 
  flex-direction: column; 
  gap: 4px;
  position: relative;

}
.custom-multiselect-narrow {
  z-index: 1500;
  width: 35px;
  font-family: sans-serif;
  display: flex; 
  flex-direction: column; 
  gap: 4px;
  position: relative;

}

.uuid-search-input {
   padding: 8px;
}

.select-box {
  border: 1px solid #ccc;
  padding: 8px;
  cursor: pointer;
  background-color: #3498db;
  color: #c2d9f1;
  text-align: center
}

.select-box:hover {
  transform: scale(1.01);
  background-color: #2980b9;
  transition: all 0.3s ease;
}

.select-box.has-selection {
  background-color: #aa4ebb;
  color: #f2f0f2;
}


.select-box.blink {
  animation: blink-red 0.6s ease-in-out;
}

@keyframes blink-red {
  0%   { background-color: red; color: white; }
  50%  { background-color: transparent; color: inherit; }
  100% { background-color: red; color: white; }
}




.checkboxes {
  border: 1px solid #716e6e;
  border-top: none;
  background: #d6d6d6;
  width: 130px;
  z-index: 1;
  max-height: 200px;
  overflow-y: auto;
  box-sizing: border-box;
  position: absolute;
  top: 76px;
}
.checkboxes label {
  display: block;
  padding: 4px 8px;
  cursor: pointer;
  color: #29779e;
}





.header-info {
    position: absolute;
    top: 10px; 
    right: 20px; 
    color: #fff;
    font-size: 14px;
    font-family: Verdana, sans-serif;
}

/* Таблица в верхнем блоке */
.upper-table {
  width: 100%; 
  table-layout: fixed;
  max-height: 100%;  
  margin: 0px auto;
  border-collapse: collapse;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  color: #000062; 
}

.upper-table-wrapper {
  position: relative;
  overflow: hidden; 
  padding-right: 0; 
  background-color: #004080;
  width: calc(100vw - 6px);
}

.upper-table tr {
  border-bottom: none;
}

/* Адаптивность */
@media (max-width: 768px) {
    .filters {
        flex-wrap: wrap;
        gap: 10px;
    }
    .filter-group {
        grid-template-columns: 1fr;
    }
    .filter-item {
        flex: 1;
        text-align: center;
    }
}

/* Поля ввода фильтра */
.filter-input {
  width: 80%;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: 1px;
  margin: 5px 5px 0px 5px;
  box-sizing: border-box;
}
.filter-input[type=number] {
  -moz-appearance: textfield;
}
.filter-input[type=number]::-webkit-inner-spin-button,
.filter-input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.filter-input-double {
  width: 30%;
  margin: 5px 5px 0px 5px;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: 1px;
  box-sizing: border-box;
}
.filter-input-double[type=number] {
  -moz-appearance: textfield;
}
.filter-input-double[type=number]::-webkit-inner-spin-button,
.filter-input-double[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.filter-save-as {
  cursor: pointer;
}


/* Кнопки сброса */
.reset-button {
  background-color: #1e61a9; 
  border: none;
  width: 80%;
  color: #c2d9f1;
  cursor: pointer;
  border-radius: 1px;
  font-family: Verdana;
  font-weight: normal;
  font-size: 10px;
}

.reset-all-button {
  background-color: #c27838;
  color: white;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.9em;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.reset-button:hover,
.reset-all-button:hover {
  /* ваш ховер-эффект */
}

.reset-all-button {
  width: 80%;
}

/* Активная (красная) кнопка сброса */
.reset-button.active {
  background-color: #c27838; 
  position: relative; 
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow: hidden; 
}

.reset-button.active::after {
  content: 'RESET';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.reset-button.active:hover::after {
  opacity: 1;
}

.reset-button.active:hover {
  color: transparent;
}

/* Подсказки (автокомплит) */
#suggestions {
  position: absolute;
  background-color: #3f56ae !important;
  border: 1px solid #ccc;
  max-height: 400px;
  overflow-y: auto;
  z-index: 4000;
  max-width: 400px;
  color: snow;
  font-size: 14px;
  font-family: system-ui;
}

#suggestions div {
  padding: 1px 20px 1px 10px;
  cursor: pointer;
}

#suggestions div:hover {
  background-color: #004080 !important;
}

thead tr:first-child th {
  /* по желанию */
}


/* Таблица */
.table-container {
    height: calc(100vh - 200px); /* Высота таблицы с учётом отступов */
    overflow-y: auto; /* Прокрутка только для контейнера */
    position: relative;

}

/* Общие стили для таблиц */
table {
  width: 100%; 
  table-layout: fixed;
  max-height: 100%;  
  margin: 0px auto;
  border-collapse: collapse;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background: #fff;
  color: #000062; 
}
        
th, td {
  border-right: 1px solid #b2bcd1;
  padding-left: 10px;
  text-align: left;
  white-space: nowrap; 
  overflow: hidden;    
  text-overflow: ellipsis;
}

/* Заголовки таблицы */
th {
  background: #1e61a9 !important;
  color: #c2d9f1; 
  text-align: center;
  position: sticky;
  top: 0px;
  z-index: 1100;
  font-family: Verdana;
  font-weight: normal;
  font-size: 10px;
  padding-left: 0px;
}



tr {
  border-bottom: 1px solid #dadfe8;
}


 tbody#results {
  cursor: default;
}


.ship-row {
  background-color: #ccdde3; /* Светло-голубой для судов */

}

.cargo-row {
 /* background-color: #fde9d0;  Светло-оранжевый для грузов */
}



td {
  color: #000062; 
}

/* Зебра-эффект 
tr:nth-child(even) {
  background: #f2f2f2;
}
*/

#sentinel {
  height: 1px;
  width: 100%;
  background: transparent;
}

/* Классы для столбцов */
.publisher {
  font-size: 13px;
  text-transform: capitalize;
/*  background-color: #f2f2f2;  */
}

.lot_or_dwt {
  font-size: 13px;
  text-align: right;
  border-right: none;
  padding-right: 5px;
}

.margin {
  font-size: 13px;
  text-align: left;
}

.loading_port {
  font-size: 13px;
/*  text-transform: capitalize;
  text-align: right;    */
  border-right: none;
  background-color: #f2f2f2;
}

.discharge_port {
  font-size: 13px;
/*  text-transform: capitalize;   */
  background-color: #f2f2f2;
}

.description {
  font-size: 12px;
  text-transform: uppercase;
}

.similar-info {
  display: inline-block;
  color: #0056b3;
  margin-right: 5px;
  padding: 2px 4px;
  border-radius: 1px;
  font-size: 9px;
  background-color: #e3e6e6;
  cursor: pointer; 
}
             
/* Цвета для характеристик по data-type */
.similar-info[data-type="S"] { background-color: #a53fd4; } /* Красный - SALE */
.similar-info[data-type="T"] { background-color: #a53fd4; } /* Оранжевый - T/C */
.similar-info[data-type="P"] { background-color: #99ccff; } /* Голубой - PC */
.similar-info[data-type="L"] { background-color: #99ccff; } /* Голубой - PC */
.similar-info[data-type="I"] { background-color: #cccccc; } /* Серый - IND */
.similar-info[data-type="B"] { background-color: #3f4ac4; } /* Тёмно-красный - BUY */
.similar-info[data-type="C"] { background-color: #3f4ac4; } /* Оранжевый - T/C */
.similar-info[data-type="N"] { background-color: #66cc66; } /* Зелёный - BUILD */

.freight-idea {
  background-color: #f44336; /* красный фон */
  color: #fff;
  border-radius: 3px;
  padding: 1px 4px;
  margin-left: 6px;
  font-size: 11px;
}


/* Стиль для XX-sim */
.similar-count {
  background-color: #e3e6e6;
  color: #004080;
}

.laycan_start {
  font-size: 13px; 
  text-align: right;
  border-right: none;
  background-color: #f2f2f2;
}

.laycan_end {
  font-size: 13px; 
  background-color: #f2f2f2;
}

.commission,
.similar-posts-table.commission {
  font-size: 10px;
  text-align: center;
}

.chart_owners {
  font-size: 10px;
  text-transform: capitalize;
}

.similar {
  font-size: 10px;
  text-align: center;
}


.age {
  font-size: 10px;
  text-align: center;
}

tr:hover td {
  background-color: #4571a3;
  color: white;
}

.row-hovered td {
  background-color: #4571a3;
  color: white;
}

