/**
* Template Name: NiceAdmin
* Template URL: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/
* Updated: Apr 20 2024 with Bootstrap v5.3.3
* Author: BootstrapMade.com
* License: https://bootstrapmade.com/license/
*/

/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
:root {
    scroll-behavior: smooth;
    /* Header and page-title height variables for layout calculations */
    --top-bar-height: 80px;      /* Default height for .top-bar */
    --page-header-height: 64px;  /* Default height for .page-header */
    --mobile-nav-height: 48px;   /* Default height for .mobile-nav */
    --header-total-height: var(--page-header-height); /* Default: page-header height for desktop */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f9fafb;
    color: #374151;
    line-height: 1.5;
}

a {
    color: #0044ff;
    text-decoration: none;
}

a:hover {
    color: #717ff5;
    text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
}

/*--------------------------------------------------------------
# Main Content Layout
--------------------------------------------------------------*/
#main {
    /* margin-top: 40px; */
    /* padding: 10px 10px; */
    transition: all 0.3s;
}

/* Main Content Container - Consolidated from multiple locations */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0; /* Allow flex item to shrink below content size */
    margin-left: 240px; /* Width of sidebar when open */
    padding-right: 16px;
    padding-bottom: 0; /* Remove padding since footer is not sticky */
    transition: margin-left 0.3s ease, width 0.3s ease; /* Smooth transition when sidebar toggles */
    
    /* Remove margin-top since JavaScript will handle precise positioning */
    margin-top: 0 !important;
    width: calc(100vw - 240px); /* Dynamic width calculation */
}

/* On mobile, main content should account for mobile nav height */
@media (max-width: 768px) {
    .main-content {
        /* On mobile, the main content comes after mobile nav in DOM flow */
        margin-top: 0 !important;
        padding-top: 16px; /* Add some spacing after mobile nav */
    }
}

/* Fallback for views that still use .main */
.main {
    display: flex;
    flex: 1;
    overflow: auto;
    min-height: 0; /* Allow flex item to shrink below content size */
}

/* When sidebar is collapsed, adjust main content margin and width */
body.sidebar-collapsed .main-content {
    margin-left: 64px; /* Width of collapsed sidebar */
    width: calc(100vw - 64px); /* Dynamic width calculation when collapsed */
}

/* Fallback: Keep existing sibling selectors for compatibility */
.sidebar.collapsed + .main-content,
.toggle-sidebar .sidebar.collapsed + .main-content {
    margin-left: 64px; /* Width of collapsed sidebar */
    width: calc(100vw - 64px); /* Dynamic width calculation when collapsed */
}

/* For mobile: hide sidebar and adjust main content */
@media (max-width: 1199px) {
    .sidebar {
        left: -300px;
    }
    
    .main-content {
        margin-left: 0;
        width: 100vw; /* Full viewport width on mobile */
    }
}

/* Enhanced responsive layout for screens <1024px */
@media (max-width: 1023px) {
    /* Ensure main-content takes full width */
    .main-content {
        margin-left: 0 !important;
        width: 100vw !important;
        padding-right: 16px;
    }
    
    /* Ensure footer takes full width */
    .footer {
        margin-left: 0 !important;
        width: 100vw !important;
    }
    
    /* Ensure bottom-summary takes full width */
    .bottom-summary {
        margin-left: 0 !important;
        width: 100vw !important;
    }
    
    /* Ensure mobile-nav is visible */
    .mobile-nav {
        display: block !important;
    }
    
    /* Hide desktop sidebar */
    .sidebar {
        display: none !important;
    }
}

/* When sidebar is toggled open on mobile */
.toggle-sidebar .sidebar {
    left: 0;
}

/* Tablet specific adjustments - Updated to align with 1024px breakpoint */
@media (min-width: 768px) and (max-width: 1023px) {
    .main-content {
        width: 100vw !important; /* Full viewport width on tablet */
        margin-left: 0 !important;
    }
    
    body.sidebar-collapsed .main-content {
        width: 100vw !important; /* Full viewport width even when collapsed on tablet */
        margin-left: 0 !important;
    }
    
    /* Ensure footer and bottom-summary also have full width */
    .footer,
    body.sidebar-collapsed .footer {
        width: 100vw !important;
        margin-left: 0 !important;
    }
    
    .bottom-summary,
    body.sidebar-collapsed .bottom-summary {
        width: 100vw !important;
        margin-left: 0 !important;
    }
    
    /* Ensure mobile-nav is displayed */
    .mobile-nav {
        display: block !important;
    }
    
    /* Hide sidebar */
    .sidebar {
        display: none !important;
    }
}

/* Large tablet/small desktop: 1024px-1199px */
@media (min-width: 1024px) and (max-width: 1199px) {
    .main-content {
        width: calc(100vw - 240px); /* Desktop layout with sidebar */
        margin-left: 240px;
    }
    
    body.sidebar-collapsed .main-content {
        width: calc(100vw - 64px); /* Desktop collapsed sidebar */
        margin-left: 64px;
    }
    
    /* Footer and bottom-summary follow main-content */
    .footer {
        width: calc(100vw - 240px);
        margin-left: 240px;
    }
    
    body.sidebar-collapsed .footer {
        width: calc(100vw - 64px);
        margin-left: 64px;
    }
    
    .bottom-summary {
        width: calc(100vw - 240px);
        margin-left: 240px;
    }
    
    body.sidebar-collapsed .bottom-summary {
        width: calc(100vw - 64px);
        margin-left: 64px;
    }
    
    /* Hide mobile-nav, show sidebar */
    .mobile-nav {
        display: none !important;
    }
    
    .sidebar {
        display: flex !important;
    }
}

/* Desktop specific adjustments */
@media (min-width: 1200px) {
    .main-content {
        width: calc(100vw - 240px); /* Desktop: viewport minus sidebar width */
    }
    
    body.sidebar-collapsed .main-content {
        width: calc(100vw - 64px); /* Desktop collapsed: viewport minus collapsed sidebar */
    }
}

@media (max-width: 1199px) {
    #main {
        padding: 10px;
    }
}

/*--------------------------------------------------------------
# Page Title
--------------------------------------------------------------*/
.pagetitle {
    margin-bottom: 10px;
}

.pagetitle h1 {
    font-size: 24px;
    margin-bottom: 0;
    font-weight: 600;
    color: #012970;
}

/*--------------------------------------------------------------
# Back to top button
--------------------------------------------------------------*/
.back-to-top {
    position: fixed;
    visibility: hidden;
    opacity: 0;
    right: 15px;
    bottom: 21px;
    z-index: 99999;
    background: #0044ff;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    transition: all 0.4s;
}

.back-to-top i {
    font-size: 24px;
    color: #fff;
    line-height: 0;
}

.back-to-top:hover {
    background: #6776f4;
    color: #fff;
}

.back-to-top.active {
    visibility: visible;
    opacity: 1;
}

/*--------------------------------------------------------------
# Override some default Bootstrap stylings
--------------------------------------------------------------*/
/* Dropdown menus */
.dropdown-menu {
    border-radius: 4px;
    padding: 10px 0;
    animation-name: dropdown-animate;
    animation-duration: 0.2s;
    animation-fill-mode: both;
    border: 0;
    box-shadow: 0 5px 30px 0 rgba(82, 63, 105, 0.2);
}

.dropdown-menu .dropdown-header,
.dropdown-menu .dropdown-footer {
    text-align: center;
    font-size: 12px;
    padding: 10px 25px;
}

.dropdown-menu .dropdown-footer a {
    color: #444444;
    text-decoration: underline;
}

.dropdown-menu .dropdown-footer a:hover {
    text-decoration: none;
}

.dropdown-menu .dropdown-divider {
    color: #a5c5fe;
    margin: 0;
}

.dropdown-menu .dropdown-item {
    font-size: 14px;
    padding: 10px 15px;
    transition: 0.3s;
}

.dropdown-menu .dropdown-item i {
    margin-right: 10px;
    font-size: 18px;
    line-height: 0;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #f6f9ff;
}

