/* Сброс */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Глобально */
body, * {
    font-family: 'Manrope', sans-serif;
}

body {
    background: #fff;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

/* Лого и заголовок (страница входа) */
.login-header {
    text-align: center;
    margin: 40px 0 20px;
}

.index-logo img {
    max-width: 180px;
    height: auto;
}

.index-logo div {
    font-size: 14px;
    margin-top: 5px;
    color: #333;
}

/* Блок логина */
.login {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.login-container {
    width: 320px;
    padding: 30px;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
}

.login-container h2 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.login-container p {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
}

/* Поля формы */
form label {
    display: block;
    position: relative;
    margin-bottom: 20px;
}

form input[type="text"],
form input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

form input[type="text"]:focus,
form input[type="password"]:focus {
    border-color: #007bff;
}

form label span {
    position: absolute;
    top: -10px;
    left: 12px;
    font-size: 12px;
    background: #fff;
    padding: 0 4px;
    color: #666;
}

/* Чекбокс */
.checkbox-container {
    text-align: left;
    margin-bottom: 20px;
    font-size: 14px;
    color: #333;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 6px;
}

/* Кнопка */
.btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    background: #e0a8a8;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #d18f8f;
}

/* Футер */
.footer {
    margin-top: 20px;
}

.footer a {
    font-size: 14px;
    color: #2a4cff;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Шапка сайта */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-bottom: 3px solid #222;
}

.site-header__logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.site-header__logo img {
    height: 32px;
    width: auto;
}

.site-header__role {
    font-size: 15px;
    font-weight: 500;
    color: #444;
    border-left: 1px solid #ccc;
    padding-left: 14px;
}

.site-header__nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Кнопки навигации */
.nav-btn {
    display: inline-block;
    padding: 7px 16px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.nav-btn:hover {
    background: #f2f2f2;
}

.nav-btn--active {
    background: #e9ecef;
    border-color: #ccc;
    color: #000;
}

.nav-btn--logout {
    color: #c0392b;
    border-color: #e0a8a8;
}

.nav-btn--logout:hover {
    background: #fbeaea;
}

.nav-btn--download {
    color: #2e7d32;
    border-color: #b8d9b8;
}

.nav-btn--download:hover {
    background: #eaf5ea;
}

/* Заголовок страницы */
.page-header {
    margin: 24px 0 8px;
    padding: 0 10px;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 600;
}

/* Контейнер таблицы */
.table-wrapper {
    max-height: 85vh;       /* таблица занимает почти весь экран */
    overflow-y: auto;       /* вертикальный скролл */
    border: 1px solid #ddd;
    border-radius: 6px;
    display: block;
}

/* Таблица заказов */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 14px;   /* текст в таблице */
    table-layout: fixed;
}

.orders-table th,
.orders-table td {
    padding: 10px;
    border: 1px solid #ddd;
    word-wrap: break-word;
}

.orders-table thead th {
    position: sticky;
    top: 0;
    background: #f8f8f8;
    z-index: 5;
}

/* Колонка с фото */
.orders-table td:first-child,
.orders-table th:first-child {
    width: 65px;
    min-width: 65px;
    max-width: 65px;
    text-align: center;
    vertical-align: middle;
    padding: 3px;
    overflow: hidden;
}

/* Фото */
.orders-table td img {
    width: 55px;
    height: 50px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    max-width: 100%;
}

/* Popup (модальное окно) */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 6px;
    width: 400px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.modal-content h2 {
    margin-bottom: 15px;
    font-size: 18px;
}

.modal-content p {
    margin: 8px 0;
}

.close-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background: #e0a8a8;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.close-btn:hover {
    background: #d18f8f;
}

/* Современный селектор клиента */
.client-select {
    position: relative;
    display: inline-block;
    width: 280px;
}

.client-select select {
    width: 100%;
    padding: 14px 12px 6px 12px;
    font-size: 16px; /* побольше */
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    appearance: none;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.client-select select:focus {
    border-color: #007bff;
    box-shadow: 0 2px 6px rgba(0,123,255,0.2);
    outline: none;
}

.client-select label {
    position: absolute;
    top: 4px;
    left: 12px;
    font-size: 11px;
    color: #777;
    pointer-events: none;
}

/* Блок выбора клиента */
.filter-block {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: 20%;
    margin-top: 10px;
    margin-bottom: 20px;
}

/* Поиск */
.search-input {
    height: 44px;
    padding: 0 14px;
    font-size: 14px;
    font-family: 'Manrope', sans-serif;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    width: 300px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    border-color: #007bff;
    box-shadow: 0 2px 6px rgba(0,123,255,0.15);
}

.search-block {
    margin: 0 0 16px 0;
    padding: 0 10px;
}

/* Кнопка экспорта */
.btn-export {
    padding: 0 20px;
    height: 44px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Manrope', sans-serif;
    border: 1px solid #b8d9b8;
    border-radius: 8px;
    background: #fff;
    color: #2e7d32;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.btn-export:hover {
    background: #eaf5ea;
}

/* Кнопка обновления данных */
.btn-refresh {
    padding: 0 20px;
    height: 44px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Manrope', sans-serif;
    border: 1px solid #e0a8a8;
    border-radius: 8px;
    background: #fff;
    color: #c0392b;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.btn-refresh:hover {
    background: #fbeaea;
}

.btn-refresh:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Статус обновления */
.refresh-status {
    font-size: 13px;
    color: #555;
}



.calc-container {
    display: flex;
    gap: 30px;
    background: #f6f9f6;
    padding: 30px;
    border-radius: 12px;
    margin-top: 20px;
}

.calc-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.calc-form label {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: #333;
}

.calc-form select {
    margin-top: 6px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.calc-form select:focus {
    border-color: #007bff;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

/* Правый блок */
.calc-result {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.calc-result h2 {
    font-size: 20px;
    margin-bottom: 15px;
}

.calc-result table {
    width: 100%;
    border-collapse: collapse;
}

.calc-result td {
    padding: 8px 4px;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.calc-result td:last-child {
    text-align: right;
}

.calc-result tr.total td {
    font-weight: bold;
    color: #c00;
    font-size: 16px;
}


/* Фото из порта */
.orders-table td:nth-child(13),
.orders-table th:nth-child(13) {
    min-width: 110px;     /* шире */
    white-space: nowrap;  /* не переносить слово */
}

/* Номер контейнера */
.orders-table td:nth-child(15),
.orders-table th:nth-child(15) {
    min-width: 140px;     /* чуть шире, чтобы влезал текст */
}

/* Информация о плательщике */
.orders-table td:last-child,
.orders-table th:last-child {
    min-width: 160px;     /* расширили колонку */
    white-space: nowrap;  /* не переносить по словам */
    text-align: center;
}

/* Общие настройки для таблицы */
.orders-table {
    table-layout: auto;   /* вместо fixed, чтобы ширина подстраивалась */
}

/* Фото из порта */
.orders-table td:nth-child(13),
.orders-table th:nth-child(13) {
    min-width: 130px;     /* ещё шире */
    white-space: nowrap;  /* запрет переноса */
    text-align: center;
}

/* Номер контейнера */
.orders-table td:nth-child(15),
.orders-table th:nth-child(15) {
    min-width: 160px;     /* шире, чтобы влезли 2–3 символа */
    text-align: center;
}

/* Информация о плательщике */
.orders-table td:last-child,
.orders-table th:last-child {
    min-width: 200px;     /* делаем просторнее */
    white-space: nowrap;  /* в одну строку */
    text-align: center;
}
