﻿.nav-link.d-flex {
    align-items: center; /* вертикальное выравнивание flex */
}

    .nav-link.d-flex i {
        font-size: 1rem; /* размер иконки равен тексту */
        line-height: 1.5; /* убираем лишнюю высоту */
    }

.nav-link-text {
    line-height: 1.2; /* корректируем для текста */
    display: inline-block; /* гарантируем правильный baseline */
}

body {
    padding: 0px;
    margin: 0px;
    background-color: #f4f6f9;
}

.toprow-title {
    font-weight: bolder;
    font-size: 21px;
}

body .login-page {
    background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
    font-family: 'Segoe UI', sans-serif;
}

.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: 1rem;
    background-color: white;
}

.login-logo {
    width: 80px;
    height: 80px;
}

.form-control, .form-select {
    border-radius: 0.5rem;
    border-color: #cbd5e1;
    padding: 0.55rem 1.275rem;
    font-size: 0.925rem;
}

    .form-control:focus, .form-select:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    }

button[type="submit"] {
    border-radius: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

@media (max-width: 800px) {
    .toprow-title {
        font-weight: bolder;
        font-size: 16px;
    }

    .navbar-brand {
        white-space: nowrap;
    }
}

.errors li {
    margin-left: 10px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    align-items: center;
}

    .filters label {
        font-weight: 600;
        margin-right: 4px;
    }

.pagination {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .pagination button {
        padding: 5px 12px;
    }

@media (max-width: 768px) {
    .top-row .container-fluid {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .navbar-brand {
        flex: 1 1 auto;
        text-align: left;
        margin-left: 8px;
    }

    .navbar-toggler {
        order: 2;
    }
}

/* --- Стилизация дефолтных элементов Bootstrap --- */

/* Кнопки */
.btn {
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
}

    .btn-primary:hover {
        background-color: #1d4ed8;
        border-color: #1d4ed8;
        box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
    }

/* Современные таблицы без поломанных темных шапок */
.table {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
    color: #334155;
    vertical-align: middle;
}

    .table thead th,
    .table-dark th {
        background-color: #000 !important;
        color: #749fdb !important;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.05em;
        border-bottom: 2px solid #e2e8f0 !important;
        border-top: none;
        padding: 0.875rem 1rem;
    }

    .table td {
        padding: 0.875rem 1rem;
        color: #334155;
        vertical-align: middle;
        border-top: 1px solid #f1f5f9;
    }

.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* Карточки */
.card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -2px rgba(0, 0, 0, 0.02);
    background-color: #ffffff;
}

/* Контейнер для текстовых писем */
.email-text-container {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
}

/* Контейнер для HTML писем */
.email-html-container {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

    .email-html-container a {
        color: #2563eb;
        text-decoration: underline;
    }

        .email-html-container a:hover {
            color: #1d4ed8;
        }

    .email-html-container p {
        margin-bottom: 1em;
    }

    .email-html-container br {
        display: block;
        margin: 0.5em 0;
    }
