    .profile-page {
        padding: 30px 0;
    }
    .profile-grid {
        display: grid;
        grid-template-columns: 340px 1fr;
        gap: 30px;
    }
    .profile-left {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    .profile-card {
        background: var(--bg-card);
        border-radius: 20px;
        padding: 30px;
        box-shadow: var(--shadow);
        text-align: center;
    }
    .profile-avatar {
        position: relative;
        display: inline-block;
        margin-bottom: 20px;
    }

    /* Z5: баннер профиля 1500x500 (3:1) на всю ширину, аватар поверх его нижнего края */
    .profile-banner--wide {
        margin: 0 0 40px;
        border-radius: 14px;
        aspect-ratio: 3 / 1;
        background: var(--bg-secondary);
        border: 1px solid var(--border-light);
        overflow: hidden;
    }
    .profile-banner--wide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
    }

    .profile-avatar--overlap {
        margin-top: -64px;
        z-index: 2;
    }

    .profile-avatar--overlap img,
    .profile-avatar--overlap .avatar-placeholder {
        border: 4px solid var(--bg-card);
        box-shadow: 0 0 0 4px var(--bg-card), var(--shadow);
    }

    @media (max-width: 900px) {
        .profile-avatar--overlap {
            margin-top: -70px;
        }
    }
    .profile-avatar img {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        object-fit: cover;
        border: 4px solid var(--color-secondary);
    }
    .avatar-placeholder {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        background: var(--avatar-gradient);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 48px;
        color: white;
        border: 4px solid var(--color-secondary);
        margin: 0 auto;
    }
    /* Стили для бейджей ролей */
    .profile-roles {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        margin-top: 8px;
    }
    .role-badge {
        display: inline-block;
        padding: 2px 12px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: 600;
        color: white;
        text-transform: capitalize;
    }
    /* Фоны подобраны так, чтобы белый текст давал >=4.5:1 */
    .role-badge { background: #6b7280; }
    .role-badge.role-admin { background: #dc2626; }
    .role-badge.role-moderator { background: #6d28d9; }
    .role-badge.role-organizer { background: #c2410c; }
    .role-badge.role-user { background: #6b7280; }
    .role-badge.role-master { background: #166534; }
    .role-badge.role-vip { background: #b45309; }
    .role-badge.role-verified { background: #0369a1; }
    .role-badge.role-partner { background: #4338ca; }

    .profile-info h1 {
        font-size: 24px;
        color: var(--text-primary);
        margin-bottom: 8px;
    }
    .profile-email {
        font-size: 14px;
        color: var(--text-muted);
        margin-bottom: 15px;
    }
    .profile-email i {
        margin-right: 8px;
        color: var(--color-primary-text);
    }
    .profile-bio {
        background: var(--bg-hover);
        padding: 15px;
        border-radius: 12px;
        margin: 15px 0;
        text-align: left;
        display: flex;
        gap: 10px;
    }
    .profile-bio i {
        color: var(--color-primary-text);
        font-size: 18px;
        margin-top: 2px;
    }
    .profile-bio p {
        margin: 0;
        font-size: 14px;
        color: var(--text-secondary);
        line-height: 1.5;
    }
    .profile-joined {
        font-size: 13px;
        color: var(--text-muted);
        margin: 15px 0;
    }
    .profile-joined i {
        margin-right: 8px;
        color: var(--color-primary-text);
    }
    .profile-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin: 15px 0;
        background: var(--bg-hover);
        border-radius: 12px;
        padding: 12px;
    }
    .stat-item {
        text-align: center;
    }
    .stat-item .stat-number {
        display: block;
        font-size: 20px;
        font-weight: 700;
        color: var(--text-primary);
    }
    .stat-item .stat-label {
        font-size: 12px;
        color: var(--text-muted);
    }
    .profile-actions {
        margin-top: 12px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .profile-actions .btn-primary,
    .profile-actions .btn-secondary {
        padding: 8px 20px;
        border-radius: 30px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }

    .profile-right {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    /* Вкладки */
    .profile-tabs {
        display: flex;
        gap: 2px;
        background: var(--bg-secondary);
        border: 1px solid var(--border-light);
        border-radius: 12px;
        padding: 4px;
        box-shadow: none;
        margin-bottom: 20px;
    }
    .tab-btn {
        flex: 1;
        padding: 9px 14px;
        border: none;
        border-radius: 9px;
        background: transparent;
        color: var(--text-secondary);
        font-weight: 600;
        font-size: 14px;
        cursor: pointer;
        transition: background-color 0.15s ease, color 0.15s ease;
    }
    .tab-btn:hover {
        background: var(--bg-hover);
    }
    .tab-btn.active {
        background: var(--bg-card);
        color: var(--text-primary);
        box-shadow: 0 1px 2px rgba(22, 24, 29, 0.08);
    }

    .tab-content {
        display: none;
        background: var(--bg-card);
        border-radius: 16px;
        padding: 20px;
        box-shadow: var(--shadow);
        animation: none;
    }
    .tab-content.active {
        display: block;
    }
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Посты */
    .create-post-form, .create-album-form {
        background: var(--bg-hover);
        padding: 20px;
        border-radius: 12px;
        margin-bottom: 20px;
        border: 1px solid var(--border-color);
    }
    .create-post-form h3, .create-album-form h3 {
        margin-top: 0;
        font-size: 18px;
        color: var(--text-primary);
    }
    .create-post-form textarea {
        width: 100%;
        padding: 10px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: var(--bg-input);
        color: var(--text-primary);
        font-family: inherit;
        resize: vertical;
    }
    .create-post-form .form-group,
    .create-album-form .form-group {
        margin-bottom: 12px;
    }
    .create-post-form .form-actions,
    .create-album-form .form-actions {
        display: flex;
        gap: 10px;
    }

    .posts-feed {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    .post-item {
        background: var(--bg-hover);
        border-radius: 12px;
        padding: 16px;
        border: 1px solid var(--border-light);
    }
    .post-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
    }
    .post-header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .post-author {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .post-avatar, .post-avatar-placeholder {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        object-fit: cover;
    }
    .post-avatar-placeholder {
        background: var(--avatar-gradient);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: 600;
        font-size: 14px;
    }
    .post-username {
        font-weight: 600;
        color: var(--text-primary);
        font-size: 14px;
    }
    .post-date {
        font-size: 12px;
        color: var(--text-muted);
    }
    .post-content p {
        margin: 0 0 10px;
        color: var(--text-secondary);
        line-height: 1.6;
    }
    .post-media {
        margin: 10px 0;
    }
    .post-media img {
        max-width: 100%;
        border-radius: 8px;
    }
    .post-media video {
        max-width: 100%;
        border-radius: 8px;
    }
    .post-actions {
        display: flex;
        gap: 16px;
        margin: 10px 0;
    }
    .like-btn {
        background: none;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 4px;
        color: var(--text-secondary);
        font-size: 14px;
        padding: 4px 8px;
        border-radius: 20px;
        transition: all 0.2s;
    }
    .like-btn:hover {
        background: var(--bg-hover);
    }
    .like-btn i {
        color: #d1d5db;
        transition: color 0.2s;
    }
    .like-btn i.liked {
        color: #ef4444;
    }
    .comments-count {
        display: flex;
        align-items: center;
        gap: 4px;
        color: var(--text-muted);
        font-size: 14px;
    }
    .post-comments {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--border-light);
    }
    .comment-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 4px 0;
        font-size: 14px;
    }
    .comment-author {
        font-weight: 600;
        color: var(--text-primary);
    }
    .comment-content {
        color: var(--text-secondary);
    }
    .comment-form {
        display: flex;
        gap: 8px;
        margin-top: 8px;
    }
    .comment-form input {
        flex: 1;
        padding: 6px 12px;
        border: 1px solid var(--border-color);
        border-radius: 20px;
        background: var(--bg-input);
        color: var(--text-primary);
        font-size: 13px;
    }
    .comment-form input:focus {
        outline: none;
        border-color: var(--color-secondary);
    }

    .empty-state {
        text-align: center;
        padding: 30px 0;
        color: var(--text-muted);
    }
    .empty-state i {
        font-size: 36px;
        margin-bottom: 10px;
        display: block;
    }
    .empty-state p {
        margin-bottom: 10px;
    }


    /* Мероприятия и отзывы (стили уже есть в public_profile) */
    .event-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-light);
    }
    .event-item:last-child {
        border-bottom: none;
    }
    .event-title {
        color: var(--text-primary);
        text-decoration: none;
        font-weight: 500;
    }
    .event-title:hover {
        color: var(--color-primary-text);
    }
    .event-meta {
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 13px;
        color: var(--text-muted);
    }
    /* Цвета берутся из общего .badge-status (style.css) + тёмные варианты в base.html. */
    .event-status {
        padding: 2px 10px;
        border-radius: 10px;
        font-size: 11px;
        font-weight: 500;
        text-transform: none;
    }

    .reviews-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .review-item {
        padding: 12px 0;
        border-bottom: 1px solid var(--border-light);
    }
    .review-item:last-child {
        border-bottom: none;
    }
    .review-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 6px;
    }
    .review-author {
        font-weight: 600;
        color: var(--text-primary);
    }
    .review-rating {
        color: var(--color-warning-text);
        font-size: 14px;
    }
    .review-comment {
        font-size: 14px;
        color: var(--text-secondary);
        margin-bottom: 4px;
    }
    .review-date {
        font-size: 12px;
        color: var(--text-muted);
    }

    .pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 16px;
        margin-top: 20px;
        flex-wrap: wrap;
    }
    .page-info {
        font-size: 14px;
        color: var(--text-muted);
    }

    @media (max-width: 768px) {
        .profile-grid {
            grid-template-columns: 1fr;
        }
        .profile-stats {
            grid-template-columns: repeat(3, 1fr);
        }
        .profile-tabs {
            flex-wrap: wrap;
        }
        .tab-btn {
            flex: 1;
            min-width: 80px;
            font-size: 13px;
            padding: 8px 12px;
        }
        .event-item {
            flex-direction: column;
            align-items: flex-start;
            gap: 6px;
        }
        .event-meta {
            flex-wrap: wrap;
        }
        .post-header {
            flex-wrap: wrap;
        }
    }
    @media (max-width: 480px) {
        .profile-card {
            padding: 20px;
        }
        .profile-avatar img, .avatar-placeholder {
            width: 80px;
            height: 80px;
            font-size: 32px;
        }
        .profile-info h1 {
            font-size: 20px;
        }
        .profile-stats {
            grid-template-columns: 1fr 1fr;
        }
        .create-post-form .form-actions,
        .create-album-form .form-actions {
            flex-direction: column;
        }
        .comment-form {
            flex-direction: column;
        }
    }
