* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f4f7fb;
    color: #243447;
    font-family: Arial, Helvetica, sans-serif;
}

.container {
    width: 94%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 0 50px;
}

.inicio {
    max-width: 650px;
    padding-top: 10vh;
}

.card {
    background: #fff;
    border: 1px solid #e1e7ef;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 22px;
    box-shadow: 0 3px 12px rgba(30, 55, 90, .06);
}

h1 {
    margin: 0 0 6px;
    color: #164b8a;
}

h2 {
    margin: 0 0 18px;
    color: #214b78;
    font-size: 21px;
}

p {
    color: #607080;
}

.topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.link-topo {
    text-decoration: none;
    color: #fff;
    background: #164b8a;
    padding: 11px 16px;
    border-radius: 8px;
    white-space: nowrap;
}

.botoes {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.botao {
    border: 0;
    background: #1769aa;
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 15px;
}

.botao:hover,
.link-topo:hover {
    opacity: .9;
}

.botao.secundario {
    background: #52677d;
}

.botao.excluir {
    background: #c0392b;
    padding: 9px 13px;
}

.formulario {
    display: flex;
    gap: 10px;
}

.formulario input {
    flex: 1;
}

input {
    border: 1px solid #cbd5df;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    outline: none;
}

input:focus {
    border-color: #1769aa;
}

.alerta {
    padding: 13px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
}

.alerta.sucesso {
    background: #e8f7ee;
    color: #176b3a;
}

.alerta.erro {
    background: #fdeceb;
    color: #9b2c2c;
}

.contador {
    display: inline-flex;
    min-width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #e7eef7;
    color: #164b8a;
    font-weight: bold;
    padding: 0 9px;
}

.contador.destaque {
    background: #dff3e7;
    color: #16733d;
}

.titulo-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grid-nomes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
}

.nome-card {
    border: 1px solid #cbdbea;
    background: #f8fbff;
    border-radius: 10px;
    padding: 18px 14px;
    color: #174d82;
    font-weight: bold;
    font-size: 16px;
    min-height: 64px;
    cursor: pointer;
    transition: .15s;
}

.nome-card:hover {
    background: #e8f3ff;
    border-color: #76a8d6;
    transform: translateY(-1px);
}

.grid-dentro {
    display: grid;
    gap: 10px;
}

.pessoa-dentro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 14px 16px;
    border: 1px solid #dce8df;
    border-radius: 9px;
    background: #f8fcf9;
}

.pessoa-dentro strong {
    display: block;
    color: #24573a;
}

.pessoa-dentro small {
    display: block;
    margin-top: 4px;
    color: #718176;
}

.status-dentro {
    background: #dff3e7;
    color: #16733d;
    font-size: 12px;
    font-weight: bold;
    border-radius: 15px;
    padding: 7px 10px;
}

.lista-admin {
    display: grid;
    gap: 9px;
}

.linha-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #edf0f3;
    padding: 10px 0;
}

.vazio {
    margin: 0;
    text-align: center;
    padding: 20px;
    color: #7a8794;
}

@media (max-width: 650px) {
    .container {
        width: 92%;
        padding-top: 18px;
    }

    .topo {
        align-items: flex-start;
        flex-direction: column;
    }

    .link-topo {
        width: 100%;
        text-align: center;
    }

    .formulario {
        flex-direction: column;
    }

    .formulario .botao {
        width: 100%;
    }

    .botoes {
        flex-direction: column;
    }

    .botoes .botao {
        text-align: center;
    }

    .grid-nomes {
        grid-template-columns: 1fr;
    }

    .pessoa-dentro {
        align-items: flex-start;
        flex-direction: column;
    }
}

.login-card {
    max-width: 480px;
    margin: 0 auto;
}

.login-form {
    display: grid;
    gap: 9px;
}

.login-form label {
    font-weight: bold;
    color: #405568;
    margin-top: 8px;
}

.login-form select {
    border: 1px solid #cbd5df;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    background: #fff;
}

