/**
 * Estilos compartilhados do Painel da Empresa e de sua página de login.
 * Padrão visual: clean, compacto e adequado a telas com muitos dados.
 */

:root {
    --navy: #052c57;
    --blue: #075d9d;
    --orange: #ff7900;
    --ink: #17324d;
    --muted: #708296;
    --soft: #f3f7fb;
    --line: #dce6ef;
    --white: #fff;
    --sidebar: 250px;
    --shadow: 0 12px 35px rgba(5, 44, 87, .08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--soft);
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

/* ==========================
   LOGIN DA EMPRESA
   ========================== */

.empresa-login-body {
    background: var(--soft);
}

.empresa-login {
    display: grid;
    grid-template-columns: minmax(340px, .9fr) minmax(480px, 1.1fr);
    min-height: 100vh;
}

.empresa-login-marca {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px clamp(34px, 5vw, 76px);
    background: var(--navy);
    color: #fff;
}

.empresa-login-marca::after {
    position: absolute;
    right: -190px;
    bottom: -190px;
    width: 450px;
    height: 450px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    box-shadow:
        0 0 0 75px rgba(255, 255, 255, .025),
        0 0 0 150px rgba(255, 255, 255, .018);
    content: "";
}

.empresa-login-logo {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    min-height: 92px;
    margin: -48px clamp(-76px, -5vw, -34px) 30px;
    padding: 17px clamp(34px, 5vw, 76px);
    background: #fff;
}

.empresa-login-logo img {
    display: block;
    width: 235px;
    max-width: 100%;
}

.empresa-login-mensagem {
    position: relative;
    z-index: 1;
    max-width: 480px;
}

.empresa-login-mensagem > span,
.empresa-login-etiqueta {
    display: block;
    margin-bottom: 13px;
    color: #ff9d3f;
    font-size: .69rem;
    font-weight: 700;
    letter-spacing: .16em;
}

.empresa-login-mensagem h1 {
    margin: 0 0 17px;
    font-size: clamp(2.15rem, 4vw, 3.7rem);
    font-weight: 500;
    letter-spacing: -.035em;
    line-height: 1.07;
}

.empresa-login-mensagem p {
    margin: 0;
    color: #bdd0e1;
    font-size: 1rem;
    line-height: 1.65;
}

.empresa-login-marca > small {
    position: relative;
    z-index: 1;
    color: #9db5c9;
    font-size: .76rem;
}

.empresa-login-acesso {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px clamp(28px, 8vw, 110px);
}

.empresa-login-card {
    width: 100%;
    max-width: 460px;
}

.empresa-login-voltar {
    display: inline-flex;
    gap: 7px;
    margin-bottom: 40px;
    color: var(--muted);
    font-size: .8rem;
    text-decoration: none;
}

.empresa-login-etiqueta {
    margin-bottom: 9px;
    color: var(--orange);
}

.empresa-login-card h2 {
    margin: 0 0 7px;
    color: var(--navy);
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: -.025em;
}

.empresa-login-card > p {
    margin: 0 0 27px;
    color: var(--muted);
    font-size: .87rem;
}

.empresa-login-alerta {
    margin-bottom: 17px;
    padding: 11px 13px;
    border: 1px solid #f1c9c6;
    border-radius: 8px;
    background: #fff3f2;
    color: #9d302a;
    font-size: .76rem;
}

.empresa-login-campo {
    display: block;
    margin-bottom: 16px;
}

.empresa-login-campo span {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
    font-size: .77rem;
    font-weight: 500;
}

.empresa-login-campo input {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    border: 1px solid #ccd9e4;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: .82rem;
    outline: none;
}

.empresa-login-campo input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(7, 93, 157, .09);
}

.empresa-login-botao {
    width: 100%;
    height: 46px;
    margin-top: 5px;
    border: 0;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    font: inherit;
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
}

.empresa-login-botao:hover {
    background: var(--blue);
}

.empresa-login-nota {
    margin-top: 18px;
    padding: 11px 13px;
    border: 1px solid #d5e3ed;
    border-radius: 8px;
    color: var(--muted);
    font-size: .7rem;
    line-height: 1.45;
}

/* ==========================
   ESTRUTURA DO PAINEL
   ========================== */

.empresa-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    width: var(--sidebar);
    padding: 28px 18px 22px;
    background: var(--navy);
    color: #fff;
}

