﻿/* Container para logo e tÃ­tulo */
.header-container {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 16px 32px;
    margin: 24px auto 32px auto;
    width: fit-content;
    gap: 24px;
}

#logo-empresa {
    position: static;
    height: 56px;
    margin: 0;
    box-shadow: none;
    background: none;
    padding: 0;
}

.header-container h1 {
    margin: 0;
    font-size: 2.4rem;
    font-weight: 700;
    color: #222b3a;
}
/* Logotipo fixo no canto superior esquerdo */
#logo-empresa {
    position: fixed;
    top: 18px;
    left: 24px;
    height: 48px;
    z-index: 1000;
    border-radius: 8px;
    padding: 4px 8px;
}
/* Container comum para os dois blocos */
#faturamento-cards-container {
    display: flex;
    gap: 16px;
    margin: 30px auto 24px auto;
    max-width: 95vw;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    box-sizing: border-box;
}
#cards-container {
    display:flex;
    gap:16px;
    margin:0 auto 24px;
    max-width:97vw;
    width:100%;
    flex-wrap:nowrap;
    justify-content:center;
    align-items:stretch;
    box-sizing:border-box;
}


/* === CARDS DE PROCESSOS === */
.card, .info-card, .total-card {
    flex: 0 1 320px;
    min-width: 220px;
    max-width: 380px;
    width: 100%;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
    padding: 18px 20px;
    border: 1px solid #ececec;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    margin: 0;
}

/* === CARDS DE FATURAMENTO === */
.card-info {
    flex: 1 1 0;
    min-width: 260px;
    max-width: 500px;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 18px 24px;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    border: 1px solid #ececec;
    margin: 0;
}

/* Se precisar de tamanhos diferentes por tipo, use variaÃ§Ãµes controladas */
.card-grande {
    flex:0 1 420px;
    min-width:380px;
    max-width:480px;
}

/* Ajuste fino caso tenha tÃ­tulos ou conteÃºdos com tamanhos muito diferentes */
.card .titulo,
.faturamento-card .titulo {
    font-size:1.25rem;
    padding:16px 20px 12px;
    margin:3;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.card .conteudo,
.faturamento-card .conteudo {
    padding:0 20px 20px;
}
.card-info .card-title {
    font-size: 0.98em;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}
.card-info .card-value {
    font-size: 1.35em;
    font-weight: 700;
    color: #222b45;
}
/* ===== Cores de status ===== */
.status-dentro-prazo {
    background: #00c896 !important; /* Roxo creme */
    color: #fff;
}
.status-fora-prazo {
    background: #dc091e !important; /* Rosa choque */
    color: #fff;
}
.status-pendente-dentro-prazo {
    background: #e6e0f8 !important; /* Verde jade */
    color: #666;
}
.status-pendente-fora-prazo {
    background: #ff9100 !important; /* Laranja vibrante */
    color: #fff;
}

/* ===== Largura automÃ¡tica baseada no cabeÃ§alho ===== */
table {
    table-layout: auto;
}
/* ===== Estilo geral da pÃ¡gina ===== */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #fafbfc;
    margin: 0;
    padding: 0;
}
/* ===== TÃ­tulo principal ===== */
h1 {
    text-align: center;
    margin-top: 30px;
    color: #333;
}
/* ===== Container da tabela ===== */
/* Container da tabela com borda e sombra leve */
#table-container {
    max-width: 95vw;
    margin: 30px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 24px;
    border: 1px solid #ececec;
}
/* ===== Tabela ===== */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 16px;
    background: #fff;
    table-layout: fixed;
}
/* ===== CÃ©lulas da tabela (limite de 2 linhas) ===== */
th, td {
    border-bottom: 1px solid #ececec;
    padding: 14px 16px;
    text-align: left;
    height: 6em; /* Aproximadamente 3 linhas */
    line-height: 2em; /* Mais espaÃ§amento entre linhas */
    overflow: hidden;
    word-break: normal;
    white-space: normal;
    overflow-wrap: normal;
    font-size: 0.85em; /* Fonte menor para dados */
}
/* ===== CabeÃ§alho da tabela ===== */
th {
    background: #f6f7f9;
    color: #222b45;
    font-weight: 600;
    font-size: 1.05em;
    letter-spacing: 0.02em;
    border-bottom: 2px solid #ececec;
    white-space: nowrap;
    height: 2.8em;
    overflow: hidden;
}
/* ===== Linhas alternadas ===== */
tr:nth-child(even) {
    background: #fcfcfd;
}
/* ===== PaginaÃ§Ã£o (nÃ£o utilizada visualmente) ===== */
.pagination {
    text-align: center;
    margin-top: 10px;
    white-space: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
}
/* ===== BotÃµes de paginaÃ§Ã£o (nÃ£o exibidos) ===== */
.pagination span {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    margin: 0 2px;
    background: #e0e0e0;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}
/* ===== BotÃ£o de pÃ¡gina ativa (nÃ£o exibido) ===== */
.pagination .active {
    background: #1976d2;
    color: #fff;
}

/* ===== Container do grÃ¡fico de faturamento ===== */
#grafico-container {
    max-width: 95vw;
    margin: 30px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 24px;
    border: 1px solid #ececec;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 480px;
}

