/* =========================
   PROFESSIONAL FONT
========================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* =========================
   VARIABLES
========================= */
:root {
    --violet: #6f2dbd;
    --violet-dark: #4c1d95;
    --bg-dark: #0f172a;
    --bg-dark-2: #020617;
    --text-light: #e5e7eb;
    --muted: #94a3b8;
    --yellow: #fde047;
}

/* =========================
   OVERLAY (COVERS EVERYTHING EXCEPT SIDEBAR)
========================= */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(3px);

    z-index: 5000;               /* 🔥 ABOVE NAVBAR + STATUS BAR */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* =========================
   SIDEBAR (FULL SCREEN, TOP MOST)
========================= */
.user-sidebar {
    position: fixed;
    top: 0;                      /* 🔥 START FROM TOP */
    right: 0;

    width: 300px;
    max-width: 85vw;
    height: 100vh;

    background: linear-gradient(180deg, var(--bg-dark), var(--bg-dark-2));
    color: #ffffff;

    z-index: 6000;               /* 🔥 ABOVE OVERLAY navbar & status bar */
    transform: translateX(100%);
    transition: transform 0.35s ease;

    display: flex;
    flex-direction: column;
}

.user-sidebar.open {
    transform: translateX(0);
}

/* =========================
   HEADER
========================= */
.sidebar-header {
    height: 64px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;

    color: #fff;
    font-weight: 600;

    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
}

.sidebar-header button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* =========================
   PROFILE CARD
========================= */
.profile-card {
    margin: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--violet), var(--violet-dark));
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.profile-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* =========================
   AVATAR
========================= */
.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* =========================
   PROFILE INFO
========================= */
.profile-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-info strong {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-info span {
    font-size: 13px;
    opacity: 0.85;
}

.profile-arrow {
    margin-left: auto;
    opacity: 0.8;
    flex-shrink: 0;
}

/* =========================
   NAVIGATION
========================= */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0 24px;
}

/* =========================
   SECTION LABELS
========================= */
.sidebar-section {
    display: block;
    padding: 14px 18px 6px;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* =========================
   LINKS
========================= */
.sidebar-link {
    margin: 6px 12px;
    padding: 12px 14px;
    border-radius: 14px;

    display: flex;
    align-items: center;
    gap: 12px;

    color: var(--text-light);
    text-decoration: none;

    opacity: 0;
    transform: translateX(20px);
    transition:
        background 0.25s ease,
        transform 0.3s ease,
        opacity 0.3s ease;
}

.user-sidebar.open .sidebar-link {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.sidebar-link.active {
    background: linear-gradient(135deg, var(--violet), var(--violet-dark));
}

.sidebar-link .arrow {
    margin-left: auto;
    opacity: 0.6;
}

.sidebar-link i {
    font-size: 18px;
}

.net-icon {
    width: 22px;
    height: 22px;
}

/* =========================
   WALLET BADGE
========================= */
.wallet-badge {
    margin-left: auto;
    background: rgba(253, 224, 71, 0.18);
    color: var(--yellow);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

/* =========================
   DARK MODE
========================= */
.dark-mode-toggle {
    margin: 12px 16px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* =========================
   FOOTER
========================= */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.logout-btn {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #3b0a0a, #7f1d1d);
    color: #f87171;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
}

.logout-btn:hover {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
}

.sidebar-footer small {
    color: var(--muted);
    font-size: 12px;
}

/* =========================
   LOGOUT MODAL
========================= */
.logout-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.65);
    backdrop-filter: blur(4px);

    z-index: 7000;            /* 🔥 ABOVE EVERYTHING */
    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.logout-modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.logout-modal {
    background: #020617;
    color: #fff;
    width: 320px;
    border-radius: 18px;
    padding: 22px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: modalPop 0.3s ease;
}

@keyframes modalPop {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.logout-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 24px;
}

.logout-modal h3 {
    margin: 10px 0 6px;
    font-size: 18px;
    font-weight: 600;
}

.logout-modal p {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 18px;
}

.logout-modal-actions {
    display: flex;
    gap: 12px;
}

.logout-modal-actions button {
    flex: 1;
    padding: 10px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-confirm {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    color: #fff;
}

.btn-confirm:hover {
    background: linear-gradient(135deg, #991b1b, #b91c1c);
}
/* PROFILE CARD AVATAR */
.profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: #f1f5f9;
}

/* IMAGE */
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* INITIALS FALLBACK */
.profile-avatar-text {
    width: 100%;
    height: 100%;
    background: var(--violet);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    display: grid;
    place-items: center;
}

/* REMOVE LINK UNDERLINE FROM PROFILE CARD */
.profile-card,
.profile-card * {
    text-decoration: none !important;
}

/* EXTRA SAFETY (IN CASE OF HOVER / ACTIVE) */
.profile-card:hover,
.profile-card:hover * {
    text-decoration: none !important;
}


