/* _header_partial.css - LIGHT THEME & LARGER TEXT */

:root {
    --header-bg: #ffffff;
    /* White Background */
    --header-height: 80px;
    /* Taller header */
    --header-text: #3F4254;
    /* Dark Text */
    --header-text-muted: #7E8299;
    /* Muted Text */
    --header-highlight: #3699FF;
    /* Primary Blue */
    --header-hover: #F3F6F9;
    /* Light Gray Hover */
    --header-border: #EBEDF3;
    /* Light Border */
}

/* 0. TOP_NAV WRAPPER */
.top_nav {
    display: block;
    width: auto;
}

.toggle {
    float: left;
    margin: 0;
    padding-top: 0px;
    width: 70px;
}

/* 1. HEADER CONTAINER */
.modern-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    height: var(--header-height);

    background-color: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    box-shadow: 0 4px 15px rgba(140, 140, 140, 0.05);

    padding: 0 30px;
    box-sizing: border-box;

    position: sticky;
    top: 0;
    z-index: 20;

    font-family: 'Poppins', sans-serif;
}



/* 2. LEFT SECTION (Role) */
.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    /* Never shrink */
}

/* Role Pill Style */
.role-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(54, 153, 255, 0.15);
    border: 1px solid rgba(54, 153, 255, 0.3);
    border-radius: 50px;

    color: var(--header-highlight);
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.role-pill:hover {
    background: var(--header-highlight);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(54, 153, 255, 0.3);
}

.role-text {
    font-size: 1.05rem;
    /* Larger font */
    font-weight: 500;
}

.role-text b {
    font-weight: 700;
    text-transform: uppercase;
}

/* 3. RIGHT SECTION (Icons + Profile) */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Spacing between items */
    height: 100%;
}

/* Environment Label (High Visibility) */
.env-label {
    display: flex;
    align-items: center;
    background: #FFA800;
    color: var(--header-text);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 20px;
    box-shadow: 0 4px 10px rgba(255, 168, 0, 0.4);
}

.env-label span {
    opacity: 0.9;
    margin-right: 5px;
    font-weight: 800;
}

/* Header Action Buttons (Icons) */
.header-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    color: var(--header-text-muted);
    transition: all 0.2s ease;
    text-decoration: none !important;
    position: relative;
    cursor: pointer;
}

.header-action:hover {
    background-color: var(--header-hover);
    color: var(--header-highlight);
}

.header-action i {
    font-size: 1.5rem;
}

/* Notification Badge */
.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    background: #F64E60;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--header-bg);
}

/* User Profile Block */
.user-profile-block {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    border-radius: 50px;
    margin-left: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.user-profile-block:hover,
.user-profile-block[aria-expanded="true"] {
    background-color: var(--header-hover);
}

.user-text {
    text-align: right;
    display: none;
    /* Mobile hidden */
}

@media(min-width: 992px) {
    .user-text {
        display: block;
    }
}

.user-name {
    display: block;
    color: var(--header-text);
    font-weight: 700;
    font-size: 1.1rem;
    /* Larger font */
    line-height: 1.2;
}

.user-role {
    display: block;
    color: var(--header-text-muted);
    font-size: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--header-highlight);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

/* Dropdown Customization (Dark) */
.custom-dropdown-menu {
    background-color: #1e1e2d;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    margin-top: 10px !important;
    padding: 10px 0;
}

.custom-dropdown-menu li>a {
    color: #b5b5c3;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    font-weight: 500;
    text-decoration: none;
    transition: 0.2s;
}

.custom-dropdown-menu li>a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--header-highlight);
}

.custom-dropdown-menu li>a i {
    width: 25px;
    text-align: center;
    margin-right: 5px;
    font-size: 1.1rem;
}

/* Notifications List specific */
.notif-list {
    min-width: 300px;
    max-height: 350px;
    overflow-y: auto;
}

.notif-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item a {
    display: block !important;
    white-space: normal;
}

.notif-img {
    float: left;
    margin-right: 10px;
}

.notif-content {
    display: block;
    overflow: hidden;
}

