
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

* { font-family: 'Inter', sans-serif; }

body { background: #0f172a; }

/* ================= SIDEBAR ================= */
#sidebar {
    width: 82px;
    transition: all 0.35s ease;
    overflow: hidden;
    background: linear-gradient(180deg, #0f172a 0%, #111827 40%, #020617 100%);
    border-right: 1px solid rgba(255,255,255,0.08);
}

#sidebar:hover { width: 270px; }

.nav-label {
    opacity: 0;
    transition: all 0.25s ease;
    white-space: nowrap;
}

#sidebar:hover .nav-label { opacity: 1; }

.menu-item {
    position: relative;
    overflow: hidden;
}

.menu-item::before {
    content: "";
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: 0.5s;
}

.menu-item:hover::before { left: 100%; }

.active-menu {
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
    box-shadow: 0 8px 20px rgba(59,130,246,0.35);
    color: white !important;
}

/* ================= HEADER ================= */
.top-header {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* ================= SEARCH ================= */
.search-box {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: white;
}

.search-box::placeholder { color: #94a3b8; }

.search-box:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56,189,248,0.15);
}

/* ================= ICON BUTTON ================= */
.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    transition: 0.25s;
    position: relative;
}

.icon-btn:hover {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: white;
    transform: translateY(-2px);
}

/* ================= AVATAR ================= */
.avatar {
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 10px 25px rgba(37,99,235,0.35);
}

/* ================= DROPDOWN (DESKTOP) ================= */
.dropdown-menu {
    background: #111827;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 20px 40px rgba(0,0,0,0.45);
}

.dropdown-item {
    transition: 0.2s;
    font-size: 13px;
}

.dropdown-item:hover {
    background: rgba(255,255,255,0.06);
    padding-left: 16px;
}

/* ================= MAIN CONTENT ================= */
.main-content { background: #f8fafc; }

/* ================= SCROLLBAR ================= */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

/* ================= MOBILE MENU BUTTON ================= */
.mobile-menu-btn{
    display:none;
}

/* ================= TABLET + MOBILE ================= */
@media(max-width:1024px){

    /* HEADER */
    .top-header{
        padding-left:14px !important;
        padding-right:14px !important;
    }

    /* SEARCH HIDE */
    .search-wrapper{
        display:none !important;
    }

    /* MOBILE MENU BUTTON */
    .mobile-menu-btn{
        display:flex;
        width:40px;
        height:40px;
        border-radius:12px;
        align-items:center;
        justify-content:center;
        background:rgba(255,255,255,0.08);
        color:white;
        font-size:18px;
    }

    /* SIDEBAR MOBILE */
    #sidebar{
        position:fixed;
        top:64px;
        left:-280px;
        width:260px !important;
        height:calc(100vh - 64px);
        z-index:999;
        transition:0.35s ease;
    }

    #sidebar.mobile-active{
        left:0;
    }

    /* SHOW FULL LABELS IN MOBILE SIDEBAR */
    #sidebar .nav-label{
        opacity:1 !important;
        display:inline-block !important;
    }

    /* COMPACT ICONS */
    .icon-btn{
        width:38px;
        height:38px;
        border-radius:10px;
    }

    /* USER INFO HIDE TEXT */
    .mobile-hide{
        display:none !important;
    }

    /* DROPDOWN SMALLER */
    #userDropdown{
        width:240px !important;
    }

    /* MAIN CONTENT */
    .main-content{
        padding:14px !important;
    }
}

/* ================= SMALL MOBILE ================= */
@media(max-width:640px){

    .top-header{
        height:58px !important;
    }

    .icon-btn{
        width:34px;
        height:34px;
        border-radius:10px;
    }

    .avatar{
        width:32px !important;
        height:32px !important;
    }

    .mobile-menu-btn{
        width:36px;
        height:36px;
        font-size:16px;
    }

    #userDropdown{
        width:220px !important;
    }

    .dropdown-item{
        font-size:12px;
    }
}

@media(max-width:1024px){

    /* SIDEBAR STRUCTURE */
    #sidebar{
        display:flex;
        flex-direction:column;
        height:calc(100vh - 64px);
    }

    /* NAV AREA TAKES SPACE + SCROLL IF NEEDED */
    #sidebar nav{
        flex:1;
        overflow-y:auto;
        padding-top:10px !important;
        padding-bottom:10px !important;
    }

    /* REDUCE GAP BETWEEN MENU ITEMS */
    #sidebar nav.space-y-2{
        gap:6px !important;
    }

    /* COMPACT MENU ITEM */
    #sidebar .menu-item{
        height:42px !important;
        padding:0 10px !important;
        border-radius:10px !important;
        display:flex;
        align-items:center;
    }

    /* ICON TIGHT */
    #sidebar .menu-item i{
        font-size:18px !important;
        min-width:20px !important;
    }

    /* TEXT TIGHT */
    #sidebar .nav-label{
        margin-left:10px !important;
        font-size:13px !important;
    }

    /* USER + LOGOUT AREA */
    #sidebar .p-4{
        padding:10px !important;
        flex-shrink:0;
        background:#0f172a;
    }

    /* LOGOUT BUTTON HEIGHT FIX */
    #sidebar a.flex.items-center.h-12{
        height:40px !important;
    }

    /* FORCE BOTTOM SECTION ALWAYS VISIBLE */
    #sidebar .border-t{
        flex-shrink:0;
    }
}
@media(max-width:1024px){
    .logo-box{
        display:none !important;
    }

    .logo-subtitle{
        display:none !important;
    }

    .logo-title{
        font-size:16px !important;
    }
}
/* ================= OVERLAY FIX ================= */
.sidebar-overlay{
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    height: calc(100vh - 64px);
    background: rgba(0,0,0,0.45);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    z-index: 998;
}

.sidebar-overlay.active{
    opacity: 1;
    visibility: visible;
}

/* ================= FIX SIDEBAR STACK ================= */
@media(max-width:1024px){

    #sidebar{
        z-index: 999;
    }

    /* FORCE FULL HEIGHT STRUCTURE */
    #sidebar{
        display:flex;
        flex-direction:column;
        height:calc(100vh - 64px);
    }

    /* SCROLL ONLY MENU AREA */
    #sidebar nav{
        flex:1;
        overflow-y:auto;
        padding-bottom:8px;
    }

    /* KEEP BOTTOM ALWAYS FIXED VISUAL */
    #sidebar .border-t{
        flex-shrink:0;
        position:sticky;
        bottom:0;
        background:#0f172a;
    }

    /* ENSURE LOGOUT ALWAYS VISIBLE */
    #sidebar .p-4{
        flex-shrink:0;
    }
}
 