﻿/* Layout-specific styles only. Keep global styles in site.css */

/* Topbar (mobile) */
.topbar {
    display: none;
    width: 100%;
    height: 50px;
    background-color: #1F2937;
    color: #fff;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
}

.topbar-logo {
    height: 40px;
    margin: 0 auto;
}

.sidebar-toggler {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

/* Sidebar */
.sidebar {
    height: 100vh;
    width: 250px;
    position: fixed;
    top: 0;
    right: 0;
    background-color: #1F2937;
    display: flex;
    flex-direction: column;
    transition: all .3s;
    overflow-y: auto;
    padding-top: 20px;
}

.sidebar-logo {
    width: 80%;
    display: block;
    margin: 0 auto 20px;
    border-radius: 10px;
}

.sidebar .nav {
    list-style: none;
    padding: 0;
    margin: 0;
    white-space: nowrap;
}

.sidebar .nav-link {
    color: #fff;
    padding: 10px;
    text-align: right;
}

    .sidebar .nav-link:hover {
        background-color: #3B82F6;
    }

.logout-form {
    width: 100%;
}

.logout-button {
    width: 100%;
    background: none;
    border: none;
    color: #fff;
    text-align: right;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
    display: block;
}

    .logout-button:hover {
        background-color: #3B82F6;
    }

.notification-circle {
    position: absolute;
    top: 5px;
    left: 10px;
    width: 20px;
    height: 20px;
    background: #FBBF24;
    color: #1F2937;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
}

/* Content */
.content {
    margin-right: 250px;
    padding: 20px;
    transition: all .3s;
    background-color: rgba(249, 250, 251, 0);
}

/* Mobile (off-canvas overlay) */
@media (max-width: 768px) {
    .topbar {
        display: flex !important; /* ✅ show it */
        z-index: 1300; /* ✅ above sidebar + backdrop */
    }

    .sidebar-toggler {
        display: block;
    }

    .sidebar {
        right: -250px;
        padding-top: 60px;
        z-index: 1200; /* below topbar */
    }

    .content {
        margin-right: 0;
    }

    .sidebar.active {
        right: 0;
    }

        /* hide content when sidebar open (your requirement) */
        .sidebar.active ~ #content {
            display: none !important;
        }

    .content.active {
        margin-right: 0 !important;
    }
}


/* Desktop tweaks */
@media (min-width: 769px) {
    
}
/* Backdrop overlay (mobile) */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 1150; /* below sidebar (1200), below topbar (1300) */
}

@media (max-width: 768px) {
    .sidebar-backdrop.active {
        display: block;
    }
}
body.sidebar-open {
    overflow: hidden;
}
@media (max-width: 768px) {
    .content {
        padding-top: 70px; /* 50px topbar + some spacing */
    }
}
<style >
/* Make modal never exceed screen */
.modal-dialog {
    max-height: 100dvh;
    margin: 0;
}

/* Fullscreen feel on mobile */
@media (max-width: 768px) {
    .modal-dialog {
        width: 100%;
        height: 100%;
        max-width: 100%;
    }

    .modal-content {
        height: 100dvh;
        border-radius: 0;
    }
}

/* Sticky header (X always visible) */
.modal-header {
    position: sticky;
    top: 0;
    z-index: 1055;
    background: #fff;
}

/* Scroll only body */
.modal-body {
    overflow-y: auto;
    max-height: calc(100dvh - 120px);
}

/* Optional: sticky footer */
.modal-footer {
    position: sticky;
    bottom: 0;
    background: #fff;
}

</style >