/* ================== LOGOUT CONFIRM MODAL ================== */
.logout-modal-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 30%, rgba(212, 175, 55, 0.18), transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(180, 130, 70, 0.14), transparent 60%),
        rgba(26, 18, 12, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 21000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
    transform: translateZ(0);
}

.logout-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease, visibility 0s linear 0s;
}

.logout-modal {
    position: relative;
    width: min(92vw, 460px);
    background:
        radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.18), transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(180, 130, 70, 0.16), transparent 60%),
        linear-gradient(180deg, rgba(46, 32, 23, 0.98), rgba(26, 18, 12, 0.99));
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid var(--line-2);
    border-radius: var(--r-xl);
    box-shadow:
        0 32px 70px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(244, 228, 188, 0.10),
        0 0 60px rgba(212, 175, 55, 0.20);
    overflow: hidden;
    transform: translate3d(0, 24px, 0);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    will-change: transform, opacity;
}

.logout-modal-overlay.active .logout-modal {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

/* Золотой акцентный рейл сверху */
.logout-modal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent-3) 50%, var(--accent) 70%, transparent);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.55);
    z-index: 1;
}

.logout-modal-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 26px 16px;
    border-bottom: 1px solid var(--line);
}

.logout-modal-title {
    margin: 0;
    color: var(--accent-3);
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.005em;
    text-shadow: 0 0 18px rgba(212, 175, 55, 0.20);
}

.logout-modal-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(244, 228, 188, 0.06), rgba(244, 228, 188, 0.02));
    color: var(--text);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.25s ease;
}

.logout-modal-close:hover {
    background: linear-gradient(180deg, rgba(244, 228, 188, 0.14), rgba(244, 228, 188, 0.04));
    border-color: var(--line-strong);
    color: var(--accent-3);
    transform: rotate(90deg);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.22);
}

.logout-modal-body {
    position: relative;
    z-index: 2;
    padding: 20px 26px 24px;
}

.logout-modal-text {
    margin: 0;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 18px;
    line-height: 1.5;
}

.logout-modal-actions {
    margin-top: 22px;
    display: flex;
    gap: 12px;
}

.logout-modal-btn {
    flex: 1;
    height: 46px;
    border-radius: var(--r-pill);
    border: 1px solid var(--line-2);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: none;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    position: relative;
    overflow: hidden;
}

.logout-modal-btn:hover {
    transform: translateY(-2px);
}

/* Отмена — стеклянная вторичная */
.logout-modal-btn.cancel {
    background: linear-gradient(180deg, rgba(244, 228, 188, 0.06), rgba(244, 228, 188, 0.02));
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(244, 228, 188, 0.06);
}

.logout-modal-btn.cancel:hover {
    background: linear-gradient(180deg, rgba(244, 228, 188, 0.14), rgba(244, 228, 188, 0.04));
    border-color: var(--line-strong);
    color: var(--accent-3);
    box-shadow:
        inset 0 1px 0 rgba(244, 228, 188, 0.14),
        0 8px 18px rgba(0, 0, 0, 0.4),
        0 0 0 4px rgba(212, 175, 55, 0.22);
}

/* Подтвердить выход — тёплая «опасная» */
.logout-modal-btn.confirm {
    background: linear-gradient(180deg, rgba(180, 60, 50, 0.40), rgba(120, 38, 32, 0.55));
    border-color: rgba(220, 110, 90, 0.55);
    color: #ffe2d2;
    text-shadow: 0 0 10px rgba(220, 110, 90, 0.40);
    box-shadow:
        inset 0 1px 0 rgba(255, 200, 180, 0.12),
        0 0 0 1px rgba(220, 110, 90, 0.20);
}

.logout-modal-btn.confirm:hover {
    background: linear-gradient(180deg, rgba(200, 75, 60, 0.55), rgba(140, 45, 38, 0.70));
    border-color: rgba(240, 140, 120, 0.70);
    color: #fff5ee;
    box-shadow:
        inset 0 1px 0 rgba(255, 220, 200, 0.18),
        0 10px 22px rgba(0, 0, 0, 0.5),
        0 0 0 4px rgba(220, 110, 90, 0.25),
        0 0 24px rgba(220, 110, 90, 0.30);
}

.profile-logout-btn {
    min-width: 230px;
}

@media (max-width: 540px) {
    .logout-modal-actions {
        flex-direction: column;
    }

    .profile-logout-btn {
        min-width: 200px;
    }
}
