/* =========================
   RESET
========================= */

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

:root{
    --bg:#050816;
    --panel:#0D1323;
    --panel2:#10192d;
    --border:rgba(255,255,255,0.08);

    --text:#ffffff;
    --muted:#8A94A7;

    --green:#00FFB2;
    --blue:#4DA3FF;
    --violet:#7B61FF;
    --red:#FF4D6D;

    --glow:0 0 20px rgba(77,163,255,.15);
  
  --primary:#5B8CFF;
    --primary2:#7C5CFF;

    --text:#fff;
    --muted:#9CA3AF;
    --border:rgba(255,255,255,.08);
}

body{
    background:
        radial-gradient(circle at top left, rgba(77,163,255,.12), transparent 25%),
        radial-gradient(circle at bottom right, rgba(123,97,255,.10), transparent 30%),
        var(--bg);

    color:var(--text);
    font-family:'Inter',sans-serif;
    min-height:100vh;
}

/* =========================
   LAYOUT
========================= */

.dashboard{
    display:grid;
    grid-template-columns:260px 1fr;
    min-height:100vh;
}

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

.sidebar{
    background:rgba(10,14,26,.75);
    border-right:1px solid var(--border);
    backdrop-filter:blur(18px);
    padding:24px;

    display:flex;
    flex-direction:column;
}

/* =========================
   BRAND
========================= */

.brand{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:40px;
}

.logo{
    width:42px;
    height:42px;

    border-radius:14px;

    background:linear-gradient(
        135deg,
        var(--primary),
        var(--primary2)
    );

    display:flex;
    align-items:center;
    justify-content:center;

    color:#fff;
    font-size:16px;
    font-weight:800;

    flex-shrink:0;
}

.brand-text h2{
    font-size:16px;
    font-weight:700;
    letter-spacing:.4px;
    color:var(--text);
}

.brand-text p{
    font-size:11px;
    color:var(--muted);
    margin-top:3px;
    letter-spacing:1.2px;
}

/* =========================
   MENU
========================= */

.menu{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.menu-item{
    padding:12px 14px;
    border-radius:12px;

    color:var(--muted);
    font-size:13px;
    font-weight:500;

    cursor:pointer;

    transition:.25s ease;
}

.menu-item:hover{
    background:rgba(255,255,255,.04);
    color:var(--text);
}

.menu-item.active{
    background:linear-gradient(
        135deg,
        rgba(91,140,255,.18),
        rgba(124,92,255,.12)
    );

    color:var(--text);

    border:1px solid rgba(91,140,255,.18);
}

.main{
    padding:30px;
}

/* =========================
   TOP BAR
========================= */

.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:30px;
}

.heading h1{
    font-size:34px;
    font-weight:800;
}

.heading p{
    color:var(--muted);
    margin-top:8px;
}

.account{
    display:flex;
    align-items:center;
    gap:15px;
}

.pill{
    background:rgba(255,255,255,.05);
    border:1px solid var(--border);
    padding:10px 18px;
    border-radius:50px;
    color:var(--muted);
}

/* =========================
   HERO GRID
========================= */

.hero-grid{
    display:grid;
    grid-template-columns:420px 1fr;
    gap:24px;
    margin-bottom:24px;
}

/* =========================
   GLASS CARD
========================= */

.card{
    background:rgba(13,19,35,.82);
    border:1px solid var(--border);
    border-radius:24px;
    backdrop-filter:blur(18px);
    box-shadow:var(--glow);
}

/* =========================
   EQUITY CARD
========================= */

.equity-card{
    padding:30px;
}

.label{
    color:var(--muted);
    font-size:14px;
    margin-bottom:10px;
}

.big-equity{
    font-size:44px;
    font-weight:800;
    margin-bottom:24px;
}

.pnl{
    color:var(--green);
    font-size:22px;
    font-weight:700;
    margin-bottom:30px;
}

.stats{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
}

.stat-box{
    background:rgba(255,255,255,.03);
    border:1px solid rgba(255,255,255,.04);
    border-radius:18px;
    padding:18px;
}