#graficoFaturamento {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    height: 420px !important;
    min-height: 420px !important;
    display: block;
}


#rodape-controles {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    background: rgba(255,255,255,0.94);
    border: 1px solid #dfe3ea;
    border-radius: 12px;
    padding: 8px 10px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

#rodape-controles button {
    border: 1px solid #c7d0de;
    background: #ffffff;
    color: #1f2a37;
    border-radius: 8px;
    min-width: 40px;
    height: 36px;
    padding: 0 10px;
    font-weight: 600;
    cursor: pointer;
}

#rodape-controles button:hover {
    background: #f4f7fb;
}

body {
    padding-bottom: 78px;
}

html {
    zoom: 0.9;
}

@supports not (zoom: 1) {
    body {
        transform: scale(0.9);
        transform-origin: top left;
        width: 111.1111%;
    }
}

#metas-form-container,
#metas-table-container {
    max-width: 95vw;
    margin: 30px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 24px;
    border: 1px solid #ececec;
}

#form-meta {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto auto;
    gap: 12px;
    align-items: end;
}

.campo-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.campo-meta label {
    font-size: 0.92rem;
    color: #495466;
    font-weight: 600;
}

.campo-meta select,
.campo-meta input {
    height: 38px;
    border: 1px solid #c7d0de;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 0.95rem;
    box-sizing: border-box;
    background: #fff;
}

#btn-salvar-meta {
    border: 1px solid #a8b6cc;
    background: #eef3fb;
    color: #1f2a37;
    border-radius: 8px;
    height: 38px;
    padding: 0 14px;
    font-weight: 700;
    cursor: pointer;
}

#btn-salvar-meta:hover {
    background: #e4ecf9;
}

#btn-cancelar-meta {
    border: 1px solid #d5dbe7;
    background: #ffffff;
    color: #1f2a37;
    border-radius: 8px;
    height: 38px;
    padding: 0 14px;
    font-weight: 700;
    cursor: pointer;
}

#btn-cancelar-meta:hover {
    background: #f5f7fb;
}

#metas-status {
    margin-top: 12px;
    min-height: 20px;
    font-size: 0.92rem;
}

#metas-status.status-ok {
    color: #137333;
}

#metas-status.status-erro {
    color: #b42318;
}

.meta-acoes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.meta-acoes button {
    border: 1px solid #c7d0de;
    background: #ffffff;
    color: #1f2a37;
    border-radius: 8px;
    min-width: 72px;
    height: 32px;
    padding: 0 10px;
    font-weight: 600;
    cursor: pointer;
}

.meta-acoes button:hover {
    background: #f4f7fb;
}

.meta-grupo-row td {
    background: #f8fafc;
    font-weight: 600;
}

.meta-grupo-cliente {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-meta-toggle {
    border: 1px solid #c7d0de;
    background: #ffffff;
    color: #1f2a37;
    border-radius: 8px;
    min-width: 28px;
    width: 28px;
    height: 28px;
    padding: 0;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.btn-meta-toggle:hover {
    background: #f4f7fb;
}

.meta-detalhe-row td:first-child {
    padding-left: 24px;
}

@media (max-width: 960px) {
    #form-meta {
        grid-template-columns: 1fr;
    }

    #btn-salvar-meta,
    #btn-cancelar-meta {
        width: 100%;
    }
}

/* Centraliza o texto nas celulas da coluna Status */
td.status-dentro-prazo,
td.status-fora-prazo,
td.status-pendente-dentro-prazo,
td.status-pendente-fora-prazo {
    text-align: center;
    vertical-align: middle;
}

/* Centraliza o cabecalho da coluna Status */
th.status-header {
    text-align: center;
}