@media (min-width: 768px) {
    .dropdown-menu-arrow::before {
        content: "";
        width: 13px;
        height: 13px;
        background: #fff;
        position: absolute;
        top: -7px;
        right: 20px;
        transform: rotate(45deg);
        border-top: 1px solid #eaedf1;
        border-left: 1px solid #eaedf1;
    }
}

@keyframes dropdown-animate {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }

    0% {
        opacity: 0;
    }
}

/* Light Backgrounds */
.bg-primary-light {
    background-color: #cfe2ff;
    border-color: #cfe2ff;
}

.bg-secondary-light {
    background-color: #e2e3e5;
    border-color: #e2e3e5;
}

.bg-success-light {
    background-color: #d1e7dd;
    border-color: #d1e7dd;
}

.bg-danger-light {
    background-color: #f8d7da;
    border-color: #f8d7da;
}

.bg-warning-light {
    background-color: #fff3cd;
    border-color: #fff3cd;
}

.bg-info-light {
    background-color: #cff4fc;
    border-color: #cff4fc;
}

.bg-dark-light {
    background-color: #d3d3d4;
    border-color: #d3d3d4;
}

/* Card */
.card {
    margin-bottom: 8px;
    border: none;
    border-radius: 0px;
    /* box-shadow: 0px 0 30px rgba(1, 41, 112, 0.1); */
}

.card-header,
.card-footer {
    border-color: #ebeef4;
    background-color: #fff;
    color: #798eb3;
    padding: 15px;
}

.card-title {
    padding: 20px 0 15px 0;
    font-size: 12px;
    font-weight: 500;
    color: #012970;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.card-title span {
    color: #899bbd;
    font-size: 10px;
    font-weight: 400;
}

.card-body {
    padding: 0 20px 20px 20px;
}

.card-img-overlay {
    background-color: rgba(255, 255, 255, 0.6);
}

/* Alerts */
.alert-heading {
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 20px;
}

/* Close Button */
.btn-close {
    background-size: 25%;
}

.btn-close:focus {
    outline: 0;
    box-shadow: none;
}

/* Accordion */
.accordion-item {
    border: 1px solid #ebeef4;
}

.accordion-button:focus {
    outline: 0;
    box-shadow: none;
}

.accordion-button:not(.collapsed) {
    color: #012970;
    background-color: #f6f9ff;
}

.accordion-flush .accordion-button {
    padding: 15px 0;
    background: none;
    border: 0;
    font-size: 12px;
    color: #374151;
    flex: 1;
    line-height: 1.3;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 5px; /* Creates consistent 5px spacing between all flex children */
}

.accordion-flush .accordion-button:not(.collapsed) {
    box-shadow: none;
    color: #0044ff;
}

.accordion-flush .accordion-body {
    padding: 0 0 15px 0;
    color: #3e4f6f;
    font-size: 15px;
}
.accordion-button::after {
    width: 0.8rem; /* smaller width */
    height: 0.8rem; /* smaller height */
    background-size: 0.8rem; /* match the size */
    margin-left: 5px; /* Changed from 'auto' to fixed 5px spacing */
    flex-shrink: 0; /* Prevents chevron from shrinking */
    order: 2; /* Ensures chevron appears after badges */
}

.accordion-button:not(.collapsed)::after {
    width: 0.8rem;
    height: 0.8rem;
    background-size: 0.8rem;
}

.accordion-item .accordion-header button {
    font-size: 12px;
    /* font-weight: 500; */
    /* color: #012970; */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    /* margin-top: 10px; */
}

/* Breadcrumbs */
.breadcrumb {
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #899bbd;
    font-weight: 600;
}

.breadcrumb a {
    color: #899bbd;
    transition: 0.3s;
}

.breadcrumb a:hover {
    color: #51678f;
}

.breadcrumb .breadcrumb-item::before {
    color: #899bbd;
}

.breadcrumb .active {
    color: #51678f;
    font-weight: 600;
}

/* Bordered Tabs */
.nav-tabs-bordered {
    border-bottom: 2px solid #ebeef4;
}

.nav-tabs-bordered .nav-link {
    margin-bottom: -2px;
    border: none;
    color: #2c384e;
}

.nav-tabs-bordered .nav-link:hover,
.nav-tabs-bordered .nav-link:focus {
    color: #0044ff;
}

.nav-tabs-bordered .nav-link.active {
    background-color: #fff;
    color: #0044ff;
    border-bottom: 2px solid #0044ff;
}

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
.logo {
    line-height: 1;
}

@media (min-width: 1200px) {
    .logo {
        width: 250px;
    }
}

.logo img {
    max-height: 20px;
    margin-right: 5px;
}

.logo span {
    font-size: 18px;
    font-weight: 700;
    color: #012970;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.header {
    transition: all 0.5s;
    z-index: 997;
    height: 40px;
    box-shadow: 0px 2px 20px rgba(1, 41, 112, 0.1);
    background-color: #fff;
    padding-left: 20px;
    /* Toggle Sidebar Button */
    /* Search Bar */
}

.header .toggle-sidebar-btn {
    font-size: 24px;
    padding-left: 10px;
    cursor: pointer;
    color: #012970;
}

.header .search-bar {
    min-width: 360px;
    padding: 0 20px;
}

@media (max-width: 1199px) {
    .header .search-bar {
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        padding: 20px;
        box-shadow: 0px 0px 15px 0px rgba(1, 41, 112, 0.1);
        background: white;
        z-index: 9999;
        transition: 0.3s;
        visibility: hidden;
        opacity: 0;
    }

    .header .search-bar-show {
        top: 60px;
        visibility: visible;
        opacity: 1;
    }
}

.header .search-form {
    width: 100%;
}

.header .search-form input {
    border: 0;
    font-size: 14px;
    color: #012970;
    border: 1px solid rgba(1, 41, 112, 0.2);
    padding: 7px 38px 7px 8px;
    border-radius: 3px;
    transition: 0.3s;
    width: 100%;
}

.header .search-form input:focus,
.header .search-form input:hover {
    outline: none;
    box-shadow: 0 0 10px 0 rgba(1, 41, 112, 0.15);
    border: 1px solid rgba(1, 41, 112, 0.3);
}

.header .search-form button {
    border: 0;
    padding: 0;
    margin-left: -30px;
    background: none;
}

.header .search-form button i {
    color: #012970;
}

/*--------------------------------------------------------------
# Header Nav
--------------------------------------------------------------*/
.header-nav ul {
    list-style: none;
}

.header-nav > ul {
    margin: 0;
    padding: 0;
}

.header-nav .nav-icon {
    font-size: 18px;
    color: #012970;
    margin-right: 25px;
    position: relative;
}

.header-nav .nav-profile {
    color: #012970;
}

.header-nav .nav-profile img {
    max-height: 24px;
}

.header-nav .nav-profile span {
    font-size: 12px;
    font-weight: 600;
}

.header-nav .badge-number {
    position: absolute;
    inset: -2px -5px auto auto;
    font-weight: normal;
    font-size: 8px;
    padding: 3px 6px;
}

.header-nav .notifications {
    inset: 8px -15px auto auto !important;
}

.header-nav .notifications .notification-item {
    display: flex;
    align-items: center;
    padding: 5px 5px;
    transition: 0.3s;
}

.header-nav .notifications .notification-item i {
    margin: 0 20px 0 10px;
    font-size: 18px;
}

.header-nav .notifications .notification-item h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.header-nav .notifications .notification-item p {
    font-size: 12px;
    margin-bottom: 3px;
    color: #919191;
}

.header-nav .notifications .notification-item:hover {
    background-color: #f6f9ff;
}

.header-nav .messages {
    inset: 8px -15px auto auto !important;
}

.header-nav .messages .message-item {
    padding: 5px 5px;
    transition: 0.3s;
}

.header-nav .messages .message-item a {
    display: flex;
}

.header-nav .messages .message-item img {
    margin: 0 20px 0 10px;
    max-height: 30px;
}

.header-nav .messages .message-item h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #444444;
}

.header-nav .messages .message-item p {
    font-size: 12px;
    margin-bottom: 3px;
    color: #919191;
}

.header-nav .messages .message-item:hover {
    background-color: #f6f9ff;
}

