/* ------------------ Desktop / Default ------------------ */
.main-header {
    background: white;
    padding: 30px 60px;
    position: fixed;
    top: 0;
    right: 0;
    left: 260px; /* default sidebar width */
    width: calc(100% - 260px);
    transition: left 0.3s ease, width 0.3s ease; /* smooth toggle */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
}

/* ---------------- Header Text ---------------- */
.main-header h2 {
    font-size: 3rem;
    font-weight: bold;
}

/* ---------------- Header Logo ---------------- */
.header-logo {
    width: 55px;
    height: 50px;
    display: none; /* mobile will override */
}

/* ---------------- Buttons ---------------- */
.btn-bell {
    width: 50px;
    height: 50px;
    border: none;
    background: none;
    color: #333;
    font-size: 3.5rem;
    position: relative;
}

.btn-bell:hover {
    border-radius: 50%;
    background: rgba(223, 223, 223, 0.5);
}

.notif-circle {
    top: 14px;
    right: -4px;
}

.notification-wrapper{
    position: relative;
}

.notification-dropdown{
    margin-top: 20px;
    padding: 0;
    position:absolute;
    right:0;
    top:45px;
    width: 350px;
    background:white;
    border-radius:20px;
    box-shadow:0 5px 15px rgba(0,0,0,.2);
    max-height: 605px;
    overflow-y: auto;
    display:none;
    z-index: 1002;
}

.notification-dropdown.show{
    display:block;
}

.notification-header {
    padding: 20px;
}

.notif-empty {
    width: 100%;
    height: auto;
    padding: 30px 20px;
    text-align: center;
}

.beanbag-logo {
    width: 125px;
    height: 100px;
    filter: opacity(25%);
    margin-bottom: 60px;
    margin-top: 20px;
}

.notif-item{
    display:flex;
    align-items: center;
    justify-content: space-around;
    gap:10px;
    padding:15px 10px;
    color: #333;
    text-decoration: none;
    margin: 5px;
    border-radius: 20px;
}

.notif-item:hover{
    background:#f5f5f5;
}

.notif-item.unread{
    background:#f5f7ff;
    font-weight:500;
}

.notif-icon{
    width: 40px;
    height: 40px;
    font-size:3.5rem;
}

.notif-content {
    font-size: 1.8rem;
}

.notif-time{
    font-size:1.3rem;
    color:#888;
}

.clearnotif-btn{
    background:none;
    border:none;
    color:#e74c3c;
    font-size:1.4rem;
    cursor:pointer;
}

.clearnotif-btn:hover{
    text-decoration:underline;
}

/* ---------------- Mobile ---------------- */
@media (max-width: 768px) {
    .welcome-user{
        display: none;
    }

    /* Header logo toggle visible on mobile */
    .header-logo-toggle {
        display: block;
        cursor: pointer;
    }

    .main-header {
        left: 0 !important; /* mobile always full width */
        width: 100% !important;
        padding: 20px 15px; /* smoother mobile spacing */
    }

    .header-logo {
        display: block;
        width: 35px;
        height: 30px;
    }  

    .main, .main-content {
        margin-left: 0; /* fix blank space on mobile */
    }

    /* Notification adjustments */
    .btn-bell { height: 40px; width: 40px; font-size: 2.5rem; }
    .notif-circle { top: 10px; right: 0; }
    .notification-dropdown { width: 275px; }
    .notif-item { margin: 10px; }
    .notif-icon { width: 32.5px; height: 32.5px; font-size: 3rem; }
    .notif-content { font-size: 1.5rem; }
    .notif-time { font-size: 1.1rem; }
}

@media (max-width: 430px) {
    .main-header {
        padding: 15px;
        height: 75px;
    }

    .main-header h2 {
        font-size: 2rem;
    }
}

/* ---------------- Desktop: Collapsed Sidebar ---------------- */
/* Added: fixes blank space / rough toggle */
#sidebar.collapsed ~ .main-header {
    left: 80px; /* sidebar collapsed width */
    width: calc(100% - 80px);
}

#sidebar.collapsed ~ .main,
#sidebar.collapsed ~ .main-content {
    margin-left: 80px; /* align main content when sidebar collapsed */
}

/* ---------------- Sidebar Active on Mobile ---------------- */
/* Added: smooth mobile slide using transform */
#sidebar {
    width: 260px;
    transition: transform 0.3s ease; /* smooth slide */
}

#sidebar.active {
    transform: translateX(0); /* slide in */
}

@media (max-width: 768px) {
    #sidebar { transform: translateX(-100%); } /* hidden by default */
}