/* RESET */
* {
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f5f5f5;
    padding: 20px;
}

.menu {
    background: #2f80ed;
    width: 100%;
    padding: 12px 20px;
    margin-bottom: 20px;
}

.menu ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.menu ul li a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

/* CONTAINER */
.form-cadastrocliente {
    max-width: 90%;
    margin: 30px auto;
    padding: 24px 28px;
    background: #ffffff;
    border-radius: 10px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr)); /* 12 colunas */
    gap: 14px 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

/* TÍTULO PRINCIPAL */
.form-title {
    grid-column: 1 / -1;
    font-size: 20px;
    font-weight: 600;
    color: #2c2c2c;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

/* GRUPO DE CAMPOS */
.form-cadastrocliente > div {
    display: flex;
    flex-direction: column;
}

/* LABEL */
.form-label {
    font-size: 12px;
    font-weight: 600;
    color: #444;
    margin-bottom: 4px;
}

/* INPUTS */
.form-input,
.form-select {
    width: 100%;
    padding: 9px 11px;
    border-radius: 5px;
    border: 1px solid #ced4da;
    background: #fff;
    font-size: 13px;
    transition: all 0.2s;
}

/* FOCO */
.form-input:focus,
.form-select:focus {
    box-shadow: 0 0 0 3px rgba(47,128,237,0.15);
    outline: none;
}

/* TAMANHOS PADRÃO ERP - PARA 3 CAMPOS POR LINHA */
.field-xl { grid-column: span 12; } /* 1 por linha */
.field-lg { grid-column: span 6; } /* 2 por linha */
.field-md { grid-column: span 4; } /* 3 por linha (4 + 4 + 4 = 12) */
.field-sm { grid-column: span 3; } /* 4 por linha */
.field-tres { grid-column: span 4; } /* 3 por linha */

/* SEÇÕES VISUAIS */
.form-section {
    grid-column: 1 / -1;
    margin-top: 10px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #2f80ed;
    padding-bottom: 6px;
}

/* CONTAINERS DOS BOTÕES */
.botoes-adicional-container,
.botoes-copiar-container {
    grid-column: 1 / -1;
    margin-bottom: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px dashed #dee2e6;
}

/* Container interno dos botões */
.botoes {
    display: flex;
    gap: 12px;  
    flex-wrap: wrap;
}

.botoes-copiar {
    justify-content: center;  
}

.botoes-adicional {   
    justify-content: right;    
}

/* ========== ESTILO DE TODOS OS BOTÕES ========== */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-align: center;
    text-decoration: none;
    color: white;
    min-width: 180px;
}

/* Botões de cores diferentes */
.btn-info { background: #17a2b8; }
.btn-info:hover { background: #138496; }

.btn-copiar { background: #5a6268; }
.btn-copiar:hover { background: #495057; }

.btn-primary { background: #2f80ed; }
.btn-primary:hover { background: #1a6fd8; }

.btn-secondary { background: #6c757d; }
.btn-secondary:hover { background: #5a6268; }

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* RESPONSIVO */
@media (max-width: 1200px) {
    .form-cadastrocliente {
        max-width: 95%;
    }
    
    .field-tres {
        grid-column: span 6; /* 2 por linha em telas médias */
    }
}

@media (max-width: 900px) {
    .form-cadastrocliente {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        max-width: 98%;
    }
    
    .field-tres {
        grid-column: span 3; /* 2 por linha em 6 colunas */
    }
    
    .botoes-copiar {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 600px) {
    .form-cadastrocliente {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 12px;
        max-width: 100%;
    }
    
    .field-tres {
        grid-column: span 1;
    }
    
    .btn {
        padding: 7px 14px;
        font-size: 11px;
        min-width: 160px;
    }
}