/* ==========================
   RESET
========================== */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family:'Inter',sans-serif;
    background:#0f172a;
    color:#ffffff;
    min-height:100vh;
}

/* ==========================
   HEADER
========================== */
.header{
    height:70px;
    padding:0 25px;

    display:flex;
    justify-content:space-between;
    align-items:center;

    background:rgba(15,23,42,.85);
    backdrop-filter:blur(18px);

    border-bottom:1px solid rgba(255,255,255,.08);

    position:sticky;
    top:0;
    z-index:1000;
}

.logo{
    font-size:20px;
    font-weight:800;
}

.header-right{
    display:flex;
    align-items:center;
    gap:15px;
}

.header-right span{
    color:#cbd5e1;
}

.logout-btn{
    text-decoration:none;

    background:#ef4444;
    color:#fff;

    padding:10px 18px;

    border-radius:12px;

    transition:.3s;
}

.logout-btn:hover{
    background:#dc2626;
}

/* ==========================
   LAYOUT
========================== */
.dashboard-container{
    display:flex;
    min-height:calc(100vh - 70px);
}

/* ==========================
   SIDEBAR
========================== */
.sidebar{
    width:250px;
    flex-shrink:0;

    background:rgba(255,255,255,.03);

    backdrop-filter:blur(16px);

    border-right:1px solid rgba(255,255,255,.08);

    padding:25px;
}

.sidebar h3{
    margin-bottom:25px;
}

.sidebar ul{
    list-style:none;
}

.sidebar li{
    margin-bottom:10px;
}

.sidebar a{
    display:block;

    text-decoration:none;

    color:#cbd5e1;

    padding:14px 16px;

    border-radius:12px;

    transition:.3s;
}

.sidebar a:hover{
    background:rgba(255,255,255,.08);
    color:#fff;
}

/* ==========================
   MAIN CONTENT
========================== */
.main-content{
    flex:1;
    padding:30px;
    overflow:auto;
}

/* ==========================
   WELCOME CARD
========================== */
.welcome-card{
    background:rgba(255,255,255,.05);

    border:1px solid rgba(255,255,255,.08);

    backdrop-filter:blur(16px);

    border-radius:20px;

    padding:25px;

    margin-bottom:25px;
}

.welcome-card h1{
    font-size:25px;
    margin-bottom:10px;
}

.welcome-card p{
    color:#cbd5e1;
}

/* ==========================
   STATS GRID
========================== */
.stats-grid{
    display:grid;

    grid-template-columns:
    repeat(auto-fit,minmax(220px,1fr));

    gap:20px;

    margin-bottom:25px;
}

.stat-card{
    background:rgba(255,255,255,.05);

    border:1px solid rgba(255,255,255,.08);

    border-radius:20px;

    padding:25px;

    transition:.3s;
}

.stat-card:hover{
    transform:translateY(-5px);

    box-shadow:
    0 15px 30px rgba(0,0,0,.25);
}

.stat-card h3{
    color:#cbd5e1;
    margin-bottom:10px;
}

.stat-card h2{
    font-size:22px;
}

/* ==========================
   GENERAL CARDS
========================== */
.card{
    background:rgba(255,255,255,.05);

    border:1px solid rgba(255,255,255,.08);

    backdrop-filter:blur(16px);

    border-radius:20px;

    padding:25px;

    margin-bottom:25px;
}

.card h2{
    margin-bottom:20px;
}

/* ==========================
   TABLES
========================== */
.card table{
    width:100%;
    border-collapse:collapse;
}

.card th{
    text-align:left;

    padding:15px;

    background:rgba(255,255,255,.05);

    color:#ffffff;
}

.card td{
    padding:15px;

    color:#e2e8f0;

    border-top:
    1px solid rgba(255,255,255,.08);
}

.card tr:hover{
    background:rgba(255,255,255,.03);
}

