main > .container {
    padding: 70px 15px 20px;
}

.footer {
    background-color: #f5f5f5;
    font-size: .9em;
    height: 60px;
}

.footer > .container {
    padding-right: 15px;
    padding-left: 15px;
}

.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th {
    white-space: nowrap;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align the logout "link" (button in form) of the navbar */
.nav li > form > button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.5);
}

@media(max-width:767px) {
    .nav li > form > button.logout {
        display:block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.nav > li > form > button.logout:focus,
.nav > li > form > button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.nav > li > form > button.logout:focus {
    outline: none;
}

.form-group {
    margin-bottom: 1rem;
}


/**
=============================
 */
/* Основной цвет навигационной панели */
.navbar {
    background-color: #4d7198 !important;
    border-color: #3d5a7a;
}

/* Цвет бренда и текста в шапке */
.navbar-brand,
.navbar-nav .nav-link {
    color: #ffffff !important;
}

/* Цвет кнопки навигации (бургер) */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-toggler {
    border-color: rgba(255,255,255,0.5);
}

/* Цвет активного пункта меню */
.navbar-nav .nav-item.active .nav-link {
    background-color: rgba(0,0,0,0.1);
    border-radius: 4px;
}

/* Эффекты при наведении */
.navbar-nav .nav-link:hover {
    background-color: rgba(0,0,0,0.15);
    border-radius: 4px;
    color: #fff !important;
}

/* Цвет выпадающего меню */
.navbar-nav >.dropdown-menu {
    background-color: #4d7198;
    border: 1px solid #3d5a7a;
}

.navbar-nav >.dropdown-item {
    color: #ffffff;
}

.navbar-nav >.dropdown-item:hover {
    background-color: #3d5a7a;
    color: #fff;
}

/* Для кнопки выхода */
.navbar-nav .logout-form button {
    color: #ffffff !important;
}

.navbar-nav .logout-form button:hover {
    color: #f8f9fa !important;
    text-decoration: underline;
}


/*dropzone */
#my-dropzone {
    border: 2px dashed #dee2e6 !important;  /* Серая пунктирная граница */
    border-radius: 1rem !important;         /* Закругленные углы */
    background: #f8f9fa;                    /* Светло-серый фон */
    min-height: 200px;
    padding: 20px;
    position: relative;
}
/* Красный крестик для ошибок */
.dz-error-mark svg path {
    fill: #dc3545 !important; /* Красный цвет Bootstrap */
    stroke: #dc3545 !important;
}

/* Зеленая галочка для успеха */
.dz-success-mark svg path {
    fill: #28a745 !important; /* Зеленый цвет Bootstrap */
    stroke: #28a745 !important;
}

/* Дополнительно можно стилизовать сами метки */
.dz-error-mark, .dz-success-mark {
    opacity: 0.8;
    transform: scale(1.2); /* Немного увеличим */
}


.dz-success-mark,
.dz-error-mark {
    opacity: 0 !important;
    transition: opacity 0.3s ease;
}

/* Показываем только при соответствующих событиях */
.dz-success .dz-success-mark,
.dz-error .dz-error-mark {
    opacity: 1 !important;
}

/* Стили для постоянного отображения (после загрузки) */
.dz-success .dz-success-mark {
    display: block !important;
    pointer-events: auto !important;
}


/**
=====================================
 */

/* Выделение строки */
.grid-view tbody tr.selected-row {
    background-color: #0d6efd !important;
    color: white !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Эффект наведения */
.grid-view tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.1) !important;
    cursor: pointer;
}

/* Анимация подсветки */
.grid-view tbody tr.row-highlight {
    animation: highlight-fade 1s ease-out;
}

@keyframes highlight-fade {
    0% {
        background-color: #ffc107;
    }
    100% {
        background-color: transparent;
    }
}

/* Фиксированная ширина для таблицы */
.grid-view {
    width: 100%;
    overflow-x: auto;
}


/**
=============================
 */

/* Кнопка выезжающей панели */
.email-panel-btn {
    position: fixed;
    left: 20px;
    bottom: 20px;  /* Изменил с top: 50% на bottom: 20px */
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.email-panel-btn:hover {
    transform: scale(1.08);  /* Убрал translateY */
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.email-panel-btn i {
    font-size: 26px;
}

.email-panel-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ef4444;
    color: white;
    border-radius: 50%;
    padding: 4px 7px;
    font-size: 11px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Выезжающая панель */
.email-panel {
    position: fixed;
    left: -420px;
    bottom: 0;
    width: 420px;
    /* Вместо 70vh используем расчет от верха, чтобы не перекрывать нави */
    /* Предположим, ваш navbar высотой 70px. Сделаем отступ 80px */
    top: 80px;

    height: auto; /* Высота подстроится под top и bottom */
    background: #ffffff;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);

    /* Поднимаем выше навигации (у Bootstrap Nav обычно 1030) */
    z-index: 1060;

    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;

    /* Скруглим углы сверху и снизу справа для красоты */
    border-radius: 0 20px 0 0;
}
.email-panel.open {
    left: 0;
}

/* Затемнение фона */
.email-panel-overlay {
    z-index: 1055;
    backdrop-filter: blur(2px);
}

.email-panel-overlay.show {
    display: block;
}

/* Хедер панели */
.email-panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.email-panel-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.email-panel-header h5 i {
    margin-right: 8px;
}

.close-panel {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-panel:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

/* Счетчик писем в хедере */
.email-counter {
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Вкладки в панели */
.email-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 0 16px;
}

.email-tab {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.email-tab:hover {
    color: #667eea;
}

.email-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Список писем */
.email-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

/* Элемент письма */
.email-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #f0f0f0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.email-item:hover {
    background: #f9fafb;
    transform: translateX(3px);
    border-color: #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.email-item.unread {
    background: #f0f9ff;
    border-left: 3px solid #667eea;
}

.email-subject {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1f2937;
}

.email-from {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

.email-from i {
    font-size: 11px;
}

.email-preview {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-date {
    font-size: 10px;
    color: #9ca3af;
}

/* Пустое состояние */
.empty-emails {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.empty-emails i {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Анимация загрузки */
.email-loading {
    text-align: center;
    padding: 60px 20px;
}

/* Композер письма */
.compose-btn {
    margin: 16px;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.compose-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}