/* ==========================
   GOOGLE FONT
========================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ==========================
   CSS VARIABLES
========================== */
:root {

    --primary-purple: #7C3AED;
    --primary-pink: #EC4899;

    --purple-light: #F3E8FF;
    --pink-light: #FDF2F8;

    --white: #FFFFFF;
    --background: #F8F9FC;

    --text-dark: #2D1B46;
    --text-light: #6B7280;

    --border: #E5E7EB;

    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;

    --sidebar-width: 280px;
    --navbar-height: 75px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);

    --radius: 16px;
}

/* ==========================
   RESET
========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:'Poppins', sans-serif;
    background:var(--background);
    color:var(--text-dark);
}

a{
    text-decoration:none;
}

ul{
    list-style:none;
}

img{
    max-width:100%;
    display:block;
}

/* ==========================
   LAYOUT
========================== */

.layout{
    display:flex;
    min-height:100vh;
}

.main-container{
    flex:1;
    margin-left:var(--sidebar-width);
    display:flex;
    flex-direction:column;
}

/* ==========================
   SIDEBAR
========================== */

.sidebar{
    position:fixed;
    top:0;
    left:0;
    width:var(--sidebar-width);
    height:100vh;

    background:
    linear-gradient(
        180deg,
        var(--primary-purple),
        var(--primary-pink)
    );

    color:white;
    display:flex;
    flex-direction:column;
    justify-content:space-between;

    z-index:1000;
}

.logo-section{
    padding:30px;
    text-align:center;
}

.logo-section h2{
    font-size:1.6rem;
    font-weight:700;
}

.sidebar-nav{
    display:flex;
    flex-direction:column;
    padding:20px;
    gap:12px;
}

.nav-link{
    color:white;

    display:flex;
    align-items:center;
    gap:15px;

    padding:15px 18px;

    border-radius:12px;

    transition:.3s ease;
}

.nav-link:hover{
    background:rgba(255,255,255,0.15);
}

.nav-link i{
    width:20px;
    text-align:center;
}

.nav-link.active{
    background:white;
    color:var(--primary-purple);
    font-weight:600;
}

.sidebar-footer{
    padding:20px;
}

.logout-btn{
    display:flex;
    align-items:center;
    gap:12px;

    color:white;
    padding:15px;

    border-radius:12px;
    transition:.3s;
}

.logout-btn:hover{
    background:rgba(255,255,255,0.15);
}

/* ==========================
   TOPBAR
========================== */

.topbar{
    height:var(--navbar-height);

    background:white;

    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:0 30px;

    box-shadow:var(--shadow-sm);
}

.topbar-title{
    font-size:1.2rem;
    font-weight:600;
}

.user-profile{
    display:flex;
    align-items:center;
    gap:15px;
}

.notification-icon{
    width:45px;
    height:45px;

    border-radius:50%;

    background:var(--purple-light);

    display:flex;
    justify-content:center;
    align-items:center;

    cursor:pointer;

    color:var(--primary-purple);
}

.profile-pic{
    width:45px;
    height:45px;

    border-radius:50%;
    object-fit:cover;
}

.user-info h4{
    font-size:14px;
}

.user-info small{
    color:var(--text-light);
}

/* ==========================
   CONTENT AREA
========================== */

.content-area{
    padding:30px;
    flex:1;
}

/* ==========================
   FLASH MESSAGES
========================== */

.alert{

    padding:15px 20px;

    border-radius:12px;

    margin-bottom:20px;

    font-weight:500;

    display:flex;
    align-items:center;

    box-shadow:var(--shadow-sm);

    animation:fadeIn .4s ease;
}

.alert-success{

    background:#ECFDF5;

    color:#047857;

    border-left:5px solid var(--success);
}

.alert-danger{

    background:#FEF2F2;

    color:#B91C1C;

    border-left:5px solid var(--danger);
}

.alert-warning{

    background:#FFFBEB;

    color:#B45309;

    border-left:5px solid var(--warning);
}

.alert-info{
    background:#EFF6FF;
    color:#1D4ED8;
    border-left:5px solid #3B82F6;
}

