/* ================= RESET ================= */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Inter',sans-serif;
}

html,body{
    width:100%;
    min-height:100%;
}

body{
    background:#0f172a;
    color:white;
    overflow-x:hidden;
}

/* ================= LAYOUT ================= */
.wrapper{
    display:flex;
    min-height:100vh;
}

/* ================= SIDEBAR ================= */
.sidebar{
    width:240px;
    background:#020617;
    padding:20px;
    border-right:1px solid rgba(255,255,255,0.05);
    position:fixed;
    top:0;
    left:0;
    height:100vh;
    overflow-y:auto;
    transition:0.3s ease;
    z-index:1000;
}

.sidebar h2{
    margin-bottom:25px;
    font-size:20px;
}

.sidebar a{
    display:block;
    padding:12px;
    margin-bottom:8px;
    color:#cbd5f5;
    text-decoration:none;
    border-radius:10px;
    font-size:14px;
    transition:0.2s;
}

.sidebar a:hover{
    background:#1e293b;
    transform:translateX(3px);
}

.sidebar a.active{
    background:linear-gradient(135deg,#6366f1,#8b5cf6);
    color:#fff;
}

.close-btn{
    display:none;
}

/* ================= MAIN ================= */
.main{
    margin-left:240px;
    width:calc(100% - 240px);
    min-height:100vh;
    padding:30px;
    display:flex;
    flex-direction:column;
}

/* ================= CONTENT ================= */
.content{
    width:100%;
    max-width:1100px;
    margin:0 auto;
    flex:1;
}

.content.narrow{
    max-width:850px;
}

/* ================= CARDS ================= */
.cards{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:20px;
    margin-top:20px;
}

.dashboard-cards{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
    margin-top:20px;
}

.card{
    background:linear-gradient(145deg,#111827,#0b1220);
    padding:24px;
    border-radius:16px;
    border:1px solid rgba(255,255,255,0.05);
    transition:0.25s;
    margin-bottom:20px;
}

.card:hover{
    transform:translateY(-4px);
}

.card h2,
.card h3,
.card h4{
    margin-bottom:12px;
}

.card p{
    line-height:1.6;
    color:#d1d5db;
}

/* ================= FORMS ================= */
.input{
    margin-bottom:20px;
}

.input label{
    display:block;
    margin-bottom:8px;
    font-size:13px;
    color:#94a3b8;
}

input,
textarea,
select{
    width:100%;
    padding:14px;
    border:none;
    border-radius:10px;
    background:#1f2937;
    color:white;
}

textarea{
    resize:vertical;
    min-height:140px;
}

input:focus,
textarea:focus,
select:focus{
    outline:2px solid #6366f1;
}

/* ================= BUTTONS ================= */
.btn,
.submit-btn{
    display:inline-block;
    width:100%;
    padding:14px;
    border:none;
    border-radius:10px;
    background:linear-gradient(135deg,#6366f1,#8b5cf6);
    color:white;
    text-decoration:none;
    text-align:center;
    cursor:pointer;
}

.btn:hover{
    opacity:0.95;
}

/* ================= MODALS ================= */
.modal{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.65);
    backdrop-filter:blur(6px);
    z-index:9999;
    align-items:center;
    justify-content:center;
    padding:20px;
}

.modal-box{
    background:#111827;
    padding:25px;
    border-radius:16px;
    width:100%;
    max-width:600px;
    position:relative;
}

.close-x{
    position:absolute;
    top:12px;
    right:15px;
    cursor:pointer;
    font-size:22px;
}

/* ================= TOPBAR ================= */
.topbar{
    display:none;
}

.top-dropdown{
    position:fixed;
    top:65px;
    right:15px;
    background:#111827;
    border-radius:10px;
    display:none;
    flex-direction:column;
    min-width:160px;
    z-index:4000;
    border:1px solid rgba(255,255,255,0.05);
}

.top-dropdown a{
    padding:12px;
    color:white;
    text-decoration:none;
}

.top-dropdown a:hover{
    background:#1f2937;
}

/* ================= FOOTER ================= */
.footer{
    margin-top:auto;
    text-align:center;
    padding:25px 0;
    color:#94a3b8;
    font-size:14px;
}

.footer span{
    color:#8b5cf6;
    font-weight:600;
}

/* ================= TABLET ================= */
@media(max-width:1024px){
    .dashboard-cards{
        grid-template-columns:repeat(2,1fr);
    }
}

/* ================= MOBILE ================= */
@media(max-width:768px){

    /* SIDEBAR FIX */
    .sidebar{
        position:fixed;
        top:0;
        left:-100%;
        width:75%;
        height:100vh;
        background:#020617;
        z-index:5000;
        transition:0.3s ease;
        overflow-y:auto;
        padding-top:70px;
    }

    .sidebar.active{
        left:0;
    }

    /* CLOSE BTN */
    .close-btn{
        display:block;
        position:absolute;
        top:15px;
        right:15px;
        background:#ef4444;
        padding:6px 10px;
        border:none;
        border-radius:6px;
        color:white;
        cursor:pointer;
        z-index:5001;
    }

    /* MAIN */
    .main{
        margin-left:0;
        width:100%;
        padding:85px 15px 20px;
    }

    /* TOPBAR */
    .topbar{
        display:flex;
        align-items:center;
        justify-content:space-between;
        position:fixed;
        top:0;
        left:0;
        width:100%;
        height:65px;
        background:#020617;
        padding:0 15px;
        z-index:4500;
    }

    /* BIGGER LOGO */
    .topbar-logo{
        position:absolute;
        left:50%;
        transform:translateX(-50%);
    }

    .topbar-logo img{
        height:45px;
        max-width:180px;
        object-fit:contain;
    }

    /* MENU BUTTON */
    .menu-btn{
        background:#6366f1;
        border:none;
        padding:10px 12px;
        border-radius:8px;
        color:white;
        font-size:20px;
        cursor:pointer;
        z-index:4600;
    }

    /* DOTS */
    .topbar-dots{
        font-size:24px;
        cursor:pointer;
        z-index:4600;
    }

    .cards,
    .dashboard-cards{
        grid-template-columns:1fr;
    }

    .content,
    .content.narrow{
        max-width:100%;
    }

    .modal-box{
        max-width:100%;
        padding:20px;
    }
}