/* Общие стили для страницы */
html,
body {
    margin: 0;
    padding: 0;
}

body {
    background-color: #f1ebeb;
    font-family: Arial, sans-serif;
}

.login-page #block-primary-tabs {
    display: none !important;
}

.login-page #block-top-nav {
    min-height: 46px;
}

.login-page #navbarNav {
    min-height: 46px;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
}

.login-page [data-block="page-header"] {
    min-width: auto;
    width: auto;
    position: static;
    margin-left: auto;
    padding-right: 10px;
}

.login-page [data-block="page-header"] #dateTime {
    white-space: nowrap;
}

.login-page [data-block="page-header"] .title {
    display: none;
}

.has-fixed-navbar {
    padding-top: 94px;
}

.courier-panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(210, 160, 10, 0.35);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 14px 34px rgba(120, 78, 0, 0.12);
}

.courier-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.courier-panel__title {
    margin: 0;
    font-size: 22px;
    color: #6a1c00;
}

.courier-panel__subtitle {
    margin: 4px 0 0;
    font-size: 14px;
    color: #5d5d5d;
}

.courier-panel__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.courier-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.courier-summary__card,
.courier-card {
    background: linear-gradient(180deg, #fffaf0 0%, #ffffff 100%);
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: 14px;
    padding: 14px;
}

.courier-summary__label {
    font-size: 13px;
    color: #7a6c52;
}

.courier-summary__value {
    font-size: 26px;
    font-weight: 700;
    color: #8c1d18;
}

.courier-card__title {
    margin: 0 0 10px;
    font-size: 18px;
    color: #6a1c00;
}

.courier-link-code {
    min-height: 24px;
    font-weight: 700;
    color: #8c1d18;
}

.courier-table {
    margin-bottom: 0;
}

.courier-table thead th {
    background: #ffe28a;
    color: #5f1600;
    white-space: nowrap;
}

.courier-table td,
.courier-table th {
    vertical-align: middle;
}

.primary-tabs-wrap {
    display: flex;
    align-items: center;
    min-height: 46px;
}

.primary-tabs {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 3px;
    margin: 0;
    padding: 0;
}

.primary-tabs__item {
    list-style: none;
}

/* Permission-dependent tabs stay hidden until script.js has resolved access.
   This prevents BGT from flashing briefly during report page navigation. */
body:not(.access-ready) [data-page-link="air"] {
    display: none !important;
}

.primary-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 37px;
    padding: 5px 8px;
    border-radius: 13px;
    font-size: 12px;
    font-weight: 500;
    color: #d80000;
    line-height: 1.1;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-tabs .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.55);
    color: #b10000;
    padding: 5px 8px;
}

.primary-tabs .nav-link.active,
.primary-tabs__item.is-active .nav-link {
    background: #ffffff;
    color: #333333;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .top-right {
        position: static;
        text-align: left;
        margin-top: 8px;
    }

    .navbar-center {
        position: static;
        transform: none;
        width: 100%;
        margin: 6px 0;
    }

    .navbar-collapse {
        flex-direction: column;
        align-items: stretch;
    }

    .navbar-nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 4px;
    }

    .primary-tabs-wrap {
        min-height: auto;
        width: 100%;
    }

    .primary-tabs {
        width: 100%;
        gap: 6px;
    }

    .primary-tabs .nav-link {
        min-height: auto;
        width: 100%;
        font-size: 13px;
        padding: 7px 8px;
        border-radius: 14px;
    }

    .primary-tabs .nav-link:hover {
        padding: 7px 8px;
    }

    .has-fixed-navbar {
        padding-top: 86px;
    }

    .title {
        font-size: 14px;
    }

    [data-block="page-header"] {
        min-width: auto;
        align-items: flex-start;
        text-align: left;
    }

    [data-block="page-header"] #dateTime {
        font-size: 12px;
        white-space: normal;
    }

    [data-block="page-header"] .title {
        font-size: 12px;
        width: auto;
        margin-left: 0;
        text-align: left;
        white-space: normal;
    }

    .report-scroll {
        max-height: calc(100vh - 200px);
    }

    .month-grid,
    .report-table,
    .air-table {
        font-size: 11px;
    }

    .month-grid th,
    .month-grid td,
    .report-table th,
    .report-table td {
        padding: 1px 2px;
    }

    .report-wrapper {
        min-width: 1200px;
    }

    .air-table {
        width: 100%;
    }

    .courier-panel {
        padding: 14px;
    }

    .courier-panel__header {
        flex-direction: column;
    }

    .courier-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 12px;
    }

    .user-inline {
        font-size: 12px;
    }

    .report-export-btn {
        font-size: 10px;
        padding: 2px 4px;
    }

    .courier-summary {
        grid-template-columns: 1fr;
    }

    .courier-panel__title {
        font-size: 18px;
    }

    [data-block="page-header"] #dateTime {
        font-size: 11px;
    }

    [data-block="page-header"] .title {
        font-size: 11px;
    }
}
/* Фиксируем страницу отчетов, скролл только внутри таблиц */
.report-page {
    overflow: hidden;
}

