html {
    max-width: 100%;
    overflow-x: clip;
}

body,
.main-layout,
.content {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .main-layout {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .main-layout > .sidebar {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .main-layout > .sidebar.collapsed {
        width: 100%;
    }

    .main-layout > .sidebar > .sidebar-toggle {
        right: 16px;
        left: auto;
    }

    .main-layout > .content {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .main-layout > .content > .header {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 110px;
        padding: 10px 20px 8px;
        box-sizing: border-box;
        background: #f0f0f0;
        border-bottom: 1px solid #e0e0e0;
        box-shadow: none;
    }

    .main-layout > .content > .header .dashboard-header {
        flex: 1 1 0;
        min-width: 0;
        margin: 0;
    }

    .main-layout > .content > .header .dashboard-header h1,
    .main-layout > .content > .header .dashboard-header .title-dash {
        margin: 0 0 2px;
        color: #051418;
        font-size: clamp(1.25rem, 6.6vw, 1.75rem);
        font-weight: 700;
        line-height: 1.15;
        letter-spacing: normal;
        overflow-wrap: anywhere;
    }

    .main-layout > .content > .header .dashboard-header p {
        max-width: none;
        margin: 0;
        color: #3d3d3d;
        font-size: 0.95rem;
        line-height: 1.35;
        opacity: 0.8;
        overflow-wrap: anywhere;
    }

    .main-layout > .content > .header .header-actions {
        flex: 0 0 auto;
        align-items: center;
        gap: 10px;
        height: auto;
    }

    .main-layout > .content > .header .notifications-container {
        position: static;
        margin: 0;
        transform: none;
    }

    .main-layout > .content > .header .header-actions .notifications-container .notification-bell {
        bottom: 0;
    }

    .main-layout > .content > .header .usuario-info {
        display: flex;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
        justify-content: center;
        box-sizing: border-box;
        border: 2px solid #e9ecef;
        border-radius: 10px;
        background: #f8f9fa;
        color: #6c757d;
        box-shadow: none;
    }

    .main-layout > .content > .header .usuario-info i {
        width: auto;
        height: auto;
        margin: 0;
        font-size: 22px;
    }

    .main-layout > .content > .header .notifications-panel {
        position: absolute;
        top: calc(100% + 8px);
        right: 12px;
        left: auto;
        width: min(360px, calc(100vw - 24px));
        max-width: none;
        margin: 0;
    }
}

@media (max-width: 400px) {
    .main-layout > .content > .header {
        gap: 8px;
        padding-right: 12px;
        padding-left: 12px;
    }

    .main-layout > .content > .header .dashboard-header h1,
    .main-layout > .content > .header .dashboard-header .title-dash {
        font-size: 1.18rem;
    }

    .main-layout > .content > .header .dashboard-header p {
        font-size: 0.82rem;
    }

    .main-layout > .content > .header .header-actions {
        gap: 8px;
    }
}
