﻿
/* =========================================
   BINARYPRO MEMBER DASHBOARD
   ========================================= */

:root {
    --dashboard-primary: #5b4bdb;
    --dashboard-primary-dark: #4435bd;
    --dashboard-bg: #f5f6fb;
    --dashboard-white: #ffffff;
    --dashboard-text: #20243a;
    --dashboard-muted: #858ba3;
    --dashboard-border: #e9eaf2;
    --dashboard-sidebar: #171a35;
    --dashboard-sidebar-text: #b9bfd8;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.dashboard-page {
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--dashboard-bg);
    color: var(--dashboard-text);
}

.dashboard-page a {
    text-decoration: none;
}

/* MAIN LAYOUT */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* =========================================
   SIDEBAR
   ========================================= */

.dashboard-sidebar {
    width: 250px;
    min-width: 250px;
    background: var(--dashboard-sidebar);
    color: var(--dashboard-white);
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
}

.dashboard-logo {
    display: inline-block;
    color: #ffffff;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -1px;
    margin: 0 12px 45px;
}

    .dashboard-logo span {
        color: #8e82ff;
    }

.sidebar-label {
    color: #777f9f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin: 0 12px 15px;
}

/* NAVIGATION */
.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .dashboard-nav a {
        display: flex;
        align-items: center;
        gap: 13px;
        padding: 14px 15px;
        border-radius: 10px;
        color: var(--dashboard-sidebar-text);
        font-size: 14px;
        font-weight: 500;
        transition: 0.25s ease;
    }

        .dashboard-nav a span {
            width: 22px;
            text-align: center;
            font-size: 18px;
        }

        .dashboard-nav a:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #ffffff;
        }

        .dashboard-nav a.active {
            background: var(--dashboard-primary);
            color: #ffffff;
            box-shadow: 0 7px 18px rgba(91, 75, 219, 0.25);
        }

/* SIDEBAR BOTTOM */
.sidebar-bottom {
    margin-top: auto;
    padding-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .sidebar-bottom a,
    .sidebar-bottom button {
        display: block;
        width: 100%;
        padding: 12px 15px;
        border: 0;
        border-radius: 9px;
        background: transparent;
        color: var(--dashboard-sidebar-text);
        text-align: left;
        font-size: 14px;
        cursor: pointer;
        transition: 0.2s ease;
    }

        .sidebar-bottom a:hover,
        .sidebar-bottom button:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #ffffff;
        }

/* =========================================
   MAIN CONTENT
   ========================================= */

.dashboard-main {
    flex: 1;
    min-width: 0;
    padding: 32px 38px;
}

/* TOP BAR */
.dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-breadcrumb {
    color: var(--dashboard-muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.dashboard-topbar h1 {
    font-size: 29px;
    font-weight: 750;
    letter-spacing: -0.5px;
}

.dashboard-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e5ff;
    color: var(--dashboard-primary);
    font-size: 19px;
    font-weight: 800;
}

.dashboard-user strong {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
}

.dashboard-user small {
    display: block;
    color: var(--dashboard-muted);
    font-size: 12px;
}

/* =========================================
   WELCOME CARD
   ========================================= */

.welcome-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding: 30px 34px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(120deg, #5b4bdb, #8475f2);
    box-shadow: 0 12px 30px rgba(91, 75, 219, 0.16);
    margin-bottom: 30px;
}

    .welcome-card > div:first-child > p:first-child {
        color: #dcd8ff;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 1.5px;
        margin-bottom: 12px;
    }

    .welcome-card h2 {
        font-size: 26px;
        line-height: 1.3;
        margin-bottom: 10px;
    }

        .welcome-card h2 span {
            color: #ffffff;
        }

    .welcome-card > div:first-child > p:last-child {
        color: #e5e2ff;
        font-size: 14px;
        line-height: 1.6;
    }

.welcome-icon {
    width: 70px;
    height: 70px;
    min-width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 34px;
}

/* =========================================
   MEMBER INFO CARDS
   ========================================= */

.member-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.info-card {
    background: var(--dashboard-white);
    border: 1px solid var(--dashboard-border);
    border-radius: 15px;
    padding: 23px;
    transition: 0.25s ease;
}

    .info-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 25px rgba(30, 35, 80, 0.06);
    }

.info-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--dashboard-muted);
    font-size: 13px;
    margin-bottom: 20px;
}

.info-icon {
    width: 35px;
    height: 35px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #efedff;
    color: var(--dashboard-primary);
    font-size: 13px;
    font-weight: 800;
}

.info-card h3 {
    font-size: 23px;
    font-weight: 750;
    overflow-wrap: anywhere;
    margin-bottom: 9px;
}

.info-card > p {
    color: var(--dashboard-muted);
    font-size: 12px;
    line-height: 1.5;
}

.info-card .status-active {
    color: #159b68;
}

/* =========================================
   DASHBOARD SECTIONS
   ========================================= */

.dashboard-section {
    margin-bottom: 35px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

    .section-heading h2 {
        font-size: 20px;
        font-weight: 750;
        margin-bottom: 7px;
    }

    .section-heading p {
        color: var(--dashboard-muted);
        font-size: 13px;
    }

/* =========================================
   BINARY TEAM CARDS
   ========================================= */

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.team-card {
    background: var(--dashboard-white);
    border: 1px solid var(--dashboard-border);
    border-radius: 15px;
    padding: 25px;
    transition: 0.25s ease;
}

    .team-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 25px rgba(30, 35, 80, 0.06);
    }

.team-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 23px;
}

.team-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
}

.left-team .team-icon {
    background: #e8f4ff;
    color: #3288d8;
}

