/* Скрыть disabled опции в select */
select option[disabled] {
    display: none;
}

select option[style*="display: none"] {
    display: none !important;
}

/* Панель уведомлений */
.notification-bar {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
    text-align: center;
}

.notification-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.notification-error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

/* Адаптивные стили для шапки */

/* Обычная раскладка: заголовок слева, [кнопки + имя] справа */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.user-name {
    color: #667eea;
    font-weight: 500;
    font-size: 1.1em;
    white-space: nowrap;
}

/* Раскладка для админа (47080643): заголовок + имя сверху, кнопки снизу справа */
#main-header.admin-layout .header-row {
    flex-wrap: wrap;
}

#main-header.admin-layout .header-right {
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

#main-header.admin-layout .user-name {
    order: -1; /* Имя пользователя первым (сверху) */
}

#main-header.admin-layout .header-buttons {
    justify-content: flex-end;
}

/* Мобильная адаптация */
@media (max-width: 900px) {
    .header-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-row h1 {
        text-align: center;
        font-size: 1.5em !important;
    }
    
    .header-right {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .user-name {
        font-size: 1em;
        order: -1;
    }
    
    .header-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .header-buttons .btn {
        padding: 8px 10px;
        font-size: 0.8em;
    }
    
    /* Для админа на мобильном - так же как для остальных */
    #main-header.admin-layout .header-right {
        flex-direction: column;
        width: auto;
        justify-content: center;
        align-items: center;
    }
    
    #main-header.admin-layout .user-name {
        order: -1;
    }
    
    /* Статистика на мобильных - компактный размер */
    .stats {
        flex-wrap: nowrap !important;
        gap: 4px !important;
    }
    
    .stats .stat-card {
        flex: 1 !important;
        min-width: 0;
        padding: 10px 6px !important;
    }
    
    .stat-value {
        font-size: 1.3em !important;
    }
    
    .stat-label {
        font-size: 0.7em;
        line-height: 1.2;
    }
}

@media (max-width: 600px) {
    .header-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .header-buttons .btn,
    .header-buttons a.btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    /* Статистика на мобильных - очень компактный размер */
    .stats {
        flex-wrap: nowrap !important;
        gap: 2px !important;
    }
    
    .stats .stat-card {
        flex: 1 !important;
        min-width: 0;
        padding: 6px 2px !important;
        border-radius: 6px !important;
    }
    
    .stat-value {
        font-size: 1em !important;
    }
    
    .stat-label {
        font-size: 0.55em;
        line-height: 1.1;
    }
    
    /* Кнопки в карточках заявок */
    .ticket-actions {
        flex-wrap: wrap;
    }
    
    .ticket-actions .btn {
        flex: 1 1 45%;
        min-width: 120px;
    }
}
