/* /assets/css/dashboard.css (FINAL APP-LIKE UI THEME WITH SIDEBAR) */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
    --bg-color: #0d1117;      /* GitHub Dark Background */
    --sidebar-bg: #161b22;    /* Sidebar Background */
    --card-color: #161b22;    /* Card Background */
    --border-color: #30363d;  /* Border Color */
    --text-primary: #c9d1d9;  /* Primary Text Color */
    --text-secondary: #8b949e; /* Secondary Text Color */
    --brand-color: #d4af37;   /* Gold Color */
    --green-color: #28a745;
    --red-color: #dc3545;
    --green-glow: rgba(40, 167, 69, 0.2);
    --red-glow: rgba(220, 53, 69, 0.2);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Roboto', sans-serif;
}

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* --- Sidebar Styles (UPDATED) --- */
#sidebar {
    min-width: 250px;
    max-width: 250px;
    background: var(--sidebar-bg);
    transition: all 0.3s ease-in-out;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 999;
    display: flex; /* Added for flex structure */
    flex-direction: column; /* Arrange items vertically */
}

#sidebar.active {
    margin-left: -250px;
}

#sidebar .sidebar-header {
    padding: 20px;
    background: var(--bg-color);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0; /* Prevent header from shrinking */
}

#sidebar .sidebar-header img {
    height: 40px;
}

#sidebar ul.components {
    padding: 15px 0;
    overflow-y: auto;
    flex-grow: 1;
}

/* Custom Scrollbar for better look in Chrome/Safari */
#sidebar ul.components::-webkit-scrollbar { width: 6px; }
#sidebar ul.components::-webkit-scrollbar-track { background: var(--sidebar-bg); }
#sidebar ul.components::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; }
#sidebar ul.components::-webkit-scrollbar-thumb:hover { background: #777; }


#sidebar ul li a {
    padding: 12px 20px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    border-left: 4px solid transparent;
    transition: all 0.2s;
    font-weight: 500;
}
#sidebar ul li a:hover { color: #fff; background: var(--bg-color); }
#sidebar ul li a.active { color: var(--brand-color); background: var(--bg-color); border-left-color: var(--brand-color); font-weight: 600; }
#sidebar ul li a i { margin-right: 15px; font-size: 1.2rem; width: 20px; text-align: center; }

/* --- Main Content Styles --- */
#content {
    width: 100%;
    padding: 20px;
    min-height: 100vh;
    transition: all 0.3s ease-in-out;
    margin-left: 250px;
}

#sidebar.active ~ #content {
    margin-left: 0;
}

/* --- Top Navbar Styles --- */
.top-navbar {
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-navbar #sidebarCollapse {
    background: transparent;
    border: none;
    color: var(--brand-color);
    font-size: 1.5rem;
}

.user-profile a { text-decoration: none; color: var(--text-primary); }
.user-profile img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border: 2px solid var(--brand-color);
}

/* --- Stat Card Styles --- */
.stat-card {
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    /* margin-bottom has been removed from here */
    transition: all 0.3s ease;
    height: 100%;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border-color: var(--brand-color);
}
.stat-card .stat-icon {
    font-size: 1.8rem;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 15px;
    color: #fff;
}
.stat-card h6 {
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}
.stat-card .balance { font-size: 2rem; font-weight: 700; color: #fff; }
.stat-card .sub-balance { font-size: 1.5rem; font-weight: 600; color: #fff; }

/* --- 3D Gradient Colors for Icons --- */
.icon-main { background: linear-gradient(135deg, #f7971e, #ffd200); }
.icon-fund { background: linear-gradient(135deg, #11998e, #38ef7d); }
.icon-asw { background: linear-gradient(135deg, #4e54c8, #8f94fb); }
.icon-income { background: linear-gradient(135deg, #15b57d, #00f59a); box-shadow: 0 0 15px var(--green-glow); }
.icon-withdrawal { background: linear-gradient(135deg, #ff5e62, #ff9966); }
.icon-investment { background: linear-gradient(135deg, #56ccf2, #2f80ed); }
.icon-team { background: linear-gradient(135deg, #8e2de2, #4a00e0); }

.text-success-glow { color: var(--green-color); text-shadow: 0 0 8px var(--green-glow); }
.text-danger-glow { color: var(--red-color); text-shadow: 0 0 8px var(--red-glow); }

/* --- General Text and Other Styles --- */
.page-title { color: #fff; font-weight: 700; }
.welcome-text { color: var(--text-secondary); }

/* Footer Styling */
.footer {
    background-color: var(--card-color);
    color: var(--text-secondary);
    padding: 15px 0;
    margin-top: auto; /* Pushes footer to the bottom */
    border-top: 1px solid var(--border-color);
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
    #sidebar { margin-left: -250px; }
    #sidebar.active { margin-left: 0; }
    #content { margin-left: 0; padding: 15px; }
    .top-navbar .user-profile .d-none { display: none !important; }
    .stat-card .balance { font-size: 1.8rem; }
    .stat-card .sub-balance { font-size: 1.3rem; }
    .page-title { font-size: 1.5rem; }
}
/* --- NEW ICON STYLE FOR AWARDS --- */
/* Add this to the end of your /assets/css/dashboard.css file */

.icon-award { 
    background: linear-gradient(135deg, #ffc107, #f7971e); 
}