.right-team .team-icon {
    background: #f2eaff;
    color: #8958d6;
}

.team-label {
    color: var(--dashboard-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.team-card h3 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.team-card p {
    color: var(--dashboard-muted);
    font-size: 13px;
}

/* =========================================
   QUICK ACCESS
   ========================================= */

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.quick-card {
    position: relative;
    display: block;
    min-height: 190px;
    padding: 22px;
    background: var(--dashboard-white);
    border: 1px solid var(--dashboard-border);
    border-radius: 15px;
    color: var(--dashboard-text);
    transition: 0.25s ease;
}

    .quick-card:hover {
        transform: translateY(-4px);
        border-color: #d6d0ff;
        box-shadow: 0 12px 28px rgba(30, 35, 80, 0.07);
    }

.quick-card-icon {
    width: 43px;
    height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #efedff;
    color: var(--dashboard-primary);
    font-size: 21px;
    margin-bottom: 20px;
}

.quick-card h3 {
    font-size: 15px;
    font-weight: 750;
    margin-bottom: 9px;
}

.quick-card p {
    color: var(--dashboard-muted);
    font-size: 12px;
    line-height: 1.6;
    padding-right: 10px;
}

.quick-arrow {
    position: absolute;
    right: 20px;
    bottom: 20px;
    color: var(--dashboard-primary);
    font-size: 20px;
}

/* =========================================
   FOOTER
   ========================================= */

.dashboard-footer {
    padding: 25px 0 5px;
    border-top: 1px solid var(--dashboard-border);
    color: var(--dashboard-muted);
    font-size: 12px;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */

@media (max-width: 1200px) {
    .dashboard-main {
        padding: 28px;
    }

    .quick-access-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .dashboard-sidebar {
        width: 215px;
        min-width: 215px;
        padding: 25px 14px;
    }

    .dashboard-main {
        padding: 25px 20px;
    }

    .member-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

        .member-info-grid .info-card:last-child {
            grid-column: 1 / -1;
        }
}

@media (max-width: 650px) {
    .dashboard-layout {
        flex-direction: column;
    }

    .dashboard-sidebar {
        width: 100%;
        min-width: 0;
        padding: 18px;
    }

    .dashboard-logo {
        margin: 0 8px 20px;
        font-size: 25px;
    }

    .sidebar-label {
        margin-bottom: 10px;
    }

    .dashboard-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

        .dashboard-nav a {
            padding: 12px 10px;
            font-size: 12px;
            gap: 8px;
        }

            .dashboard-nav a span {
                font-size: 16px;
            }

    .sidebar-bottom {
        margin-top: 15px;
        padding-top: 10px;
        flex-direction: row;
    }

        .sidebar-bottom a,
        .sidebar-bottom button {
            font-size: 12px;
            padding: 10px;
        }

    .dashboard-main {
        padding: 22px 16px;
    }

    .dashboard-topbar {
        align-items: flex-start;
        margin-bottom: 22px;
    }

        .dashboard-topbar h1 {
            font-size: 24px;
        }

    .dashboard-user {
        gap: 8px;
    }

    .user-avatar {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .dashboard-user strong {
        font-size: 12px;
    }

    .dashboard-user small {
        font-size: 10px;
    }

    .welcome-card {
        padding: 24px 20px;
        border-radius: 15px;
    }

        .welcome-card h2 {
            font-size: 21px;
        }

    .welcome-icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
        border-radius: 15px;
        font-size: 25px;
    }

    .member-info-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

        .member-info-grid .info-card:last-child {
            grid-column: auto;
        }

    .info-card {
        padding: 20px;
    }

    .team-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .quick-access-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .quick-card {
        min-height: 165px;
    }

    .section-heading h2 {
        font-size: 18px;
    }
}

@media (max-width: 380px) {
    .dashboard-topbar {
        flex-direction: column;
    }

    .dashboard-user {
        align-self: flex-start;
    }

    .welcome-icon {
        display: none;
    }

    .dashboard-nav {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   REFERRAL LINK + INCOME (added)
   ========================================= */

.referral-card {
    background: var(--dashboard-white);
    border: 1px solid var(--dashboard-border);
    border-radius: 15px;
    padding: 23px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.referral-code-box {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--dashboard-muted);
    font-size: 13px;
}

    .referral-code-box strong {
        color: var(--dashboard-primary);
        font-size: 20px;
        letter-spacing: 0.5px;
        background: #f0eefe;
        padding: 6px 14px;
        border-radius: 10px;
    }

.referral-link-row {
    display: flex;
    gap: 10px;
}

    .referral-link-row input {
        flex: 1;
        min-width: 0;
        padding: 12px 14px;
        border: 1px solid var(--dashboard-border);
        border-radius: 10px;
        font-size: 14px;
        color: var(--dashboard-text);
        background: var(--dashboard-bg);
    }

.referral-btn {
    border: none;
    background: var(--dashboard-primary);
    color: #fff;
    padding: 11px 18px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

    .referral-btn:hover {
        background: var(--dashboard-primary-dark);
    }

    .referral-btn.outline {
        background: transparent;
        color: var(--dashboard-primary);
        border: 1px solid var(--dashboard-primary);
    }

        .referral-btn.outline:hover {
            background: #f0eefe;
        }

.referral-side-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.copy-message {
    color: #159b68;
    font-size: 13px;
    font-weight: 600;
}

.referral-sponsor {
    color: var(--dashboard-muted);
    font-size: 13px;
}

.income-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

@media (max-width: 1100px) {
    .income-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .income-grid {
        grid-template-columns: 1fr;
    }

    .referral-link-row {
        flex-direction: column;
    }
}