.report-scroll {
    max-height: calc(100vh - 140px);
    overflow: auto;
    padding-bottom: 60px;
}

.report-fixed-top {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    margin-top: 0 !important;
    z-index: 1000;
}

#block-top-nav {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1100;
}

#block-primary-tabs {
    position: relative;
    z-index: 1101;
}
/* Фон для страницы 2places */
.dhl-bg {
    background-image: url("boeing-747-8-bcf-dhl-cargo-4k-no-mirroring-S3KI7.jpg.webp");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.dhl-bg .container {
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 16px;
}

/* Стили для заголовков, ссылок и текста */
.title, .nav-link.active, .navbar-nav .nav-link, .time, .top-right {
    color: red;
}

/* Фиксированная навигационная панель */
.navbar-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

/* Стили для заголовка */
.title {
    font-size: 16px;
    text-align: center;
}

/* Стили для отображения времени */
.time {
    font-family: Arial, sans-serif;
    float: right;
}

/* Стили для изображения с закругленными углами */
.rounded-img {
    width: 15%;
    border-radius: 80%;
    box-shadow: 0 0 10px rgba(26, 0, 0, 0.4);
    padding: 0.2em;
    margin-bottom: 1em;
    float: left;
}

/* Изменение размеров при наведении на изображение */
.rounded-img:hover {
    width: 10%;
    transition: width 0.3s;
}

/* Стили для логотипа компании */
.company-logo {
    height: 40px;
    cursor: pointer;
    transition: transform 0.3s;
}

/* Изменение позиции логотипа при наведении */
.company-logo:hover {
    transform: translateX(10px); /* Двигаем логотип вправо на 10px при наведении */
}

/* Стили для верхнего правого блока */
.top-right {
    position: absolute;
    font-size: 16px;
    top: 2px;
    right: 10px;
    text-align: right;
}

[data-block="page-header"] {
    min-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: Arial, sans-serif;
    text-align: right;
}

[data-block="page-header"] #dateTime {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    color: #e10000;
    white-space: nowrap;
}

[data-block="page-header"] .title {
    margin: 4px 0 0 auto;
    display: block;
    width: 100%;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    color: #e10000;
    font-family: Arial, sans-serif;
    text-align: right;
    white-space: nowrap;
}

.navbar-collapse {
    justify-content: space-between;
    position: relative;
}

.navbar-center {
    position: absolute;
    right: 380px;
    transform: none;
    z-index: 1102;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    max-width: 520px;
    pointer-events: auto;
}

#logoutBtn {
    position: relative;
    z-index: 1103;
    pointer-events: auto;
    cursor: pointer;
}

.city-switcher select {
    font-size: 12px;
    padding: 2px 6px;
}

