/* Mobile Specific Adjustments */
@media screen and (max-width: 1024px) {
    .header-selector-form {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0.75rem;
    }

    .header-filter-group {
        flex: 1 1 auto;
        min-width: 200px;
    }

    .header-select {
        width: 100%;
        min-width: unset;
    }
}

@media screen and (max-width: 768px) {

    .header-page-title-section {
        width: max-content;
        min-width: 100%;
        padding: 0;
    }

    .header-page-title-wrapper {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    /* Hide scrollbar for Chrome/Safari/Opera */
    .header-page-title-wrapper::-webkit-scrollbar {
        display: none;
    }

    .header-menu-toggle {
        display: flex !important;
        margin: auto 0;
        grid-column: 1;
        align-self: center;
        height: 40px;
        width: 40px;
        justify-content: center;
        align-items: center;
    }

    /* Header Adjustments */
    .header-main-bar {
        height: var(--header-mobile-height);
        padding: 0 16px;
        display: grid;
        grid-template-columns: auto 1fr auto;
        /* Tres columnas: menú, logo, usuario */
        align-items: center;
    }

    .header-bar-accent {
        height: calc(var(--header-mobile-height) + 5px);
    }

    /* Logo Adjustments */
    .header-logo-link {
        height: 50px;
        margin-right: 20px;
        display: flex;
        align-items: center;
        /* Alinea el logo verticalmente */
    }

    .header-logo {
        width: 180px;
    }

    /* Force Logo Visibility */
    #mainLogo.header-logo-link {
        height: 50px !important;
        margin: 0 auto !important;
        /* Centra horizontalmente */
        justify-content: center;
        grid-column: 2;
        /* Posiciona en columna central */
    }

    #mainLogoImage.header-logo {
        width: 180px !important;
        display: block !important;
        position: static !important;
    }

    /* Navigation Changes */
    .header-nav {
        display: none !important;
    }

    /* Show Mobile Menu Toggle */
    .header-menu-toggle {
        display: flex !important;
        grid-column: 1;
        /* Primera columna */
    }

    /* Mobile Side Menu */
    .header-side-menu {
        display: block;
    }

    /* Mobile Navigation Styles */
    .header-side-menu .header-nav {
        display: flex !important;
        flex-direction: column;
        height: auto;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .header-side-menu.active {
        right: 0;
    }

    .header-side-menu .header-nav-item {
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .header-side-menu .header-nav-link {
        padding: 16px;
        width: 100%;
        color: #D8EBF3;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Mobile Dropdown Adjustments */
    .header-side-menu .header-submenu {
        position: static;
        width: 100%;
        max-width: none;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
        display: none;
    }

    .header-side-menu .header-submenu.show {
        display: block;
    }


    .header-side-menu .header-submenu-item {
        padding: 12px 24px;
        color: #D8EBF3;
    }

    .header-side-menu .header-submenu-item.has-nested {
        padding: 12px 40px 12px 16px;
    }

    .header-side-menu .header-submenu-item.has-nested a {
        padding: 12px 40px 12px 16px;
        margin: -12px -40px -12px -16px;
        color: #D8EBF3;
    }

    .header-side-menu .header-submenu-item.has-nested::after {
        content: '+';
        left: auto;
        right: 16px;
        font-size: 18px;
    }

    .header-side-menu .header-submenu-item.has-nested.active::after {
        content: '-';
    }

    .header-side-menu .header-nested-submenu {
        position: static;
        width: 100%;
        background: rgba(255, 255, 255, 0.05);
        border: none;
        box-shadow: none;
        margin: 0;
        padding: 0;
    }

    .header-side-menu .header-nested-submenu .header-submenu-item {
        padding: 12px 16px 12px 32px;
    }

    /* Overlay Styles */
    .header-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 59;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }

    .header-overlay.active {
        display: block;
        opacity: 1;
    }

    .header-page-selectors {
        padding: 0.5rem;
    }

    .header-selectors-container {
        gap: 0.5rem;
    }

    .header-selector {
        margin-right: 0.5rem;
    }

    .header-selector-form {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .header-filter-group {
        width: 100%;
    }

    .header-select {
        min-width: 150px;
        width: auto;
    }

    .header-date-group {
        width: 100%;
        flex-direction: column;
    }

    .header-datetime-group {
        width: 100%;
    }

    .header-date-input,
    .header-time-input {
        min-width: 120px;
        width: auto;
    }

    .header-user-controls {
        grid-column: 3;
        /* Última columna */
        margin-left: 0;
        /* Reset del margin auto */
    }

    .header-breadcrumb {
        padding: 0 0.75rem;
    }

    /* Ajustes del texto del breadcrumb para móvil */
    .header-breadcrumb-main,
    .header-breadcrumb-sub,
    .header-breadcrumb-current {
        font-size: 1.125rem;
        /* Ligeramente más pequeño en móvil */
    }
}

@media screen and (max-width: 480px) {

    .header-page-title-section {
        padding: 0;
    }

    .header-main-bar {
        height: var(--header-sm-height);
        padding: 0 12px;
    }

    .header-bar-accent {
        height: calc(var(--header-sm-height) + 5px);
    }

    .header-logo-link {
        height: 40px;
    }

    .header-logo {
        width: 140px;
    }

    #mainLogo.header-logo-link {
        height: 40px !important;
    }

    #mainLogoImage.header-logo {
        width: 140px !important;
    }

    .header-side-menu {
        width: 100%;
        right: -100%;
    }

    .header-selectors-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .header-selector {
        flex: 1 1 100%;
        margin-right: 0;
    }

    .header-page-selectors {
        padding: 0 0.5rem;
    }

    .header-breadcrumb {
        padding: 0 0.5rem;
        min-height: 50px;
    }

    .header-breadcrumb-main,
    .header-breadcrumb-sub,
    .header-breadcrumb-current {
        font-size: 1rem;
    }
}