.empresa-sidebar-brand {
    display: flex;
    align-items: center;
    min-height: 102px;
    margin: -28px -18px 24px;
    padding: 16px 15px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.empresa-sidebar-brand img {
    display: block;
    width: 218px;
    max-width: 100%;
}

.empresa-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.empresa-painel-nome {
    display: block;
    padding: 0 13px 11px;
    color: var(--orange);
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .14em;
}

.empresa-sidebar nav a,
.empresa-logout,
.empresa-nav-futuro {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border-radius: 8px;
    color: #c6d6e4;
    font-size: .82rem;
    font-weight: 400;
    text-decoration: none;
}

.empresa-sidebar nav a:hover,
.empresa-sidebar nav a.active {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.empresa-sidebar nav a.active {
    box-shadow: inset 3px 0 var(--orange);
}

.empresa-nav-secao {
    padding: 22px 13px 6px;
    color: #7596b2;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .13em;
}

.empresa-nav-futuro {
    color: #7596b2;
    cursor: default;
}

.empresa-logout {
    margin-top: auto;
}

.empresa-logout:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.empresa-main {
    margin-left: var(--sidebar);
    padding: 34px clamp(24px, 4vw, 58px) 60px;
}

/* ==========================
   GUIAS E CONSULTAS DOS CADASTROS
   ========================== */

.cadastro-guias {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
    background: #f8fbfd;
}

.cadastro-guia {
    flex: 0 0 auto;
    padding: 13px 12px 11px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: .72rem;
    cursor: pointer;
}

.cadastro-guia:hover {
    color: var(--blue);
}

.cadastro-guia.active {
    border-bottom-color: var(--orange);
    color: var(--navy);
}

.cadastro-painel[hidden] {
    display: none;
}

.campo-com-botao {
    display: flex;
    gap: 6px;
}

.campo-com-botao input {
    flex: 1;
    min-width: 0;
}

.btn-consultar-cadastro {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 92px;
    height: 37px;
    padding: 0 10px;
    border: 1px solid #c7d8e5;
    border-radius: 7px;
    background: #edf5fb;
    color: var(--blue);
    font: inherit;
    font-size: .67rem;
    cursor: pointer;
}

.btn-consultar-cadastro:hover {
    border-color: var(--blue);
}

.btn-consultar-cadastro:disabled {
    cursor: wait;
    opacity: .65;
}

.status-consulta-cadastro {
    min-height: 14px;
    margin-top: 4px;
    color: var(--muted);
    font-size: .63rem;
}

.status-consulta-cadastro.erro {
    color: #a83b35;
}

.status-consulta-cadastro.sucesso {
    color: #207a45;
}

.empresa-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 24px;
}

.empresa-topbar h1 {
    margin: 0 0 4px;
    color: var(--navy);
    font-size: 1.65rem;
    font-weight: 500;
    letter-spacing: -.025em;
}

.empresa-topbar p {
    margin: 0;
    color: var(--muted);
    font-size: .84rem;
}

.empresa-usuario {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.empresa-usuario > span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: #e7f1f8;
    color: var(--navy);
    font-weight: 600;
}

.empresa-usuario strong,
.empresa-usuario small {
    display: block;
}

.empresa-usuario strong {
    color: var(--navy);
    font-size: .78rem;
    font-weight: 600;
}

.empresa-usuario small {
    max-width: 170px;
    margin-top: 2px;
    overflow: hidden;
    color: var(--muted);
    font-size: .66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empresa-boas-vindas {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
    padding: 17px 19px;
    border: 1px solid #cfe0ec;
    border-radius: 12px;
    background: linear-gradient(110deg, #fff, #edf6fc);
}

.empresa-boas-vindas div > span {
    display: block;
    margin-bottom: 4px;
    color: var(--orange);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .13em;
}

.empresa-boas-vindas h2 {
    margin: 0 0 3px;
    color: var(--navy);
    font-size: 1.05rem;
    font-weight: 500;
}

.empresa-boas-vindas p {
    margin: 0;
    color: var(--muted);
    font-size: .72rem;
}

.empresa-status {
    padding: 5px 9px;
    border-radius: 999px;
    background: #e8f7ee;
    color: #207a45;
    font-size: .66rem;
    font-weight: 500;
}

.empresa-status.teste {
    background: #fff5d8;
    color: #956b00;
}

.empresa-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 18px;
}

.empresa-cards article {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 91px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.empresa-card-icone {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 10px;
}

.empresa-card-icone.azul {
    background: #e5f1fa;
    color: var(--blue);
}

.empresa-card-icone.verde {
    background: #e8f7ee;
    color: #207a45;
}

.empresa-card-icone.laranja {
    background: #fff0e1;
    color: #d96500;
}

.empresa-card-icone.cinza {
    background: #edf1f4;
    color: #66798c;
}

.empresa-cards h2 {
    margin: 0 0 2px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 500;
}

.empresa-cards strong {
    display: block;
    color: var(--navy);
    font-size: 1.28rem;
    font-weight: 500;
    line-height: 1.05;
}

.empresa-cards p {
    margin: 3px 0 0;
    color: #8a99a8;
    font-size: .65rem;
}

.empresa-conteudo-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    box-shadow: var(--shadow);
}

.empresa-conteudo-card > header {
    padding: 17px 19px 13px;
    border-bottom: 1px solid #edf2f5;
}

.empresa-conteudo-card h2 {
    margin: 0 0 3px;
    color: var(--navy);
    font-size: .92rem;
    font-weight: 500;
}

.empresa-conteudo-card header p {
    margin: 0;
    color: var(--muted);
    font-size: .7rem;
}

.empresa-tabela-responsiva {
    overflow-x: auto;
}

.empresa-conteudo-card table {
    width: 100%;
    border-collapse: collapse;
}

.empresa-conteudo-card th {
    padding: 10px 12px;
    border-bottom: 1px solid #e9eff4;
    color: #788a9b;
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.empresa-conteudo-card td {
    padding: 11px 12px;
    border-bottom: 1px solid #edf2f5;
    color: #53687c;
    font-size: .73rem;
    white-space: nowrap;
}

.empresa-conteudo-card td strong {
    color: var(--ink);
    font-weight: 500;
}

.empresa-badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: .63rem;
    font-weight: 500;
}

.status-ativo {
    background: #e8f7ee;
    color: #207a45;
}

.status-pendente {
    background: #fff5d8;
    color: #956b00;
}

.status-inativo {
    background: #eef2f5;
    color: #697a89;
}

.status-bloqueado {
    background: #fdebea;
    color: #ad382f;
}

.empresa-vazio {
    padding: 35px 15px !important;
    color: var(--muted) !important;
    text-align: center;
}

.empresa-mobile-bar,
.empresa-menu-overlay,
.empresa-menu-fechar {
    display: none;
}

.empresa-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 28px;
    padding: 22px 2px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .68rem;
}

/* Padroniza os botões de voltar e salvar de todos os cadastros do painel. */
.empresa-main .btn-voltar,
.empresa-main button[type="submit"][class*="btn-salvar"] {
    font-family: inherit;
    font-size: .72rem;
    font-weight: 400;
    line-height: 1;
}

.empresa-footer-identidade strong,
.empresa-footer-identidade span {
    display: block;
}

.empresa-footer-identidade strong {
    margin-bottom: 2px;
    color: var(--navy);
    font-size: .78rem;
    font-weight: 600;
}

.empresa-footer-identidade span {
    color: var(--muted);
    font-size: .6rem;
    letter-spacing: .04em;
}

.empresa-footer-desenvolvedor {
    text-align: right;
    line-height: 1.5;
}

.empresa-footer-desenvolvedor a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
}

