/* Presentación compacta del menú principal. No cambia datos ni permisos. */

body.theme-r25-global header.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 8px 16px;
    flex-wrap: wrap;
}

body.theme-r25-global .topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

body.theme-r25-global .brand-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

body.theme-r25-global .brand-logo,
body.theme-r25-global .brand-logo-commercial {
    display: block;
    height: 40px;
    max-height: 40px;
    width: auto;
    max-width: 168px;
    object-fit: contain;
}

body.theme-r25-global .brand-name {
    display: block;
    max-width: 200px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--primary-dark, #0b3a5b);
}

body.theme-r25-global .license-compact {
    margin: 0;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
}

body.theme-r25-global .topbar-title {
    margin: 0;
    line-height: 1.15;
}

body.theme-r25-global .topbar-title strong {
    display: block;
    font-size: 16px;
}

body.theme-r25-global .topbar-title span {
    display: block;
    font-size: 12px;
}

body.theme-r25-global .usernav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
    margin-left: auto;
}

body.theme-r25-global .usernav > link,
body.theme-r25-global .usernav > script {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    border: 0;
}

body.theme-r25-global .usernav > .user-summary-stack,
body.theme-r25-global .usernav > .nav-hogar-view-form,
body.theme-r25-global .usernav > .nav-btn,
body.theme-r25-global .usernav > .wf2-bell {
    flex: 0 0 auto;
    align-self: center;
    margin-top: 0;
}

body.theme-r25-global .user-summary-stack {
    display: flex;
    align-items: center;
    gap: 6px;
}

body.theme-r25-global .usernav .nav-btn,
body.theme-r25-global .usernav .wf2-bell,
body.theme-r25-global .nav-hogar-view-form select {
    height: 34px;
    min-height: 34px;
    box-sizing: border-box;
}

body.theme-r25-global .usernav .nav-btn,
body.theme-r25-global .usernav .wf2-bell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

body.theme-r25-global .menu-cal-compact {
    padding: 0 10px;
    font-size: 13px;
}

body.theme-r25-global .menu-cal-compact svg {
    display: block;
    width: 16px;
    height: 16px;
    max-height: 16px;
    flex: 0 0 16px;
}

body.menu-r25-light > main.container {
    display: flex;
    flex-direction: column;
    padding-bottom: 8px;
}

body.menu-r25-light .menu-modes {
    flex: 0 0 auto;
    height: calc(100dvh - 128px);
    max-height: calc(100dvh - 128px);
    min-height: 280px;
    margin-bottom: 8px;
    overflow: auto;
}

body.cortana-env-development.menu-r25-light .menu-modes {
    height: calc(100dvh - 160px);
    max-height: calc(100dvh - 160px);
}

body.menu-r25-light .menu-list-sidebar {
    max-height: none;
    overflow: visible;
}

body.menu-r25-light .menu-list-layout {
    min-height: 0;
}

@media (max-width: 800px) {
    body.menu-r25-light .menu-modes,
    body.cortana-env-development.menu-r25-light .menu-modes {
        height: calc(100dvh - 210px);
        max-height: calc(100dvh - 210px);
    }
}

/* ui-header-structure: la píldora tiene dos líneas y el grupo baja entero si no cabe. */
body.theme-r25-global header.topbar,
body.theme-r25-global .topbar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    justify-content: flex-start;
    gap: 8px 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    max-height: none;
    box-sizing: border-box;
    overflow: visible;
    padding: 8px 60px 8px 16px;
}
body.theme-r25-global .topbar-left {
    display: flex;
    flex: 0 1 auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    min-width: 0;
    max-width: 100%;
}
body.theme-r25-global .topbar-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    gap: 0;
}
body.theme-r25-global .topbar-title strong,
body.theme-r25-global .topbar-title span {
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}
body.theme-r25-global .topbar-3d {
    display: inline-flex;
    align-items: center;
    margin: 0;
}
body.theme-r25-global .topbar-right {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px 10px;
    min-width: min(100%, max-content);
    max-width: 100%;
    margin-left: auto;
}
body.theme-r25-global .topbar-user {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    align-self: center;
    min-width: min-content;
    max-width: 100%;
}
body.theme-r25-global .topbar .user-pill {
    display: flex;
    align-items: flex-start;
    flex-wrap: nowrap;
    width: max-content;
    max-width: 100%;
    min-width: min-content;
    height: auto;
    min-height: 0;
    padding: 4px 12px 4px 6px;
    gap: 8px;
    white-space: normal;
    box-sizing: border-box;
}
body.theme-r25-global .topbar .header-user-photo,
body.theme-r25-global .topbar .header-user-initials {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
}
body.theme-r25-global .topbar .user-identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: nowrap;
    min-width: min-content;
    max-width: none;
    gap: 1px;
}
body.theme-r25-global .topbar .user-name {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}
body.theme-r25-global .topbar .user-meta {
    display: inline-flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    min-width: max-content;
    max-width: none;
    white-space: nowrap;
    line-height: 1.2;
}
    body.theme-r25-global .topbar .user-pill small {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}
body.theme-r25-global .topbar .user-role + .user-lang::before {
    content: "·";
    margin: 0 6px;
    font-weight: 700;
}
body.theme-r25-global .topbar-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: max-content;
    max-width: 100%;
}
body.theme-r25-global .topbar-actions > .nav-btn,
body.theme-r25-global .topbar-actions > .nav-hogar-view-form,
body.theme-r25-global .topbar-actions > .wf2-bell,
body.theme-r25-global .topbar-actions > .user-summary-pending,
body.theme-r25-global .topbar-3d > .nav-btn {
    flex: 0 0 auto;
    align-self: center;
    height: 34px;
    min-height: 34px;
    max-height: none;
    margin: 0;
    white-space: nowrap;
    overflow: visible;
}
body.theme-r25-global .topbar .user-summary-pending {
    width: auto;
    max-width: none;
    padding: 0 10px;
}
@media (max-width: 860px) {
    body.theme-r25-global .topbar-actions {
        flex-basis: 100%;
        flex-wrap: wrap;
        min-width: 0;
    }
    body.theme-r25-global .topbar .user-name,
    body.theme-r25-global .topbar-title strong,
    body.theme-r25-global .topbar-title span {
        white-space: normal;
    }
}
@media (max-width: 620px) {
    body.theme-r25-global .topbar .user-pill {
        display: flex;
    }
}