/* Print Styles */
@media print {
    .header-container {
        position: static;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .header-menu-toggle,
    .header-side-menu,
    .header-overlay {
        display: none !important;
    }
}

/* ====== header.css tablet additions ====== */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .header-main-bar {
        height: calc(var(--header-height) - 20px);
        padding: 0 20px;
    }

    .header-logo {
        width: 200px;
    }

    .header-nav {
        gap: 10px;
    }

    .header-nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }

    .header-page-selectors {
        padding: 0.75rem;
    }

    .header-selector-form {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .header-filter-group {
        flex: 1 1 45%;
        min-width: 200px;
    }

    .header-date-group {
        flex-direction: row;
        gap: 0.5rem;
    }

    .header-select {
        width: 100%;
    }

    /* Improve dropdown menus for touch devices */
    .header-submenu {
        padding: 6px 0;
    }

    .header-submenu-item {
        padding: 10px 16px;
        font-size: 14px;
    }
}

@media screen and (max-width: 1200px) {
    .header-nav {
        gap: 4px;
    }

    .header-nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }

    .header-logo {
        width: 220px;
    }
}

@media screen and (max-width: 1024px) {
    .header-main-bar {
        height: var(--header-tablet-height);
        padding: 0 16px;
    }

    .header-bar-accent {
        height: calc(var(--header-tablet-height) + 5px);
    }

    .header-logo-link {
        height: 55px;
        margin-right: 25px;
    }

    .header-logo {
        width: 200px;
    }

    /* Adjust navigation for tablets */
    .header-nav {
        display: flex !important;
        gap: 2px;
    }

    .header-nav-item {
        position: relative;
    }

    .header-nav-link {
        padding: 8px 10px;
        font-size: 13px;
    }

    /* Adjust dropdown positioning for tablets */
    .header-submenu {
        min-width: 200px;
        max-width: 260px;
    }

    /* Improve touch targets for tablets */
    .header-submenu-item {
        padding: 12px 16px;
        font-size: 13px;
    }

    /* Adjust selectors section for tablets */
    .header-page-selectors {
        padding: 8px;
    }

    .header-selectors-container {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
    }

    .header-selector {
        flex: 1;
        min-width: 200px;
        margin-right: 0.75rem;
    }

    .header-select {
        min-width: unset;
        width: 100%;
    }

    /* Adjust date inputs for tablets */
    .header-date-input,
    .header-time-input {
        padding: 8px;
        font-size: 13px;
    }

    /* Improve filter form layout */
    .header-selector-form {
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-filter-group {
        flex: 1 1 auto;
        min-width: 180px;
    }
}

/* Specific iPad/Tablet Portrait Mode */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .header-main-bar {
        height: var(--header-tablet-height);
    }

    .header-nav {
        gap: 1px;
    }

    .header-nav-link {
        padding: 8px 8px;
        font-size: 12px;
    }

    /* Adjust logo for portrait mode */
    .header-logo-link {
        height: 50px;
        margin-right: 15px;
    }

    .header-logo {
        width: 180px;
    }
}