.empresa-footer-desenvolvedor a:hover {
    color: var(--orange);
}

/* ==========================
   RESPONSIVIDADE
   ========================== */

@media (max-width: 1040px) {
    .empresa-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    body.empresa-menu-aberto {
        overflow: hidden;
    }

    .empresa-login {
        grid-template-columns: 1fr;
    }

    .empresa-login-marca {
        min-height: 270px;
        padding: 28px;
    }

    .empresa-login-logo {
        min-height: 78px;
        margin: -28px -28px 28px;
        padding: 13px 28px;
    }

    .empresa-login-logo img {
        width: 205px;
    }

    .empresa-login-mensagem h1 {
        font-size: 2rem;
    }

    .empresa-login-marca > small {
        display: none;
    }

    .empresa-login-acesso {
        padding: 38px 24px;
    }

    .empresa-mobile-bar {
        position: fixed;
        inset: 0 0 auto 0;
        z-index: 30;
        display: flex;
        align-items: center;
        gap: 13px;
        height: 64px;
        padding: 8px 15px;
        border-bottom: 1px solid var(--line);
        background: #fff;
        box-shadow: 0 3px 16px rgba(5, 44, 87, .07);
    }

    .empresa-mobile-bar img {
        display: block;
        width: 178px;
        max-width: calc(100% - 55px);
    }

    .empresa-menu-toggle {
        display: grid;
        place-items: center;
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        color: var(--navy);
        font-size: 1.25rem;
    }

    .empresa-menu-overlay {
        position: fixed;
        inset: 0;
        z-index: 35;
        width: 100%;
        height: 100%;
        border: 0;
        background: rgba(3, 25, 49, .48);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .empresa-sidebar {
        z-index: 40;
        width: min(84vw, 290px);
        height: 100vh;
        transform: translateX(-102%);
        box-shadow: 16px 0 40px rgba(2, 22, 43, .2);
        transition: transform .22s ease;
    }

    .empresa-menu-fechar {
        position: absolute;
        top: 14px;
        right: 12px;
        z-index: 2;
        place-items: center;
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 8px;
        background: #edf3f8;
        color: var(--navy);
    }

    .empresa-main {
        margin-top: 64px;
        margin-left: 0;
        padding: 25px 18px 45px;
    }

    .empresa-usuario {
        display: none;
    }

    .empresa-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .empresa-footer-desenvolvedor {
        text-align: left;
    }

    body.empresa-menu-aberto .empresa-sidebar {
        transform: translateX(0);
    }

    body.empresa-menu-aberto .empresa-menu-overlay {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    body.empresa-menu-aberto .empresa-menu-fechar {
        display: grid;
    }
}

@media (max-width: 520px) {
    .empresa-login-card h2 {
        font-size: 1.55rem;
    }

    .empresa-topbar h1 {
        font-size: 1.42rem;
    }

    .empresa-boas-vindas {
        align-items: flex-start;
        flex-direction: column;
    }

    .empresa-cards {
        grid-template-columns: 1fr;
    }
}