.stat-box h3{
    color:var(--muted);
    font-size:13px;
    margin-bottom:10px;
    font-weight:500;
}

.stat-box p{
    font-size:22px;
    font-weight:700;
}

/* =========================
   CHART CARD
========================= */

.chart-card{
    padding:24px;
    position:relative;
    overflow:hidden;
}

.chart-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}

.chart-buttons{
    display:flex;
    gap:10px;
}

.chart-buttons button{
    background:rgba(255,255,255,.05);
    color:var(--muted);
    border:none;
    padding:8px 14px;
    border-radius:10px;
    cursor:pointer;
    transition:.3s;
}

.chart-buttons button.active{
    background:linear-gradient(
        135deg,
        var(--blue),
        var(--violet)
    );

    color:#fff;
}

.chart{
    height:320px;
    display:flex;
    align-items:flex-end;
    gap:10px;
}

.bar{
    flex:1;
    background:linear-gradient(
        180deg,
        rgba(77,163,255,.95),
        rgba(123,97,255,.2)
    );

    border-radius:12px 12px 0 0;
    animation:rise 1s ease forwards;
    opacity:0;
}

@keyframes rise{
    from{
        height:0;
        opacity:0;
    }
    to{
        opacity:1;
    }
}

/* =========================
   METRIC GRID
========================= */

.metrics{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
    margin-bottom:24px;
}

.metric-card{
    padding:22px;
}

.metric-title{
    color:var(--muted);
    margin-bottom:14px;
    font-size:14px;
}

.metric-value{
    font-size:30px;
    font-weight:800;
    margin-bottom:10px;
}

.metric-change{
    color:var(--green);
    font-weight:600;
}

/* =========================
   TABLES
========================= */

.table-card{
    padding:24px;
    margin-bottom:24px;
}

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

.section-title h2{
    font-size:24px;
}

table{
    width:100%;
    border-collapse:collapse;
}

thead{
    background:rgba(255,255,255,.03);
}

th{
    text-align:left;
    padding:18px;
    color:var(--muted);
    font-size:13px;
    font-weight:600;
}

td{
    padding:18px;
    border-top:1px solid rgba(255,255,255,.04);
    font-size:14px;
}

tbody tr{
    transition:.3s;
}

tbody tr:hover{
    background:rgba(255,255,255,.03);
}

.positive{
    color:var(--green);
    font-weight:700;
}

.negative{
    color:var(--red);
    font-weight:700;
}

.long{
    color:var(--blue);
    font-weight:700;
}

.short{
    color:var(--red);
    font-weight:700;
}

/* =========================
   ANALYTICS
========================= */

.analytics{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:24px;
}

.analytics-card{
    padding:24px;
}

.circle{
    width:220px;
    height:220px;
    border-radius:50%;
    margin:30px auto;

    background:
    conic-gradient(
        var(--green) 0% 78%,
        rgba(255,255,255,.08) 78% 100%
    );

    display:flex;
    align-items:center;
    justify-content:center;
}

.circle::before{
    content:"78%";
    width:160px;
    height:160px;
    background:var(--panel);
    border-radius:50%;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:42px;
    font-weight:800;
}

.activity{
    display:flex;
    flex-direction:column;
    gap:16px;
    margin-top:20px;
}

.activity-item{
    display:flex;
    justify-content:space-between;
    background:rgba(255,255,255,.03);
    padding:16px;
    border-radius:16px;
}

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

@media(max-width:1200px){

    .metrics{
        grid-template-columns:1fr 1fr;
    }

    .hero-grid{
        grid-template-columns:1fr;
    }

}

@media(max-width:900px){

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

    .sidebar{
        display:none;
    }

    .analytics{
        grid-template-columns:1fr;
    }

}

@media(max-width:700px){

    .metrics{
        grid-template-columns:1fr;
    }

    .topbar{
        flex-direction:column;
        align-items:flex-start;
        gap:20px;
    }

    .stats{
        grid-template-columns:1fr;
    }

    table{
        display:block;
        overflow-x:auto;
    }

}