/*
 * Author: amirhossinbanavand
 * Website: banclub.ir
 * File: header.css (Final Professional Version)
 * Description: UI Architecture for Sidebar, Topbar, and Navigation Layout
 */

/* 1. Base Layout Structure */
.ban-app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
    background: var(--ban-bg);
}

/* 2. Sidebar Architecture (Right Side - RTL) */
.ban-sidebar {
    width: 280px;
    background: var(--ban-sidebar);
    backdrop-filter: blur(25px) saturate(150%);
    -webkit-backdrop-filter: blur(25px) saturate(150%);
    border-left: 1px solid var(--ban-border);
    height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
}

.ban-sidebar-header {
    padding: 40px 20px;
    text-align: center;
    border-bottom: 1px solid var(--ban-border);
}

.ban-logo-placeholder {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -1px;
    color: #fff;
    text-shadow: 0 0 15px rgba(255,255,255,0.1);
}

.logo-accent {
    color: var(--ban-accent);
    filter: drop-shadow(0 0 8px var(--ban-accent-glow));
}

/* 3. Navigation Menu */
.ban-nav-container {
    flex-grow: 1;
    padding: 25px 15px;
    overflow-y: auto;
}

.ban-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ban-nav-item {
    margin-bottom: 10px;
    perspective: 1000px;
}

.ban-nav-link {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--ban-text-muted);
    text-decoration: none !important;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 15px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-icon {
    margin-left: 15px;
    font-size: 20px;
    width: 25px;
    text-align: center;
    transition: transform 0.3s ease;
}

/* Hover State */
.ban-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(-5px);
}

.ban-nav-link:hover .nav-icon {
    color: var(--ban-accent);
    transform: scale(1.2);
}

/* Active State (The Parspack Style) */
.ban-nav-link.active {
    background: var(--ban-accent);
    color: #0d0f14 !important; /* Deep Dark text on Green bg */
    font-weight: 700;
    box-shadow: 0 10px 25px var(--ban-accent-glow);
    transform: scale(1.02);
}

.ban-nav-link.active .nav-icon {
    color: #0d0f14 !important;
}

.ban-nav-divider {
    height: 1px;
    background: var(--ban-border);
    margin: 20px 10px;
    opacity: 0.5;
}

.store-link {
    border: 1px dashed rgba(0, 200, 83, 0.4);
}

/* 4. Sidebar Footer & Theme Controller */
.ban-sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--ban-border);
}

.ban-theme-controller {
    background: var(--ban-surface);
    border-radius: 14px;
    padding: 5px;
    border: 1px solid var(--ban-border);
}

.theme-switch-btn {
    width: 100%;
    height: 45px;
    border: none;
    background: transparent;
    color: var(--ban-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.3s;
    font-family: inherit;
    font-weight: 600;
}

.theme-switch-btn:hover {
    color: var(--ban-accent);
}

.icon-light { display: none; }
body.light-mode .icon-dark { display: none; }
body.light-mode .icon-light { display: inline-block; }

/* 5. Content Wrapper & Top Bar */
.ban-content-wrapper {
    flex-grow: 1;
    margin-right: 280px; /* Same as sidebar width */
    width: calc(100% - 280px);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.ban-top-bar {
    height: 85px;
    background: rgba(10, 11, 16, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--ban-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.page-title-text {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

/* 6. Wallet Component (Green Pulse) */
.ban-wallet-component {
    background: var(--ban-glass);
    border: 1px solid var(--ban-border);
    padding: 10px 18px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: 0.3s;
}

.ban-wallet-component:hover {
    border-color: var(--ban-accent);
}

.wallet-balance {
    display: flex;
    flex-direction: column;
}

.wallet-balance .label {
    font-size: 11px;
    color: var(--ban-text-muted);
    margin-bottom: 2px;
}

.wallet-balance .value {
    font-size: 16px;
    font-weight: 800;
    color: var(--ban-accent);
}

.wallet-add-btn {
    background: var(--ban-accent);
    color: #000 !important;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 12px var(--ban-accent-glow);
    transition: all 0.3s;
    animation: wallet-pulse 2s infinite;
}

@keyframes wallet-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(0, 200, 83, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 200, 83, 0); }
}

/* 7. User Profile Component */
.user-profile-btn {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ban-text);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 14px;
    transition: 0.3s;
}

.user-profile-btn:hover {
    background: rgba(255,255,255,0.05);
}

.user-avatar-circle {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--ban-accent), #00e676);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* 8. Dropdown Glassmorphism */
.ban-dropdown-glass {
    background: rgba(20, 23, 33, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid var(--ban-border) !important;
    border-radius: 20px !important;
    padding: 12px !important;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5) !important;
    margin-top: 15px !important;
}

.dropdown-item {
    color: var(--ban-text-muted) !important;
    border-radius: 12px !important;
    padding: 10px 15px !important;
    transition: 0.3s !important;
}

.dropdown-item:hover {
    background: rgba(0, 200, 83, 0.1) !important;
    color: var(--ban-accent) !important;
    transform: translateX(-5px);
}

.dropdown-item i {
    margin-left: 10px;
    width: 20px;
}

/* 9. Responsive & Mobile Toggle */
.mobile-sidebar-toggle {
    background: var(--ban-surface);
    border: 1px solid var(--ban-border);
    color: var(--ban-text);
    width: 45px;
    height: 45px;
    border-radius: 12px;
    margin-left: 15px;
    cursor: pointer;
}

@media (max-width: 1200px) {
    .ban-sidebar {
        transform: translateX(100%);
    }
    .ban-sidebar.open {
        transform: translateX(0);
    }
    .ban-main-wrapper {
        margin-right: 0;
        width: 100%;
    }
    .ban-content-wrapper {
        margin-right: 0;
        width: 100%;
    }
    .ban-top-bar {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .user-display-name, .wallet-balance .label {
        display: none;
    }
    .ban-top-bar {
        height: 70px;
    }
    .page-title-text {
        font-size: 18px;
    }
}

/* Page Content Container */
.ban-page-content {
    padding: 30px;
    flex-grow: 1;
}

.ban-main-card {
    background: var(--ban-glass);
    border: 1px solid var(--ban-border);
    border-radius: 28px;
    padding: 35px;
    min-height: 400px;
    animation: fade-up 0.6s ease-out;
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}