.city-switcher-fixed {
    min-width: 150px;
    padding: 7px 18px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #d2d2d2;
    color: #333333;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    text-align: left;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Предупреждающий фон */
.bg-warning {
    background-color: #f0ad4e;
}

/* Таблицы */
.single-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

/* Размеры колонок */
.small-column {
    width: 20%;
}

.other-column {
    width: 27%;
}

/* Ячейки таблицы */
.single-table td, .single-table th {
    padding: 0;
    border: none;
}

/* Навигационные ссылки */
.nav-link:hover {
    background-color: #f8f7f6;
    color: #333;
    border-radius: 15px;
    padding: 10px 30px;
}

.navbar-nav .nav-link {
    font-size: 16px;
}

/* Таблица данных */
.data-table {
    width: 100%;
    background-color: #d1ccbe;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 16px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

/* Заголовки таблицы данных */
.data-table thead {
    background-color: #ffc107;
    font-family: Arial, sans-serif;
    font-size: 14px;
    text-align: center;
}

.data-table th, .data-table td {
    font-family: Arial, sans-serif;
    width: 150px;
    min-height: 50px;
}

.data-table thead th {
    min-height: 20px;
    line-height: 10px;
}

.data-table tbody tr {
    border-bottom: 1px solid #f50804;
    font-size: 16px;
}

/* Чередование цветов строк */
.data-table tbody tr:nth-of-type(even) {
    background-color: #ffffff;
}

/* Последняя строка таблицы */
.data-table tbody tr:last-of-type {
    border-bottom: 2px solid #e84745;
}

/* Обертка для таблиц */
.tables-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

/* Левые таблицы */
.left-tables {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Заголовки таблиц */
table.data-table caption {
    caption-side: top;
    text-align: center;
    font-size: 16px;
    padding: 10px;
    font-weight: bold;
}

/* Активные ссылки */
a.active {
    font-weight: bold;
}

/* Стили для кнопок навигации */
#daysOfYearNav button:hover::after {
    content: "";
    display: block;
    height: 1px;
    background-color: currentColor;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Модальное окно */
.modal-content {
    background-color: transparent;
}

/* Нижняя навигационная панель */
.navbar-bottom {
    position: fixed;
    font-size: 16px;
    bottom: 0;
    left: 0;
    right: 0;
    overflow-x: auto;
    white-space: nowrap;
    background-color: red;
}

/* Растянуть месяцы по всей ширине внизу */
.navbar-bottom .nav-tabs {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    justify-content: space-between;
}

.navbar-bottom .nav-item {
    flex: 1 1 0;
}

.navbar-bottom .nav-link {
    width: 100%;
    text-align: center;
    padding: 8px 6px;
}

.month-tabs-list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.month-tabs-list > .nav-item {
    flex: 1 1 0;
}

.month-tabs-list > .nav-item > .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    white-space: nowrap;
}

/* Пользователь вверху рядом с временем */
.user-inline {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    color: #d40000;
    font-weight: bold;
    font-size: 14px;
}

.admin-link {
    margin-left: 6px;
    font-size: 12px;
    color: #d40000;
    text-decoration: underline;
}

.admin-link:hover {
    color: #a80000;
}

.admin-user-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e1e1e1;
}

.support-message-list {
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.88);
}

.support-message {
    border-bottom: 1px solid #ececec;
    padding: 10px 0;
}

.support-message:last-child {
    border-bottom: none;
}

.support-message__meta {
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
}

.support-message__body {
    white-space: pre-wrap;
    color: #222;
}

.admin-route-group {
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    background-color: #ffffff;
}

.admin-route-header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.admin-route-header .form-control {
    flex: 1 1 220px;
}

.admin-route-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-route-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.admin-route-row .form-control {
    flex: 1 1 220px;
}

.admin-permissions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-permissions label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.page-bg {
    position: fixed;
    inset: 0;
    background: url("boeing-747-8-bcf-dhl-cargo-4k-no-mirroring-S3KI7.jpg.webp") center / cover no-repeat;
    z-index: -1;
}

.page-content {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 12px;
    padding: 16px;
}

.has-fixed-navbar {
    padding-top: 70px;
}

/* Таблица по месяцам */
.month-grid {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    table-layout: fixed;
}

