* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: #f5f5f5;
    font-family: Arial, sans-serif;
    color: #333;
}
header {
    min-height: 80px;
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 10px 5%;
    background-color: #364326;
}

.logo-link {
    display: flex;
    align-items: center;
}

header img {
    width: 230px;
    height: auto;
}

.barra-pesquisa {
    flex: 1;
    display: flex;
    max-width: 700px;
}

.barra-pesquisa input {
    flex: 1;
    padding: 13px;
    border: none;
    font-size: 16px;
}

.barra-pesquisa button {
    padding: 13px 25px;
    border: none;
    cursor: pointer;
}

.area-usuario {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.area-usuario a {
    color: white;
    text-decoration: none;
}

.area-usuario button {
    border: none;
    background: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

.categorias {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 15px;
    background-color: white;
    border-bottom: 1px solid #ddd;
}

.categorias a {
    color: #333;
    text-decoration: none;
}

main {
    width: 90%;
    max-width: 1300px;
    margin: 30px auto;
}

main h1 {
    font-size: 24px;
}

.grade-produtos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.card-produto {
    background-color: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.card-produto:hover {
    transform: translateY(-3px);
}

.imagem-produto img {
    width: 100%;
    height: 220px;
    object-fit: contain;
}

.informacoes-produto {
    padding: 15px;
}

.informacoes-produto h2 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: normal;
}

.preco {
    font-size: 22px;
    font-weight: bold;
    margin: 10px 0;
}

.loja {
    font-weight: bold;
}

footer {
    margin-top: 50px;
    padding: 30px;
    text-align: center;
    background-color: white;
    border-top: 1px solid #ddd;
}

footer a {
    color: #364326;
}

#mensagem {
    text-align: center;
    margin: 30px;
}

.produto-detalhes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
}

.produto-imagem-grande {
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eee;
    border-radius: 8px;
    overflow: hidden;
}

.produto-imagem-grande img {
    width: 100%;
    height: 450px;
    object-fit: contain;}

.produto-informacoes h1 {
    font-size: 32px;
    margin: 10px 0;
}

.preco-detalhe {
    font-size: 32px;
    font-weight: bold;
}

.categoria {
    color: #777;
}

