.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
}

.app-shell.is-sidebar-hidden {
    grid-template-columns: 1fr;
}

.app-shell.is-sidebar-hidden .sidebar {
    display: none;
}

.shell-main {
    min-width: 0;
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(238, 246, 252, 0.84), rgba(246, 250, 255, 0.78)),
        url("/RECURSOS/FONDO_CLUB01.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 26px 20px 20px;
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(180deg, rgba(9, 27, 46, 0.98) 0%, rgba(18, 51, 83, 0.97) 56%, rgba(12, 34, 57, 0.98) 100%),
        url("/RECURSOS/panel_textura_sutil.png");
    background-size: auto, 520px auto;
    color: #eef4fb;
    border-right: 1px solid rgba(199, 215, 230, 0.12);
    box-shadow: 16px 0 44px rgba(16, 36, 58, 0.12);
}

.sidebar-brand {
    display: grid;
    gap: 4px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(199, 215, 230, 0.14);
}

.sidebar-brand-text {
    display: grid;
    gap: 4px;
}

.sidebar-brand-text strong {
    color: white;
    font-size: 1.02rem;
    line-height: 1.1;
}

.sidebar-brand-text span {
    color: rgba(238, 244, 251, 0.86);
    font-size: 0.92rem;
    font-weight: 700;
}

.sidebar-nav {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.sidebar-group {
    display: grid;
    gap: 10px;
    padding: 4px 0;
}

.sidebar-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 8px;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.sidebar-group-label {
    flex: 1 1 auto;
    margin: 0;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    line-height: 1.1;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
    color: rgba(238, 244, 251, 0.58);
}

.sidebar-group-chevron {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1;
    color: rgba(238, 244, 251, 0.58);
    transition: background 0.18s ease, color 0.18s ease;
}

.sidebar-group.is-open .sidebar-group-chevron {
    background: rgba(213, 123, 26, 0.18);
    color: rgba(238, 244, 251, 0.88);
}

.sidebar-group-links {
    display: grid;
    gap: 8px;
    padding-left: 4px;
}

.sidebar-group-links[hidden] {
    display: none;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: 15px;
    color: rgba(238, 244, 251, 0.92);
    border: 1px solid transparent;
    transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.sidebar-link:hover,
.sidebar-link.is-active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.08));
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.sidebar-link strong {
    font-size: 0.98rem;
}

.sidebar-group-toggle:hover .sidebar-group-label,
.sidebar-group-toggle:hover .sidebar-group-chevron {
    color: rgba(238, 244, 251, 0.88);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
    font-size: 0.86rem;
    color: rgba(238, 244, 251, 0.7);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px 24px;
    background:
        linear-gradient(180deg, rgba(250, 253, 255, 0.92), rgba(244, 249, 255, 0.88)),
        url("/RECURSOS/panel_textura_sutil.png");
    background-size: auto, 760px auto;
    border-bottom: 1px solid rgba(185, 203, 219, 0.55);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 28px rgba(16, 36, 58, 0.05);
}

.topbar-left,
.topbar-actions {
    display: flex;
    align-items: center;
    min-width: 0;
}

.topbar-company-block {
    display: flex;
    justify-content: center;
    min-width: 0;
}

.topbar-company-title,
.topbar-company-switcher {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    max-width: 100%;
    padding: 9px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(185, 203, 219, 0.72);
    box-shadow: 0 8px 22px rgba(16, 36, 58, 0.06);
    color: var(--brand-900);
    font-size: clamp(1rem, 1.35vw, 1.25rem);
    font-weight: 900;
    letter-spacing: 0.01em;
    text-align: center;
    white-space: nowrap;
}

.topbar-company-switcher span {
    color: var(--brand-700);
}

.topbar-company-switcher select {
    width: auto;
    min-width: 190px;
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--brand-900);
    font-weight: 900;
    text-transform: uppercase;
    box-shadow: none;
}

.topbar-actions {
    justify-content: flex-end;
    gap: 12px;
}

.topbar-user-line {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(185, 203, 219, 0.72);
    color: var(--ink-900);
    font-size: 0.92rem;
    font-weight: 800;
    white-space: nowrap;
}

.session-button {
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    background: #0b7a7a;
    color: white;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 12px 24px rgba(11, 122, 122, 0.18);
}

.session-button:hover {
    background: #096767;
    transform: translateY(-1px);
}

.page-wrap {
    width: min(1680px, calc(100% - (var(--shell-inline-space) * 2)));
    margin: 24px auto 32px;
    padding: 28px;
    border: 1px solid rgba(222, 234, 246, 0.22);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(8, 26, 46, 0.9), rgba(22, 58, 91, 0.8) 56%, rgba(12, 35, 60, 0.86)),
        url("/RECURSOS/panel_textura_sutil.png");
    background-size: auto, 780px auto;
    backdrop-filter: blur(12px);
    box-shadow: 0 28px 72px rgba(8, 24, 42, 0.34);
    min-width: 0;
}

.app-shell.is-sidebar-hidden .page-wrap {
    width: min(1780px, calc(100% - (var(--shell-inline-space) * 2)));
    margin-inline: auto;
}

.page-hero {
    display: flex;
    gap: 20px;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 22px;
}

.page-hero h1 {
    margin: 4px 0 8px;
    color: #ffffff;
    font-size: clamp(1.7rem, 2.2vw, 2.5rem);
}

.page-kicker {
    margin: 0;
    color: rgba(190, 221, 255, 0.94);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-subtitle {
    margin: 0;
    max-width: 62ch;
    color: rgba(239, 247, 255, 0.86);
}

.mobile-only {
    display: none;
}

.topbar-sidebar-toggle {
    white-space: nowrap;
}
