:root { --primary: #0F6E56; --bg: #F4F7F6; --error: #d9534f; --pattern-color: #e0e8e6; }

body { 
    font-family: 'Segoe UI', sans-serif; 
    background-color: var(--bg); 
    padding: 40px; 
    margin: 0;
    position: relative;
    min-height: 100vh;
    background-image: radial-gradient(var(--pattern-color) 1px, transparent 1px);
    background-size: 20px 20px;
}

body::after {
    content: "SÃO";
    position: fixed;
    bottom: 20px;
    right: 30px;
    font-size: 80px;
    font-weight: bold;
    color: var(--primary);
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
}

.container { max-width: 900px; margin: auto; background: white; padding: 30px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); border-top: 6px solid var(--primary); }
h1 { color: var(--primary); margin-bottom: 20px; text-align: center; }
.upload-box { border: 2px dashed var(--primary); padding: 25px; border-radius: 8px; margin-bottom: 20px; }
input { padding: 12px; margin: 10px 0; width: 100%; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
button { background: var(--primary); color: white; border: none; padding: 15px; border-radius: 6px; cursor: pointer; width: 100%; font-weight: bold; font-size: 16px; transition: background 0.3s; }
button:hover { background: #0c5a45; }

.modal { 
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; top: 0; 
    width: 100%; height: 100%; 
    background: rgba(0,0,0,0.5);
    align-items: center; 
    justify-content: center; 
}

.modal-content { 
    background: #fff; 
    padding: 30px; 
    border-radius: 12px; 
    width: 90%; 
    max-width: 500px; 
    text-align: center; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); 
}

.modal.mostrar {
    display: flex; 
}

.modal-content h3 { color: var(--error); margin-top: 0; }
.modal-content button { background: var(--primary); margin-top: 20px; }

table { width: 100%; border-collapse: collapse; margin: 15px 0; }
th, td { border: 1px solid #ddd; padding: 12px; text-align: left; }
th { background-color: var(--primary); color: white; }

.kpi-container { display: flex; justify-content: space-between; background: #e8f5e9; padding: 20px; border-radius: 10px; margin: 20px 0; }
.kpi-box { text-align: center; flex: 1; }
.kpi-value { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.8em; 
    font-weight: 800; 
    color: var(--primary); 
    line-height: 1;
    padding: 10px 0;
}

.merma-verde { color: #28a745 !important; }
.merma-rojo { color: #dc3545 !important; }
.estado-label { 
    display: block; 
    font-size: 0.4em; 
    margin-top: 8px; 
    text-transform: uppercase; 
    letter-spacing: 1.5px; 
    font-weight: 700; 
    color: #666; 
}

/* Estilo del "link" del glosario */
.glosario-link { 
    color: #0066cc; 
    cursor: pointer; 
    text-decoration: underline; 
    font-weight: bold; 
    display: block;
    margin: 15px 0;
    text-align: center;
}

p {
    /* Tipografía moderna y legible */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    
    margin-bottom: 1.5rem;
    padding: 10px;
    text-align: justify; 
    border-left: 4px solid var(--primary); 
    background-color: #f9f9f9;
    border-radius: 0 8px 8px 0; 
}