/* ==========================
   RESET
========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f4f5f7;
    color: #333; /* PADRÃO DE TEXTO */
}

/* ==========================
   HEADER
========================== */
.header {
    background-color: #ffffff;
    padding: 15px 25px;
    color: #DB0707;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: #DB0707 4px solid;
}

.header-content {
    width: 100%;
    max-width: 1100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.logo {
    width: 40px;
}

.header h1 {
    font-size: 20px;
    font-weight: 600;
}

/* ==========================
   MAIN CONTAINER
========================== */
.main-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
}

/* ==========================
   WELCOME
========================== */
.welcome-box {
    margin-bottom: 25px;
}

.welcome-box h2 {
    color: #DB0707;
    font-weight: 600;
    margin-bottom: 5px;
}

.welcome-box p {
    color: #555;
}

/* ==========================
   CARD PADRÃO
========================== */
.form-card {
    background: #FFFFFF;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}

/* ==========================
   FORM
========================== */
.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #333; /* TODOS LABELS IGUAIS */
}

.form-group input {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #dcdcdc;
    font-size: 14px;
    transition: 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #DB0707;
    box-shadow: 0 0 0 2px rgba(219,7,7,0.15);
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
}

/* ==========================
   PRODUTOS DINÂMICOS
========================== */
.section-title {
    margin: 25px 0 12px;
    font-weight: 600;
    color: #DB0707;
}

.produto {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.produto input {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #dcdcdc;
    font-size: 14px;
}

.produto input:focus {
    outline: none;
    border-color: #DB0707;
    box-shadow: 0 0 0 2px rgba(219,7,7,0.15);
}

/* ==========================
   BOTÕES
========================== */
.btn-primary {
    background-color: #DB0707;
    color: #FFFFFF;
    border: none;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
    margin-top: 15px;
}

.btn-primary:hover {
    background-color: #b30505;
}

.btn-secondary {
    background-color: #2f2f2f;
    color: #FFFFFF;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s ease;
    margin-bottom: 15px;
}

.btn-secondary:hover {
    background-color: #444;
}

/* ==========================
   TOTAL
========================== */
.total-box {
    margin-top: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #DB0707;
}

/* ==========================
   MENSAGEM
========================== */
.mensagem {
    margin-top: 12px;
    font-weight: 600;
}

/* ==========================
   FOOTER
========================== */
.footer {
    margin-top: 50px;
    background-color: #DB0707;
    color: #FFFFFF;
    text-align: center;
    padding: 15px;
    font-size: 13px;
}

/* ==========================
   RESPONSIVO
========================== */
@media (max-width: 768px) {

    .main-container {
        padding: 15px;
    }

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

    .form-row {
        flex-direction: column;
    }

    .form-card {
        padding: 20px;
    }
}

/* AÇÕES DO FORMULÁRIO */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; 
    padding-top: 20px;
}

.form-actions .left-actions {
    display: flex;
    gap: 15px;
}

.form-actions .right-actions {
    display: flex;
}

/* PRODUTO COM BOTÃO REMOVER */
.produto-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.btn-remover {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #DB0707;
    color: #fff;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remover:hover {
    background-color: #a80505;
}

/* ==========================
   CONSULTA - LETRAS
========================== */

.alphabet-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.alphabet-filter button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #333;
    transition: 0.2s ease;
}

.alphabet-filter button:hover {
    background-color: #DB0707;
    color: #fff;
    border-color: #DB0707;
}

/* ==========================
   LISTA DE VENDAS
========================== */

.venda-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.venda-info {
    display: flex;
    flex-direction: column;
}

.venda-info strong {
    font-size: 15px;
}

.btn-success {
    background-color: #28a745;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-success:hover {
    background-color: #218838;
}

.form-group select {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #dcdcdc;
    font-size: 14px;
}