* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation Menu - matching consulta.css */
.nav-menu {
    background: linear-gradient(90deg, #003473 0%, #425500 100%);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.nav-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5em;
    color: white;
}

.nav-links {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 5px 15px;
    margin: 0 5px;
    border-radius: 20px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: inline-block;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255, 255, 255, 0.2);
}

.container {
    max-width: 1200px;
    margin: 30px auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    flex: 1;
}

.header {
    background: linear-gradient(135deg, #003473 0%, #425500 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.assessment-form {
    padding: 40px;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.assessment-form h2 {
    color: #003473;
    margin-bottom: 25px;
    font-size: 1.8em;
}

/* Assessment Type Toggle */
.assessment-type-toggle {
    margin-bottom: 30px;
    text-align: center;
}

.toggle-label {
    display: block;
    font-weight: 600;
    color: #425500;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.toggle-buttons {
    display: inline-flex;
    gap: 0;
    background: #e0e0e0;
    border-radius: 30px;
    padding: 5px;
}

.toggle-btn {
    padding: 12px 30px;
    border: none;
    background: transparent;
    color: #666;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    color: #003473;
}

.toggle-btn.active {
    background: linear-gradient(135deg, #003473 0%, #425500 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 52, 115, 0.3);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #425500;
    font-size: 0.95em;
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #84bd00;
    box-shadow: 0 0 0 3px rgba(132, 189, 0, 0.1);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.checkbox-group:hover {
    border-color: #84bd00;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.checkbox-group label {
    cursor: pointer;
    color: #333;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
    resize: vertical;
    min-height: 100px;
}

.form-group textarea:focus {
    outline: none;
    border-color: #84bd00;
    box-shadow: 0 0 0 3px rgba(132, 189, 0, 0.1);
}

.field-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #666;
    font-style: italic;
}

.risk-matrix {
    padding: 40px;
    background: white;
}

.risk-matrix h2 {
    color: #003473;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.matrix-sector-selector {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.matrix-sector-selector label {
    font-weight: 600;
    color: #425500;
    margin-right: 15px;
    font-size: 1.1em;
}

.matrix-sector-selector select {
    padding: 10px 16px;
    border: 2px solid #84bd00;
    border-radius: 6px;
    font-size: 1em;
    background: white;
    min-width: 250px;
    cursor: pointer;
}

.matrix-sector-selector select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(132, 189, 0, 0.2);
}

.weight-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.matrix-table th {
    background: #003473;
    color: white;
    position: relative;
}

.edit-weights-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    vertical-align: middle;
}

.edit-weights-btn:hover {
    transform: scale(1.2);
}

.edit-weights-btn.active .edit-icon {
    color: #84bd00;
}

.matrix-table th,
.matrix-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.matrix-table tbody tr:hover {
    background: #f8f9fa;
}

.matrix-table input[type="number"] {
    width: 80px;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
    background: #f0f0f0;
    cursor: not-allowed;
}

.matrix-table input[type="number"].editable {
    background: white;
    cursor: text;
}

.matrix-table input[type="number"]:focus {
    outline: none;
    border-color: #84bd00;
}

.matrix-table input[type="number"]:disabled {
    opacity: 0.7;
}

.matrix-table select {
    width: 100%;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.matrix-table select:focus {
    outline: none;
    border-color: #84bd00;
}

.risk-comment {
    width: 100%;
    min-width: 200px;
    padding: 6px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.85em;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    height: 2.5em;
    overflow-y: hidden;
}

.risk-comment:focus {
    outline: none;
    border-color: #84bd00;
    height: auto;
    min-height: 4em;
}

.risk-comment:hover {
    border-color: #84bd00;
}

.risk-value {
    font-weight: 700;
    color: #003473;
    font-size: 1.1em;
}

.total-row {
    background: #f8f9fa;
    border-top: 2px solid #003473;
}

.total-row td {
    font-size: 1.2em;
    color: #003473;
}

.risk-score-section {
    padding: 40px;
    background: #f8f9fa;
    text-align: center;
}

.risk-score-section h2 {
    color: #003473;
    margin-bottom: 30px;
    font-size: 1.8em;
}

.risk-score {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 15px;
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.score-value {
    font-size: 4em;
    font-weight: 700;
    margin-bottom: 10px;
}

.score-label {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 20px;
}

.score-recommendation {
    font-size: 1.1em;
    line-height: 1.6;
    color: #666;
}

.risk-low {
    background: #d4edda;
    border: 2px solid #28a745;
}

.risk-low .score-value,
.risk-low .score-label {
    color: #28a745;
}

.risk-medium {
    background: #fff3cd;
    border: 2px solid #ffc107;
}

.risk-medium .score-value,
.risk-medium .score-label {
    color: #856404;
}

.risk-high {
    background: #f8d7da;
    border: 2px solid #dc3545;
}

.risk-high .score-value,
.risk-high .score-label {
    color: #dc3545;
}

.risk-config-section {
    padding: 0 40px 40px;
    background: white;
}

.config-toggle {
    background: linear-gradient(135deg, #425500 0%, #2a3600 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(66, 85, 0, 0.3);
    display: block;
    margin: 0 auto;
}

.config-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 85, 0, 0.4);
}

.risk-config-content {
    margin-top: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px solid #e0e0e0;
}

.risk-config-content h3 {
    color: #003473;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.5em;
}

.risk-levels-config {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.risk-level-config {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid;
    transition: all 0.3s ease;
}

.low-risk-config {
    border-color: #28a745;
}

.low-risk-config h4 {
    color: #28a745;
    margin-bottom: 15px;
}

.medium-risk-config {
    border-color: #ffc107;
}

.medium-risk-config h4 {
    color: #856404;
    margin-bottom: 15px;
}

.high-risk-config {
    border-color: #dc3545;
}

.high-risk-config h4 {
    color: #dc3545;
    margin-bottom: 15px;
}

.config-field {
    margin-bottom: 15px;
}

.config-field label {
    display: block;
    font-weight: 600;
    color: #425500;
    margin-bottom: 5px;
    font-size: 0.95em;
}

.config-field input[type="text"],
.config-field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.config-field input[type="text"]:focus,
.config-field textarea:focus {
    outline: none;
    border-color: #84bd00;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95em;
}

.range-inputs input[type="number"] {
    width: 80px;
    padding: 6px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
}

.range-inputs input[type="number"]:focus {
    outline: none;
    border-color: #84bd00;
}

.range-inputs span {
    color: #666;
    font-weight: 500;
}

#level2Min, #level3Min {
    font-weight: 700;
    color: #003473;
}

.config-buttons {
    text-align: center;
}

.reset-config-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.reset-config-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.report-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 40px;
    flex-wrap: wrap;
}

.report-button {
    background: linear-gradient(135deg, #003473 0%, #002050 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 52, 115, 0.3);
}

.report-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 52, 115, 0.4);
}

#copyResultsBtn {
    background: linear-gradient(135deg, #425500 0%, #2a3600 100%);
}

#downloadHTMLBtn {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

#downloadWordBtn {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

#downloadPDFBtn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

/* Footer - matching consulta.css */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 40px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-menu {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-menu a {
    color: #84bd00;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: #a4dd00;
}

.footer-credits {
    color: #999;
}

.footer-credits a {
    color: #84bd00;
    text-decoration: none;
}

.footer-credits a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(90deg, #003473 0%, #425500 100%);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .container {
        margin: 20px 10px;
    }
    
    .header h1 {
        font-size: 2em;
    }

    .assessment-form,
    .risk-matrix,
    .risk-score-section {
        padding: 20px;
    }

    .matrix-table {
        font-size: 0.9em;
    }

    .matrix-table th,
    .matrix-table td {
        padding: 10px 5px;
    }

    .matrix-table input[type="number"] {
        width: 60px;
    }

    .score-value {
        font-size: 3em;
    }
    
    .footer-menu {
        flex-direction: column;
        gap: 15px;
    }
    
    .risk-config-content {
        margin-top: 20px;
    }
    
    .risk-levels-config {
        grid-template-columns: 1fr;
    }
}