.acoes-topo {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.acoes-topo > span {
    color: #607080;
    font-size: 14px;
}

.link-topo.sair {
    background: #b83232;
}

.formulario-colunas {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.formulario-colunas .checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #405568;
}

.grid-vendas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.produto-venda {
    border: 1px solid #dce5ef;
    border-radius: 10px;
    padding: 16px;
    background: #fbfdff;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
}

.produto-venda h2 {
    font-size: 18px;
    margin-bottom: 7px;
}

.produto-venda small {
    display: block;
    margin-top: 7px;
    color: #657586;
}

.produto-venda input[type="number"] {
    width: 75px;
}

.interno {
    margin-top: 20px;
    background: #f7f9fc;
}

.botao-grande {
    width: 100%;
    font-size: 18px;
    padding: 15px;
}

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

.tabela {
    width: 100%;
    border-collapse: collapse;
}

.tabela th,
.tabela td {
    padding: 11px 10px;
    border-bottom: 1px solid #e5ebf1;
    text-align: left;
    white-space: nowrap;
}

.tabela th {
    color: #34546f;
    background: #f6f9fc;
}

.status-pendente {
    background: #fff0cf;
    color: #8a5a00;
    font-size: 12px;
    font-weight: bold;
    border-radius: 15px;
    padding: 7px 10px;
}

.linha-admin small {
    display: block;
    margin-top: 4px;
    color: #71808e;
}

@media (max-width: 700px) {
    .formulario-colunas {
        grid-template-columns: 1fr;
    }

    .grid-vendas {
        grid-template-columns: 1fr;
    }

    .produto-venda {
        align-items: flex-start;
    }
}


.link-compra {
    display: block;
    margin-top: 12px;
    text-align: center;
    color: #1769aa;
    text-decoration: none;
    font-weight: bold;
}

.link-compra:hover {
    text-decoration: underline;
}

.acoes-linha {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}


/* ============================================================
   FORMULÁRIOS ADMINISTRATIVOS - V2.0.9
   ============================================================ */

.cadastro-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.campo {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.campo.full {
    grid-column: 1 / -1;
}

.campo label,
.rotulo-campo {
    color: #34546f;
    font-weight: bold;
    font-size: 14px;
}

.campo input,
.campo select,
.campo textarea {
    width: 100%;
    border: 1px solid #cbd5df;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    background: #fff;
    color: #243447;
}

.campo textarea {
    min-height: 92px;
    resize: vertical;
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
    border-color: #1769aa;
    outline: none;
}

.help-text {
    margin: 0;
    color: #71808e;
    font-size: 13px;
    line-height: 1.4;
}

.opcoes-card {
    grid-column: 1 / -1;
    border: 1px solid #dce5ef;
    border-radius: 10px;
    background: #f8fbff;
    padding: 16px;
}

.opcoes-card h3 {
    margin: 0 0 12px;
    color: #214b78;
    font-size: 16px;
}

.opcoes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
}

.opcao-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #405568;
    line-height: 1.35;
}

.opcao-check input {
    width: auto;
    margin-top: 2px;
    flex: 0 0 auto;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 4px;
}