.notif-title {
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.notif-desc {
    color: #888;
    font-size: 0.85rem;
}

.notif-time {
    float: right;
    font-size: 0.75rem;
    color: #555;
}

/* =========================================
   MOBILE RESPONSIVENESS (max-width: 768px)
   ========================================= */
@media (max-width: 768px) {

    /* 0. RESET MARGINS */
    .top_nav,
    .right_col,
    footer {
        margin-left: 0 !important;
        width: 100% !important;
    }

    /* 1. Header - Full width, centered content */
    .modern-header-container {
        width: 100% !important;
        height: 55px;
        padding: 0 10px;
        justify-content: space-between;
    }

    /* 2. HIDE Role Selection completely on mobile */
    .role-pill {
        display: none !important;
    }

    /* 3. Header Left - Just hamburger */
    .header-left {
        flex-shrink: 0;
    }

    /* 4. Header Right - Center icons, reduce gaps */
    .header-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        flex-wrap: nowrap;
    }

    /* 5. Environment Label - Smaller */
    .env-label {
        margin-right: 5px;
        padding: 3px 6px;
        font-size: 0.65rem;
    }

    .env-label span {
        display: none;
    }

    /* 6. Action Icons - Smaller */
    .header-action {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .header-action i {
        font-size: 1.1rem;
    }

    /* 7. User Profile - Compact, just avatar */
    .user-profile-block {
        margin-left: 3px;
        padding: 2px;
        gap: 0;
    }

    .user-text {
        display: none !important;
    }

    .user-avatar {
        width: 30px;
        height: 30px;
    }

    .modern-header-container {
        position: relative !important;
        z-index: 1035 !important;
    }

    .top_nav {
        position: relative !important;
        z-index: 1035 !important;
    }
}

/* =========================================
   NOTIFICATION SIDEBAR (UNIQUE NAMES)
   ========================================= */
/* =========================================
   NOTIFICATION SIDEBAR (UNIQUE NAMES)
   ========================================= */
.notif-sidebar-panel {
    position: fixed;
    top: 0;
    right: -450px;
    /* Hidden via right offset */
    width: 400px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    /* Matches alert-sidebar, above button (9998) */
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-left: 1px solid #ebedf3;
    display: flex;
    flex-direction: column;
    font-family: 'Poppins', sans-serif;
}

.notif-sidebar-panel.is-open {
    right: 0;
}

/* Backdrop */
.notif-sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9990;
    /* Below sidebar */
    display: none;
    /* backdrop-filter: blur(2px); REMOVED */
}

.notif-sidebar-backdrop.is-visible {
    display: block;
}

/* Header */
.notif-header-modern {
    padding: 20px 25px;
    border-bottom: 1px solid #ebedf3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.notif-header-title {
    font-size: 1.25rem;
    /* Increased */
    font-weight: 700;
    color: #3F4254;
    margin: 0;
}

.notif-close-btn {
    background: #f3f6f9;
    border: none;
    color: #7E8299;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-close-btn:hover {
    background: #e1f0ff;
    color: #3699FF;
}

/* List Content */
.notif-content-area {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f9f9fc;
}

/* Notification Card */
.notif-card-modern {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid #eff2f5;
    transition: all 0.2s;
    text-decoration: none !important;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    cursor: pointer;
}

.notif-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
    border-color: #3699FF;
}

.notif-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e1f0ff;
    color: #3699FF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.notif-card-body {
    flex: 1;
}

.notif-card-time {
    font-size: 11px;
    color: #5E6278;
    /* Darker for better visibility */
    font-weight: 500;
    float: right;
    margin-top: 2px;
}

.notif-card-title {
    font-weight: 600;
    color: #3F4254;
    font-size: 14px;
    /* Matched to .card-title */
    margin-bottom: 4px;
    display: block;
}

.notif-card-desc {
    font-size: 12px;
    /* Matched to .card-meta */
    color: #7E8299;
    line-height: 1.4;
    display: block;
}

/* Empty State */
.notif-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #B5B5C3;
    text-align: center;
    padding: 40px;
}

.notif-empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 600px) {
    .notif-sidebar-panel {
        width: 100%;
        right: -100%;
    }
}

/* Footer (View All) */
.notif-footer-modern {
    padding: 15px;
    border-top: 1px solid #ebedf3;
    background: #fff;
    text-align: center;
    flex-shrink: 0;
}