.month-grid th,
.month-grid td {
    border: 1px solid #d9d9d9;
    text-align: center;
    padding: 2px;
    font-size: var(--month-font-size, 12px);
}

.month-grid thead th {
    background-color: #ffeb3b;
    color: #d40000;
    font-weight: bold;
}

.month-grid-group {
    background-color: #9ccc65;
    color: #000000;
    font-weight: bold;
    width: 90px;
}

.month-grid-sub {
    background-color: #ffeb3b;
    color: #d40000;
    width: 120px;
}

.month-grid-day {
    min-width: var(--month-day-width, 24px);
}

/* Вертикальная подсветка сегодняшнего дня в главной таблице города. */
.month-grid .month-grid-current-day {
    background-color: #fff4a8;
    box-shadow: inset 2px 0 #f1d86a, inset -2px 0 #f1d86a;
}

.month-grid thead .month-grid-current-day {
    background-color: #ffe66b;
    color: #b00000;
}

.month-grid-total {
    min-width: 60px;
    font-weight: bold;
    background-color: #ffeb3b;
    color: #d40000;
}

.month-grid-locked {
    background-color: #f3f3f3;
    color: #666666;
}

/* Отчеты: таблицы по месяцам */
.report-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    align-items: start;
    min-width: 1700px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background-color: #ffffff;
    font-size: 12px;
}

.report-table th,
.report-table td {
    border: 1px solid #d0d0d0;
    padding: 2px 4px;
    text-align: center;
}

.report-table thead th {
    background-color: #ffeb3b;
    color: #d40000;
    font-weight: bold;
}

.report-table td[contenteditable="true"] {
    background-color: #ffffff;
}

.report-input {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    text-align: center;
    font-size: 12px;
}

.report-input:disabled {
    background-color: transparent;
    color: #666666;
}

.report-input-inline {
    width: 60px;
    margin-left: 4px;
}

.report-select {
    border: none;
    background: transparent;
    font-size: 12px;
}

.report-select:disabled {
    color: #666666;
}

.report-table-shipment th,
.report-table-shipment td {
    font-size: 11px;
}

.air-table {
    width: 80%;
    font-size: 0.8em;
}

.air-table th,
.air-table td {
    padding: 2px 3px;
}

.report-locked {
    background-color: #f3f3f3;
    color: #666666;
}

.report-table-right tbody tr:nth-of-type(even) td {
    background-color: #e9f4f9;
}

.report-table-right tbody tr:nth-of-type(odd) td {
    background-color: #b7f05c;
}

.report-table-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.report-export-btn {
    align-self: flex-start;
    font-size: 11px;
    padding: 2px 6px;
}

.report-table tbody tr {
    height: 24px;
}

.row-yes td {
    background-color: #ffeb3b !important;
}

.row-no td {
    background-color: #b7f05c !important;
}

.report-table-right th,
.report-table-right td {
    min-width: 160px;
}

.report-table-right th:first-child,
.report-table-right td:first-child {
    min-width: 220px;
}

.report-table-left,
.report-table-middle,
.report-table-shipment {
    table-layout: auto;
}

.awb-col {
    min-width: 150px !important;
    width: 150px !important;
}

.total-col {
    min-width: 120px !important;
    width: 120px !important;
}

.sum-col {
    min-width: 110px !important;
    width: 110px !important;
}

.city-to-col {
    min-width: 103px !important;
    width: 103px !important;
}

.report-table-right {
    min-width: 400px;
}

/* Responsive layout: desktop, tablet and phone. Kept at the end so these
   rules reliably override the legacy fixed desktop positioning above. */
.mobile-brand {
    display: none;
}

