.alla-painel {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.alla-painel-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.alla-painel-content {
    flex: 1;
    padding: 1.25rem;
    width: 100%;
}

.alla-painel-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--alla-border);
    background: var(--alla-surface-elevated);
    position: sticky;
    top: 0;
    z-index: 20;
}

.alla-painel-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.alla-painel-topbar-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.alla-painel-topbar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
}

.alla-painel-topbar-icon .alla-sidebar-icon-svg {
    width: 22px;
    height: 22px;
}

.alla-painel-topbar h1 {
    margin: 0;
    font-size: 1.1rem;
}

.alla-painel-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alla-prontuario-search {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.alla-prontuario-search input {
    min-width: 180px;
}

@media (max-width: 900px) {
    .alla-painel {
        grid-template-columns: 1fr;
    }

    .alla-sidebar {
        display: none;
    }

    .alla-sidebar.is-open {
        display: flex;
        flex-direction: column;
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 50;
        width: min(280px, 85vw);
        height: 100vh;
        max-height: 100vh;
        overflow: hidden;
    }

    .alla-sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 40;
    }

    .alla-sidebar-backdrop.is-open {
        display: block;
    }
}