.acoes-linha {
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.botao.editar {
    background: #d98200;
}

.botao.cancelar {
    background: #7b8794;
}

.badge-admin {
    display: inline-block;
    background: #ffe8c2;
    color: #7b4900;
    border-radius: 12px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: bold;
}

.badge-inativo {
    display: inline-block;
    background: #eceff3;
    color: #5d6975;
    border-radius: 12px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: bold;
}

.aviso-edicao {
    background: #fff8e7;
    border: 1px solid #f0d58d;
    color: #705414;
    border-radius: 8px;
    padding: 11px 13px;
    margin-bottom: 16px;
}

@media (max-width: 760px) {
    .cadastro-grid,
    .opcoes-grid {
        grid-template-columns: 1fr;
    }

    .campo.full,
    .opcoes-card,
    .form-actions {
        grid-column: auto;
    }

    .acoes-linha {
        justify-content: flex-start;
    }

    .form-actions .botao {
        width: 100%;
        text-align: center;
    }
}


/* ============================================================
   IDENTIDADE VISUAL COME KI CHAMA - V2.0.10
   Tema institucional: preto, dourado e tons neutros.
   Mantemos verde/vermelho apenas para mensagens de status,
   aprovação, erro e segurança operacional.
   ============================================================ */

:root {
    --ck-preto: #111111;
    --ck-preto-suave: #1d1d1b;
    --ck-dourado: #c6a15b;
    --ck-dourado-claro: #e2c781;
    --ck-dourado-escuro: #9d7838;
    --ck-fundo: #f6f4ef;
    --ck-papel: #ffffff;
    --ck-texto: #262522;
    --ck-muted: #777164;
    --ck-linha: #ded7c9;
    --ck-soft: #f1ede4;
}

/* Estrutura geral */
body {
    background: var(--ck-fundo);
    color: var(--ck-texto);
}

.card {
    background: var(--ck-papel);
    border-color: var(--ck-linha);
    box-shadow: 0 5px 18px rgba(17, 17, 17, .06);
}

h1 {
    color: var(--ck-preto);
}

h2,
h3 {
    color: var(--ck-preto-suave);
}

p,
.acoes-topo > span {
    color: var(--ck-muted);
}

/* Links e ações principais */
.link-topo,
.botao {
    background: var(--ck-preto);
    color: #fff;
    border: 1px solid var(--ck-preto);
    transition:
        background .15s ease,
        color .15s ease,
        border-color .15s ease,
        transform .15s ease;
}

.link-topo:hover,
.botao:hover {
    background: var(--ck-dourado);
    border-color: var(--ck-dourado);
    color: var(--ck-preto);
    opacity: 1;
}

.botao:active,
.link-topo:active {
    transform: translateY(1px);
}

.botao.secundario,
.botao.cancelar {
    background: #6d685f;
    border-color: #6d685f;
    color: #fff;
}

.botao.editar {
    background: var(--ck-dourado);
    border-color: var(--ck-dourado);
    color: var(--ck-preto);
    font-weight: bold;
}

.botao.editar:hover {
    background: var(--ck-dourado-claro);
    border-color: var(--ck-dourado-claro);
}

.link-topo.sair,
.botao.excluir {
    background: #9f2f2f;
    border-color: #9f2f2f;
    color: #fff;
}

/* Links de compra e navegação textual */
.link-compra {
    color: var(--ck-dourado-escuro);
}

.link-compra:hover {
    color: var(--ck-preto);
}

/* Campos */
input,
select,
textarea,
.login-form select,
.campo input,
.campo select,
.campo textarea {
    background: #fff;
    color: var(--ck-texto);
    border-color: #cfc6b6;
}

input:focus,
select:focus,
textarea:focus,
.campo input:focus,
.campo select:focus,
.campo textarea:focus {
    border-color: var(--ck-dourado);
    box-shadow: 0 0 0 3px rgba(198, 161, 91, .14);
    outline: none;
}

.login-form label,
.campo label,
.rotulo-campo,
.formulario-colunas .checkbox,
.opcao-check {
    color: #4c483f;
}

/* Contadores e elementos de destaque */
.contador {
    background: var(--ck-soft);
    color: var(--ck-preto);
    border: 1px solid #e1d8c8;
}

.titulo-grid h2 {
    color: var(--ck-preto);
}

/* Pessoas disponíveis */
.nome-card {
    border-color: #d8cfbf;
    background: #fffdf8;
    color: var(--ck-preto);
}

.nome-card:hover {
    background: #f5eddd;
    border-color: var(--ck-dourado);
}

/* Produtos / venda */
.produto-venda {
    border-color: var(--ck-linha);
    background: #fffdf8;
}

.produto-venda small,
.linha-admin small,
.help-text,
.vazio {
    color: var(--ck-muted);
}

.interno {
    background: #f7f4ed;
}

/* Tabelas */
.tabela th,
.tabela td {
    border-bottom-color: #e6dfd2;
}

.tabela th {
    color: var(--ck-preto);
    background: #f1ede4;
}

.tabela tbody tr:hover {
    background: #fffaf0;
}

/* Administração / opções */
.opcoes-card {
    border-color: #ddd3c2;
    background: #faf7f0;
}

.opcoes-card h3 {
    color: var(--ck-preto);
}

.aviso-edicao {
    background: #fff8e8;
    border-color: #ddc47f;
    color: #6d531e;
}

.badge-admin {
    background: #f0dfb6;
    color: #5f4616;
}

.badge-inativo {
    background: #ece9e2;
    color: #625f59;
}

/* Separadores */
.linha-admin {
    border-bottom-color: #e8e1d5;
}

/* Mantemos cores semânticas para operação e segurança */
.alerta.sucesso {
    background: #e9f5ec;
    color: #22603a;
    border: 1px solid #cfe7d6;
}

.alerta.erro {
    background: #faecea;
    color: #922f2b;
    border: 1px solid #edcfcc;
}

.status-dentro,
.contador.destaque {
    background: #e5f3e8;
    color: #20623a;
}

.status-pendente {
    background: #fff0c7;
    color: #74520a;
}

/* Login: pequeno detalhe dourado institucional */
.login-card {
    border-top: 4px solid var(--ck-dourado);
}

/* Barra superior e cards com detalhe discreto */
.topo h1::after {
    content: "";
    display: block;
    width: 54px;
    height: 3px;
    margin-top: 8px;
    border-radius: 3px;
    background: var(--ck-dourado);
}

/* Checkbox / radio acompanham a identidade visual */
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--ck-dourado-escuro);
}

/* Botão grande ganha mais presença */
.botao-grande {
    font-weight: bold;
}

/* Responsividade continua a mesma; apenas reforça contraste móvel */
@media (max-width: 650px) {
    .link-topo {
        background: var(--ck-preto);
    }
}
