.iaf-container { margin-top: 0.5rem; }
.iaf-loading { color: #999; font-size: 0.85rem; padding: 1rem 0; }
.iaf-no-form { color: #999; font-size: 0.85rem; font-style: italic; padding: 0.5rem 0; }
.iaf-title { font-size: 0.95rem; color: #372562; margin: 0 0 0.25rem; }
.iaf-subtest { font-size: 0.8rem; color: #666; margin: 0 0 0.5rem; }

.iaf-table-wrapper { overflow-x: auto; margin-bottom: 0.75rem; }
.iaf-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; table-layout: fixed; }
.iaf-table th, .iaf-table td { border: 1px solid #ddd; padding: 3px 5px; text-align: center; vertical-align: middle; }
.iaf-table th { font-weight: 600; font-size: 0.75rem; }
.iaf-th-label { background: #f5f5f5; color: #372562; text-align: left; width: 20%; }
.iaf-th-pre { background: #E8F5E9; color: #372562; white-space: nowrap; }
.iaf-th-post { background: #FFF3E0; color: #372562; white-space: nowrap; }

.iaf-cell-label { text-align: left; font-size: 0.78rem; color: #372562; background: #fafafa; }
.iaf-cell-pupil-name { text-align: center; font-weight: 600; color: #372562; background: #f5f5f5; vertical-align: top; }
.iaf-cell-score { background: #fff; }
.iaf-cell-calc { font-weight: 600; }

.iaf-pupil-header td { background: #F0F7F5 !important; border-bottom: 2px solid #97c1bc; }
.iaf-pupil-info-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding: 4px 0; }
.iaf-pupil-info-row label { display: flex; align-items: center; gap: 4px; font-size: 0.75rem; color: #372562; font-weight: 500; white-space: nowrap; }

.iaf-section-row td { background: #E8EAF6 !important; font-weight: 600; color: #372562; text-align: left; font-size: 0.78rem; }
.iaf-section-label { padding: 4px 8px !important; }

.iaf-total-row td { background: #f0f0f0 !important; border-top: 2px solid #372562; }
.iaf-comments-row td { background: #fafafa; text-align: left; }
.iaf-comments-label { display: block; font-size: 0.75rem; color: #666; font-weight: 500; }
.iaf-textarea { width: 100%; min-height: 40px; border: 1px solid #ddd; border-radius: 4px; padding: 4px 6px; font-size: 0.78rem; resize: vertical; font-family: inherit; }

.iaf-pupil-divider td { border: none !important; height: 8px; background: transparent !important; }

.iaf-input { border: 1px solid #ccc; border-radius: 4px; padding: 3px 6px; font-size: 0.78rem; font-family: inherit; }
.iaf-input-sm { width: 90px; }
.iaf-input-date { width: 120px; }
.iaf-input-score { width: 50px; text-align: center; }
.iaf-input:disabled { background: #f5f5f5; opacity: 0.7; }

/* RAG colour coding for scaled percentages */
.iaf-rag-red { background: #fce4ec !important; color: #c62828 !important; font-style: normal; }
.iaf-rag-orange { background: #fff3e0 !important; color: #e65100 !important; font-style: normal; }
.iaf-rag-yellow { background: #fffde7 !important; color: #f57f17 !important; font-style: normal; }
.iaf-rag-green { background: #e8f5e9 !important; color: #2e7d32 !important; font-style: normal; }

.iaf-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; align-items: center; }
.iaf-btn { border: none; border-radius: 6px; padding: 6px 14px; font-size: 0.8rem; cursor: pointer; font-family: inherit; }
.iaf-btn-add { background: #F0F7F5; color: #372562; border: 1px solid #97c1bc; }
.iaf-btn-add:hover { background: #e0efec; }
.iaf-btn-save { background: #ec5f59; color: #fff; }
.iaf-btn-save:hover { opacity: 0.9; }
.iaf-btn-save:disabled { opacity: 0.6; cursor: not-allowed; }
.iaf-btn-remove { background: none; border: none; color: #c62828; font-size: 1.2rem; cursor: pointer; padding: 0 4px; line-height: 1; }
.iaf-btn-remove:hover { color: #b71c1c; }

.iaf-success { color: #2e7d32; background: #e8f5e9; padding: 6px 12px; border-radius: 6px; font-size: 0.8rem; margin-top: 0.5rem; }
.iaf-error { color: #c62828; background: #fce4ec; padding: 6px 12px; border-radius: 6px; font-size: 0.8rem; margin-top: 0.5rem; }