.header-nav .profile {
    min-width: 240px;
    padding-bottom: 0;
    top: 8px !important;
}

.header-nav .profile .dropdown-header h6 {
    font-size: 14px;
    margin-bottom: 0;
    font-weight: 600;
    color: #444444;
}

.header-nav .profile .dropdown-header span {
    font-size: 12px;
}

.header-nav .profile .dropdown-item {
    font-size: 12px;
    padding: 10px 15px;
    transition: 0.3s;
}

.header-nav .profile .dropdown-item i {
    margin-right: 10px;
    font-size: 14px;
    line-height: 0;
}

.header-nav .profile .dropdown-item:hover {
    background-color: #f6f9ff;
}

/*--------------------------------------------------------------
# Sidebar
--------------------------------------------------------------*/
.sidebar {
    position: fixed;
    top: 140px;
    left: 0;
    bottom: 0;
    width: 240px;
    z-index: 996;
    transition: all 0.3s;
    padding: 10px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #aab7cf transparent;
    /* box-shadow: 0px 0px 20px rgba(1, 41, 112, 0.1); */
    background-color: #fff;
}

@media (max-width: 1199px) {
    .sidebar {
        left: -300px;
    }
}

.sidebar::-webkit-scrollbar {
    width: 5px;
    height: 8px;
    background-color: #fff;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: #aab7cf;
}

@media (min-width: 1200px) {
    #main,
    #footer {
        margin-left: 240px;
    }
}

@media (max-width: 1199px) {
    .toggle-sidebar .sidebar {
        left: 0;
    }
}

@media (min-width: 1200px) {
    .toggle-sidebar #main,
    .toggle-sidebar #footer {
        margin-left: 0;
    }

    .toggle-sidebar .sidebar {
        left: -300px;
    }
}

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

.sidebar-nav li {
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar-nav .nav-item {
    margin-bottom: 5px;
}

.sidebar-nav .nav-heading {
    font-size: 11px;
    text-transform: uppercase;
    color: #899bbd;
    font-weight: 600;
    margin: 10px 0 5px 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: #0044ff;
    transition: 0.3;
    background: #f6f9ff;
    padding: 10px 15px;
    border-radius: 4px;
}

.sidebar-nav .nav-link i {
    font-size: 12px;
    margin-right: 5px;
    color: #0044ff;
}

.sidebar-nav .nav-link.collapsed {
    color: #012970;
    background: #fff;
}

.sidebar-nav .nav-link.collapsed i {
    color: #899bbd;
}

.sidebar-nav .nav-link:hover {
    color: #0044ff;
    background: #f6f9ff;
}

.sidebar-nav .nav-link:hover i {
    color: #0044ff;
}

.sidebar-nav .nav-link .bi-chevron-down {
    margin-right: 0;
    transition: transform 0.2s ease-in-out;
}

.sidebar-nav .nav-link:not(.collapsed) .bi-chevron-down {
    transform: rotate(180deg);
}

.sidebar-nav .nav-content {
    padding: 0px 0 0 0;
    margin: 0;
    list-style: none;
}

.sidebar-nav .nav-content a {
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: #012970;
    transition: 0.3;
    padding: 10px 0 10px 30px;
    transition: 0.3s;
}

.sidebar-nav .nav-content a i {
    font-size: 6px;
    margin-right: 5px;
    line-height: 0;
    border-radius: 50%;
}

.sidebar-nav .nav-content a:hover,
.sidebar-nav .nav-content a.active {
    color: #0044ff;
}

.sidebar-nav .nav-content a.active i {
    background-color: #0044ff;
}

/*--------------------------------------------------------------
# Dashboard
--------------------------------------------------------------*/
/* Filter dropdown */
.dashboard .filter {
    position: absolute;
    right: 0px;
    top: 15px;
}

.dashboard .filter .icon {
    color: #aab7cf;
    padding-right: 20px;
    padding-bottom: 5px;
    transition: 0.3s;
    font-size: 16px;
}

.dashboard .filter .icon:hover,
.dashboard .filter .icon:focus {
    color: #0044ff;
}

.dashboard .filter .dropdown-header {
    padding: 8px 15px;
}

.dashboard .filter .dropdown-header h6 {
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #aab7cf;
    margin-bottom: 0;
    padding: 0;
}

.dashboard .filter .dropdown-item {
    padding: 8px 15px;
}

/* Info Cards */
.dashboard .info-card {
    padding-bottom: 10px;
}

.dashboard .info-card h6 {
    font-size: 28px;
    color: #012970;
    font-weight: 700;
    margin: 0;
    padding: 0;
}

.dashboard .card-icon {
    font-size: 32px;
    line-height: 0;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    flex-grow: 0;
}

.dashboard .sales-card .card-icon {
    color: #0044ff;
    background: #f6f6fe;
}

.dashboard .revenue-card .card-icon {
    color: #2eca6a;
    background: #e0f8e9;
}

.dashboard .customers-card .card-icon {
    color: #ff771d;
    background: #ffecdf;
}

/* Activity */
.dashboard .activity {
    font-size: 14px;
}

.dashboard .activity .activity-item .activite-label {
    color: #888;
    position: relative;
    flex-shrink: 0;
    flex-grow: 0;
    min-width: 64px;
}

.dashboard .activity .activity-item .activite-label::before {
    content: "";
    position: absolute;
    right: -11px;
    width: 4px;
    top: 0;
    bottom: 0;
    background-color: #eceefe;
}

.dashboard .activity .activity-item .activity-badge {
    margin-top: 3px;
    z-index: 1;
    font-size: 11px;
    line-height: 0;
    border-radius: 50%;
    flex-shrink: 0;
    border: 3px solid #fff;
    flex-grow: 0;
}

.dashboard .activity .activity-item .activity-content {
    padding-left: 10px;
    padding-bottom: 20px;
}

.dashboard .activity .activity-item:first-child .activite-label::before {
    top: 5px;
}

.dashboard .activity .activity-item:last-child .activity-content {
    padding-bottom: 0;
}

/* News & Updates */
.dashboard .news .post-item + .post-item {
    margin-top: 15px;
}

.dashboard .news img {
    width: 80px;
    float: left;
    border-radius: 5px;
}

.dashboard .news h4 {
    font-size: 15px;
    margin-left: 95px;
    font-weight: bold;
    margin-bottom: 5px;
}

.dashboard .news h4 a {
    color: #012970;
    transition: 0.3s;
}

.dashboard .news h4 a:hover {
    color: #0044ff;
}

.dashboard .news p {
    font-size: 14px;
    color: #777777;
    margin-left: 95px;
}

/* Recent Sales */
.dashboard .recent-sales {
    font-size: 14px;
}

.dashboard .recent-sales .table thead {
    background: #f6f6fe;
}

.dashboard .recent-sales .table thead th {
    border: 0;
}

.dashboard .recent-sales .dataTable-top {
    padding: 0 0 10px 0;
}

.dashboard .recent-sales .dataTable-bottom {
    padding: 10px 0 0 0;
}

/* Top Selling */
.dashboard .top-selling {
    font-size: 14px;
}

.dashboard .top-selling .table thead {
    background: #f6f6fe;
}

.dashboard .top-selling .table thead th {
    border: 0;
}

.dashboard .top-selling .table tbody td {
    vertical-align: middle;
}

.dashboard .top-selling img {
    border-radius: 5px;
    max-width: 60px;
}

/*--------------------------------------------------------------
# Icons list page
--------------------------------------------------------------*/
.iconslist {
    display: grid;
    max-width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    padding-top: 15px;
}

.iconslist .icon {
    background-color: #fff;
    border-radius: 0.25rem;
    text-align: center;
    color: #012970;
    padding: 15px 0;
}

.iconslist i {
    margin: 0.25rem;
    font-size: 2.5rem;
}

.iconslist .label {
    font-family: var(--bs-font-monospace);
    display: inline-block;
    width: 100%;
    overflow: hidden;
    padding: 0.25rem;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #666;
}

/*--------------------------------------------------------------
# Profile Page
--------------------------------------------------------------*/
.profile .profile-card img {
    max-width: 120px;
}

.profile .profile-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: #2c384e;
    margin: 10px 0 0 0;
}

