@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

.div-header-icones {
    display: flex;
    align-items: center;
}

body {
    background: linear-gradient(180deg, #000 0%, #3a2415 40%, #d87c2b 100%);
    color: #222;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background-color: #262626;
    width: 100%;
    display: flex;
    justify-content: space-between;
}

main.container_metrologia {
    flex: 1;
    width: 100%;
    overflow-y: auto;
}

.titulo_metrologia {
    font-size: 1.6rem;
    font-weight: 600;
    margin-top: 1rem;
    color: #fff;
    margin-bottom: 1rem;
    text-align: center;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

.secao_metrologia {
    background-color: #262626;
    border-radius: 14px;
    padding: 1rem;
    margin: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    width: 90%;
    margin: auto;
    display: flex;
    flex-direction: column;
    margin-top: 2rem;
}

.secao_metrologia h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #f35f15;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    ;
}

.secao_fotos h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #f35f15;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.campo label {
    display: block;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.4rem;
}

.campo input,
.campo textarea {
    width: 100%;
    padding: 0.6rem;
    font-size: 0.95rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

textarea {
    resize: none;
    min-height: 80px;
}

.botao-avancar {
    width: 100%;
    background: linear-gradient(90deg, #f35f15, #ff7b00);
    color: #ffffff;
    border: none;
    padding: 0.6rem;
    border-radius: 10px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.botao-voltar {
    width: 100%;
    background: linear-gradient(135deg, #858181, #555454);
    color: #ffffff;
    border: none;
    padding: 0.6rem;
    border-radius: 10px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-conteudo {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal h3 {
    color: #f35f15;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.modal button {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.6rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
}

.texto_parte_medida {
    font-weight: 600;
    font-size: 18px;
}

.btn-sim {
    background: linear-gradient(90deg, #f35f15, #ff7b00);
    color: white;
}

.btn-nao {
    background: #ddd;
    color: #333;
}

.secao_medidas {
    display: none;
    padding: 1rem;
    margin: 1rem;
    background: #262626;
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease;
    color: white;
}

.card_peca {
    border-radius: 12px;
    margin-bottom: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.container_inputs_medidas img{
    width: 180px;
    height: 180px;
    object-fit: contain;
    object-position: left;
}

.card_peca img {
    width: 100%;
    display: block;
    position: relative;
    z-index: 12;
}

.img_orientacao {
    margin-bottom: 0.5rem;
}

.card_conteudo {
    padding: 1rem;
    display: none;
    background-color: white;
    margin-top: 1rem;
    color: black;
    width: 100%;
    z-index: 10;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.card_conteudo.ativo {
    display: block;
}


.card_conteudo input {
    color: #000000;
    padding: 0.2rem 0.5rem;
    outline: none;
    transition: 0.2s;
    height: 40px;
    min-width: 130px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    flex: 1;
}

/* ===== ETAPA DE FOTOS ===== */
.secao_fotos {
    display: none;
    padding: 1.4rem;
    margin: 1rem;
    background: #262626;
    color: white;
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.preview-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.preview {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-excluir {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
}

.btn-foto {
    display: block;
    background: linear-gradient(90deg, #f35f15, #ff7b00);
    color: white;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    font-weight: 600;
    margin: 0 auto;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

.container_etapa {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container_pecas {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.container_campos_metrologia {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-grupo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

#select_medida{
    width: 100%;
    padding: 10px;
    padding-right: 40px;
    border-radius: 8px;
    min-width: 190px;
    border: 1px solid #ddd;
    font-size: 16px;
    background: #fff url(../img/down-arrow.png) no-repeat right 10px center;
    background-size: 16px;
    color: #333;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
}

.select-unidade {
    color: #000000;
    padding: 0.2rem 0.5rem;
    outline: none;
    transition: 0.2s;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    min-width: 80px;
    flex: 1;
}

#select_peca{
    width: 100%;
    padding: 10px;
    padding-right: 40px;
    border-radius: 8px;
    min-width: 190px;
    border: 1px solid #ddd;
    font-size: 16px;
    background: #fff url(../img/down-arrow.png) no-repeat right 10px center;
    background-size: 16px;
    color: #333;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
}

.container_inputs_medidas {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.container_inputs_medidas div{
    margin-top: 1rem;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    justify-items: center;
    margin-top: 1rem;
}

.preview-slot {
    aspect-ratio: 1 / 1;
    width: 100%;
    border-radius: 10px;
    background: #dcdcdc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.titulo_secao {
    font-size: 1.15rem;
    font-weight: 600;
    color: #f35f15;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.preview-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-slot .btn-excluir {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
}


.div_medidas_nao_cadastradas {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    width: 100%;
}

.div_medidas_nao_cadastradas input {
    flex: 1;
    border: none;
    outline: none;
    height: 40px;
    font-size: 1rem;
    color: #000;
}

.foto-grupo {
    padding: 1rem;
    background: #333;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.container_input_fotos{
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.container_pecas_fotos{
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.img_peca_fotos {
    width: 100%;
}

.foto-grupo h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 0.6rem;
}

.preview-foto-individual {
    margin-top: 0.6rem;
    display: flex;
    justify-content: center;
}

.preview-foto-individual img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

.foto-wrapper {
    position: relative;
    display: inline-block;
}

.btn-excluir-foto {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}