/* Neumorphic Dashboard App Layout & Header / Sidebar Styles */

:root {
    --sidebar-width: 260px;
    --header-height: 70px;
}

body.main {
    display: flex;
    min-height: 100vh;
    background-color: var(--neu-bg, #e6ecf5);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Sidebar Left Menu */
.app-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--neu-bg, #e6ecf5);
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 5px 0 15px rgba(197, 208, 224, 0.5);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1rem;
    transition: all 0.3s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.5rem 1.5rem 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(200, 210, 225, 0.5);
}

.sidebar-logo {
    max-width: 180px;
    height: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
}

.sidebar-item {
    width: 100%;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    color: var(--neu-text-main, #2b3a4a);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--neu-radius-md, 16px);
    transition: all 0.25s ease;
}

.sidebar-link i {
    font-size: 1.25rem;
    color: var(--neu-text-muted, #6c7a89);
    transition: color 0.25s ease;
}

.sidebar-link:hover {
    color: var(--neu-primary, #005e85);
    box-shadow: var(--neu-shadow-flat-sm, 5px 5px 10px #c5d0e0, -5px -5px 10px #ffffff);
}

.sidebar-link:hover i {
    color: var(--neu-primary, #005e85);
}

.sidebar-link.active {
    color: var(--neu-primary, #005e85);
    box-shadow: var(--neu-shadow-inset, inset 3px 3px 6px #c5d0e0, inset -3px -3px 6px #ffffff);
}

.sidebar-link.active i {
    color: var(--neu-primary, #005e85);
}

/* Header Navbar */
.app-header {
    height: var(--header-height);
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    background-color: var(--neu-bg, #e6ecf5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(197, 208, 224, 0.4);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Mobile Burger Menu Button */
.mobile-toggle-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--neu-radius-sm, 10px);
    background-color: var(--neu-bg, #e6ecf5);
    border: none;
    box-shadow: var(--neu-shadow-flat-sm, 4px 4px 8px #c5d0e0, -4px -4px 8px #ffffff);
    color: var(--neu-text-main, #2b3a4a);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-toggle-btn:active {
    box-shadow: var(--neu-shadow-inset, inset 2.5px 2.5px 5px #c5d0e0, inset -2.5px -2.5px 5px #ffffff);
}

.header-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neu-text-main, #2b3a4a);
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Notification Button Neumorphic Styling */
.notification-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50% !important;
    background-color: var(--neu-bg, #e6ecf5);
    border: none;
    box-shadow: var(--neu-shadow-flat-sm, 4px 4px 8px #c5d0e0, -4px -4px 8px #ffffff);
    color: var(--neu-text-main, #2b3a4a);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-btn:hover {
    color: var(--neu-primary, #005e85);
    box-shadow: 2px 2px 5px #c5d0e0, -2px -2px 5px #ffffff;
}

.notification-btn:active {
    box-shadow: var(--neu-shadow-inset, inset 2.5px 2.5px 5px #c5d0e0, inset -2.5px -2.5px 5px #ffffff);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--neu-bg, #e6ecf5);
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.45);
    line-height: 1;
    z-index: 2;
}

/* Slide-Over Notification Drawer (Slide from Right) */
.notification-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(2px);
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.notification-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.notification-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    background: #ffffff;
    z-index: 1065;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.notification-drawer.active {
    transform: translateX(0);
}

/* Layer 3: Notification Backdrop Detail (z-index 1070) */
.notification-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(3px);
    z-index: 1070 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.notification-detail-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Layer 4: Notification Detail Modal (z-index 1075) */
#notificationDetailsModal {
    z-index: 1075 !important;
}

.notification-drawer-header {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
}

.notification-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.85rem;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: 12px;
    margin-bottom: 0.6rem;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    text-decoration: none;
}

.notification-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.notification-item.unread {
    background: #f0f9ff;
    border-color: #bae6fd;
}

.notification-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.15rem;
}

.notification-item-content {
    flex: 1;
    min-width: 0;
}

.notification-item-title {
    font-weight: 700;
    font-size: 0.86rem;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 0.2rem;
}

.notification-item-desc {
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.4;
    margin-bottom: 0.35rem;
    word-wrap: break-word;
}

.notification-item-time {
    font-size: 0.71rem;
    color: #94a3b8;
    font-weight: 500;
}

.notification-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0284c7;
    flex-shrink: 0;
    margin-top: 5px;
}

/* Profile Dropdown Neumorphic Styling */
.profile-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.4rem 0.85rem;
    border-radius: 30px;
    background-color: var(--neu-bg, #e6ecf5);
    border: none;
    box-shadow: var(--neu-shadow-flat-sm, 5px 5px 10px #c5d0e0, -5px -5px 10px #ffffff);
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-dropdown-btn:active,
.profile-dropdown-btn.show {
    box-shadow: var(--neu-shadow-inset, inset 3px 3px 6px #c5d0e0, inset -3px -3px 6px #ffffff);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--neu-primary, #005e85);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.profile-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--neu-text-main, #2b3a4a);
}

.neu-dropdown-menu {
    border-radius: var(--neu-radius-md, 16px);
    border: none;
    background-color: var(--neu-bg, #e6ecf5);
    box-shadow: 8px 8px 18px #c5d0e0, -8px -8px 18px #ffffff;
    padding: 0.5rem;
    margin-top: 0.5rem !important;
    min-width: 170px;
}

.neu-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--neu-text-main, #2b3a4a);
    border-radius: var(--neu-radius-sm, 10px);
    text-decoration: none;
    transition: all 0.2s ease;
}

.neu-dropdown-item i {
    font-size: 1.1rem;
    color: var(--neu-text-muted, #6c7a89);
}

.neu-dropdown-item:hover {
    background-color: transparent;
    color: var(--neu-primary, #005e85);
    box-shadow: var(--neu-shadow-flat-sm, 5px 5px 10px #c5d0e0, -5px -5px 10px #ffffff);
}

.neu-dropdown-item:hover i {
    color: var(--neu-primary, #005e85);
}

.neu-dropdown-item.danger-item:hover {
    color: #c02b2b;
}

.neu-dropdown-item.danger-item:hover i {
    color: #c02b2b;
}

/* Main Content Area */
.app-main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 2rem;
    width: calc(100% - var(--sidebar-width));
    min-height: calc(100vh - var(--header-height));
    transition: all 0.3s ease;
}

/* Responsive Media Query Breakpoints */
@media (max-width: 991.98px) {
    .mobile-toggle-btn {
        display: inline-flex;
    }

    .app-header {
        left: 0;
        padding: 0 1.25rem;
    }

    .app-main-content {
        margin-left: 0;
        width: 100%;
        padding: 1.25rem;
    }

    .profile-name {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .notification-drawer {
        width: 100% !important;
        max-width: 100% !important;
    }
}