/* ==========================
   BUTTONS
========================== */
.card button,
.modal-box button{
    border:none;

    cursor:pointer;

    padding:12px 20px;

    border-radius:12px;

    background:linear-gradient(
        135deg,
        #2563eb,
        #38bdf8
    );

    color:#fff;

    font-weight:400;

    transition:.3s;
}

.card button:hover,
.modal-box button:hover{
    transform:translateY(-2px);

    box-shadow:
    0 10px 25px rgba(59,130,246,.35);
}

/* ==========================
   MODAL
========================== */
.modal{
    display:none;

    position:fixed;

    top:0;
    left:0;

    width:100%;
    height:100%;

    justify-content:center;
    align-items:center;

    background:rgba(0,0,0,.7);

    backdrop-filter:blur(5px);

    z-index:9999;
}

.modal.active{
    display:flex;
}

.modal-box{
    width:100%;
    max-width:450px;

    background:#111827;

    border:1px solid rgba(255,255,255,.08);

    border-radius:20px;

    padding:30px;

    margin:20px;

    box-shadow:
    0 20px 50px rgba(0,0,0,.45);
}

.modal-box h2{
    margin-bottom:20px;
}

.modal-box form{
    display:flex;
    flex-direction:column;
    gap:14px;
}

.modal-box input{
    width:100%;

    padding:14px;

    border:none;

    border-radius:12px;

    background:#1f2937;

    color:#fff;

    outline:none;
}

.modal-box input::placeholder{
    color:#94a3b8;
}

#closeWithdraw{
    margin-top:15px;
    width:100%;
}

/* ==========================
   RESPONSIVE
========================== */
@media(max-width:768px){

    .header{
        flex-direction:column;

        height:auto;

        padding:15px;

        gap:15px;
    }

    .header-right{
        flex-wrap:wrap;
        justify-content:center;
    }

    .dashboard-container{
        flex-direction:column;
    }

    .sidebar{
        width:100%;
        border-right:none;
        border-bottom:1px solid rgba(255,255,255,.08);
    }

    .main-content{
        padding:20px;
    }

    .stats-grid{
        grid-template-columns:1fr;
    }

    .welcome-card h1{
        font-size:20px;
    }

    .card{
        overflow-x:auto;
    }

    .card table{
        min-width:600px;
    }

    .modal-box{
        width:calc(100% - 30px);
    }
}


/* ==========================
   HAMBURGER BUTTON
========================== */

.hamburger{
    display:none;

    font-size:28px;

    background:none;

    border:none;

    color:#fff;

    cursor:pointer;
}

/* ==========================
   MOBILE SIDEBAR
========================== */

@media (max-width:768px){

    .hamburger{
        display:block;
    }

    .header{
        justify-content:space-between;
        flex-direction:row;
    }

    .dashboard-container{
        flex-direction:column;
    }

    .sidebar{
        position:fixed;
        top:70px;
        left:-260px;

        height:100%;

        width:250px;

        z-index:9999;

        transition:0.3s ease;

        box-shadow:10px 0 30px rgba(0,0,0,.4);
    }

    .sidebar.active{
        left:0;
    }

    .main-content{
        padding:15px;
    }

    .stats-grid{
        grid-template-columns:1fr;
    }
}


@media (max-width: 768px){

    .stats-grid{
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card{
        padding: 16px;
    }

    .stat-card h2{
        font-size: 22px;
    }
}

.page-section{
    display: none;
}

.page-section.active{
    display: block;
}


/* MOBILE FIX */
@media(max-width:900px){
    .logo{
        font-size:20px;  /* 🔥 capped under 20px */
    }
}


/* CHARTS */
.charts{
display:grid;
grid-template-columns:1fr 1fr;
gap:20px;
margin-bottom:25px;
}

.chart-box{
background:#0f172a;
padding:20px;
border-radius:14px;
}

/* RESPONSIVE */
@media(max-width:900px){
.charts{
grid-template-columns:1fr;
}