/* Small tablets and large phones */
@media screen and (max-width: 820px) {
    .header-menu-toggle {
        display: flex !important;
    }

    .header-nav {
        display: none !important;
    }

    .header-main-bar {
        height: var(--header-mobile-height);
        grid-template-columns: auto 1fr auto;
    }

    #mainLogo.header-logo-link {
        height: 45px !important;
        margin: 0 auto !important;
        justify-content: center;
    }

    #mainLogoImage.header-logo {
        width: 160px !important;
    }

    /* Ensure side menu works properly */
    .header-side-menu {
        display: block;
        width: 280px;
    }

    .header-side-menu .header-nav {
        display: flex !important;
        flex-direction: column;
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    #content {
        margin-top: calc(var(--header-tablet-height) + var(--title-section-height));
        padding: 15px;
    }
}

/* Large tablets and hybrid devices */
@media screen and (min-width: 1024px) and (max-width: 1366px) {
    .header-main-bar {
        height: var(--header-large-tablet-height);
        padding: 0 20px;
    }

    .header-bar-accent {
        height: calc(var(--header-large-tablet-height) + 5px);
    }

    .header-logo-link {
        height: 65px;
        margin-right: 30px;
    }

    .header-logo {
        width: 230px;
    }

    .header-nav {
        gap: 6px;
    }

    .header-nav-link {
        padding: 10px 14px;
        font-size: 15px;
    }

    /* Improved touch targets for larger tablets */
    .header-submenu {
        min-width: 240px;
        max-width: 320px;
    }

    .header-submenu-item {
        padding: 14px 18px;
        font-size: 14px;
    }

    /* Adjust selectors for larger screens */
    .header-page-selectors {
        padding: 10px 20px;
    }

    .header-selector {
        min-width: 220px;
    }

    .header-select {
        padding: 8px 12px;
        font-size: 14px;
    }

    /* Form controls for touch screens */
    .header-date-input,
    .header-time-input {
        padding: 10px;
        font-size: 14px;
        min-width: 140px;
    }
}

/* iPad Pro 12.9" specific adjustments */
@media screen and (min-width: 1024px) and (max-width: 1366px) and (orientation: portrait) {
    .header-main-bar {
        height: var(--header-large-tablet-height);
    }

    .header-nav {
        gap: 4px;
    }

    .header-nav-link {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* Surface Pro and similar devices */
@media screen and (min-width: 1368px) and (max-width: 1500px) {
    .header-main-bar {
        height: calc(var(--header-large-tablet-height) + 10px);
    }

    .header-nav {
        gap: 8px;
    }

    .header-logo {
        width: 240px;
    }
}

/* Foldable devices in folded state */
@media screen and (max-width: 930px) {
    .header-menu-toggle {
        display: flex !important;
    }

    .header-nav {
        display: none !important;
    }

    .header-main-bar {
        height: var(--header-tablet-height);
    }

    #mainLogo.header-logo-link {
        height: 50px !important;
    }

    #mainLogoImage.header-logo {
        width: 180px !important;
    }
}

/* Ensure proper content spacing for large tablets */
@media screen and (min-width: 1024px) and (max-width: 1366px) {
    #content {
        margin-top: calc(var(--header-large-tablet-height) + var(--title-section-height));
        padding: 20px;
    }
}

/* High DPI screens (common in modern tablets) */
@media screen and (min-width: 1024px) and (max-width: 1366px) and (min-resolution: 192dpi) {
    .header-main-bar {
        height: var(--header-large-tablet-height);
    }

    .header-nav-link,
    .header-submenu-item,
    .header-select,
    .header-date-input,
    .header-time-input {
        font-size: 15px;
    }
}

/* Handle orientation changes smoothly */
@media screen and (orientation: landscape) and (max-height: 900px) {
    .header-main-bar {
        height: var(--header-tablet-height);
    }

    .header-logo {
        width: 200px;
    }
}

@media screen and (min-width: 820px) and (max-width: 920px),
screen and (min-width: 850px) and (max-width: 860px),
screen and (min-width: 900px) and (max-width: 920px) {
    .header-main-bar {
        height: var(--header-tablet-height);
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        padding: 0 16px;
    }

    /* Menu toggle positioning */
    .header-menu-toggle {
        display: flex !important;
        grid-column: 1;
        align-self: center;
        height: 40px;
        width: 40px;
        justify-content: center;
        align-items: center;
    }

    /* Center logo */
    .header-logo-link {
        grid-column: 2;
        justify-self: center;
        margin: 0 auto;
        height: 55px;
    }

    #mainLogo.header-logo-link {
        height: 55px !important;
        margin: 0 auto !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #mainLogoImage.header-logo {
        width: 180px !important;
        position: relative !important;
        display: block !important;
    }

    /* Hide regular nav and adjust user controls */
    .header-nav {
        display: none !important;
    }

    .header-user-controls {
        grid-column: 3;
        margin-left: 0;
    }

    /* Ensure proper spacing */
    .header-bar-accent {
        height: calc(var(--header-tablet-height) + 5px);
    }
}

