/* Base styles */
:root {
    --color-primary: #3b82f6; --color-primary-dark: #2563eb; --color-primary-container: #eff6ff;
    --color-secondary: #64748b; --color-danger: #dc2626; --color-border: #e5e7eb;
    --color-text-dark: #1f2937; --color-text-light: #4b5563; --color-card-bg: #ffffff;
}
body { font-family: 'Google Sans Text', sans-serif; background-color: #f8fafc; }
.btn { padding: 0.75rem 1.5rem; border-radius: 0.5rem; font-weight: 600; cursor: pointer; transition: background-color 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; }
.btn-primary { background-color: var(--color-primary); color: white; }
.btn-primary:hover { background-color: var(--color-primary-dark); }
.btn-secondary { background-color: var(--color-secondary); color: white; }
.btn-secondary:hover { background-color: #475569; }
.card-static { background-color: var(--color-card-bg); border-radius: 0.75rem; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.section-title { color: var(--color-text-dark); }

/* Original Component CSS */
.signature-font { font-family: 'Dancing Script', cursive; font-weight: 700; font-size: 1.5rem; color: #1e3a8a; }
.card-static h2, .card-static h3 { text-align: center; color: var(--color-text-dark); font-weight: 700; }
.card-static h2 { font-size: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--color-border); padding-bottom: 1rem; }
.card-static h3 { font-size: 1.25rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.card-static label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--color-text-light); }
.card-static select, .card-static input, .card-static textarea { width: 100%; padding: 0.75rem; margin-bottom: 1rem; border-radius: 0.5rem; border: 1px solid var(--color-border); box-sizing: border-box; font-size: 1rem; background-color: #f8fafc; }
.card-static textarea { resize: vertical; min-height: 120px; font-family: monospace; }
#result, #reevaluation-result, #severity-result, #trend-result { font-weight: bold; font-size: 1.1em; padding: 1rem; min-height: 1.5em; border-radius: 5px; line-height: 1.6; text-align: left; }
.result-bra { background-color: #fef2f2; color: var(--color-danger); border: 1px solid #fca5a5; }
.result-acceptable { background-color: #f0fdf4; color: #16a34a; border: 1px solid #86efac; }
.result-bra-yellow { background-color: #fefce8; color: #ca8a04; border: 1px solid #fde047; }
.info-result { background-color: var(--color-primary-container); border: 1px solid #93c5fd; color: var(--color-primary-dark); }
.action-required { background-color: #fef2f2; border: 1px solid #fca5a5; color: var(--color-danger); font-weight: bold; }
.instruction-block { background-color: #f8fafc; margin: 0 0 1.5rem 0; padding: 1rem; border-radius: 6px; border: 1px solid var(--color-border); }
.instruction-block h4 { margin-top: 0; font-size: 1.2em; color: var(--color-primary-dark); text-align: left; font-weight: bold; }
.instruction-block p { margin-bottom: 0.5rem; }
.instruction-block ul { margin: 0; padding-left: 20px; text-align: left; }
.instruction-block .next-step { font-weight: bold; color: #16a34a; display: block; margin-top: 10px; }
.rules-container { display: grid; grid-template-columns: 1fr; gap: 0.5rem; margin-bottom: 1rem; }
@media (min-width: 640px) { .rules-container { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .rules-container { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rules-container label { font-weight: normal; margin-left: 0.25rem; cursor: pointer; }
.rules-container div { display: flex; align-items: center; }
#trend-result ul { list-style-type: disc; padding-left: 20px; }
#trend-result li { margin-top: 8px; }
#controlChart { background-color: #fdfdfd; border: 1px solid var(--color-border); margin-top: 15px; border-radius: 0.5rem; }
.data-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .data-grid { grid-template-columns: 1fr 1fr; } }
input[type="file"] { display: none; }
.styled-box { background-color: #f8fafc; border: 1px solid var(--color-border); padding: 1.5rem; border-radius: 0.75rem; margin-bottom: 1rem;}
.styled-box label { font-size: 1.125rem; font-weight: 600; color: var(--color-text-dark); display: block; margin-bottom: 0.5rem; }
.styled-box select, .styled-box input { font-size: 1rem; padding: 0.5rem 0.75rem; border-radius: 0.5rem; border: 1px solid var(--color-border); width: 100%; }
th { background-color: #f8fafc; font-weight: 600; color: var(--color-text-light); }
table { width: 100%; border-collapse: collapse; }

/* Module 5 Enhanced Styles */
#trend-data-table { font-size: 0.95rem; }
#trend-data-table input[type="text"],
#trend-data-table input[type="number"] { 
    width: 100%; 
    padding: 0.5rem; 
    border: 1px solid var(--color-border); 
    border-radius: 0.375rem; 
    font-size: 0.9rem;
    background-color: white;
}
#trend-data-table input[type="text"]:focus,
#trend-data-table input[type="number"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
#trend-data-table tbody tr:hover {
    background-color: #f1f5f9;
}
#trend-data-table .row-number {
    font-weight: 600;
    color: var(--color-text-light);
    text-align: center;
}
.btn-icon-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: 0.375rem;
    border: 1px solid var(--color-border);
    background-color: white;
    transition: all 0.2s;
}
.btn-icon-small:hover {
    background-color: #fee;
    border-color: var(--color-danger);
    color: var(--color-danger);
}
details summary {
    padding: 0.5rem;
    background-color: #f8fafc;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}
details[open] summary {
    margin-bottom: 1rem;
}
.hidden { display: none; }
th, td { border: 1px solid var(--color-border); padding: 0.75rem; text-align: left; }
.legend ul { list-style-position: inside; }
.overall-results-card { background-color: #f8fafc; padding: 20px; border-radius: 8px; border: 1px solid var(--color-border); text-align: center; margin-top: 2rem; }
.final-ratio-display { font-size: 3em; font-weight: bold; margin: 10px 0; }
.interpretation { font-size: 1.3em; font-weight: 500; margin-top: 15px; }
.trend-analysis { margin-top: 20px; padding: 15px; border-radius: 5px; text-align: center; }
.trend-improved { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb;}
.trend-stable { background-color: #e2e3e5; color: #383d41; border: 1px solid #d6d8db;}
.trend-review-required { background-color: #fefce8; color: #ca8a04; border: 1px solid #fde047; }
.trend-analysis span { font-weight: bold; }
.result-success { color: #155724; }
.result-danger { color: var(--color-danger); }
.multi-select-container { position: relative; width: 100%; }
.chips-container { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; border: 1px solid var(--color-border); border-radius: 0.5rem; background-color: #fff; min-height: 48px; cursor: pointer; }
.chip { display: flex; align-items: center; background-color: #e0e7ff; color: #3730a3; padding: 4px 8px; border-radius: 12px; font-size: 0.875rem; font-weight: 500; }
.chip-close { margin-left: 8px; cursor: pointer; font-weight: bold; color: #4f46e5; }
.chip-close:hover { color: #312e81; }
.chips-placeholder { color: #6b7280; padding: 2px 0; font-size: 1rem; }
.checkbox-dropdown { position: absolute; top: 100%; left: 0; right: 0; border: 1px solid var(--color-border); border-top: none; border-radius: 0 0 0.5rem 0.5rem; background-color: #fff; z-index: 1000; max-height: 250px; overflow-y: auto; padding: 0.5rem; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.checkbox-dropdown.hidden { display: none; }
.checkbox-dropdown div { display: flex; align-items: center; padding: 8px; border-radius: 4px; }
.checkbox-dropdown div:hover { background-color: #f1f5f9; }
.checkbox-dropdown label { font-size: 0.9rem; font-weight: 400; margin-left: 0.5rem; color: var(--color-text-dark); cursor: pointer; width: 100%; }
.checkbox-dropdown input[type="checkbox"] { width: auto; margin: 0; cursor: pointer; }

/* --- [NEW] ADDED STYLES --- */
.validation-disclaimer { background-color: #fefce8; color: #854d0e; border: 2px solid #facc15; padding: 1.5rem; margin: 0 auto 2rem auto; border-radius: 0.75rem; text-align: center; font-size: 1.1rem; line-height: 1.6; }
.validation-disclaimer h3 { font-weight: 700; font-size: 1.25rem; margin-top: 0; color: #854d0e; }
.attestation-block { background-color: #f9fafb; border: 1px solid #e5e7eb; border-radius: 0.5rem; padding: 1.5rem; margin-top: 1.5rem; }
.attestation-block .attestation-statement { display: flex; align-items: flex-start; margin-top: 1rem; }
.attestation-block input[type="checkbox"] { width: auto; margin-right: 0.75rem; margin-top: 0.25rem; flex-shrink: 0; }
.btn-success { background-color: #16a34a; color: white; }
.btn-success:hover { background-color: #15803d; }
