﻿.app-layout {
    display: flex;
    min-height: 100vh;
    background: transparent;
    align-items: flex-start;
}

/* SIDEBAR IGUAL À DASHBOARD */
.sidebar {
    width: 250px;
    background: rgba(255,255,255,0.02);
    border-right: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 22px;
    height: fit-content !important;
    min-height: 0 !important;
    max-height: none !important;
    align-self: flex-start;
    border-radius: 0 0 24px 0;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    flex-shrink: 0;
}

/* TOPO SIDEBAR */
.sidebar-topo {
    margin-bottom: 26px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    font-size: 1.2rem;
    color: #fff;
}

.logo-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #22c55e, #38bdf8);
    color: #041017;
    font-size: 1.5rem;
    font-weight: 900;
    flex-shrink: 0;
}

.logo-textos-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .logo-textos-sidebar strong {
        color: #ffffff;
        font-size: 1.05rem;
        line-height: 1.1;
    }

    .logo-textos-sidebar span {
        color: var(--cor-texto-suave);
        font-size: 0.82rem;
        line-height: 1.1;
    }

/* MENU */
.menu,
.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-item,
.sidebar-sair,
.menu-footer a,
.sidebar-rodape a {
    min-height: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 14px;
    color: var(--cor-texto-suave);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    box-sizing: border-box;
    width: 100%;
}

    .menu-item:hover,
    .menu-item.ativo,
    .sidebar-sair:hover,
    .menu-footer a:hover,
    .sidebar-rodape a:hover,
    .sidebar-menu .ativo {
        background: rgba(255,255,255,0.05);
        color: #fff;
        border-color: rgba(255,255,255,0.06);
    }

    .menu-item.ativo,
    .sidebar-menu .ativo {
        box-shadow: 0 0 0 1px rgba(56,189,248,0.08);
    }

/* SAIR */
.menu-footer,
.sidebar-rodape {
    margin-top: 14px !important;
    padding-top: 6px;
}

    .menu-item.sair,
    .sidebar-sair,
    .menu-footer a,
    .sidebar-rodape a {
        color: #f87171;
    }

        .menu-item.sair:hover,
        .sidebar-sair:hover,
        .menu-footer a:hover,
        .sidebar-rodape a:hover {
            background: rgba(248,113,113,0.08);
            color: #fff;
        }

/* CONTEÚDO */
.conteudo-pagina {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    padding: 22px;
}

/* TOPO */
.topo-interno {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.tag-pagina {
    display: inline-block;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cor-primaria-clara);
    margin-bottom: 6px;
    font-weight: 800;
}

.topo-interno h1 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.03em;
}

.topo-acoes-interno {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.busca-box {
    flex: 1;
    min-width: 280px;
}

    .busca-box input {
        width: 100%;
        height: 50px;
        border-radius: 16px;
        border: 1px solid rgba(255,255,255,0.08);
        background: rgba(255,255,255,0.04);
        padding: 0 16px;
        color: #ffffff;
        outline: none;
        transition: all 0.25s ease;
        box-sizing: border-box;
    }

        .busca-box input::placeholder {
            color: rgba(255,255,255,0.42);
        }

        .busca-box input:focus {
            border-color: rgba(56,189,248,0.35);
            box-shadow: 0 0 0 4px rgba(56,189,248,0.08);
            background: rgba(255,255,255,0.05);
        }

/* BOTÕES */
.btn-novo-material,
.btn-filtrar,
.acoes-linha button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    box-sizing: border-box;
}