.profile .profile-card h3 {
    font-size: 18px;
}

.profile .profile-card .social-links a {
    font-size: 20px;
    display: inline-block;
    color: rgba(1, 41, 112, 0.5);
    line-height: 0;
    margin-right: 10px;
    transition: 0.3s;
}

.profile .profile-card .social-links a:hover {
    color: #012970;
}

.profile .profile-overview .row {
    margin-bottom: 20px;
    font-size: 15px;
}

.profile .profile-overview .card-title {
    color: #012970;
}

.profile .profile-overview .label {
    font-weight: 600;
    color: rgba(1, 41, 112, 0.6);
}

.profile .profile-edit label {
    font-weight: 600;
    color: rgba(1, 41, 112, 0.6);
}

.profile .profile-edit img {
    max-width: 120px;
}

/*--------------------------------------------------------------
# F.A.Q Page
--------------------------------------------------------------*/
.faq .basic h6 {
    font-size: 18px;
    font-weight: 600;
    color: #0044ff;
}

.faq .basic p {
    color: #6980aa;
}

/*--------------------------------------------------------------
# Contact
--------------------------------------------------------------*/
.contact .info-box {
    padding: 28px 30px;
}

.contact .info-box i {
    font-size: 38px;
    line-height: 0;
    color: #0044ff;
}

.contact .info-box h3 {
    font-size: 20px;
    color: #012970;
    font-weight: 700;
    margin: 20px 0 10px 0;
}

.contact .info-box p {
    padding: 0;
    line-height: 24px;
    font-size: 14px;
    margin-bottom: 0;
}

.contact .php-email-form .error-message {
    display: none;
    color: #fff;
    background: #ed3c0d;
    text-align: left;
    padding: 15px;
    margin-bottom: 24px;
    font-weight: 600;
}

.contact .php-email-form .sent-message {
    display: none;
    color: #fff;
    background: #18d26e;
    text-align: center;
    padding: 15px;
    margin-bottom: 24px;
    font-weight: 600;
}

.contact .php-email-form .loading {
    display: none;
    background: #fff;
    text-align: center;
    padding: 15px;
    margin-bottom: 24px;
}

.contact .php-email-form .loading:before {
    content: "";
    display: inline-block;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    margin: 0 10px -6px 0;
    border: 3px solid #18d26e;
    border-top-color: #eee;
    animation: animate-loading 1s linear infinite;
}

.contact .php-email-form input,
.contact .php-email-form textarea {
    border-radius: 0;
    box-shadow: none;
    font-size: 14px;
    border-radius: 0;
}

.contact .php-email-form input:focus,
.contact .php-email-form textarea:focus {
    border-color: #0044ff;
}

.contact .php-email-form input {
    padding: 10px 15px;
}

.contact .php-email-form textarea {
    padding: 12px 15px;
}

.contact .php-email-form button[type="submit"] {
    background: #0044ff;
    border: 0;
    padding: 10px 30px;
    color: #fff;
    transition: 0.4s;
    border-radius: 4px;
}

.contact .php-email-form button[type="submit"]:hover {
    background: #5969f3;
}