/* iPad Pro (1024x1366) specific fixes */
@media screen and (min-width: 1024px) and (max-width: 1366px) {
    .header-main-bar {
        height: var(--header-large-tablet-height);
        padding: 0 20px;
    }

    .header-bar-accent {
        height: calc(var(--header-large-tablet-height) + 5px);
    }

    .header-logo-link {
        height: 65px;
        margin-right: 30px;
    }

    .header-logo {
        width: 220px;
    }

    .header-nav {
        display: flex !important;
        gap: 6px;
    }

    .header-nav-link {
        padding: 10px 14px;
        font-size: 15px;
    }

    /* Hide menu toggle for iPad Pro */
    .header-menu-toggle {
        display: none !important;
    }

    /* Ensure proper content spacing */
    #content {
        margin-top: calc(var(--header-large-tablet-height) + var(--title-section-height));
    }
}

/* Additional fix for iPad Pro portrait orientation */
@media screen and (width: 1024px) and (height: 1366px) {
    .header-main-bar {
        height: var(--header-large-tablet-height);
    }

    .header-nav {
        gap: 4px;
    }

    .header-nav-link {
        padding: 10px 12px;
        font-size: 14px;
    }
}



/* iPad Pro (1024x1366) specific responsive header */
@media screen and (width: 1024px),
screen and (min-width: 1024px) and (max-width: 1025px) {
    .header-main-bar {
        height: var(--header-tablet-height);
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        padding: 0 16px;
    }

    /* Enable menu toggle */
    .header-menu-toggle {
        display: flex !important;
        grid-column: 1;
        align-self: center;
        height: 40px;
        width: 40px;
        justify-content: center;
        align-items: center;
        margin: 0;
    }

    /* Center logo */
    .header-logo-link {
        grid-column: 2;
        justify-self: center;
        margin: 0 auto;
        height: 55px;
    }

    #mainLogo.header-logo-link {
        height: 55px !important;
        margin: 0 auto !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #mainLogoImage.header-logo {
        width: 180px !important;
        position: relative !important;
        display: block !important;
    }

    /* Hide regular nav */
    .header-nav {
        display: none !important;
    }

    .header-user-controls {
        grid-column: 3;
        margin-left: 0;
    }

    /* Adjust accent bar */
    .header-bar-accent {
        height: calc(var(--header-tablet-height) + 5px);
    }

    /* Ensure proper content spacing */
    #content {
        margin-top: calc(var(--header-tablet-height) + var(--title-section-height));
    }

    /* Side menu adjustments */
    .header-side-menu {
        display: none;
        width: 300px;
        right: -300px;
    }

    .header-side-menu.active {
        display: block;
        right: 0;
    }
}

/* Larger side menu for tablets */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .header-side-menu {
        width: 400px;
        right: -400px;
    }

    .header-side-menu.active {
        right: 0;
    }
}

/* Even larger for bigger tablets */
@media screen and (min-width: 1025px) and (max-width: 1366px) {
    .header-side-menu {
        width: 450px;
        right: -450px;
    }

    .header-side-menu.active {
        right: 0;
    }
}

/* Adjust padding and font sizes for better readability on tablets */
@media screen and (min-width: 768px) {
    .header-side-menu .header-nav-link {
        padding: 16px 24px;
        font-size: 16px;
    }

    .header-side-menu .header-submenu-item {
        padding: 14px 24px;
        font-size: 15px;
    }
}

/* Desktop header fixes for 1920x1080 and similar resolutions */
@media screen and (min-width: 1367px) {

    /* Restore base header height for desktop */
    .header-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 50;
        background: white;
    }

    .header-main-bar {
        height: var(--header-height);
        padding: 0 28px;
    }

    .header-bar-accent {
        height: calc(var(--header-height) + 5px);
    }

    /* Ensure title section remains visible */
    .header-page-title-section {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--background-color, white);
        z-index: 49;
        min-height: var(--title-section-height);
        border-bottom: 1px solid #e5e7eb;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

    .header-page-title-wrapper {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        z-index: 49;
        background: var(--background-color, white);
    }

    /* Adjust content spacing */
    #content {
        margin-top: calc(var(--header-height) + var(--title-section-height));
        padding: 20px;
        position: relative;
        z-index: 1;
    }

    /* Logo positioning */
    .header-logo-link {
        height: 65px;
        margin-right: 40px;
    }

    .header-logo {
        width: 251px;
    }

    /* Navigation spacing */
    .header-nav {
        gap: 8px;
    }

    .header-nav-link {
        padding: 8px 16px;
        font-size: 16px;
    }
}

