body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background-color: #f4f4f4;
    margin: 0;
    padding: 20px;
}

.header {
    width: 100%;
    max-width: 1200px;
    text-align: left;
    margin-bottom: 20px;
}

.header h1 {
    color: #333;
    margin-bottom: 5px;
}

.header p {
    color: #666;
    font-style: italic;
}

.main-content-wrapper {
    display: flex;
    width: 100%;
    max-width: 1600px; /* Ajustado por você */
    max-height: calc(100vh - 40px - 20px - 20px); /* Usar 100vh menos padding e margem do header */
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
}

.fields-area {
    width: 500px; 
    background-color: #98c5ce;
    /*background-color: #fff;*/
    padding: 20px 20px 20px 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-sizing: border-box;
    flex-shrink: 0;
    max-height: 100%;
    overflow-y: auto;
}

.fields-area h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.input-row-two-cols {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}

.input-group {
    flex: 1;
    min-width: 180px;
    
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
    white-space: nowrap;
    
}

.input-group input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    
}

button {
    display: block;
    width: 50%;
    padding: 10px 15px; /* Padding ajustado para ser mais consistente */
    background-color: #007bff; /* Voltei a cor do botão para azul para visibilidade */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
    margin-left: auto; /* Centraliza o botão se a largura for 50% */
    margin-right: auto;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

.drawing-area-flex-wrapper {
    flex-grow: 1;
    background-color: #f0f0f0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    display: flex;
    flex-direction: column; /* Para empilhar output-fields-container e canvas */
    justify-content: center;
    align-items: center;
    position: relative;
    height: 700px; /* Ajustado por você */
    min-width: 300px;
    
}

/* Estilo para os novos campos de exibição */
.output-fields-container {
    width: calc(40% - 40px); /* Ocupa a largura total do wrapper menos padding */
    padding: 10px;
    margin-bottom: 10px; /* Espaço entre os campos de saída e o canvas */
    box-sizing: border-box;
    text-align: center;
    font-weight: bold;
    color: #333;
    /* Ajuste para que fique 10px acima do topo do ATMP_1 no desenho */
    /* Isso será mais ajustado no JS, mas o CSS controla o fluxo aqui */
    position: absolute;
    top: 10px; /* Alinha no topo da área de desenho, dentro do padding */
    left: 10px;
    right: 10px;
    z-index: 10; /* Garante que fique acima do canvas */
    background-color: rgba(255, 255, 255, 0.8); /* Fundo semi-transparente para o texto */
    border-radius: 5px;
    border: 1px solid #ccc;
    margin-left: 280px;
    background-color: #98c5ce;
}

.output-fields-container p {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1.1em;
    
    
}

.output-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    
}

.output-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    
}

.output-group label {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 3px;
    
}

.output-group input[type="text"] {
    width: 100px; /* Largura fixa para os campos de saída */
    padding: 1px 1px 1px 1px;
    border: 1px solid #ddd;
    background-color: #eee;
    text-align: center;
    font-weight: bold;
    border-radius: 4px;
    box-sizing: border-box;
    
}


#drawingCanvas {
    display: block;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: calc(100% - 40px);
    height: calc(100% - 130px);
    box-sizing: border-box;
    position: absolute;
    top: 90px; /* Isso será reajustado dinamicamente pelo JS */
    left: 20px;
    right: 20px;
    bottom: 10px;
    
}