@keyframes animate-loading {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/*--------------------------------------------------------------
# Error 404
--------------------------------------------------------------*/
.error-404 {
    padding: 30px;
}

.error-404 h1 {
    font-size: 180px;
    font-weight: 700;
    color: #0044ff;
    margin-bottom: 0;
    line-height: 150px;
}

.error-404 h2 {
    font-size: 24px;
    font-weight: 700;
    color: #012970;
    margin-bottom: 30px;
}

.error-404 .btn {
    background: #51678f;
    color: #fff;
    padding: 8px 30px;
}

.error-404 .btn:hover {
    background: #3e4f6f;
}

@media (min-width: 992px) {
    .error-404 img {
        max-width: 50%;
    }
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.footer {
    padding: 20px 0;
    font-size: 14px;
    transition: all 0.3s;
    border-top: 1px solid #cddfff;
}

.footer .copyright {
    text-align: center;
    color: #012970;
}

.footer .credits {
    padding-top: 5px;
    text-align: center;
    font-size: 13px;
    color: #012970;
}

/*--------------------------------------------------------------
# Content Specific Styles
--------------------------------------------------------------*/
.content-title .card-title {
    font-size: 16px;
}

.content-title .card-body {
    padding-bottom: 0px;
}

.galery-list {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #aab7cf transparent;
}
.galery-list .inner {
    background: white;
}

.galery-list .card-title {
    font-size: 14px;
}

.asset-link {
    display: block;
}

.asset {
    margin-left: 15px;
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 12px 16px;
    transition: background 0.3s;
    border-radius: 6px;
}
.asset:hover {
    background: #f6f9ff;
}

/* target the span when the link (a) or .asset is hovered */
a:hover .asset-text,
.asset:hover .asset-text {
    color: #0044ff;
}

.asset .asset-text {
    color: #012970;
    transition: color 0.3s;
    display: -webkit-box; /* enables flex-like layout for multiline truncation */
    -webkit-line-clamp: 3; /* number of lines to show */
    -webkit-box-orient: vertical; /* sets box direction to vertical */
    overflow: hidden; /* hides the extra text */
    text-overflow: ellipsis; /* adds "..." at the end */
    line-height: 1.4; /* adjust as needed for readability */
    max-height: calc(1.4em * 3); /* line-height * number of lines */
}

.asset-critical {
    height: 100%;
    width: 5px;
    background-color: red;
}

.asset-optional {
    height: 100%;
    width: 5px;
    background-color: green;
}

.asset-detail .asset-label span.value-critical {
    color: red;
    font-weight: 500;
}

.asset-detail .asset-label span.value-optional {
    color: green;
    font-weight: 500;
}

.asset-detail .asset-label .asset-ranking h5 {
    margin-bottom: -0.1rem;
    padding-top: 0.5rem;
}

.asset-detail .asset-label .asset-ranking h5,
.asset-detail .asset-label .asset-ranking span {
    color: white;
    font-weight: 700;
    border: none;
}

.asset-detail .asset-label .asset-ranking h5.ranking-critical,
.asset-detail .asset-label .asset-ranking span.ranking-critical {
    background: red;
}
.asset-detail .asset-label .asset-ranking h5.ranking-optional,
.asset-detail .asset-label .asset-ranking span.ranking-optional {
    background: green;
}

.year-selector {
    padding-top: 20px 0 15px 0;
}
.year-select:focus {
    outline: none;
    box-shadow: none;
    border-color: inherit; /* or transparent if you want */
}

.asset-detail {
    padding: 10px 0px 10px 0px;
}
.asset-link.active {
    background-color: #e1e9fa !important;
    border-radius: 5px;
    display: block; /* ensures highlight fills the full link area */
}

.asset-link.active span {
    color: #0044ff !important;
    font-weight: 600; /* optional: make it stand out */
}

.asset-link span {
    font-size: 12px;
}

.asset-detail .asset-label h5,
.asset-detail .asset-label span {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.asset-detail .asset-label h5 {
    font-size: 12px;
    font-weight: 500;
    color: #012970;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin-top: 10px;
}

.asset-detail .asset-label span {
    display: block; /* Makes the span behave like a full-width element */
    width: 100%; /* Full width of the parent */
    box-sizing: border-box; /* Include padding/border in total width */
    border: 1px solid #d0ddf3;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 300;
    color: #36393f;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding: 5px 5px 5px 5px;
}

.asset-detail .asset-label p {
    font-size: 12px;
    font-weight: 300;
    color: #828998;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.asset-detail .asset-label .text-center {
    text-align: center;
}

.asset-divider {
    width: 100%;
    height: 5px;
    background-color: #e5ecfa;
    border-radius: 0px; /* optional: soft rounded corners */
    margin: 0px 0; /* optional: space above and below */
}

.total-aset .custom-bg-grey {
    display: block; /* Makes the span behave like a full-width element */
    width: 100%; /* Full width of the parent */
    box-sizing: border-box; /* Include padding/border in total width */
    background: rgb(215, 215, 215);
}

.total-aset .custom-bg-blue {
    display: block; /* Makes the span behave like a full-width element */
    width: 100%; /* Full width of the parent */
    height: 100%;
    box-sizing: border-box; /* Include padding/border in total width */
    background: #3008d2;
}

.total-aset .custom-bg-red {
    display: block; /* Makes the span behave like a full-width element */
    width: 100%; /* Full width of the parent */
    box-sizing: border-box; /* Include padding/border in total width */
    background: red;
}
.total-aset .custom-bg-green {
    display: block; /* Makes the span behave like a full-width element */
    width: 100%; /* Full width of the parent */
    box-sizing: border-box; /* Include padding/border in total width */
    background: green;
}

.total-aset h5,
.total-aset span {
    margin: 5px 0px 5px 0px;
    font-size: 10px;
    font-weight: 600;
}

.total-aset .count-value h5,
.total-aset .count-value span {
    /* margin: 0px 0px 0px 0px; */
    font-size: 10px;
    font-weight: 600;
    color: white;
}
.total-aset .count-value h5 {
    padding-bottom: 0px;

    margin-bottom: 0px;
}
.total-aset .count-value span {
    padding-top: 0px;
    margin-top: 0px;
}

.total-aset .card-body {
    padding: 0px 0px 0px 0px;
}

.button-panel .card-body {
    padding: 0px 20px 0px 20px;
}

.penel-left .panel-text {
    font-size: 10px;
    font-weight: 300;
    color: #36393f;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.btn-xs {
    --bs-btn-padding-y: 0.2rem;
    --bs-btn-padding-x: 0.35rem;
    --bs-btn-font-size: 0.65rem;
    --bs-btn-border-radius: 0.15rem;
    margin-right: 0.2rem;
}

.impact-dropdown {
    width: 60%;
}

.asset-detail .asset-label .form-text {
    font-size: 12px;
    font-weight: 300;
    color: #36393f;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.modal-title,
.modal-body h5 {
    font-size: 12px;
    font-weight: 300;
    color: #36393f;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.asset-detail .asset-label table.table td span {
    display: block; /* Makes the span take full width */
    width: 100%; /* Full width of its parent cell */
    border: none !important;
    font-size: 12px; /* Smaller text size */
    font-weight: 300; /* Light font weight */
    color: #36393f; /* Neutral dark gray */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; /* Font family */
    padding: 5px; /* Even padding around text */
}

.asset-detail .asset-label table.table th {
    font-size: 14px; /* Smaller text size */
    font-weight: 600; /* Light font weight */
    color: #36393f; /* Neutral dark gray */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; /* Font family */
    padding: 5px; /* Even padding around text */
}

.legend .mitigation .mitigation-text {
    border: none;
}

.header-countermeasures ul li button {
    font-size: 12px;
    font-weight: 500;
    color: #012970;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin-top: 10px;
}

.location {
    font-size: 14px;
    color: #012970;
}

/*--------------------------------------------------------------
# Form1 View Specific Styles
--------------------------------------------------------------*/
/* Top Bar Styles */
.top-bar {
    background: linear-gradient(to right, #1f2937, #111827);
    color: white;
    padding: 12px 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.app-title {
    font-size: 14px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    flex: 1;
    justify-content: flex-end;
}

.company-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-label {
    font-size: 10px;
    color: #9ca3af;
}

.info-value {
    font-size: 12px;
}

.action-icons {
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 1px solid #4b5563;
    padding-left: 24px;
}

.btn-share {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: white;
    color: #111827;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.btn-share:hover {
    background: #f3f4f6;
}

.icon-btn {
    padding: 8px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: #374151;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
}

/* Page Header */
.page-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 24px;
    position: fixed;
    top: var(--top-bar-height); /* Position below top-bar using CSS variable */
    left: 0;
    right: 0;
    z-index: 999;
    /* Ensure page-header height is consistent with CSS variable */
    min-height: var(--page-header-height);
    display: flex;
    align-items: center;
}

/* Main content positioning - sits directly under page-header on desktop */
.main-content {
    /* JavaScript will set precise margin-top based on actual header heights */
    margin-top: var(--header-total-height);
    /* Ensure this takes precedence over other margin-top styles */
    margin-top: var(--header-total-height) !important;
}

/* Mobile Navigation */
.mobile-nav {
    display: block;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px;
    /* Position mobile nav below page-header on mobile */
    position: relative;
    z-index: 998;
    /* Ensure mobile nav appears after page-header in mobile view */
    margin-top: 0;
    /* Use the CSS variable for consistent height */
    min-height: var(--mobile-nav-height);
}

.page-header h1 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-top: 0.5rem;
}

/* Ensure body uses full viewport height and flex layout */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

/* Ensure footer is visible and sticky to bottom */
footer {
    flex-shrink: 0;
}

/* Sidebar: full-height, extending to bottom */
.sidebar {
    position: fixed;
    /* top: 60px;  Below top-bar */
    left: 0;
    bottom: 0;
    width: 240px;
    z-index: 997;
    display: flex;
    flex-direction: column;
    background: white;
    border-right: 1px solid #e5e7eb;
    box-shadow: 0px 0px 20px rgba(1, 41, 112, 0.1);
}

/* Ensure sidebar nav takes available space */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 8px;
}

/* Ensure sidebar footer stays at bottom of sidebar */
.sidebar-footer {
    flex-shrink: 0;
    padding: 16px;
    border-top: 1px solid #e5e7eb;
}

/* Ensure sidebar transitions are smooth */
.sidebar {
    transition: left 0.3s ease, width 0.3s ease;
}

/* Collapsed sidebar width */
.sidebar.collapsed {
    width: 64px;
}

/* On mobile, ensure mobile nav is positioned correctly after page-header */
@media (max-width: 768px) {
    .mobile-nav {
        /* Remove any fixed positioning that might interfere */
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        /* Ensure it's visually below the page-header */
        margin-top: 0;
        border-top: 1px solid #e5e7eb;
        /* Use the CSS variable for consistent height */
        min-height: var(--mobile-nav-height);
    }
    
    /* On mobile, page-header should not be fixed to allow normal DOM flow */
    .page-header {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        z-index: 999;
        /* Remove fixed positioning on mobile */
        position: relative;
    }
    
    /* Ensure main content flows naturally on mobile */
    .main-content {
        margin-top: 0 !important;
        padding-top: 16px;
    }
}

/* On mobile, ensure mobile nav is positioned correctly after page-header */
@media (max-width: 768px) {
    .mobile-nav {
        /* Remove any fixed positioning that might interfere */
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        /* Ensure it's visually below the page-header */
        margin-top: 0;
        border-top: 1px solid #e5e7eb;
    }
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.mobile-menu-btn:hover {
    background: #e5e7eb;
}

.mobile-menu-btn svg:last-child {
    margin-left: auto;
}

.mobile-dropdown {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 50;
    max-height: 80vh;
    overflow-y: auto;
    margin-top: 4px;
}

.mobile-dropdown.show {
    display: block;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
}

.mobile-menu-item:hover {
    background: #f9fafb;
}

.mobile-accordion {
    border-bottom: 1px solid #f3f4f6;
}

.mobile-accordion-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: transparent;
    border: none;
    width: 100%;
    cursor: pointer;
    font-size: 14px;
}

.mobile-accordion-trigger:hover {
    background: #f9fafb;
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.accordion-icon {
    transition: transform 0.2s;
}

.mobile-accordion-trigger.open .accordion-icon {
    transform: rotate(180deg);
}

.mobile-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-accordion-content.open {
    max-height: 500px;
}

.mobile-submenu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 10px 48px;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.mobile-submenu-item:hover {
    background: #f9fafb;
}

.mobile-submenu-item.active {
    background: #eff6ff;
    color: #2563eb;
}

.mobile-menu-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

.mobile-user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.user-avatar-mobile {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #6b7280;
}

/* Desktop Sidebar */
.sidebar {
    display: none;
    width: 256px;
    background: white;
    border-right: 1px solid #e5e7eb;
    flex-direction: column;
    transition: width 0.3s;
}

.sidebar.collapsed {
    width: 64px;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-toggle {
    padding: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: #f3f4f6;
}

.sidebar.collapsed .chevron-left {
    display: none;
}

.sidebar:not(.collapsed) .chevron-right {
    display: none;
}

.sidebar-title {
    font-size: 12px;
    color: #6b7280;
    flex: 1;
    text-align: center;
}

.sidebar.collapsed .sidebar-title {
    display: none;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: background 0.2s;
    margin-bottom: 4px;
}

.nav-item:hover {
    background: #f9fafb;
}

.nav-item svg {
    flex-shrink: 0;
}

.nav-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .nav-label {
    display: none;
}

.nav-accordion-trigger {
    position: relative;
}

.nav-chevron {
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.nav-accordion-trigger.open .nav-chevron {
    transform: rotate(180deg);
}

.sidebar.collapsed .nav-chevron {
    display: none;
}

/* Keep accordion subitem icons visible when sidebar is collapsed */
.sidebar.collapsed .nav-subitem svg {
    display: block !important;
    visibility: visible !important;
}

/* Ensure nav-subitem layout is correct when sidebar is collapsed */
.sidebar.collapsed .nav-subitem {
    justify-content: center;
    padding: 8px;
    min-height: 40px;
}

.sidebar.collapsed .nav-subitem svg {
    margin: 0 auto;
    flex-shrink: 0;
}

/* Hide text labels in nav-subitems when sidebar is collapsed */
.sidebar.collapsed .nav-subitem .nav-label {
    display: none;
}

/* Center icons in collapsed sidebar */
.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 8px;
}

.sidebar.collapsed .nav-item svg {
    margin: 0;
}

/* Center accordion trigger icons when sidebar is collapsed */
.sidebar.collapsed .nav-accordion-trigger {
    justify-content: center;
    padding: 8px;
}

.sidebar.collapsed .nav-accordion-trigger svg {
    margin: 0;
}

.nav-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 4px;
}

.nav-accordion-content.open {
    max-height: 500px;
}

.nav-subitem {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 8px 28px;
    background: transparent;
    border: none;
    border-radius: 8px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: background 0.2s;
    margin-bottom: 4px;
}

.nav-subitem:hover {
    background: #f9fafb;
}

.nav-subitem.active {
    background: #eff6ff;
    color: #2563eb;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #e5e7eb;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-sidebar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #6b7280;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-size: 14px;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .user-info {
    display: none;
}

.sidebar.collapsed .user-profile {
    justify-content: center;
}

/* Content Wrapper */
.content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    flex-direction: column;
    width: 100%;
    transition: width 0.3s ease;
}


/* When sidebar is collapsed, ensure content wrapper uses full available width */
body.sidebar-collapsed .content-wrapper {
    width: calc(100vw - 64px); /* Full viewport width minus collapsed sidebar */
}

/* Fallback: Keep existing sibling selectors for compatibility */
.sidebar.collapsed + .main-content .content-wrapper,
.toggle-sidebar .sidebar.collapsed + .main-content .content-wrapper {
    width: calc(100vw - 64px); /* Full viewport width minus collapsed sidebar */
}

/* Asset List Pane - Dynamic width adjustments */
.asset-list-pane {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    gap: 12px;
    transition: width 0.3s ease;
}

/* Form Area - Dynamic width adjustments */
.form-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    transition: flex-basis 0.3s ease;
}

/* Ensure both panes dynamically adjust when sidebar is collapsed */
body.sidebar-collapsed .asset-list-pane,
body.sidebar-collapsed .form-area {
    transition: all 0.3s ease;
}

/* Fallback: Keep existing sibling selectors for compatibility */
.sidebar.collapsed + .main-content .asset-list-pane,
.sidebar.collapsed + .main-content .form-area,
.toggle-sidebar .sidebar.collapsed + .main-content .asset-list-pane,
.toggle-sidebar .sidebar.collapsed + .main-content .form-area {
    transition: all 0.3s ease;
}

/* Mobile: Full width for content wrapper */
@media (max-width: 767px) {
    .content-wrapper {
        width: 100vw; /* Full viewport width on mobile */
    }
    
    body.sidebar-collapsed .content-wrapper {
        width: 100vw; /* Full viewport width even when collapsed on mobile */
    }
}

/* Tablet: Responsive width calculations - Updated for 1024px breakpoint */
@media (min-width: 768px) and (max-width: 1023px) {
    .content-wrapper {
        width: 100vw; /* Full viewport width on tablet */
    }
    
    body.sidebar-collapsed .content-wrapper {
        width: 100vw; /* Full viewport width even when collapsed on tablet */
    }
    
    .asset-list-pane {
        width: 320px; /* Fixed width for asset list pane on tablet */
        border-right: 1px solid #e5e7eb;
        border-bottom: none;
    }
    
    .form-area {
        flex: 1;
        width: calc(100% - 320px); /* Remaining width after asset list pane */
    }
    
    /* When sidebar is collapsed on tablet */
    body.sidebar-collapsed .asset-list-pane {
        width: 320px; /* Maintain fixed width */
    }
    
    body.sidebar-collapsed .form-area {
        width: calc(100% - 320px); /* Adjust remaining width */
    }
    
    /* Fallback: Keep existing sibling selectors for compatibility */
    .sidebar.collapsed + .main-content .content-wrapper,
    .toggle-sidebar .sidebar.collapsed + .main-content .content-wrapper {
        width: 100vw; /* Full viewport width on tablet */
    }
    
    .sidebar.collapsed + .main-content .asset-list-pane,
    .toggle-sidebar .sidebar.collapsed + .main-content .asset-list-pane {
        width: 320px; /* Fixed width for asset list pane */
    }
    
    .sidebar.collapsed + .main-content .form-area,
    .toggle-sidebar .sidebar.collapsed + .main-content .form-area {
        flex: 1;
        width: calc(100% - 320px); /* Remaining width after asset list pane */
    }
}

/* Large tablet/small desktop: 1024px-1199px */
@media (min-width: 1024px) and (max-width: 1199px) {
    .content-wrapper {
        width: calc(100vw - 240px); /* Desktop layout with sidebar */
    }
    
    body.sidebar-collapsed .content-wrapper {
        width: calc(100vw - 64px); /* Desktop collapsed sidebar */
    }
    
    .asset-list-pane {
        width: 320px; /* Fixed width for asset list pane */
        border-right: 1px solid #e5e7eb;
        border-bottom: none;
    }
    
    .form-area {
        flex: 1;
        width: calc(100% - 320px); /* Remaining width after asset list pane */
    }
    
    /* When sidebar is collapsed */
    body.sidebar-collapsed .asset-list-pane {
        width: 320px; /* Maintain fixed width */
    }
    
    body.sidebar-collapsed .form-area {
        width: calc(100% - 320px); /* Adjust remaining width */
    }
    
    /* Fallback: Keep existing sibling selectors for compatibility */
    .sidebar.collapsed + .main-content .content-wrapper,
    .toggle-sidebar .sidebar.collapsed + .main-content .content-wrapper {
        width: calc(100vw - 64px); /* Desktop collapsed sidebar */
    }
    
    .sidebar.collapsed + .main-content .asset-list-pane,
    .toggle-sidebar .sidebar.collapsed + .main-content .asset-list-pane {
        width: 320px; /* Fixed width for asset list pane */
    }
    
    .sidebar.collapsed + .main-content .form-area,
    .toggle-sidebar .sidebar.collapsed + .main-content .form-area {
        flex: 1;
        width: calc(100% - 320px); /* Remaining width after asset list pane */
    }
}

/* Desktop: Responsive width calculations */
@media (min-width: 1200px) {
    .content-wrapper {
        width: calc(100vw - 240px); /* Desktop: viewport minus sidebar width */
    }
    
    body.sidebar-collapsed .content-wrapper {
        width: calc(100vw - 64px); /* Desktop collapsed: viewport minus collapsed sidebar */
    }
    
    .asset-list-pane {
        width: 320px; /* Fixed width for asset list pane on desktop */
        border-right: 1px solid #e5e7eb;
        border-bottom: none;
    }
    
    .form-area {
        flex: 1;
        width: calc(100% - 320px); /* Remaining width after asset list pane */
    }
    
    /* When sidebar is collapsed on desktop */
    body.sidebar-collapsed .asset-list-pane {
        width: 320px; /* Maintain fixed width */
    }
    
    body.sidebar-collapsed .form-area {
        width: calc(100% - 320px); /* Adjust remaining width */
    }
    
    /* Fallback: Keep existing sibling selectors for compatibility */
    .sidebar.collapsed + .main-content .content-wrapper,
    .toggle-sidebar .sidebar.collapsed + .main-content .content-wrapper {
        width: calc(100vw - 64px); /* Full viewport width minus collapsed sidebar */
    }
    
    .sidebar.collapsed + .main-content .asset-list-pane,
    .toggle-sidebar .sidebar.collapsed + .main-content .asset-list-pane {
        width: 320px; /* Fixed width for asset list pane */
    }
    
    .sidebar.collapsed + .main-content .form-area,
    .toggle-sidebar .sidebar.collapsed + .main-content .form-area {
        flex: 1;
        width: calc(100% - 320px); /* Remaining width after asset list pane */
    }
}

.card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
}

.form-label-small {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
}

.select-wrapper {
    position: relative;
}

.form-select {
    width: 100%;
    padding: 8px 32px 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    appearance: none;
    background: white;
    cursor: pointer;
}

.select-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #9ca3af;
}