@media (max-width: 1199.98px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    body.has-fixed-navbar {
        padding-top: 0;
    }

    #block-top-nav,
    .report-fixed-top {
        position: sticky !important;
        top: 0;
        min-height: 58px;
        padding: 8px 12px;
    }

    .mobile-brand {
        display: block;
        max-width: calc(100% - 60px);
        margin-right: auto;
        color: #c90000;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.15;
        white-space: normal;
    }

    .navbar-expand-lg .navbar-toggler {
        display: block;
        min-width: 44px;
        min-height: 44px;
        padding: 6px 10px;
        border-color: rgba(150, 0, 0, 0.35);
    }

    .navbar-expand-lg .navbar-collapse.collapse:not(.show) {
        display: none !important;
    }

    .navbar-expand-lg .navbar-collapse.collapse.show,
    .navbar-expand-lg .navbar-collapse.collapsing {
        display: flex !important;
    }

    #navbarNav,
    .navbar-collapse {
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding-top: 10px;
    }

    .primary-tabs-wrap,
    .primary-tabs,
    .navbar-nav {
        width: 100%;
    }

    .primary-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .primary-tabs .nav-link,
    .primary-tabs .nav-link:hover {
        width: 100%;
        min-height: 44px;
        padding: 10px 12px;
        font-size: 14px;
        text-align: center;
    }

    .navbar-center {
        position: static;
        right: auto;
        width: 100%;
        max-width: none;
        transform: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        margin: 0;
    }

    .city-switcher {
        flex: 1 1 220px;
    }

    .city-switcher select,
    .city-switcher-fixed {
        width: 100%;
        min-height: 44px;
        padding: 8px 12px;
        font-size: 16px;
    }

    .user-inline {
        flex: 1 1 auto;
        justify-content: flex-start;
        font-size: 14px;
    }

    #logoutBtn {
        min-height: 44px;
        padding-right: 16px;
        padding-left: 16px;
    }

    [data-block="page-header"],
    .top-right {
        display: none;
        position: static;
        min-width: 0;
        width: 100%;
    }

    .login-page #navbarNav {
        display: none !important;
        min-height: 0;
    }

    .login-page .navbar-toggler {
        display: none;
    }

    .login-page .mobile-brand {
        max-width: 100%;
    }

    .container,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl {
        max-width: 100%;
    }

    .page-content,
    .courier-panel,
    .card {
        border-radius: 12px;
    }

    .month-table,
    .report-scroll,
    .table-responsive {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-inline: contain;
    }

    .month-grid {
        min-width: 1500px;
        table-layout: auto;
        font-size: 13px;
    }

    .month-grid th,
    .month-grid td {
        min-width: 38px;
        height: 34px;
        padding: 4px 5px;
        font-size: 13px;
    }

    .month-grid .month-grid-group {
        position: sticky;
        left: 0;
        z-index: 5;
        width: 92px;
        min-width: 92px;
        max-width: 92px;
    }

    .month-grid .month-grid-sub {
        position: sticky;
        left: 92px;
        z-index: 4;
        width: 140px;
        min-width: 140px;
        max-width: 140px;
    }

    .month-grid thead .month-grid-group,
    .month-grid thead .month-grid-sub {
        z-index: 7;
    }

    .report-page {
        overflow: auto;
    }

    .report-scroll {
        max-height: none;
        margin-top: 12px !important;
        padding-right: 10px;
        padding-bottom: 76px;
        padding-left: 10px;
    }

    .report-wrapper {
        min-width: 1680px;
    }

    .air-table {
        width: 100%;
        min-width: 980px;
    }

    .navbar-bottom {
        display: block;
        height: 52px;
        min-height: 52px;
        max-height: 52px;
        padding: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .navbar-bottom .nav-tabs {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start;
        width: max-content !important;
        min-width: 100%;
        height: 52px;
        margin: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .navbar-bottom .nav-item {
        flex: 0 0 auto;
    }

    .navbar-bottom .nav-link {
        min-width: 72px;
        height: 51px;
        min-height: 51px;
        padding: 12px 9px;
        white-space: nowrap;
    }

    input,
    select,
    textarea,
    .form-control,
    .form-select {
        font-size: 16px;
    }
}

@media (max-width: 767.98px) {
    #block-top-nav,
    .report-fixed-top {
        padding: 7px 10px;
    }

    .mobile-brand {
        font-size: 14px;
    }

    .page-content {
        margin-top: 10px !important;
        margin-bottom: 64px !important;
        padding: 8px;
        border-radius: 0;
    }

    #block-admin-layout,
    #block-login-layout,
    #block-register-layout {
        margin-top: 14px !important;
        padding-right: 10px;
        padding-left: 10px;
    }

    #block-admin-layout .card,
    #block-login-layout .card,
    #block-register-layout .card {
        padding: 18px !important;
    }

    .courier-panel {
        padding: 10px;
    }

    .courier-panel__actions,
    .courier-panel__actions .btn {
        width: 100%;
    }

    .courier-panel__actions .btn {
        min-height: 44px;
    }

    .courier-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-user-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-user-item .btn,
    .admin-route-header .btn,
    .admin-route-row .btn {
        min-height: 44px;
    }

    .support-message-list {
        max-height: 55vh;
    }

    .dhl-bg,
    .page-bg {
        background-attachment: scroll;
    }
}

