/* ===== GLOBAL ===== */
body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #f4f6f9;
    overflow-x: hidden;
}

/* ===== SIDEBAR BASE ===== */
.sidebar {
    position: fixed;
    top: 85px; /* ✅ header ke niche */
    left: -270px;
    width: 270px;
    height: calc(100vh - 85px);
    padding-top: 10px;

    backdrop-filter: blur(15px);
    background: linear-gradient(180deg, #141e30, #243b55);

    transition: all .4s cubic-bezier(.77, 0, .18, 1);
    z-index: 1000;
    overflow-y: auto;

    box-shadow: 5px 0 25px rgba(0, 0, 0, .3);
}

/* ACTIVE */
.sidebar.active {
    left: 0;
}

/* ===== HOVER TRIGGER ===== */
.sidebar-hover-area {
    position: fixed;
    left: 0;
    top: 85px;
    width: 18px;
    height: calc(100vh - 85px);
    z-index: 999;
}

/* ===== MENU ===== */
.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    margin: 6px 0;
}

/* ===== MAIN MENU ITEM ===== */
.sidebar ul li > a {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 13px 18px;
    margin: 6px 12px;
    border-radius: 12px;

    text-decoration: none;
    color: #fff;
    font-size: 14px;
    font-weight: 500;

    transition: all .3s ease;
}

/* ===== HOVER EFFECT ===== */
.sidebar ul li > a:hover {
    transform: translateX(6px);
    box-shadow: 0 50px 20px rgba(0,0,0,0.3);
}

/* ===== 🔥 MULTI COLOR SECTIONS ===== */
.sidebar ul li:nth-child(1) > a {
    background: linear-gradient(45deg, #00c6ff, #0072ff);
}

.sidebar ul li:nth-child(2) > a {
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
}

.sidebar ul li:nth-child(3) > a {
    background: linear-gradient(45deg, #43cea2, #185a9d);
}

.sidebar ul li:nth-child(4) > a {
    background: linear-gradient(45deg, #f7971e, #ffd200);
    color: #000;
}

.sidebar ul li:nth-child(5) > a {
    background: linear-gradient(45deg, #8e2de2, #4a00e0);
}

.sidebar ul li:nth-child(6) > a {
    background: linear-gradient(45deg, #ff9966, #ff5e62);
}

.sidebar ul li:nth-child(7) > a {
    background: linear-gradient(45deg, #00b09b, #96c93d);
    color: #000;
}

/* ===== SUB MENU ===== */
.sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease;
    padding-left: 10px;
}

.has-sub.active > .sub-menu {
    max-height: 500px;
}

/* ===== SUB MENU ITEMS ===== */
.sub-menu li a {
    font-size: 13px;
    background: rgba(255,255,255,0.1);
    margin: 4px 15px;
    border-radius: 8px;
    padding: 10px 15px;
    color: #fff;
    transition: 0.3s;
}

.sub-menu li a:hover {
    background: rgba(255,255,255,0.25);
    transform: translateX(5px);
}

/* ===== ARROW ===== */
.has-sub > a::after {
    content: '▼';
    font-size: 11px;
    transition: transform .3s ease;
}

.has-sub.active > a::after {
    transform: rotate(-180deg);
}

/* ===== ACTIVE LINK ===== */
.sidebar ul li a.active {
    box-shadow: 0 0 15px rgba(255,255,255,0.6);
}

/* ===== SCROLLBAR ===== */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.4);
    border-radius: 10px;
}

/* ===== CONTENT SHIFT ===== */
.main-content {
    margin-top: 85px;
    transition: margin-left .4s ease;
}

.main-content.shift {
    margin-left: 270px;
}

/* ===== ANIMATION ===== */
.sidebar ul li {
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeSlide .4s forwards;
}

.sidebar.active ul li {
    animation-delay: .1s;
}

@keyframes fadeSlide {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== TOP GLOW ===== */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255,255,255,.2), transparent);
}