@keyframes fadeIn{

    from{
        opacity:0;
        transform:translateY(-8px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }

}


/* ==========================
   CARDS
========================== */

.card{
    background:white;
    border-radius:var(--radius);
    padding:25px;
    box-shadow:var(--shadow-sm);
    transition:.3s;
}

.card:hover{
    transform:translateY(-3px);
    box-shadow:var(--shadow-md);
}

.card-title{
    font-size:1rem;
    font-weight:600;
    margin-bottom:15px;
}

/* ==========================
   BUTTONS
========================== */

.btn{
    border:none;
    outline:none;
    cursor:pointer;
    border-radius:12px;
    padding:12px 20px;
    font-size:14px;
    font-weight:600;
    transition:.3s;
}

.btn-primary{
    background:
    linear-gradient(
        135deg,
        var(--primary-purple),
        var(--primary-pink)
    );

    color:white;
}

.btn-primary:hover{
    transform:translateY(-3px);
    box-shadow:0 12px 20px rgba(124,58,237,.25);
}

.btn-outline{
    background:white;
    color:var(--primary-purple);
    border:2px solid var(--primary-purple);
}

.btn-outline:hover{
    background:var(--primary-purple);
    color:white;
}

/* ==========================
   FORM ELEMENTS
========================== */

.input-group{
    margin-bottom:20px;
}

.input-group label{
    display:block;
    margin-bottom:8px;
    font-weight:500;
}

.input-group input,
.input-group textarea,
.input-group select{
    width:100%;

    padding:14px;

    border:1px solid var(--border);
    border-radius:12px;

    font-family:'Poppins', sans-serif;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus{

    outline:none;

    border-color:var(--primary-purple);

    box-shadow:0 0 0 4px rgba(124,58,237,.15);

    transition:.25s;

}

/* ==========================
   GRID SYSTEM
========================== */

.grid{
    display:grid;
    gap:20px;
}

.grid-2{
    grid-template-columns:repeat(2,1fr);
}

.grid-3{
    grid-template-columns:repeat(3,1fr);
}

.grid-4{
    grid-template-columns:repeat(4,1fr);
}

/* ==========================
   MOBILE MENU
========================== */

.menu-btn{
    display:none;

    border:none;
    background:none;

    font-size:22px;
    cursor:pointer;

    color:var(--primary-purple);
}

/* ==========================
   OVERLAY
========================== */

.overlay{
    position:fixed;

    top:0;
    left:0;

    width:100%;
    height:100%;

    background:rgba(0,0,0,.5);

    visibility:hidden;
    opacity:0;

    transition:.3s;

    z-index:999;
}

.overlay.active{
    visibility:visible;
    opacity:1;
}

/* ==========================
   RESPONSIVE
========================== */

@media(max-width:992px){

    .grid-4{
        grid-template-columns:repeat(2,1fr);
    }

    .grid-3{
        grid-template-columns:repeat(2,1fr);
    }
}

@media(max-width:768px){

    .sidebar{
        left:-100%;
        transition:.3s;
    }

    .sidebar.active{
        left:0;
    }

    .main-container{
        margin-left:0;
    }

    .menu-btn{
        display:block;
    }

    .topbar{
        padding:0 20px;
    }

    .content-area{
        padding:20px;
    }

    .user-info{
        display:none;
    }

    .grid-2,
    .grid-3,
    .grid-4{
        grid-template-columns:1fr;
    }
}

@media(max-width:480px){

    .content-area{
        padding:15px;
    }

    .card{
        padding:20px;
    }

    .topbar-title{
        font-size:1rem;
    }
}

/* ==========================
   PAGE ANIMATION
========================== */

.content-area{

    animation:fadePage .4s ease;

}

@keyframes fadePage{

    from{

        opacity:0;

        transform:translateY(12px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/* ==========================
   SCROLLBAR
========================== */

::-webkit-scrollbar{

    width:10px;

}

::-webkit-scrollbar-track{

    background:#F3F4F6;

}

::-webkit-scrollbar-thumb{

    background:linear-gradient(
        var(--primary-purple),
        var(--primary-pink)
    );

    border-radius:20px;

}

::-webkit-scrollbar-thumb:hover{

    background:var(--primary-purple);

}