/**
 * 🔐 AUTH UI STYLES
 * Стили для компонентов аутентификации и пользовательского меню
 * Вынесено из inline стилей business1_index.html для enterprise архитектуры
 */

/* Header Content Layout */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 9999; /* Высокий z-index для header-user */
}

/* User Dropdown Container */
.user-dropdown {
    position: relative;
    z-index: 9999; /* Высокий z-index для контейнера */
}

/* User Info Display */
.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.user-info.clickable {
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.user-info.clickable:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
}

.user-role {
    font-size: 11px;
    color: #94a3b8;
    background: rgba(99, 102, 241, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
}

/* User Dropdown Menu - ФИНАЛЬНОЕ РЕШЕНИЕ: menu в body */
.user-menu {
    position: fixed !important; /* FIXED так как теперь в body */
    top: 60px !important; /* Прямо под header */
    right: 20px !important;
    margin: 0 !important;
    padding: 8px 0 !important;
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
    min-width: 250px !important;
    width: auto !important;
    z-index: 10000 !important; /* Высокий z-index, теперь работает так как menu в body */
    display: none; /* По умолчанию скрыт */
    overflow: visible !important;
}

/* Когда menu должен быть видим - переопределяем display */
.user-menu[style*="block"] {
    display: block !important;
}

.user-menu .menu-item {
    padding: 12px 20px !important; /* Больше padding для читаемости */
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex !important;
    align-items: center;
    gap: 10px;
    color: #e2e8f0 !important;
    white-space: nowrap !important; /* Текст не переносится */
    font-size: 14px !important;
    line-height: 1.5 !important;
    border: none !important;
    background: transparent !important;
    width: 100% !important;
    text-align: left !important;
}

.user-menu .menu-item:hover {
    background-color: #334155 !important;
}

.user-menu .menu-item:first-child {
    border-radius: 8px 8px 0 0;
}

.user-menu .menu-item:last-child {
    border-radius: 0 0 8px 8px;
}

.user-menu .menu-item i {
    width: 20px;
    flex-shrink: 0; /* Иконка не сжимается */
}

/* Logout Button */
.btn-logout {
    padding: 8px 16px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Password Change Modal */
.modal .modal-content.small {
    max-width: 500px;
}

#change-password-form .form-group {
    margin-bottom: 16px;
}

#change-password-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #e2e8f0;
}

#change-password-form input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #334155;
    border-radius: 4px;
    background: #0f172a;
    color: #e2e8f0;
}

#change-password-form small {
    color: #94a3b8;
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

