/**
 * Sidebar profile card — 7panel.net reference (loads last in head / bundle).
 */

.sidebar-profile-card + .sidebar-promo-stack {
    margin-top: 0.75rem;
}

.sidebar-promo-stack .nav-mobile-app > .btn-tickets {
    margin-top: 0 !important;
}

.sidebar-profile-card {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 250, 255, 0.95) 50%, rgba(244, 247, 255, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 22px;
    padding: 7px 14px;
    margin: 0 var(--sidebar-inline-inset, 12px) 0 var(--sidebar-inline-inset, 12px);
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    box-shadow:
        0 10px 40px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(49, 160, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.sidebar-profile-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(49, 160, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: sidebar-profile-pulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.sidebar-profile-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(6, 102, 255, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: sidebar-profile-pulse 5s ease-in-out infinite reverse;
    pointer-events: none;
    z-index: 0;
}

@keyframes sidebar-profile-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}

.sidebar-profile-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 20px 60px rgba(15, 23, 42, 0.12),
        0 0 0 1px rgba(49, 160, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.sidebar-profile-body {
    position: relative;
    z-index: 1;
}

.sidebar-profile-body > div:first-child {
    margin-bottom: 18px;
    display: flex;
    justify-content: center;
}

.sidebar-profile-body > div:first-child > div {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 255, 0.9) 100%);
    border: 2px solid rgba(49, 160, 255, 0.2) !important;
    border-radius: 18px !important;
    padding: 7px !important;
    box-shadow:
        0 8px 24px rgba(49, 160, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: inline-block;
    line-height: 0;
}

.sidebar-profile-body > div:first-child > div::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(49, 160, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: sidebar-profile-shimmer 3s infinite;
    pointer-events: none;
}

@keyframes sidebar-profile-shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.sidebar-profile-body > div:first-child > div:hover {
    transform: scale(1.05);
    border-color: rgba(49, 160, 255, 0.4) !important;
    box-shadow:
        0 12px 32px rgba(49, 160, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.sidebar-profile-body > div:first-child img {
    width: 72px !important;
    height: 72px !important;
    object-fit: cover;
    display: block;
    border-radius: 14px !important;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.sidebar-profile-body > div:first-child:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 16px rgba(49, 160, 255, 0.3));
}

.sidebar-profile-detail {
    text-align: center;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.sidebar-profile-name {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 7px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.sidebar-profile-card:hover .sidebar-profile-name {
    background: linear-gradient(135deg, #31a0ff 0%, #0066ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-profile-username {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    display: block;
    transition: all 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.sidebar-profile-card:hover .sidebar-profile-username {
    color: #31a0ff;
}

.sidebar-profile-action {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    margin-bottom: 0;
}

.sidebar-profile-action .btn-action,
.sidebar-profile-action .btn-action.btn-primary {
    position: relative;
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none !important;
    border-radius: 50% !important;
    background: rgb(58, 87, 232) !important;
    color: #fff !important;
    box-shadow:
        0 3px 9px rgba(58, 87, 232, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-profile-action .btn-action:hover,
.sidebar-profile-action .btn-action.btn-primary:hover {
    transform: translateY(-2px);
    background: rgb(48, 72, 210) !important;
    box-shadow:
        0 6px 16px rgba(58, 87, 232, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    color: #fff !important;
}

.sidebar-profile-action .btn-action:active,
.sidebar-profile-action .btn-action.btn-primary:active {
    transform: translateY(0);
}

.sidebar-profile-action .btn-action .btn-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.sidebar-profile-action .btn-action svg,
.sidebar-profile-action .btn-action .btn-inner svg,
.sidebar-profile-action .btn-action .icon-32,
.sidebar-profile-action .btn-action .icon-20 {
    width: 13px !important;
    height: 13px !important;
    max-width: 13px !important;
    max-height: 13px !important;
}

.sidebar-profile-action .notification-alert {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    border: 1px solid #fff;
}

html.dark-mode .sidebar-profile-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.95) 50%, rgba(30, 41, 59, 0.98) 100%);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(56, 189, 248, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html.dark-mode .sidebar-profile-card:hover {
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(56, 189, 248, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html.dark-mode .sidebar-profile-card::before {
    background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, transparent 70%);
}

html.dark-mode .sidebar-profile-card::after {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
}

html.dark-mode .sidebar-profile-body > div:first-child > div {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.9) 100%);
    border-color: rgba(56, 189, 248, 0.3) !important;
    box-shadow:
        0 8px 24px rgba(56, 189, 248, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html.dark-mode .sidebar-profile-body > div:first-child > div:hover {
    border-color: rgba(56, 189, 248, 0.5) !important;
    box-shadow:
        0 12px 32px rgba(56, 189, 248, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html.dark-mode .sidebar-profile-name {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

html.dark-mode .sidebar-profile-card:hover .sidebar-profile-name {
    background: linear-gradient(135deg, #38bdf8 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

html.dark-mode .sidebar-profile-username {
    color: #94a3b8;
}

html.dark-mode .sidebar-profile-card:hover .sidebar-profile-username {
    color: #60a5fa;
}

html.dark-mode .sidebar-profile-action .btn-action,
html.dark-mode .sidebar-profile-action .btn-action.btn-primary {
    background: rgb(58, 87, 232) !important;
    box-shadow:
        0 3px 9px rgba(58, 87, 232, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

html.dark-mode .sidebar-profile-action .btn-action:hover,
html.dark-mode .sidebar-profile-action .btn-action.btn-primary:hover {
    background: rgb(48, 72, 210) !important;
    box-shadow:
        0 6px 16px rgba(58, 87, 232, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

@media (max-width: 991px) {
    .sidebar-profile-card {
        margin: 11px var(--sidebar-inline-inset, 12px) !important;
        padding: 18px 14px;
        border-radius: 18px;
        width: auto;
        max-width: 100%;
        box-sizing: border-box;
    }

    .sidebar-profile-name {
        font-size: 14px;
    }

    .sidebar-profile-username {
        font-size: 12px;
    }

    .sidebar-profile-action .btn-action,
    .sidebar-profile-action .btn-action.btn-primary {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }
}

@media (max-width: 575px) {
    .sidebar-profile-card {
        margin: 9px var(--sidebar-inline-inset, 12px) !important;
        padding: 16px 13px;
        border-radius: 16px;
        width: auto;
        max-width: 100%;
        box-sizing: border-box;
    }

    .sidebar-profile-action {
        gap: 9px;
    }

    .sidebar-profile-action .btn-action,
    .sidebar-profile-action .btn-action.btn-primary {
        width: 27px;
        height: 27px;
        min-width: 27px;
    }
}
