/* Base partilhada — fragmentos de módulos administrativos (e-comerce SYSADMIN-TI) */



:root {

    --py-modulo-raio: 16px;

    --py-modulo-transicao: 0.22s cubic-bezier(0.4, 0, 0.2, 1);

    --py-modulo-sombra-leve: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(175, 134, 30, 0.08);

}



/* Cabeçalho de módulo — cartão leve com acento lateral */

#content .page-header--modulo,

.page-header--modulo {

    position: relative;

    margin-bottom: 1.35rem;

    padding: 1.15rem 1.35rem 1.2rem 1.45rem;

    border-radius: var(--py-modulo-raio);

    border: 1px solid rgba(226, 232, 240, 0.9);

    background: linear-gradient(

        128deg,

        rgba(255, 255, 255, 0.97) 0%,

        rgba(248, 250, 252, 0.92) 55%,

        rgba(255, 248, 231, 0.75) 100%

    );

    box-shadow: var(--py-modulo-sombra-leve);

    overflow: hidden;

    transition: box-shadow var(--py-modulo-transicao), border-color var(--py-modulo-transicao);

}



#content .page-header--modulo::before,

.page-header--modulo::before {

    content: '';

    position: absolute;

    left: 0;

    top: 0;

    bottom: 0;

    width: 4px;

    background: linear-gradient(180deg, #d4a843 0%, #8f6f18 100%);

    border-radius: 4px 0 0 4px;

    opacity: 0.95;

}



#content .page-header--modulo::after,

.page-header--modulo::after {

    content: '';

    position: absolute;

    top: -40%;

    right: -8%;

    width: min(220px, 42vw);

    height: min(160px, 32vw);

    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);

    pointer-events: none;

}



.page-header--modulo .page-header-text,

.page-header--modulo > div:first-child {

    flex: 1;

    min-width: 0;

    position: relative;

    z-index: 1;

}



.page-header--modulo h1 {

    margin: 0 0 0.4rem;

    font-size: clamp(1.22rem, 2.1vw, 1.52rem);

    font-weight: 700;

    letter-spacing: -0.02em;

    display: flex;

    align-items: center;

    gap: 0.65rem;

    line-height: 1.25;

    color: var(--py-consola-texto, #0f172a);

}



.page-header--modulo h1 i {

    flex-shrink: 0;

    width: 2.35rem;

    height: 2.35rem;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    border-radius: 12px;

    font-size: 1rem;

    color: var(--py-consola-azul, #af861e);

    background: linear-gradient(145deg, rgba(212, 168, 67, 0.2), rgba(143, 111, 24, 0.1));

    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);

}



.page-header--modulo p {

    margin: 0;

    max-width: 44rem;

    color: var(--py-texto-suave, #64748b);

    font-size: 0.93rem;

    line-height: 1.55;

    font-weight: 400;

}



.py-modulo-corpo {

    min-height: 280px;

    animation: pyModuloCorpoEntrada 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;

    animation-delay: 0.05s;

}



@keyframes pyModuloCorpoEntrada {

    from {

        opacity: 0;

        transform: translateY(8px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}



.py-modulo-corpo .py-filtros,

.py-modulo-corpo .py-tabela-envolvente {

    margin-top: 0;

}



.py-pagina-admin {

    margin-top: 0;

}



/* Blocos informativos legados (equipamentos, etc.) */

#content .filters-section,

.filters-section {

    margin-bottom: 1.25rem;

    padding: 1.1rem 1.25rem;

    border-radius: var(--py-modulo-raio);

    border: 1px solid rgba(226, 232, 240, 0.9);

    background: rgba(255, 255, 255, 0.92);

    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);

    font-size: 0.92rem;

    line-height: 1.55;

    color: #475569;

    transition: border-color var(--py-modulo-transicao), box-shadow var(--py-modulo-transicao);

}



#content .filters-section:hover,

.filters-section:hover {

    border-color: rgba(148, 163, 184, 0.45);

    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);

}



/* Estado vazio / carregamento genérico */

.py-modulo-corpo:empty::before {

    content: '';

    display: block;

    min-height: 220px;

    border-radius: 12px;

    background: linear-gradient(

        90deg,

        rgba(241, 245, 249, 0.9) 0%,

        rgba(226, 232, 240, 0.75) 45%,

        rgba(241, 245, 249, 0.9) 90%

    );

    background-size: 200% 100%;

    animation: pyModuloSkeleton 1.35s ease-in-out infinite;

}



@keyframes pyModuloSkeleton {

    0% {

        background-position: 100% 0;

    }

    100% {

        background-position: -100% 0;

    }

}



.py-estado-vazio {

    text-align: center;

    padding: 2.75rem 1.5rem;

    color: #64748b;

}



.py-estado-vazio i {

    font-size: 2.15rem;

    color: #94a3b8;

    margin-bottom: 0.85rem;

    opacity: 0.85;

}



.py-estado-vazio h2 {

    font-size: 1.08rem;

    font-weight: 600;

    color: #334155;

    margin: 0 0 0.5rem;

    letter-spacing: -0.01em;

}



.py-estado-vazio p {

    margin: 0 auto;

    max-width: 28rem;

    font-size: 0.9rem;

    line-height: 1.55;

}



body[data-theme="dark"] #content .page-header--modulo,

body[data-theme="dark"] .page-header--modulo {

    background: linear-gradient(

        128deg,

        rgba(30, 41, 59, 0.95) 0%,

        rgba(15, 23, 42, 0.88) 100%

    );

    border-color: rgba(255, 255, 255, 0.08);

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);

}



body[data-theme="dark"] .page-header--modulo h1 {

    color: #f1f5f9;

}



body[data-theme="dark"] .page-header--modulo h1 i {

    background: linear-gradient(145deg, rgba(212, 168, 67, 0.25), rgba(143, 111, 24, 0.14));

    color: #fcd34d;

}



body[data-theme="dark"] .page-header--modulo p {

    color: #94a3b8;

}



body[data-theme="dark"] #content .filters-section,

body[data-theme="dark"] .filters-section {

    background: rgba(30, 41, 59, 0.75);

    border-color: rgba(255, 255, 255, 0.08);

    color: #cbd5e1;

}



@media (prefers-reduced-motion: reduce) {

    .py-modulo-corpo {

        animation: none;

    }

    .py-modulo-corpo:empty::before {

        animation: none;

    }

}


