* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

/* шапка сверху, контент страницы занимает всё оставшееся окно */
body {
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* страницы без обёртки (подтверждения смены пароля): отступ, который раньше давал margin у body */
body > h1,
body > p {
    margin-left: 8px;
    margin-right: 8px;
}

/* кнопки и поля по умолчанию не наследуют шрифт страницы */
button,
input,
select,
textarea {
    font: inherit;
}

.main {
    display: flex;
    flex: 1;
    /* высота = окно минус шапка, таблицы внутри скроллятся сами (height: "100%") */
    min-height: 0;
}

.navigation-main {
    background-color: #045bbe;
    min-width: 100px;
    min-height: 50px;
    display: flex;
    flex: none;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    padding: 1px 15px;
    position: relative;
    z-index: 100;
}

.nav-left {
    display: flex;
    gap: 8px;
}

.nav-tab,
.dropdown-toggle,
.analysis-nav-tab {
    background-color: transparent;
    color: white;
    display: block;
    font-size: 20px;
    border: none;
    text-decoration: none;
    text-align: center;
}

.nav-tab {
    width: 4em;
    margin: 10px 1px;
}

.dropdown-toggle {
    width: 80px;
    /* растягивается на высоту .dropdown — текст на одной линии с остальными пунктами */
    height: 100%;
}

.analysis-nav-tab {
    width: 100%;
    margin: 10px 1px;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 80px;
    margin: 4px 0 0;
    padding: 4px 0;
    list-style: none;
    background-color: #045bbe;
    border: 1px solid #ddd;
    z-index: 101;
    /* border-radius: 6px; */
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, .1); */
}

.dropdown.open .dropdown-menu {
    display: block;
}

.invisible {
    display: none;
}

.visible-flex {
    display: flex;
}

.main-window {
    flex: 1;
    min-width: 0;
    display: flex;
}

.control-panel {
    flex: none;
    margin: 20px 10px;
    min-width: 50px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.side-filter-panel {
    margin-top: 20px;
    margin-right: 10px;
    margin-left: 8px;
    width: 25vw;
    min-width: 200px;
    transition: width 0.3s ease;
    flex-direction: column;
    gap:10px;
    /* на невысоком экране фильтры скроллятся внутри панели, а не всей страницей */
    overflow-y: auto;
}

.panel-btn {
    min-width: 40px;
    min-height: 40px;
    padding: 0.5px;
    background-color:white;
    font-size: 14px;
}

#main-info {
    width : 100%;
}

.date-filter-input-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-filter {
    display: flex;
    flex-direction: column;
}

#toast-container {
    position: fixed;
    /* не зависит от скролла страницы */
    top: 20px;
    right: 20px;
    z-index: 9999;
    /* выше Tabulator и его модалок */
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    /* контейнер не перехватывает клики по таблице */
}

.toast {
    pointer-events: auto;
    /* а сам тост — кликабелен (крестик, копирование) */
    min-width: 260px;
    max-width: 400px;
    padding: 12px 16px;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    opacity: 0;
    transform: translateX(30px);
    transition: opacity .25s ease, transform .25s ease;
}

.toast.show {
    /* класс добавляем через кадр — иначе анимации не будет */
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    background: #2e7d32;
}

.toast.error {
    background: #c62828;
}

.toast.info {
    background: #1565c0;
}

.input-filter-text {
    width: 100%;
}

#filter-panel-apply-button {
    margin: 0 auto;
    width: 80%;
    height: 30px;
    background-color : #045bbe;
    color: white;
}

#filter-panel-reset-filter-button {
    margin: 0 auto;
    width: 80%;
    height: 30px;
    background-color: transparent;
    color: black;
}

.tabulator .tabulator-col .tabulator-col-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* без этого длинный заголовок обрезается слева, а не многоточием */
.tabulator .tabulator-col .tabulator-col-content .tabulator-col-title-holder {
    min-width: 0;
}

/* серый фон Tabulator (#888) виден под короткими таблицами */
.tabulator {
    background-color: #fff;
}

.main-upload-window {
    min-width : 900px;
    width: 70%;
    margin: auto;
    margin-top: 30px;
    display: flex;
    flex-direction: column;
}

.tabulator .tabulator-cell {
    font-size: 18px;
}

.tabulator .tabulator-cell input,
.tabulator .tabulator-cell select,
.tabulator .tabulator-cell textarea {
    font-size: inherit;
    font-family: inherit;
    line-height: inherit;
    color: inherit;
}

.nav-right {
    margin-left: auto;

    height: 60px;

    display: flex;
    align-items: center;
}

.nav-username {
    height: 60px;
    padding: 0 18px;

    display: flex;
    align-items: center;

    color: white;
    font-size: 16px;
    font-family: inherit;
}

.logout-form {
    height: 60px;
    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;
}

.logout-button {
    appearance: none;
    -webkit-appearance: none;

    height: 60px;
    padding: 0 28px;

    color: white;
    background-color: transparent;
    border: none;

    font-size: 18px;
    font-family: inherit;

    cursor: pointer;
}

.logout-button:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.tabulator .tabulator-row.row-overdue .tabulator-cell {
    background-color: #ffd5d5;
}