/* App shell — sidebar navy RGEF · contenu Fluent */

.app {
    display: flex;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    background: var(--rgef-base);
}

.app-sidebar {
    width: var(--rgef-sidebar-width);
    flex-shrink: 0;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    background: var(--rgef-nav-bg);
    color: var(--rgef-nav-text);
    padding: var(--rgef-space-5) var(--rgef-space-3);
    display: flex;
    flex-direction: column;
    gap: var(--rgef-space-4);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.app-sidebar__brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
    padding: 0 var(--rgef-space-3) var(--rgef-space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.app-sidebar__brand strong {
    font-size: var(--rgef-font-size-lg);
    font-weight: 600;
    color: #fff;
}

.app-sidebar__brand span {
    font-size: var(--rgef-font-size-caption);
    color: var(--rgef-nav-text-muted);
}

.app-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 0 var(--rgef-space-1);
}

.app-nav__link {
    display: flex;
    align-items: center;
    gap: var(--rgef-space-3);
    width: 100%;
    min-height: 36px;
    flex-shrink: 0;
    padding: var(--rgef-space-2) var(--rgef-space-3);
    font-family: inherit;
    font-size: var(--rgef-font-size);
    font-weight: 400;
    text-align: left;
    color: var(--rgef-nav-text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--rgef-radius-sm);
    cursor: pointer;
    transition: background var(--rgef-duration) var(--rgef-ease),
        color var(--rgef-duration) var(--rgef-ease);
}

.app-nav__link .bi {
    font-size: 1rem;
    flex-shrink: 0;
    opacity: 0.9;
}

.app-nav__link:hover {
    background: var(--rgef-nav-active);
    color: var(--rgef-nav-text);
}

.app-nav__link.is-active {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--rgef-accent);
}

.app-sidebar__logout {
    flex-shrink: 0;
    margin-top: auto;
    color: var(--rgef-nav-text-muted);
    border-color: rgba(255, 255, 255, 0.18);
}

.app-sidebar__logout:hover:not(:disabled) {
    color: #fff;
    background: var(--rgef-nav-active);
    border-color: rgba(255, 255, 255, 0.2);
}

.app-main {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--rgef-base);
}

.app-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--rgef-space-4);
    min-height: 52px;
    padding: var(--rgef-space-3) var(--rgef-space-6);
    background: var(--rgef-header-bg);
    border-bottom: var(--rgef-border-strong-style);
    backdrop-filter: blur(24px) saturate(140%);
}

.app-header__title {
    margin: 0;
    font-size: var(--rgef-font-size-lg);
    font-weight: 600;
    color: var(--rgef-primary-strong);
    line-height: 1.3;
}

.app-header__subtitle {
    margin: 2px 0 0;
    font-size: var(--rgef-font-size-caption);
    color: var(--rgef-text-muted);
}

.app-header__user {
    font-weight: 600;
    font-size: var(--rgef-font-size-sm);
    color: var(--rgef-accent-text);
    padding: var(--rgef-space-1) var(--rgef-space-3);
    background: var(--rgef-accent-subtle);
    border-radius: var(--rgef-radius-sm);
}

.app-view {
    flex: 1;
    min-height: 0;
    padding: var(--rgef-space-6);
    overflow-x: hidden;
    overflow-y: auto;
}

.app-main--fullscreen .app-header {
    display: none;
}

.app-main--fullscreen .app-view {
    padding: var(--rgef-space-8) var(--rgef-space-6);
}

.app-main--centered .app-view {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.app-main--centered .app-view__inner {
    width: 100%;
    max-width: 420px;
}

@media (max-width: 768px) {
    html,
    body {
        overflow: auto;
    }

    .app {
        height: auto;
        max-height: none;
        min-height: 100vh;
        flex-direction: column;
        overflow: visible;
    }

    .app-sidebar {
        width: 100%;
        height: auto;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .app-main {
        overflow: visible;
    }

    .app-view {
        overflow: visible;
        padding: var(--rgef-space-4);
    }
}