/* Asset Accordion */
.asset-accordion {
    /* Remove max-height and overflow to allow dynamic height expansion */
}

.asset-category {
    border-bottom: 1px solid #e5e7eb;
}

.asset-category:last-child {
    border-bottom: none;
}

.asset-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.asset-category-header:hover {
    background: #f9fafb;
}

.category-name {
    font-size: 12px;
    color: #374151;
    flex: 1;
    line-height: 1.3;
}

.category-badges {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    margin-left: 5px; /* Changed from 'auto' to fixed 5px spacing */
    order: 1; /* Ensures badges appear before chevron */
}

.badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    min-width: 24px;
    text-align: center;
    margin-left: 0;
}

.badge-critical {
    background: #ef4444;
    color: white;
}

.badge-optional {
    background: #10b981;
    color: white;
}

.asset-impact-badge {
    font-size: 10px !important;
    padding: 2px 6px !important;
    flex-shrink: 0;
}

.category-chevron {
    transition: transform 0.2s;
    color: #6b7280;
}

.asset-category-header.open .category-chevron {
    transform: rotate(180deg);
}

.asset-category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.asset-category-content.open {
    max-height: 1000px;
}

.asset-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 12px;
    color: #6b7280;
    border-radius: 4px;
    transition: all 0.2s;
}

