:root {
    --primary-color: #2a6fdb; /* Azul vibrante */
    --secondary-color: #e91e63; /* Rosa vibrante */
    --background-color: #f4f7fc; /* Fundo ligeiramente azulado */
    --card-color: #ffffff;
    --text-color: #34495e; /* Azul acinzentado escuro */
    --text-light-color: #7f8c9a; /* Cinza claro para textos secundários */
    --border-color: #e1e8ed;
    --success-color: #2ecc71; /* Verde mais moderno */
    --warning-color: #f39c12; /* Laranja */
    --error-color: #e74c3c; /* Vermelho */
    --hover-primary-color: #255ebf;
    --shadow-color: rgba(42, 111, 219, 0.15);
    --input-focus-color: rgba(42, 111, 219, 0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    line-height: 1.6;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 900px;
    margin: 30px auto;
}

.card {
    background-color: var(--card-color);
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--shadow-color);
    padding: 30px 35px;
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #2c3e50;
}

h1 i {
    margin-right: 10px;
    color: var(--primary-color);
}

h2 {
    font-size: 1.75rem;
    /* border-bottom: 2px solid var(--primary-color); */ /* Removido para resultado */
    padding-bottom: 10px;
    margin-top: 0; /* Ajuste para resultado */
    color: #34495e;
}

h2 i {
    margin-right: 8px;
    color: var(--primary-color);
}

h3 {
    font-size: 1.3rem;
    margin-top: 25px;
    color: #34495e;
}

h3:first-of-type {
    margin-top: 0; /* Remove margem do primeiro h3 no card */
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-light-color);
}

input[type="number"],
input[type="date"],
select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fdfdfe;
    color: var(--text-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input::placeholder {
    color: #bdc3c7;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--input-focus-color);
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    display: block;
    margin: 30px auto 10px auto;
    width: auto;
    min-width: 220px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(42, 111, 219, 0.3);
}

button:hover {
    background-color: var(--hover-primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 111, 219, 0.4);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(42, 111, 219, 0.3);
}

/* Estilo para a área de resultado */
.result {
    margin-top: 15px; /* Menos margem superior dentro do card de resultado */
    padding: 0; /* Padding já está no card */
    /* background-color: #eaf1fc; */ /* Removido, cor vem do card */
    border-radius: 0; /* Removido, borda vem do card */
    /* border-left: 6px solid var(--primary-color); */ /* Removido */
}

.result-category {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
}

.result-category:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.result-category h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.result-item span:first-child {
    color: var(--text-light-color);
    flex-basis: 60%; /* Dar mais espaço para a descrição */
}

.result-item span:last-child {
    font-weight: 600;
    color: var(--text-color);
    text-align: right;
    flex-basis: 40%;
}

.result-item .status-ok {
    color: var(--success-color);
    font-weight: bold;
}

.result-item .status-nok {
    color: var(--error-color);
    font-weight: bold;
}

.result-item .status-warn {
    color: var(--warning-color);
    font-weight: bold;
}

.form-group {
    margin-bottom: 30px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.form-col {
    flex: 1;
    padding: 0 15px;
    min-width: 200px;
    margin-bottom: 10px;
}

/* Tooltip e Info Icon */
.tooltip {
    position: relative;
    display: inline-block;
    margin-left: 5px;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    transition: background-color 0.3s ease;
}

.tooltip:hover .info-icon {
    background-color: var(--hover-primary-color);
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 280px;
    background-color: #34495e;
    color: #fff;
    text-align: left;
    border-radius: 8px;
    padding: 12px 15px;
    position: absolute;
    z-index: 10;
    bottom: 135%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    font-size: 0.85rem;
    font-weight: normal;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #34495e transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.hidden {
    display: none !important;
}

/* Bloco de Explicação */
.explanation {
    background-color: #eaf1fc; /* Fundo azul bem claro */
    border-left: 6px solid var(--primary-color);
    padding: 25px 30px;
    margin: 30px 0;
    border-radius: 12px;
}

.explanation h3 {
    margin-top: 0;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.explanation h3 i {
    margin-right: 8px;
}

.explanation h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    color: #34495e;
    font-weight: 600;
}

.explanation p {
    margin-bottom: 1rem;
    color: var(--text-light-color);
    font-size: 0.95rem;
}

.explanation ul {
    margin-left: 20px;
    margin-bottom: 1rem;
    color: var(--text-light-color);
    font-size: 0.95rem;
}

.explanation li {
    margin-bottom: 0.5rem;
}

.explanation strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#resultado.card:not(.hidden) {
    animation: fadeIn 0.5s ease-out;
}

/* Responsividade */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    .container {
        margin: 20px auto;
    }
    .card {
        padding: 20px;
    }
    h1 {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    h2 {
        font-size: 1.5rem;
    }
    h3 {
        font-size: 1.2rem;
    }
    .form-row {
        margin: 0 -10px;
    }
    .form-col {
        flex: 1 1 100%;
        padding: 0 10px;
        min-width: unset;
        margin-bottom: 15px;
    }
    .form-col:last-child {
        margin-bottom: 0;
    }
    input[type="number"],
    input[type="date"],
    select {
        margin-bottom: 15px;
    }
    button {
        width: 100%;
        min-width: unset;
        padding: 12px 20px;
    }
    .result-item, .result-total {
        font-size: 0.9rem;
    }
    .tooltip .tooltip-text {
        width: 240px;
        left: 10%;
        transform: translateX(0);
    }
    .tooltip .tooltip-text::after {
        left: 15px;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    .card {
        border-radius: 8px;
        padding: 15px;
    }
}