@media (max-width: 575.98px) {
    .primary-tabs {
        grid-template-columns: 1fr;
    }

    .navbar-center,
    .user-inline,
    #logoutBtn {
        width: 100%;
    }

    #logoutBtn {
        display: block;
    }

    .courier-summary {
        grid-template-columns: 1fr;
    }

    .courier-summary__value {
        font-size: 22px;
    }

    .navbar-bottom .nav-link {
        min-width: 64px;
        font-size: 12px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1320px;
    }
}

/* Final mobile correction for the month selector. Bootstrap's navbar rules
   can otherwise turn the twelve tabs into a tall vertical menu. */
@media (max-width: 1199.98px) {
    #block-month-tabs.navbar-bottom {
        position: fixed !important;
        inset: auto 0 0;
        z-index: 1200;
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch;
        width: 100%;
        height: 58px !important;
        min-height: 58px !important;
        max-height: 58px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: pan-x;
        scrollbar-width: none;
    }

    #block-month-tabs.navbar-bottom::-webkit-scrollbar {
        display: none;
    }

    #block-month-tabs #monthTabs.month-tabs-list {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: stretch;
        justify-content: flex-start !important;
        width: max-content !important;
        min-width: 100%;
        height: 58px !important;
        margin: 0;
        padding: 0;
        overflow: visible !important;
        touch-action: pan-x;
    }

    #block-month-tabs #monthTabs.month-tabs-list > .nav-item {
        display: block !important;
        flex: 0 0 auto !important;
        width: auto !important;
        height: 58px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

#block-month-tabs #monthTabs.month-tabs-list > .nav-item > .nav-link {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: auto !important;
        min-width: 78px;
        height: 58px !important;
        min-height: 58px !important;
        padding: 10px 12px !important;
        margin: 0;
        white-space: nowrap;
        font-size: 13px;
        line-height: 1.1;
    }

    .month-table {
        padding-bottom: 8px;
    }
}

/* Нерабочие дни Казахстана: воскресенья и официальные праздники 2026 года. */
.month-grid th.month-grid-non-working,
.month-grid td.month-grid-non-working {
    background: #ffd6d6 !important;
    color: #c00000 !important;
}

.month-grid th.month-grid-non-working {
    font-weight: 800;
}

/* Значения KSX «Доставка», автоматически перенесённые с главной страницы. */
.kostanay-source-cell {
    color: #c00000 !important;
    background: #ffe0e0 !important;
    font-weight: 800 !important;
}

#kostanayMonthTabs .nav-link {
    border: 1px solid #d0d0d0;
    color: #d40000;
    background: #ffeb3b;
    font-weight: bold;
}

#kostanayMonthTabs .nav-link.active {
    color: #d40000;
    background: #ffeb3b;
    border-color: #c00000;
    box-shadow: inset 0 -3px 0 #c00000;
}

.kostanay-source-panel {
    border-top: 3px solid #c00000;
}

@media (max-width: 575.98px) {
    #block-month-tabs #monthTabs.month-tabs-list > .nav-item > .nav-link {
        min-width: 86px;
        font-size: 13px;
    }

    .month-grid th,
    .month-grid td {
        font-size: 14px;
    }
}