.btn-novo-material {
    min-width: 180px;
    height: 50px;
    border: none;
    color: #ffffff;
    background: linear-gradient(135deg, #22c55e, #38bdf8);
    box-shadow: 0 10px 30px rgba(34,197,94,0.18);
}

    .btn-novo-material:hover {
        transform: translateY(-1px);
        filter: brightness(1.03);
    }

/* RESUMOS */
.resumos-materiais {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.resumo-interno {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}

    .resumo-interno span {
        display: block;
        color: var(--cor-texto-suave);
        font-size: 0.84rem;
        margin-bottom: 8px;
    }

    .resumo-interno strong {
        display: block;
        font-size: 1.75rem;
        font-weight: 900;
        color: #ffffff;
        margin-bottom: 6px;
        letter-spacing: -0.03em;
    }

    .resumo-interno small {
        color: var(--cor-texto-suave);
        font-size: 0.82rem;
    }

/* FILTROS */
.filtros-materiais {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}

.filtro-grupo {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .filtro-grupo label {
        color: #eefaf4;
        font-size: 0.9rem;
        font-weight: 700;
    }

    .filtro-grupo select {
        width: 100%;
        height: 48px;
        border-radius: 16px;
        border: 1px solid rgba(255,255,255,0.08);
        background: rgba(255,255,255,0.04);
        padding: 0 14px;
        color: #ffffff;
        outline: none;
        appearance: none;
        transition: all 0.25s ease;
        box-sizing: border-box;
    }

        .filtro-grupo select:focus {
            border-color: rgba(56,189,248,0.35);
            box-shadow: 0 0 0 4px rgba(56,189,248,0.08);
            background: rgba(255,255,255,0.05);
        }

.filtro-acoes {
    display: flex;
    align-items: end;
}

.btn-filtrar {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    color: #ffffff;
}

    .btn-filtrar:hover {
        background: rgba(255,255,255,0.08);
        transform: translateY(-1px);
    }

/* LISTAGEM */
.painel-listagem {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}

.painel-listagem-topo {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

    .painel-listagem-topo h3 {
        color: #ffffff;
        font-size: 1.18rem;
        font-weight: 800;
        margin: 0;
    }

.contador-lista {
    color: var(--cor-texto-suave);
    font-size: 0.88rem;
    white-space: nowrap;
}

.tabela-materiais {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.linha-tabela {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr 180px;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.028);
    border: 1px solid rgba(255,255,255,0.05);
    color: #ffffff;
    transition: all 0.25s ease;
}

    .linha-tabela:hover {
        transform: translateY(-2px);
        background: rgba(255,255,255,0.04);
        border-color: rgba(255,255,255,0.08);
    }

    .linha-tabela.cabecalho {
        background: transparent;
        border: none;
        padding-top: 4px;
        padding-bottom: 4px;
        color: var(--cor-texto-suave);
        font-size: 0.84rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

        .linha-tabela.cabecalho:hover {
            transform: none;
        }

/* STATUS */
.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    width: fit-content;
}

    .status.disponivel {
        color: #b8ffd4;
        background: rgba(34,197,94,0.14);
    }

    .status.negociacao {
        color: #ffe89c;
        background: rgba(250,204,21,0.12);
    }

    .status.finalizado {
        color: #b9ecff;
        background: rgba(56,189,248,0.14);
    }

/* AÇÕES */
.acoes-linha {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

    .acoes-linha button {
        flex: 1;
        min-width: 0;
        height: 38px;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,0.08);
        background: rgba(255,255,255,0.04);
        color: #ffffff;
        font-weight: 700;
    }

        .acoes-linha button:hover {
            background: rgba(255,255,255,0.08);
            transform: translateY(-1px);
        }

/* RESPONSIVO */
@media (max-width: 1280px) {
    .resumos-materiais {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filtros-materiais {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .linha-tabela {
        grid-template-columns: 1.4fr 1fr 1fr 1fr;
    }

        .linha-tabela span:nth-child(5),
        .linha-tabela .acoes-linha,
        .linha-tabela.cabecalho span:nth-child(5),
        .linha-tabela.cabecalho span:nth-child(6) {
            grid-column: span 2;
        }
}

@media (max-width: 980px) {
    .sidebar {
        display: none;
    }

    .topo-interno {
        flex-direction: column;
    }

    .topo-acoes-interno {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .busca-box {
        min-width: 100%;
    }

        .busca-box input,
        .btn-novo-material {
            width: 100%;
        }
}

@media (max-width: 768px) {
    .resumos-materiais,
    .filtros-materiais {
        grid-template-columns: 1fr;
    }

    .painel-listagem {
        padding: 16px;
    }

    .linha-tabela,
    .linha-tabela.cabecalho {
        grid-template-columns: 1fr;
    }

        .linha-tabela.cabecalho {
            display: none;
        }

    .acoes-linha {
        width: 100%;
        flex-direction: column;
    }

        .acoes-linha button {
            width: 100%;
        }
}