.informacoes-loja {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.botao-whatsapp {
    display: inline-block;
    padding: 14px 20px;
    background-color: #25d366;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
}

.fazer-oferta {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.fazer-oferta h3 {
    margin-bottom: 10px;
}

.fazer-oferta input {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.fazer-oferta button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.mensagem-oferta {
    margin-top: 10px;
}

.pagina-cadastro {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.formulario-produto {
    width: 100%;
    max-width: 700px;
    background: white;
    padding: 30px;
    border-radius: 8px;
}

.formulario-produto h1 {
    margin-top: 0;
    margin-bottom: 30px;
}

.formulario-produto label {
    display: block;
    margin-top: 18px;
    margin-bottom: 6px;
    font-weight: bold;
}

.formulario-produto input,
.formulario-produto select,
.formulario-produto textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.formulario-produto textarea {
    resize: vertical;
}

.formulario-produto button {
    width: 100%;
    margin-top: 25px;
    padding: 14px;
    border: none;
    border-radius: 5px;
    background-color: #364326;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.formulario {
    width: 100%;
    max-width: 480px;
    margin: 40px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-sizing: border-box;
}

.formulario h1 {
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
}

.formulario label {
    display: block;
    margin-top: 18px;
    margin-bottom: 6px;
    font-weight: bold;
}

.formulario input,
.formulario select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.formulario button {
    width: 100%;
    margin-top: 25px;
    padding: 14px;
    border: none;
    border-radius: 5px;
    background-color: #364326;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.link-voltar {
    margin-top: 18px;
    text-align: center;
}

.dica-senha {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

.mensagem-dev {
    margin-top: 12px;
    padding: 10px;
    background: #fff8e1;
    border: 1px solid #f0e0a0;
    border-radius: 5px;
    font-size: 13px;
    word-break: break-all;
}

#mensagem {
    text-align: center;
    margin-top: 15px;
}

#preview-imagens {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.preview-imagem {
    width: 120px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.imagem-produto {
    position: relative;
    overflow: hidden;
}

.imagem-produto img {
    width: 100%;
    height: 220px;
    object-fit: fill;
}

.seta-esquerda,
.seta-direita {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 25px;
    cursor: pointer;
}

.seta-esquerda {
    left: 8px;
}

.seta-direita {
    right: 8px;
}
.produto-imagem-area {
    width: 100%;
}

.produto-imagem-grande {
    position: relative;
    width: 100%;
    height: 600px;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.produto-imagem-grande img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.seta-produto {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 32px;
    cursor: pointer;
}

.seta-produto.esquerda {
    left: 15px;
}

.seta-produto.direita {
    right: 15px;
}

.miniaturas-produto {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.miniatura-produto {
    width: 80px;
    height: 70px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
}

.miniatura-produto.ativa {
    border-color: #364326;
}

.menu-interno {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 35px;
    padding: 0 20px;
    box-sizing: border-box;
    background-color: white;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.menu-interno a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 5px;
    color: #333;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    transition: 0.2s;
}

.menu-interno a:hover {
    color: #e67e22;
}

.menu-interno a.ativo {
    border-bottom: 3px solid #364326;
}

#usuario-header {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

#usuario-header button {
    border: none;
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 5px;
}

.logo {
    text-decoration: none;
}

.categorias {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
}

.categorias a,
.botao-categorias {
    text-decoration: none;
    color: #333;
    font-weight: 700;
}

.botao-categorias {
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    color: #333;
    font-weight: 300;
}

.dropdown-categorias {
    position: relative;
}

.botao-categorias {
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    color: #333;
    font-weight: 700;
}

.lista-categorias {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 550px;
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 5px;
    row-gap: 2px;
    font-weight: 300;
}

.lista-categorias a {
    display: block;
    padding: 8px 10px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}

.lista-categorias a:hover {
    background-color: #f2f2f2;
}

.dropdown-categorias:hover .lista-categorias {
    display: grid;
}

.lista-categorias .item-categoria {
    display: block;      /* Fundamental: força quebra de linha */
    width: 100%;         /* Ocupa a largura total da coluna */
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    break-inside: avoid; /* Evita que o item seja cortado entre colunas */
}

.lista-categorias .item-categoria:hover {
    background-color: #f9f9f9;
    color: #007bff;
    cursor: pointer;
}

.lista-categorias-itens {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px 15px;
}

.item-categoria {
    display: block;
    padding: 6px 5px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    border-radius: 4px;
    white-space: nowrap;
}

.item-categoria:hover {
    background: #f2f2f2;
}

.pesquisa-categorias {
    width: 100%;
    margin-bottom: 12px;
}

.pesquisa-categorias input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    outline: none;
}

.botao-comprar,
.botao-vender {
    padding: 8px 15px;
    border-radius: 5px;
}

.botao-comprar {
    background: #25D366;
    color: white !important;
}

.botao-vender {
    background: #e67e22;
    color: white !important;
}

.pagina-venda-loja {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.formulario-venda-loja {
    width: 100%;
    max-width: 700px;
    background: white;
    padding: 30px;
    border-radius: 8px;
}

.formulario-venda-loja h1 {
    margin-top: 0;
}

.formulario-venda-loja label {
    display: block;
    margin-top: 18px;
    margin-bottom: 6px;
    font-weight: bold;
}

.formulario-venda-loja input,
.formulario-venda-loja textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.formulario-venda-loja textarea {
    resize: vertical;
}

.formulario-venda-loja button {
    width: 100%;
    margin-top: 25px;
    padding: 14px;
    border: none;
    border-radius: 5px;
    background: #25D366;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

#preview-venda-loja {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.preview-venda-loja {
    width: 120px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.pagina-painel {
    width: calc(100% - 40px);
    max-width: 1600px;
    margin: 0 auto;
    padding: 30px 20px;
    box-sizing: border-box;
}

.cabecalho-pagina {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.cabecalho-pagina .botao-principal {
    font-size: 12px;
    padding: 7px 10px;
}

.filtros-produtos-loja {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
}

.filtros-produtos-loja input {
    grid-column: 1 / -1;
    width: 100%;
    box-sizing: border-box;
}

.filtros-produtos-loja select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.botao-principal {
    display: inline-block;
    padding: 11px 18px;
    border-radius: 6px;
    background: #364326;
    color: white;
    text-decoration: none;
    font-weight: 700;
}
.cabecalho-pagina .botao-principal {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.filtros-produtos-loja,
.filtros-vendas {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    margin-bottom: 25px;
    padding: 18px;
    background: #f5f5f5;
    border-radius: 8px;
}

.filtros-produtos-loja input,
.filtros-produtos-loja select,
.filtros-vendas input,
.filtros-vendas select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.filtros-vendas div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filtros-vendas button,
.filtros-produtos-loja button {
    padding: 10px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
}
.lista-produtos-loja {
    width: 100%;
}

.tabela-produtos-wrapper {
    width: 100%;
    overflow-x: auto;
}

.tabela-produtos-loja,
.tabela-produtos-loja tbody {
    display: block;
    width: 100%;
}

.tabela-produtos-loja thead {
    display: none;
}

.tabela-produtos-loja tr {
    display: grid;
    grid-template-columns: 120px 90px minmax(150px, 1fr) minmax(150px, 1fr);
    grid-template-areas:
        "acoes foto produto categoria"
        "acoes foto preco pago"
        "acoes foto condicao status"
        "acoes foto pagamento pagamento";
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 15px;
    padding: 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.tabela-produtos-loja td {
    border: none;
    padding: 0;
    min-width: 0;
    box-sizing: border-box;
}

.tabela-produtos-loja td:nth-child(1) {
    grid-area: acoes;
}

.tabela-produtos-loja td:nth-child(2) {
    grid-area: foto;
}

.tabela-produtos-loja td:nth-child(3) {
    grid-area: produto;
}

.tabela-produtos-loja td:nth-child(4) {
    grid-area: categoria;
}

.tabela-produtos-loja td:nth-child(5) {
    grid-area: preco;
}

.tabela-produtos-loja td:nth-child(6) {
    grid-area: pago;
}

.tabela-produtos-loja td:nth-child(7) {
    grid-area: condicao;
}

.tabela-produtos-loja td:nth-child(8) {
    grid-area: status;
}

.tabela-produtos-loja td:nth-child(9) {
    grid-area: pagamento;
}

.acoes-produto-tabela {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.acoes-produto-tabela button {
    width: 100%;
}

.exclusao-bloqueada {
    display: block;
    white-space: normal;
    word-break: break-word;
}

.miniatura-produto-loja {
    width: 80px;
    height: 80px;
}

.miniatura-produto-loja img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tabela-produtos-loja td:nth-child(3),
.tabela-produtos-loja td:nth-child(4),
.tabela-produtos-loja td:nth-child(7) {
    overflow-wrap: anywhere;
}

.acoes-produto button,
.informacoes-venda-produto button,
.status-venda button {
    border: none;
    padding: 9px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
}

.pagamento-recebido {
    font-weight: 700;
}

.pagamento-pendente {
    font-weight: 700;
}

.cards-vendas-completo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.card-financeiro {
    padding: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.card-financeiro strong,
.card-financeiro span {
    display: block;
}

.card-financeiro span {
    margin-top: 8px;
    font-size: 20px;
    font-weight: 700;
}

.card-venda-completa {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 25px;
    align-items: center;
    margin-bottom: 15px;
    padding: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.card-venda-completa h2 {
    margin-top: 0;
}

.status-venda {
    min-width: 170px;
}

.status-venda > strong {
    display: block;
    margin-bottom: 10px;
}

.mensagem-vazia {
    padding: 40px;
    text-align: center;
    background: #f5f5f5;
    border-radius: 8px;
}

.filtros-financeiros {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.filtros-financeiros > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filtros-financeiros label {
    font-weight: 700;
}

.filtros-financeiros input {
    height: 38px;
    padding: 0 10px;
    box-sizing: border-box;
}

.filtros-financeiros button {
    height: 38px;
    padding: 0 18px;
    font-weight: 700;
    cursor: pointer;
}


.miniatura-produto-loja {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f5f5f5;
    border-radius: 5px;
}

.miniatura-produto-loja img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pagamento-recebido {
    font-weight: 700;
}

.pagamento-pendente {
    font-weight: 700;
}

.tabela-produtos-wrapper {
    width: 100%;
    overflow-x: auto;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.tabela-produtos-loja {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.tabela-produtos-loja th,
.tabela-produtos-loja td {
    padding: 8px 9px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: middle;
}

.tabela-produtos-loja th {
    background: #f5f5f5;
    font-weight: 700;
    white-space: nowrap;
}

.tabela-produtos-loja td {
    font-size: 14px;
}

.tabela-produtos-loja tbody tr:hover {
    background: #fafafa;
}

.miniatura-produto-loja {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f5f5f5;
    border-radius: 5px;
}

.miniatura-produto-loja img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.acoes-produto-tabela {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.acoes-produto-tabela button {
    padding: 6px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.exclusao-bloqueada {
    display: inline-block;
    padding: 6px 8px;
    border-radius: 4px;
    background: #f0f0f0;
    color: #777;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.cards-financeiros {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.card-financeiro {
    padding: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.card-financeiro strong,
.card-financeiro span {
    display: block;
}

.card-financeiro span {
    margin-top: 8px;
    font-size: 22px;
    font-weight: 700;
}

.cards-vendas {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.cards-vendas > div {
    padding: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.cards-vendas span,
.cards-vendas strong {
    display: block;
    margin-top: 8px;
}

.tabela-financeiro-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 30px;
}

.tabela-financeiro {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #ddd;
}

.tabela-financeiro th,
.tabela-financeiro td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.tabela-financeiro th {
    background: #f5f5f5;
    font-weight: 700;
}

.valor-entrada {
    font-weight: 700;
}

.valor-saida {
    font-weight: 700;
}

.status-movimentacao {
    display: inline-block;
    margin-top: 4px;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
}

.status-realizado {
    color: #dff3e4;
    background: #176b2c;
}

.status-pendente {
    color: #dff3e4;
    background: #9a5b00;
}

.cabecalho-painel {
    margin-bottom: 25px;
}

.cabecalho-painel h1 {
    margin-bottom: 5px;
}

.bloco-painel {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.titulo-bloco-painel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.titulo-bloco-painel h2 {
    margin: 0;
}

.titulo-bloco-painel p {
    margin: 5px 0 0;
}

.botao-ver-tudo {
    padding: 9px 15px;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    white-space: nowrap;
}

.resumo-painel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.item-resumo {
    padding: 15px;
    background: #f7f7f7;
    border-radius: 6px;
}

.item-resumo strong {
    display: block;
    font-size: 20px;
    font-weight: 700;
}

.item-resumo span {
    display: block;
    margin-top: 5px;
    font-size: 13px;
}

.acoes-financeiras {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 20px;
}

.acoes-financeiras button {
    padding: 10px 16px;
    border: none;
    border-radius: 5px;
    background: #333;
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.modal-movimentacao {
    display: none;
    position: fixed;
    inset: 0;
    background: #364326;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-movimentacao.ativo {
    display: flex;
}

.conteudo-modal {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-sizing: border-box;
}

.cabecalho-modal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.cabecalho-modal h2 {
    margin: 0;
}

.cabecalho-modal button {
    border: none;
    background: none;
    font-size: 28px;
    cursor: pointer;
}

#form-movimentacao {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#form-movimentacao input,
#form-movimentacao select,
#form-movimentacao textarea {
    padding: 10px;
    box-sizing: border-box;
}

#form-movimentacao textarea {
    min-height: 80px;
    resize: vertical;
}

.acoes-modal {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.acoes-modal button {
    padding: 10px 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
}

.acoes-financeiras-painel {
    display: flex;
    align-items: center;
    gap: 8px;
}

.acoes-financeiras-painel button {
    padding: 9px 12px;
    border: none;
    border-radius: 5px;
    background: #333;
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.acoes-financeiras-painel button:hover {
    opacity: 0.85;
}
#campos-venda-externa {
    display: none;
    width: 100%;
}

#campos-venda-externa label {
    display: block;
    width: 100%;
    margin-top: 10px;
}

#campos-venda-externa input,
#campos-venda-externa select {
    display: block;
    width: 100%;
    box-sizing: border-box;
}
@media (max-width: 760px) {
    header {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        box-sizing: border-box;
        width: 100%;
        overflow: visible;
    }

    .logo-link {
        min-width: 0;
    }

    .logo-link img {
        display: block;
        width: 140px;
        max-width: 100%;
        height: auto;
    }

    .area-usuario {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 5px;
        white-space: nowrap;
        min-width: 0;
    }

    .area-usuario span {
        font-size: 12px;
    }

    .area-usuario a,
    .area-usuario button {
        font-size: 12px;
        padding: 4px 5px;
    }

    .area-usuario p {
        margin: 0;
    }

    .barra-pesquisa {
        grid-column: 1 / -1;
        display: flex;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .barra-pesquisa input {
        flex: 1;
        min-width: 0;
        width: auto;
        box-sizing: border-box;
    }

    .barra-pesquisa button {
        flex-shrink: 0;
    }

    .categorias {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 6px 5px;
        width: 100%;
        box-sizing: border-box;
        white-space: nowrap;
        position: relative;
        z-index: 100;
    }
    .dropdown-categorias {
        position: relative;
        z-index: 101;
    }

    .lista-categorias {
        z-index: 1000;
    }

    .categorias > a,
    .botao-categorias,
    .botao-comprar,
    .botao-vender {
        font-size: 11px;
        padding: 6px 7px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .cabecalho-produtos {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .cabecalho-produtos .botao-principal {
        align-self: flex-start;
        font-size: 12px;
        padding: 7px 10px;
    }

    .filtros-produtos {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        width: 100%;
    }

    .filtros-produtos input,
    .filtros-produtos select {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        font-size: 12px;
        padding: 7px;
    }

    .filtros-produtos input {
        grid-column: 1 / -1;
    }

    .grade-produtos {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 10px;
    }

    .card-produto {
        width: 100%;
        box-sizing: border-box;
    }

    .card-produto img {
        width: 100%;
        height: 150px;
        object-fit: cover;
        display: block;
    }

    .card-produto h3 {
        font-size: 14px;
        margin: 8px 0 4px;
    }

    .card-produto p {
        font-size: 12px;
        margin: 4px 0;
    }

    .card-produto .preco {
        font-size: 15px;
        font-weight: 700;
        margin-top: 6px;
    }

    .menu-interno {
        gap: 8px;
        padding: 5px 8px;
        overflow-x: auto;
        justify-content: flex-start;
    }

    .menu-interno a {
        font-size: 12px;
        padding: 7px 8px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .pagina-painel {
        width: 100%;
        padding: 20px 10px;
        box-sizing: border-box;
    }

    .tabela-produtos-wrapper {
        width: 100%;
        overflow: visible;
        border: none;
        background: transparent;
    }

    .tabela-produtos-loja {
        width: 100%;
        border-collapse: collapse;
    }

    .tabela-produtos-loja thead {
        display: none;
    }

    .tabela-produtos-loja tbody {
        display: block;
        width: 100%;
    }

    .tabela-produtos-loja tbody tr {
        display: grid;
        grid-template-columns: 85px 1fr;
        grid-template-areas:
            "foto produto"
            "foto categoria"
            "foto preco"
            "foto pago"
            "foto condicao"
            "foto status"
            "foto pagamento"
            "acoes acoes";
        gap: 6px 12px;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 15px;
        padding: 12px;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 8px;
    }

    .tabela-produtos-loja td {
        display: block;
        width: auto;
        min-width: 0;
        padding: 0;
        border: none;
        box-sizing: border-box;
        overflow-wrap: anywhere;
    }

    .tabela-produtos-loja td:nth-child(1) {
        grid-area: acoes;
    }

    .tabela-produtos-loja td:nth-child(2) {
        grid-area: foto;
    }

    .tabela-produtos-loja td:nth-child(3) {
        grid-area: produto;
    }

    .tabela-produtos-loja td:nth-child(4) {
        grid-area: categoria;
    }

    .tabela-produtos-loja td:nth-child(5) {
        grid-area: preco;
    }

    .tabela-produtos-loja td:nth-child(6) {
        grid-area: pago;
    }

    .tabela-produtos-loja td:nth-child(7) {
        grid-area: condicao;
    }

    .tabela-produtos-loja td:nth-child(8) {
        grid-area: status;
    }

    .tabela-produtos-loja td:nth-child(9) {
        grid-area: pagamento;
    }

    .tabela-produtos-loja td:nth-child(3)::before {
        content: "Produto: ";
        font-weight: 700;
    }

    .tabela-produtos-loja td:nth-child(4)::before {
        content: "Categoria: ";
        font-weight: 700;
    }

    .tabela-produtos-loja td:nth-child(5)::before {
        content: "Preço: ";
        font-weight: 700;
    }

    .tabela-produtos-loja td:nth-child(6)::before {
        content: "Valor pago: ";
        font-weight: 700;
    }

    .tabela-produtos-loja td:nth-child(7)::before {
        content: "Condição: ";
        font-weight: 700;
    }

    .tabela-produtos-loja td:nth-child(8)::before {
        content: "Status: ";
        font-weight: 700;
    }

    .tabela-produtos-loja td:nth-child(9)::before {
        content: "Pagamento: ";
        font-weight: 700;
    }

    .miniatura-produto-loja {
        width: 80px;
        height: 80px;
        margin: 0 auto;
        overflow: hidden;
        border-radius: 6px;
    }

    .miniatura-produto-loja img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .acoes-produto-tabela {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
        margin-top: 8px;
    }

    .acoes-produto-tabela button {
        flex: 1 1 auto;
        min-width: 80px;
        padding: 9px 10px;
        box-sizing: border-box;
    }

    .exclusao-bloqueada {
        display: block;
        width: 100%;
        padding: 8px 0;
        overflow-wrap: anywhere;
    }

    .badge-promocao-tabela,
    .preco-promocional-tabela {
        display: inline-block;
        margin-top: 3px;
    }
    .acoes-produto-tabela {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 8px;
    }

    .acoes-produto-tabela button {
        flex: 1;
        min-width: 80px;
        padding: 9px 6px;
    }

    .cards-financeiros {
        grid-template-columns: 1fr;
    }

    .cards-vendas {
        grid-template-columns: 1fr;
    }

    .tabela-financeiro-wrapper {
        overflow-x: auto;
    }

    .tabela-financeiro {
        min-width: 700px;
    }
    .cabecalho-pagina {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-venda-completa {
        grid-template-columns: 1fr;
    }
    .filtros-financeiros {
        flex-direction: column;
        align-items: stretch;
    }

    .filtros-financeiros > div,
    .filtros-financeiros button {
        width: 100%;
    }

    .menu-interno {
        gap: 5px 18px;
        padding: 0 10px;
        flex-wrap: wrap;
    }

    .menu-interno a {
        padding: 12px 4px;
    }

    .bloco-painel {
        padding: 15px;
    }

    .titulo-bloco-painel {
        align-items: flex-start;
    }

    .resumo-painel {
        grid-template-columns: repeat(2, 1fr);
    }

    .botao-ver-tudo {
        padding: 8px 10px;
        font-size: 12px;
    }

    /* =========================================================
        VENDAS - MOBILE
       ========================================================= */

    .filtros-vendas {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 15px;
    }

    .filtros-vendas > div {
        width: 100%;
        min-width: 0;
    }

    .filtros-vendas label {
        display: block;
        margin-bottom: 4px;
        font-size: 12px;
        font-weight: 600;
    }

    .filtros-vendas input,
    .filtros-vendas select {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        padding: 7px 6px;
        font-size: 12px;
    }

    .filtros-vendas button {
        width: 100%;
        padding: 7px 10px;
        font-size: 12px;
    }

    /* Resumo */

    .cards-vendas-completo {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 15px;
    }

    .cards-vendas-completo .card-financeiro {
        min-width: 0;
        width: 100%;
        padding: 9px 4px;
        box-sizing: border-box;
        text-align: center;
    }

    .cards-vendas-completo .card-financeiro strong {
        display: block;
        font-size: 11px;
        line-height: 1.2;
        white-space: nowrap;
    }

    .cards-vendas-completo .card-financeiro span {
        display: block;
        margin-top: 4px;
        font-size: 12px;
        line-height: 1.2;
        white-space: nowrap;
    }

    /* Tabelas de vendas */

    #lista-vendas-completa {
        width: 100%;
        overflow-x: auto;
        box-sizing: border-box;
    }

    #lista-vendas-completa table {
        width: 100%;
        min-width: 650px;
    }

    /* Cabeçalho */

    .cabecalho-pagina {
        width: 100%;
        box-sizing: border-box;
    }

    .cabecalho-pagina h1 {
        font-size: 22px;
    }

    .cabecalho-pagina p {
        font-size: 13px;
    }

    /* =========================================================
        FINANCEIRO - MOBILE
    ========================================================= */

    #resumo-financeiro {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        width: 100%;
        margin-bottom: 15px;
        box-sizing: border-box;
    }

    #resumo-financeiro > div,
    #resumo-financeiro .item-resumo,
    #resumo-financeiro .card-financeiro {
        min-width: 0;
        width: 100%;
        min-height: 68px;
        padding: 12px 10px;
        box-sizing: border-box;
        text-align: left;
        background: #f7f7f7;
        border-radius: 6px;
    }

    #resumo-financeiro strong {
        display: block;
        font-size: 20px;
        line-height: 1.2;
        white-space: nowrap;
    }

    #resumo-financeiro span {
        display: block;
        margin-top: 5px;
        font-size: 12px;
        line-height: 1.2;
        white-space: nowrap;
    }


    /* =========================================================
    RESUMO DE VENDAS
    ========================================================= */

    #resumo-vendas-financeiro {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        width: 100%;
        margin-bottom: 15px;
    }

    #resumo-vendas-financeiro > div {
        min-width: 0;
        padding: 9px 6px;
        box-sizing: border-box;
        text-align: center;
    }

    #resumo-vendas-financeiro strong {
        display: block;
        font-size: 11px;
        line-height: 1.2;
    }

    #resumo-vendas-financeiro span {
        display: block;
        margin: 3px 0;
        font-size: 10px;
    }

    #resumo-vendas-financeiro > div > strong:last-child {
        font-size: 12px;
    }


    /* =========================================================
    TABELAS
    ========================================================= */

    .tabela-financeiro-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
    }

    .tabela-financeiro {
        min-width: 600px;
        width: 100%;
        border-collapse: collapse;
    }

    .tabela-financeiro th,
    .tabela-financeiro td {
        padding: 7px 6px;
        font-size: 11px;
        white-space: nowrap;
    }

     .tabela-movimentacoes tbody tr:nth-child(even) {
        background-color: #f3f3f3;
    }

    .tabela-movimentacoes tbody tr:nth-child(odd) {
        background-color: #ffffff;
    }

    .tabela-movimentacoes tbody tr:hover {
        background-color: #e9e9e9;
    }


    /* =========================================================
    AÇÕES DAS MOVIMENTAÇÕES
    ========================================================= */

    .acoes-movimentacao {
        display: flex;
        gap: 4px;
    }

    .acoes-movimentacao button {
        padding: 4px 6px;
        font-size: 11px;
        min-width: 28px;
    }


    /* =========================================================
    STATUS
    ========================================================= */

    .status-movimentacao {
        display: block;
        margin-top: 3px;
        font-size: 9px;
    }


    /* =========================================================
    VALORES
    ========================================================= */

    .valor-entrada,
    .valor-saida {
        font-size: 11px;
    }

    .valor-entrada strong,
    .valor-saida strong {
        font-size: 11px;
    }

}

/* =========================================================
    POLIMENTO GERAL
   ========================================================= */

.hero-inicio {
    text-align: center;
    padding: 20px 10px 30px;
}

.hero-inicio h1 {
    font-size: 30px;
    margin: 0 0 8px;
    color: #364326;
}

.hero-inicio p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.carregando {
    text-align: center;
    grid-column: 1 / -1;
    color: #777;
    padding: 30px 0;
}

#mensagem.mensagem-sucesso {
    color: #176b2c;
    font-weight: 700;
    background: #e8f5ec;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 20px auto;
    max-width: 600px;
}

#mensagem.mensagem-erro {
    color: #a40000;
    font-weight: 700;
    background: #fdeaea;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 20px auto;
    max-width: 600px;
}

.descricao-pagina {
    color: #777;
    margin-top: 0;
}

.pagamento-recebido {
    color: #176b2c;
}

.pagamento-pendente {
    color: #9a5b00;
}

.status-recebido {
    color: #176b2c;
}

.status-pendente {
    color: #9a5b00;
}

.imagem-produto img {
    object-fit: cover;
}

.produto-imagem-grande img {
    object-fit: contain;
}

button,
.botao-principal,
.botao-ver-tudo,
.botao-whatsapp,
.botao-comprar,
.botao-vender {
    transition: opacity 0.15s ease, transform 0.15s ease;
}

button:hover,
.botao-principal:hover,
.botao-ver-tudo:hover,
.botao-whatsapp:hover,
.botao-comprar:hover,
.botao-vender:hover {
    opacity: 0.88;
}

.filtros-produtos-loja {
    grid-template-columns: 1fr 1fr;
}

/* =========================================================
    RESPONSIVO - MOBILE (refinamentos)
   ========================================================= */

@media (max-width: 700px) {

    .hero-inicio h1 {
        font-size: 22px;
    }

    .hero-inicio p {
        font-size: 14px;
    }

    .produto-detalhes {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }

    .produto-imagem-grande {
        height: 320px;
    }

    .produto-informacoes h1 {
        font-size: 24px;
    }

    .preco-detalhe {
        font-size: 24px;
    }

    .filtros-produtos-loja {
        grid-template-columns: 1fr;
    }

    .formulario-produto,
    .formulario-venda-loja {
        padding: 20px 16px;
    }

    .formulario-produto button,
    .formulario-venda-loja button {
        padding: 13px 10px;
    }

    .cards-vendas-completo {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cabecalho-pagina .botao-principal {
        width: 100%;
    }

    .modal-movimentacao {
        padding: 10px;
    }

    .conteudo-modal {
        max-height: 95vh;
        padding: 18px;
    }

}

/* =========================================================
    HOME - LISTA HORIZONTAL DE RECENTES
   ========================================================= */

.secao-produtos {
    margin-bottom: 40px;
}

.titulo-secao {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
}

.titulo-secao h2 {
    margin: 0;
    font-size: 22px;
    color: #364326;
}

.lista-recentes {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.lista-recentes .card-produto {
    flex: 0 0 220px;
    scroll-snap-align: start;
    cursor: pointer;
}

.lista-recentes .carregando,
.lista-recentes .sem-resultados {
    flex: 1;
    text-align: center;
    color: #777;
    padding: 30px 0;
}

.sem-resultados {
    text-align: center;
    color: #777;
    padding: 40px 10px;
    grid-column: 1 / -1;
}

/* =========================================================
    CARD DE PRODUTO (vitrine e listagem)
   ========================================================= */

.card-produto {
    cursor: pointer;
}

.sem-imagem {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;
    background: #eee;
    color: #999;
}

.badge-promocao {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 5px 10px;
    background: #e67e22;
    color: white;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
}

.condicao-produto {
    color: #777;
    font-size: 13px;
    margin: 4px 0;
}

.descricao-produto {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #555;
    font-size: 13px;
    margin: 8px 0;
    min-height: 36px;
}

.botao-comprar-card {
    display: block;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background: #25d366;
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    margin-top: 10px;
}

/* =========================================================
    LISTAGEM DE PRODUTOS - FILTROS E PAGINAÇÃO
   ========================================================= */

.filtros-lista-produtos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 25px;
    padding: 18px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.campo-filtro {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.campo-filtro label {
    font-size: 13px;
    font-weight: 700;
}

.campo-filtro input,
.campo-filtro select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.campo-busca {
    grid-column: 1 / -1;
}

.campo-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.campo-check input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.acoes-filtro {
    display: flex;
    gap: 8px;
}

.acoes-filtro button {
    flex: 1;
    padding: 10px 14px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
}

.acoes-filtro button:first-child {
    background: #364326;
    color: white;
}

.acoes-filtro button:last-child {
    background: #e9e9e9;
    color: #333;
}

.paginacao {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.paginacao button {
    min-width: 38px;
    padding: 9px 12px;
    border: 1px solid #ccc;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    color: #333;
}

.paginacao button.ativo {
    background: #364326;
    border-color: #364326;
    color: white;
}

.paginacao button:disabled {
    opacity: 0.4;
    cursor: default;
}

/* =========================================================
    PROMOÇÃO NO PAINEL DA LOJA
   ========================================================= */

.badge-promocao-tabela {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    background: #e67e22;
    color: white;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* =========================================================
    PAINEL DO ADMINISTRADOR
   ========================================================= */

.conteudo-modal-largo {
    max-width: 900px;
}

.info-loja {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    background: #f7f7f7;
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 20px;
}

.info-loja p {
    margin: 4px 0;
    font-size: 14px;
}

#detalhes-loja h3 {
    margin: 20px 0 10px;
    color: #364326;
}

#lista-vendedores .tabela-financeiro button {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    background: #364326;
    color: white;
    font-weight: 700;
    cursor: pointer;
}

/* =========================================================
    RESPONSIVO - NOVAS SEÇÕES
   ========================================================= */

@media (max-width: 700px) {

    .titulo-secao {
        align-items: flex-start;
    }

    .titulo-secao h2 {
        font-size: 18px;
    }

    .filtros-lista-produtos {
        grid-template-columns: 1fr 1fr;
    }

    .campo-busca {
        grid-column: 1 / -1;
    }

    .acoes-filtro {
        grid-column: 1 / -1;
    }

    .lista-recentes .card-produto {
        flex: 0 0 160px;
    }

    .lista-recentes .card-produto img {
        height: 140px;
    }

    .paginacao button {
        min-width: 32px;
        padding: 8px 10px;
        font-size: 13px;
    }

    .info-loja {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
    PREÇO PROMOCIONAL
   ========================================================= */

.preco-promocional {
    color: #1c9d4a;
}

.badge-promocao-inline {
    display: inline-block;
    padding: 5px 10px;
    background: #e67e22;
    color: white;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
}

.preco-original-riscado {
    color: #999;
    text-decoration: line-through;
    font-size: 14px;
    font-weight: 400;
    margin-left: 8px;
}

.preco-detalhe .preco-original-riscado {
    font-size: 20px;
}

.preco-promocional-tabela {
    display: inline-block;
    color: #1c9d4a;
    font-weight: 700;
}

/* =========================================================
    MODAL DE CONFIRMAÇÃO
   ========================================================= */

.modal-confirmacao {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-confirmacao.ativo {
    display: flex;
}

.modal-confirmacao .conteudo-modal {
    width: 100%;
    max-width: 420px;
}

.modal-confirmacao-mensagem {
    white-space: pre-line;
    color: #444;
    line-height: 1.5;
}

.modal-confirmacao-erro {
    color: #a40000;
    font-weight: 700;
    font-size: 13px;
    margin: 8px 0 0;
}

#modal-confirmacao-campo input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    margin-top: 10px;
}

.botao-modal-confirmar {
    background: #364326;
    color: white;
}

.botao-modal-cancelar {
    background: #e9e9e9;
    color: #333;
}

/* =========================================================
    ADMIN - FILTROS E HISTÓRICO
   ========================================================= */

.filtros-admin-detalhe,
.filtros-admin-historico {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 14px;
    background: #f7f7f7;
    border-radius: 8px;
}

.filtros-admin-detalhe > div,
.filtros-admin-historico > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filtros-admin-detalhe label,
.filtros-admin-historico label {
    font-size: 13px;
    font-weight: 700;
}

.filtros-admin-detalhe input,
.filtros-admin-historico input {
    height: 36px;
    padding: 0 10px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.filtros-admin-detalhe button,
.filtros-admin-historico button {
    height: 36px;
    padding: 0 14px;
    border: none;
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer;
    background: #364326;
    color: white;
}

.filtros-admin-detalhe button:nth-child(3),
.filtros-admin-historico button:nth-child(3) {
    background: #364326;
}

.filtros-admin-detalhe button:nth-child(4),
.filtros-admin-historico button:nth-child(4) {
    background: #e9e9e9;
    color: #333;
}

.botao-historico {
    background: #1c9d4a !important;
    color: white !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.resumo-detalhe-admin {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.resumo-detalhe-admin > div {
    padding: 14px;
    background: #f7f7f7;
    border-radius: 6px;
    text-align: center;
}

.resumo-detalhe-admin strong {
    display: block;
    font-size: 20px;
}

.resumo-detalhe-admin span {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: #666;
}

.abas-historico {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.aba-historico {
    padding: 10px 20px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: white;
    color: #333;
    font-weight: 700;
    cursor: pointer;
}

.aba-historico.ativa {
    background: #364326;
    border-color: #364326;
    color: white;
}

/* =========================================================
    RESPONSIVO - NOVOS COMPONENTES
   ========================================================= */

@media (max-width: 700px) {

    .resumo-detalhe-admin {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 6px;
    }

    .resumo-detalhe-admin strong {
        font-size: 16px;
    }

    .resumo-detalhe-admin span {
        font-size: 11px;
    }

    .filtros-admin-detalhe,
    .filtros-admin-historico {
        flex-direction: column;
        align-items: stretch;
    }

    .filtros-admin-detalhe > div,
    .filtros-admin-detalhe button,
    .filtros-admin-historico > div,
    .filtros-admin-historico button {
        width: 100%;
    }

    .abas-historico {
        width: 100%;
    }

    .aba-historico {
        flex: 1;
        text-align: center;
        padding: 10px 6px;
        font-size: 13px;
    }

    .preco-original-riscado {
        display: block;
        margin-left: 0;
    }

}

/* =========================================================
    NOVOS COMPONENTES - GESTÃO DE VENDEDORES E DASHBOARD
   ========================================================= */

.faixa-vista-admin {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #E99125;
    color: #fff;
    padding: 8px 16px;
    font-size: 13px;
}

.faixa-vista-admin a {
    color: #fff;
    font-weight: bold;
    text-decoration: underline;
}

.badge-origem {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    vertical-align: middle;
}

.badge-origem-site {
    background: #e6f4ea;
    color: #1e7e34;
}

.badge-origem-loja {
    background: #fff3e0;
    color: #b45309;
}

.badge-origem-externa {
    background: #eceff1;
    color: #546e7a;
}

.badge-status-usuario {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
}

.badge-status-usuario.ativo {
    background: #e6f4ea;
    color: #1e7e34;
}

.badge-status-usuario.inativo {
    background: #fdecea;
    color: #c0392b;
}

.cards-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}

.card-dashboard {
    background: #f7f5ef;
    border: 1px solid #ddd8c8;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-dashboard strong {
    font-size: 13px;
    color: #555;
}

.card-dashboard span {
    font-size: 20px;
    font-weight: bold;
    color: #364326;
}

.filtros-dashboard {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 16px;
}

.filtros-dashboard > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 150px;
}

.filtros-dashboard label {
    font-size: 12px;
    color: #555;
}

.filtros-dashboard input,
.filtros-dashboard select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.acoes-filtro-dashboard {
    flex-direction: row !important;
    align-items: center;
    justify-content: flex-start;
    gap: 8px !important;
}

.acoes-filtro-dashboard button {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    background: #364326;
    color: #fff;
    cursor: pointer;
}

.acoes-filtro-dashboard button:last-child {
    background: #6b6b6b;
}

.tabela-dashboard th,
.tabela-dashboard td {
    white-space: nowrap;
}

.paginacao-dashboard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.paginacao-dashboard button {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    background: #364326;
    color: #fff;
    cursor: pointer;
}

.paginacao-dashboard button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.form-admin-usuario {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.form-admin-usuario label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #555;
}

.form-admin-usuario input,
.form-admin-usuario select,
.form-admin-usuario textarea {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
}

.form-admin-usuario textarea {
    resize: vertical;
}

.modal-admin-mensagem {
    margin: 10px 0 0;
    padding: 8px 10px;
    border-radius: 6px;
    background: #fdecea;
    color: #c0392b;
}

.modal-admin-mensagem.sucesso {
    background: #e6f4ea;
    color: #1e7e34;
}

.acoes-admin-usuario {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.acoes-admin-usuario button {
    padding: 6px 10px;
    border: 1px solid #364326;
    background: #fff;
    color: #364326;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.acoes-admin-usuario button:hover {
    background: #364326;
    color: #fff;
}

.tabela-admin-lojas td {
    vertical-align: top;
}

.separador-admin {
    border-top: 1px solid #ddd;
    margin: 18px 0 8px;
}

.botao-voltar-dashboard {
    margin-top: 18px;
    padding: 8px 14px;
    border: 1px solid #364326;
    background: #fff;
    color: #364326;
    border-radius: 6px;
    cursor: pointer;
}

#modal-confirmacao .conteudo-modal label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #555;
    margin-top: 8px;
}

#modal-confirmacao .conteudo-modal select,
#modal-confirmacao .conteudo-modal input[type="number"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 4px;
    width: 100%;
}

@media (max-width: 700px) {

    .form-admin-usuario {
        grid-template-columns: 1fr;
    }

    .cards-dashboard {
        grid-template-columns: 1fr 1fr;
    }

    .filtros-dashboard > div {
        width: 100%;
        min-width: 0;
    }

    .acoes-admin-usuario {
        flex-direction: column;
    }

    .faixa-vista-admin {
        flex-direction: column;
        text-align: center;
    }

}

/* =========================================================
    DASHBOARD DO VENDEDOR — PRODUTOS PARA VENDA
   ========================================================= */

.filtros-produtos-venda {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.filtros-produtos-venda input,
.filtros-produtos-venda select {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.filtros-produtos-venda input {
    flex: 1;
    min-width: 200px;
}

.aviso-produtos-venda {
    background: #fff8e6;
    border: 1px solid #e6c95c;
    color: #7a5c00;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    margin: 0 0 16px;
}

.grade-produtos-venda {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.card-produto-venda {
    cursor: default;
    display: flex;
    flex-direction: column;
}

.card-produto-venda .informacoes-produto {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-produto-venda .preco {
    font-size: 18px;
    margin: 6px 0;
}

.info-loja-produto {
    color: #555;
    font-size: 13px;
    margin: 4px 0;
}

.status-produto-venda {
    color: #777;
    font-size: 13px;
    margin: 4px 0;
}

.status-produto-venda strong {
    color: #1e7e34;
}

.botao-selecionar-produto {
    margin-top: auto;
    padding: 9px 12px;
    border: 1px solid #364326;
    background: #fff;
    color: #364326;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
}

.botao-selecionar-produto:hover {
    background: #364326;
    color: #fff;
}

.botao-selecionar-produto.selecionado {
    background: #1e7e34;
    border-color: #1e7e34;
    color: #fff;
}

@media (max-width: 700px) {

    .filtros-produtos-venda {
        flex-direction: column;
        align-items: stretch;
    }

    .filtros-produtos-venda input,
    .filtros-produtos-venda select {
        width: 100%;
    }

    .grade-produtos-venda {
        grid-template-columns: 1fr 1fr;
    }

}

/* =========================================================
    FASE 2 — MODAL DE VENDA DO VENDEDOR + COMISSÕES
   ========================================================= */

.info-venda-produto {
    background: #f7f5ef;
    border: 1px solid #ddd8c8;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.info-venda-produto p {
    margin: 2px 0;
    font-size: 14px;
}

#modal-venda-vendedor .form-admin-usuario {
    grid-template-columns: 1fr;
}

#modal-venda-vendedor .aviso-produtos-venda {
    margin-top: 12px;
}

#modal-pagar-comissao .form-admin-usuario {
    grid-template-columns: 1fr 1fr;
}

.link-recibo {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid #364326;
    background: #fff;
    color: #364326;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.link-recibo:hover {
    background: #364326;
    color: #fff;
}

/* =========================================================
    COMPARTILHAR ANÚNCIO
   ========================================================= */

.botao-compartilhar-anuncio {
    margin-top: 8px;
    padding: 9px 12px;
    border: 1px solid #E99125;
    background: #fff;
    color: #E99125;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    width: 100%;
}

.botao-compartilhar-anuncio:hover {
    background: #E99125;
    color: #fff;
}

.acoes-modal-compartilhar {
    flex-wrap: wrap;
    gap: 8px;
}

.acoes-modal-compartilhar button {
    flex: 1 1 auto;
    min-width: 160px;
}