.asset-name {
    margin-bottom: 4px;
    line-height: 1.3;
    font-weight: 500;
    color: #374151;
    font-size: 13px;
}

.asset-item:hover,
.asset-item.active {
    background: #eff6ff;
    color: #2563eb;
}

/* Form Area */
.form-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #9ca3af;
}

.form-textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-help-text {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    line-height: 1.4;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

/* Impact Assessment */
.impact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.impact-card {
    padding: 16px;
    border-radius: 8px;
    border: 1px solid gray;
    text-align: center;
    background: rgb(250, 250, 250);
}

.impact-blue {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.impact-green {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.impact-red {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.impact-grey {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #6b7280;
}

.impact-yellow {
    background: #fefce8;
    border-color: #fde68a;
}

.impact-purple {
    background: #faf5ff;
    border-color: #e9d5ff;
}

.impact-orange {
    background: #fff7ed;
    border-color: #fed7aa;
}

.impact-red {
    background: #fee2e2;
    border-color: #fca5a5;
}

.impact-red {
    background: #fee2e2;
    border-color: #fecaca;
}

.impact-grey {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.impact-label {
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
}

.impact-value {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
}

.impact-summary-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.impact-summary-btn {
    padding: 12px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.impact-summary-btn:hover {
    background: #b91c1c;
}

.impact-summary-btn.summary-green {
    background: #10b981;
}

.impact-summary-btn.summary-green:hover {
    background: #059669;
}

.impact-summary-btn.summary-red {
    background: #dc2626;
}

.impact-summary-btn.summary-red:hover {
    background: #b91c1c;
}

.impact-summary-btn.summary-grey {
    background: #6b7280;
}

.impact-summary-btn.summary-grey:hover {
    background: #4b5563;
}

.summary-label {
    font-size: 14px;
    color:white;
}

.summary-label.label-f1 {
    color: #ffffff;
}

.summary-value {
    font-size: 24px;
    font-weight: 600;
    margin-top: 4px;
}

.summary-text {
    font-size: 14px;
}

.modified-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 12px;
}

/* Action Buttons */
.action-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.action-buttons-left,
.action-buttons-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-edit {
    background: #dbeafe;
    color: #2563eb;
}

.btn-edit:hover {
    background: #bfdbfe;
}

.btn-delete {
    background: #fee2e2;
    color: #dc2626;
}

.btn-delete:hover {
    background: #fecaca;
}

.btn-export {
    background: #dcfce7;
    color: #16a34a;
}

.btn-export:hover {
    background: #bbf7d0;
}

.btn-export:active {
    background: #16a34a;
    color: white;
}

/* Bottom Summary */
.bottom-summary {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 21px 24px;
}

.summary-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-text {
    font-size: 14px;
    color: #6b7280;
}

.summary-badge {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    color: white;
}

.summary-badge-blue {
    background: #2563eb;
}

.summary-badge-red {
    background: #ef4444;
}

.summary-badge-green {
    background: #10b981;
}

/*--------------------------------------------------------------
# Responsive Design
--------------------------------------------------------------*/
/* Tablet Styles */
@media (min-width: 768px) {
    .company-info {
        display: flex;
        gap: 24px;
    }

    .btn-share span {
        display: inline;
    }

    .content-wrapper {
        flex-direction: row;
    }

    .asset-list-pane {
        width: 320px;
        border-right: 1px solid #e5e7eb;
        border-bottom: none;
        max-height: none;
    }

    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .impact-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modified-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .action-buttons-left,
    .action-buttons-right {
        flex-direction: row;
    }

    .summary-content {
        flex-direction: row;
        align-items: center;
        gap: 24px;
    }
}

/* Desktop Styles - Updated to start at 1024px */
@media (min-width: 1024px) {
    .mobile-nav {
        display: none;
    }

    .sidebar {
        display: flex;
    }

    .impact-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .action-buttons-container {
        flex-direction: row;
        justify-content: space-between;
    }

    .action-buttons-left,
    .action-buttons-right {
        flex-direction: row;
    }
}

/* Tablet and below styles - Updated to end at 1023px */
@media (max-width: 1023px) {
    .mobile-nav {
        display: block;
    }

    .sidebar {
        display: none;
    }
    
    /* Ensure full width layout for tablet and below */
    .main-content {
        margin-left: 0 !important;
        width: 100vw !important;
    }
    
    .footer {
        margin-left: 0 !important;
        width: 100vw !important;
    }
    
    .bottom-summary {
        margin-left: 0 !important;
        width: 100vw !important;
    }
}

/*--------------------------------------------------------------
# Scrollbar Styles
--------------------------------------------------------------*/
.asset-accordion::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar,
.form-area::-webkit-scrollbar,
.mobile-dropdown::-webkit-scrollbar {
    width: 6px;
}

.asset-accordion::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track,
.form-area::-webkit-scrollbar-track,
.mobile-dropdown::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.asset-accordion::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb,
.form-area::-webkit-scrollbar-thumb,
.mobile-dropdown::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.asset-accordion::-webkit-scrollbar-thumb:hover,
.sidebar-nav::-webkit-scrollbar-thumb:hover,
.form-area::-webkit-scrollbar-thumb:hover,
.mobile-dropdown::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ========================================
   PRECISE LAYOUT OVERRIDE: 16px GAP
   Ensures main content maintains exactly 16px gap from sidebar edge
   ======================================== */

/* Define CSS custom properties for sidebar widths and gap */
:root {
  --sidebar-width-expanded: 240px;
  --sidebar-width-collapsed: 64px;
  --content-gap: 16px;
}

/* Main content with precise 16px gap when sidebar is expanded */
body:not(.sidebar-collapsed) .main-content {
  width: calc(100vw - var(--sidebar-width-expanded) - var(--content-gap)) !important;
  margin-left: calc(var(--sidebar-width-expanded) + var(--content-gap)) !important;
}

/* Main content with NO gap when sidebar is collapsed - touches sidebar edge */
body.sidebar-collapsed .main-content {
  width: calc(100vw - var(--sidebar-width-collapsed)) !important;
  margin-left: calc(var(--sidebar-width-collapsed)) !important;
}

/* Ensure content wrapper fills the available space */
.main-content .content-wrapper {
  width: 100% !important;
  max-width: none !important;
}

/* Footer with same dynamic behavior as main content */
.footer {
  width: calc(100vw - var(--sidebar-width-expanded) - var(--content-gap)) !important;
  margin-left: calc(var(--sidebar-width-expanded) + var(--content-gap)) !important;
  transition: width 0.3s ease, margin-left 0.3s ease;
}

/* Footer with NO gap when sidebar is collapsed - touches sidebar edge */
body.sidebar-collapsed .footer {
  width: calc(100vw - var(--sidebar-width-collapsed)) !important;
  margin-left: calc(var(--sidebar-width-collapsed)) !important;
}

/* Bottom summary bar with same dynamic behavior */
.bottom-summary {
  width: calc(100vw - var(--sidebar-width-expanded) - var(--content-gap)) !important;
  margin-left: calc(var(--sidebar-width-expanded) + var(--content-gap)) !important;
  transition: width 0.3s ease, margin-left 0.3s ease;
}

/* Bottom summary bar with NO gap when sidebar is collapsed */
body.sidebar-collapsed .bottom-summary {
  width: calc(100vw - var(--sidebar-width-collapsed)) !important;
  margin-left: calc(var(--sidebar-width-collapsed)) !important;
}

/* Responsive adjustments for the precise layout */
@media (max-width: 1024px) {
  /* main-content: 100% width for screens <1024px */
  body:not(.sidebar-collapsed) .main-content,
  body.sidebar-collapsed .main-content {
    width: 100vw !important;
    margin-left: 0 !important;
  }
  
  /* Footer: 100% width for screens <1024px */
  body:not(.sidebar-collapsed) .footer,
  body.sidebar-collapsed .footer {
    width: 100vw !important;
    margin-left: 0 !important;
  }
  
  /* Bottom summary: 100% width for screens <1024px */
  body:not(.sidebar-collapsed) .bottom-summary,
  body.sidebar-collapsed .bottom-summary {
    width: 100vw !important;
    margin-left: 0 !important;
  }
  
  /* Ensure mobile-nav is displayed for screens <1024px */
  .mobile-nav {
    display: block !important;
  }
  
  /* Hide sidebar for screens <1024px */
  .sidebar {
    display: none !important;
  }
}

@media (max-width: 768px) {
  /* Mobile: sidebar overlays content, so full width */
  .main-content {
    width: 100vw !important;
    margin-left: 0 !important;
  }
  
  /* Footer mobile: full width */
  .footer {
    width: 100vw !important;
    margin-left: 0 !important;
  }
  
  /* Bottom summary mobile: full width */
  .bottom-summary {
    width: 100vw !important;
    margin-left: 0 !important;
  }

  .summary-content {
    display: flex;
    flex-direction: row;
    align-items: center;
  }

}

/*--------------------------------------------------------------
# Responsive Header & Page Title Layout
--------------------------------------------------------------*/

/* Mobile: ≤480px */
@media (max-width: 480px) {
  :root {
    --top-bar-height: 70px;      /* Smaller height on mobile */
    --page-header-height: 56px;  /* Smaller height on mobile */
    --mobile-nav-height: 44px;   /* Smaller height on mobile */
  }
  
  .top-bar {
    padding: 8px 16px;
    flex-wrap: wrap;
    min-height: var(--top-bar-height);
  }
  
  .page-header {
    padding: 12px 16px;
    min-height: var(--page-header-height);
    /* Ensure page-header is not fixed on mobile */
    position: relative;
    top: auto;
    left: auto;
    right: auto;
  }
  
  .page-header h1 {
    font-size: 14px;
  }
  
  .mobile-nav {
    margin-top: 0; /* Position directly below page-header */
    border-top: none;
    min-height: var(--mobile-nav-height);
  }
  
  .main-content {
    padding-right: 8px;
    margin-top: 0 !important;
    padding-top: 16px;
  }
}

/* Tablet: 481px–768px */
@media (min-width: 481px) and (max-width: 768px) {
  :root {
    --top-bar-height: 75px;
    --page-header-height: 60px;
    --mobile-nav-height: 46px;   /* Tablet mobile nav height */
  }
  
  .top-bar {
    padding: 10px 20px;
    /* min-height: var(--top-bar-height); */
  }
  .company-info {
    display: none;
  }
  
  .page-header {
    padding: 14px 20px;
    min-height: var(--page-header-height);
    /* Ensure page-header is not fixed on tablet */
    position: relative;
    top: auto;
    left: auto;
    right: auto;
  }
  
  .page-header h1 {
    font-size: 15px;
  }
  
  .mobile-nav {
    margin-top: 0; /* Position directly below page-header */
    min-height: var(--mobile-nav-height);
  }
  
  .main-content {
    padding-right: 12px;
    margin-top: 0 !important;
    padding-top: 16px;
  }
}

/* Desktop: ≥769px but <1024px */
@media (min-width: 769px) and (max-width: 1023px) {
  :root {
    --top-bar-height: 80px;      /* Default desktop height */
    --page-header-height: 64px;  /* Default desktop height */
    --mobile-nav-height: 48px;   /* Default mobile nav height */
  }
  
  .mobile-nav {
    display: block; /* Show mobile nav for 769px-1023px */
  }
  
  /* Ensure page-header is not fixed for this range */
  .page-header {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
  }
  
  /* Ensure main content flows naturally */
  .main-content {
    margin-top: 0 !important;
    padding-top: 16px;
    margin-left: 0 !important;
    width: 100vw !important;
  }
  
  /* Ensure footer and bottom-summary have full width */
  .footer {
    margin-left: 0 !important;
    width: 100vw !important;
  }
  
  .bottom-summary {
    margin-left: 0 !important;
    width: 100vw !important;
  }
}

/* Large Desktop: ≥1024px */
@media (min-width: 1024px) {
  :root {
    --top-bar-height: 80px;      /* Default desktop height */
    --page-header-height: 64px;  /* Default desktop height */
    --mobile-nav-height: 48px;   /* Default mobile nav height (hidden on desktop) */
  }
  
  .mobile-nav {
    display: none; /* Hide mobile nav on large desktop */
  }
  
  /* Ensure page-header is fixed on large desktop */
  .page-header {
    position: fixed;
    top: var(--top-bar-height);
    left: 0;
    right: 0;
    z-index: 999;
  }
  
  /* Ensure main content uses the calculated margin-top on large desktop */
  .main-content {
    margin-top: var(--header-total-height) !important;
    padding-top: 0;
  }
}

/* Extra Large Desktop: ≥1200px */
@media (min-width: 1200px) {
  :root {
    --top-bar-height: 80px;
    --page-header-height: 64px;
    --mobile-nav-height: 48px;
  }
  
  /* Ensure page-header remains fixed on extra large desktop */
  .page-header {
    position: fixed;
    top: var(--top-bar-height);
    left: 0;
    right: 0;
    z-index: 999;
  }
  
  /* Ensure main content uses the calculated margin-top on extra large desktop */
  .main-content {
    margin-top: var(--header-total-height) !important;
    padding-top: 0;
  }
  
  /* Ensure mobile-nav remains hidden */
  .mobile-nav {
    display: none !important;
  }
  
  /* Ensure sidebar is displayed */
  .sidebar {
    display: flex !important;
  }
}

/* Attachment grid layout */
.attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.attachment-item {
  position: relative;
  display: inline-block;
}

.attachment-item .btn-delete {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #dc2626;
  color: white;
  border: 2px solid white;
}