/* ========================================= */
/* == СТИЛИ ПРОФИЛЯ (ЧЕРНО-СЕРО-БЕЛАЯ ГАММА) == */
/* ========================================= */

/* Заголовок страницы */
.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.page-title {
    font-size: 2em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #222;
}

.page-icon {
    font-size: 1.2em;
}

/* --- Стили для страницы профиля --- */
.profile-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    align-items: flex-start;
    margin-top: 40px;
}

.profile-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.profile-identity-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-main-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #222;
    color: white;
    font-size: 3em;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.profile-main-avatar:hover {
    transform: scale(1.05);
}

.profile-identity-card h2 {
    margin: 0 0 10px 0;
    font-size: 1.6em;
    font-weight: 600;
    color: #222;
}

.profile-identity-card .email {
    color: #666;
    font-size: 0.95em;
    word-break: break-all;
    margin-bottom: 20px;
}

/* Бейджи статуса */
.profile-badge {
    margin: 20px 0;
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.badge-admin {
    background: #222;
    color: white;
}

.badge-staff {
    background: #555;
    color: white;
}

.badge-user {
    background: #f0f0f0;
    color: #666;
}

/* Статистика профиля */
.profile-stats {
    display: flex;
    gap: 20px;
    width: 100%;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #f0f0f0;
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-value {
    font-size: 1.1em;
    font-weight: 600;
    color: #222;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85em;
    color: #999;
}

/* Детальная информация */
.profile-details-card h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    color: #222;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.2s ease;
}

.detail-item:hover {
    background-color: #fafafa;
    padding-left: 10px;
    padding-right: 10px;
    margin-left: -10px;
    margin-right: -10px;
    border-radius: 6px;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item .label {
    color: #666;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.label-icon {
    font-size: 1.1em;
}

.detail-item .value {
    font-weight: 600;
    color: #222;
}

/* Кнопки действий */
.profile-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.profile-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #222;
    border: none;
    color: white;
}

.btn-primary:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: white;
    border: 2px solid #222;
    color: #222;
}

.btn-secondary:hover {
    background: #222;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ========================================= */
/* == СТИЛИ МОДАЛЬНЫХ ОКОН == */
/* ========================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-overlay.visible {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 550px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f8f8;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
    color: #222;
}

.close-button {
    background: white;
    border: 1px solid #ddd;
    font-size: 1.8em;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    color: #666;
}

.close-button:hover {
    background: #222;
    color: white;
    border-color: #222;
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

/* Стили для полей формы */
.form-field {
    margin-bottom: 22px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #222;
    font-size: 0.95em;
}

.form-field input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1em;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-field input:focus {
    border-color: #222;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
    background: white;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.85em;
    color: #999;
}

/* Сообщения об ошибках и успехе */
.form-errors {
    background: #fff5f5;
    border-left: 4px solid #d93025;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.form-errors ul,
.form-errors .error-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #c53030;
}

.form-errors li {
    margin-bottom: 5px;
}

.form-errors li:last-child {
    margin-bottom: 0;
}

.form-success {
    margin-bottom: 20px;
}

.alert {
    padding: 15px;
    border-radius: 6px;
    font-weight: 500;
}

.alert-success {
    background: #f0fdf4;
    border-left: 4px solid #10b981;
    color: #065f46;
}

/* Кнопки в модальных окнах */
.modal-content .btn-primary {
    padding: 14px 24px;
    font-size: 1em;
    width: 100%;
    background: #222;
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-content .btn-primary:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Курсоры */
.modal-content input {
    cursor: text;
}

.modal-content button {
    cursor: pointer;
}

/* Адаптивность */
@media (max-width: 768px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-actions {
        flex-direction: column;
    }

    .profile-stats {
        flex-direction: column;
        gap: 15px;
    }

    .modal-content {
        max-width: 95%;
    }
}