/* Specific fix for 1920x1080 and similar resolutions */
@media screen and (min-width: 1920px) {

    .header-page-title-section,
    .header-page-title-wrapper {
        max-width: 100%;
        width: 100%;
    }

    .header-container {
        max-width: 100%;
        width: 100%;
    }
}

/* Side menu adjustments for tablets */
@media screen and (min-width: 768px) {
    .header-side-menu {
        width: 400px;
        right: -400px;
        padding-top: 80px;
    }

    .header-side-menu .header-nav {
        display: flex !important;
        flex-direction: column;
        height: auto;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .header-side-menu.active {
        right: 0;
    }

    .header-side-menu .header-nav-item {
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .header-side-menu .header-nav-link {
        padding: 16px 24px;
        width: 100%;
        color: #D8EBF3;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .header-side-menu .header-submenu {
        position: static;
        width: 100%;
        max-width: none;
        background: rgba(255, 255, 255, 0.05);
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
        display: none;
    }

    .header-side-menu .header-submenu.show {
        display: block;
    }

    .header-side-menu .header-submenu-item {
        padding: 14px 32px;
        color: #D8EBF3;
        font-size: 15px;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        align-items: center;
    }

    .header-side-menu .header-submenu-item.has-nested {
        padding: 14px 32px 14px 24px;
        position: relative;
    }

    /* Nested submenu items */
    .header-side-menu .header-nested-submenu {
        position: static;
        width: 100%;
        background: rgba(0, 0, 0, 0.2);
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
    }

    .header-side-menu .header-nested-submenu .header-submenu-item {
        padding: 14px 48px;
        color: #D8EBF3;
        font-size: 14px;
    }

    /* Indicators for expandable menus */
    .header-side-menu .submenu-indicator,
    .header-side-menu .nested-submenu-indicator {
        margin-left: auto;
        font-size: 20px;
        color: #D8EBF3;
    }
}

/* Larger tablets specific adjustments */
@media screen and (min-width: 1024px) and (max-width: 1366px) {
    .header-side-menu {
        width: 450px;
        right: -450px;
    }

    .header-side-menu .header-nav-link {
        padding: 18px 28px;
        font-size: 17px;
    }

    .header-side-menu .header-submenu-item {
        padding: 16px 36px;
        font-size: 16px;
    }

    .header-side-menu .header-nested-submenu .header-submenu-item {
        padding: 16px 52px;
        font-size: 15px;
    }
}

/* High DPI screens adjustments */
@media screen and (-webkit-min-device-pixel-ratio: 2),
screen and (min-resolution: 192dpi) {
    .header-side-menu {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .header-personalize-panel {
        min-width: 280px;
        max-width: 100vw;
        right: -10px;
    }

    .header-years-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .header-personalize-panel select,
    .header-personalize-panel input[type="text"],
    .header-personalize-panel input[type="number"],
    .header-personalize-panel input[type="date"] {
        padding: 0.75rem;
        font-size: 1rem;
    }

    .header-personalize-panel input[type="checkbox"],
    .header-personalize-panel input[type="radio"] {
        width: 1.25rem;
        height: 1.25rem;
    }
}

@media screen and (max-width: 480px) {
    .header-personalize-wrapper {
        flex: 0 0 auto;
    }

    .header-personalize-panel {
        min-width: 250px;
        right: -5px;
    }

    .header-years-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .header-actions-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .header-actions-container a {
        text-align: center;
    }
}

@media screen and (max-width: 1024px) {

    /* Ensure personalize wrapper maintains position */
    .header-personalize-wrapper {
        flex: 0 0 auto;
        margin-left: 0;
    }

    /* Prevent personalize panel from breaking layout */
    .header-personalize-panel {
        right: 0;
        min-width: 300px;
        max-width: 95vw;
    }
}

/* Ensure correct display states for different screen sizes */
@media screen and (min-width: 769px) {
    .header-menu-toggle {
        display: none !important;
    }
}