/* ============================
 *  Admin-only correct answer
 * ============================ */

.eaca-wrap {
    background: #f0ffee;
    padding: 20px;
    border: 3px solid #000;
}

.eaca-admin-only {
    margin-top: 20px;
    background: #fff8e1;
    border: 2px dashed #c9a400;
    border-radius: 6px;
    padding: 16px 20px;
}

.eaca-admin-only h4 {
    margin: 12px 0 6px;
    font-size: 14px;
    color: #6d5500;
}

.eaca-admin-only h4:first-child {
    margin-top: 0;
}

.eaca-explanation {
    color: #555;
    font-style: italic;
}

/* ============================
 *  Trainee feedback card
 * ============================ */

.eaca-feedback-wrap {
    margin: 24px 0;
    border-radius: 8px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Pass variant */
.eaca-feedback-wrap--pass {
    border: 2px solid #27ae60;
}

.eaca-feedback-wrap--pass .eaca-feedback-header {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

/* Fail variant */
.eaca-feedback-wrap--fail {
    border: 2px solid #c0392b;
}

.eaca-feedback-wrap--fail .eaca-feedback-header {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
}

/* Header */
.eaca-feedback-header {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: #fff;
    gap: 12px;
}

.eaca-feedback-icon {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

.eaca-feedback-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    flex-grow: 1;
}

.eaca-feedback-score {
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Body */
.eaca-feedback-body {
    padding: 16px 20px;
    background: #fff;
    line-height: 1.65;
    color: #333;
    font-size: 15px;
}

.eaca-feedback-body p {
    margin: 0;
}

/* Areas to improve */
.eaca-feedback-areas {
    padding: 14px 20px 16px;
    background: #fdf2f2;
    border-top: 1px solid #f5c6cb;
}

.eaca-feedback-areas h5 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #922;
}

.eaca-feedback-areas ul {
    margin: 0;
    padding: 0 0 0 20px;
    list-style: disc;
}

.eaca-feedback-areas li {
    margin: 4px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #552;
}

/* ============================
 *  Quiz results overview
 * ============================ */

.eaca-quiz-results {
    margin: 32px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header & stats */
.eaca-qr-header {
    margin-bottom: 24px;
    padding: 20px 24px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e2e6ea;
}

.eaca-qr-title {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
}

.eaca-qr-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.eaca-qr-stat {
    flex: 1;
    min-width: 100px;
    background: #fff;
    border-radius: 6px;
    padding: 12px 16px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.eaca-qr-stat-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
}

.eaca-qr-stat-label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.eaca-qr-stat--pending .eaca-qr-stat-value {
    color: #e67e22;
}

/* Individual question card */
.eaca-qr-item {
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e6ea;
    background: #fff;
}

.eaca-qr-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    gap: 12px;
    flex-wrap: wrap;
}

.eaca-qr-item-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.eaca-qr-item-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #6c757d;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.eaca-qr-item--pass .eaca-qr-item-number {
    background: #27ae60;
}

.eaca-qr-item--fail .eaca-qr-item-number {
    background: #c0392b;
}

.eaca-qr-item--error .eaca-qr-item-number {
    background: #e67e22;
}

.eaca-qr-item-title h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Status badge */
.eaca-qr-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.eaca-qr-badge--pass {
    background: #d4edda;
    color: #155724;
}

.eaca-qr-badge--fail {
    background: #f8d7da;
    color: #721c24;
}

.eaca-qr-badge--pending {
    background: #fff3cd;
    color: #856404;
}

.eaca-qr-badge--error {
    background: #fce4d6;
    color: #8b3a0f;
}

/* Question content sections */
.eaca-qr-question-text,
.eaca-qr-answer,
.eaca-qr-points,
.eaca-qr-feedback,
.eaca-qr-areas,
.eaca-qr-error,
.eaca-qr-pending-msg,
.eaca-qr-admin-note {
    padding: 10px 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.eaca-qr-question-text {
    background: #f0f4f8;
    border-bottom: 1px solid #e2e6ea;
}

.eaca-qr-answer-text {
    margin-top: 6px;
    padding: 10px 14px;
    background: #fafafa;
    border-left: 3px solid #ddd;
    border-radius: 0 4px 4px 0;
    color: #555;
    font-style: italic;
}

.eaca-qr-points {
    border-top: 1px solid #f0f0f0;
}

.eaca-qr-feedback {
    border-top: 1px solid #f0f0f0;
}

.eaca-qr-feedback p {
    margin: 6px 0 0;
}

.eaca-qr-areas {
    background: #fdf2f2;
    border-top: 1px solid #f5c6cb;
}

.eaca-qr-areas ul {
    margin: 6px 0 0;
    padding: 0 0 0 20px;
    list-style: disc;
}

.eaca-qr-areas li {
    margin: 4px 0;
    color: #721c24;
}

.eaca-qr-error {
    background: #fce4d6;
    color: #8b3a0f;
}

.eaca-qr-pending-msg {
    color: #856404;
    background: #fff8e1;
    font-style: italic;
}

.eaca-qr-admin-note {
    background: #eef0ff;
    border-top: 1px dashed #c5cae9;
    font-size: 13px;
    color: #3949ab;
}

/* Responsive */
@media (max-width: 600px) {
    .eaca-qr-stats {
        flex-direction: column;
    }
    .eaca-qr-item-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================
 *  Instructor Dashboard
 * ============================ */

.eaca-dash {
    margin: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a2e;
}

/* Header */
.eaca-dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e6ea;
    flex-wrap: wrap;
    gap: 16px;
}

.eaca-dash-title {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
}

.eaca-dash-subtitle {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
}

.eaca-dash-label {
    font-size: 13px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
}

.eaca-dash-select {
    padding: 8px 14px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    min-width: 220px;
    background: #fff;
    cursor: pointer;
}

.eaca-dash-select:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

/* Loading & empty states */
.eaca-dash-loading {
    padding: 60px 20px;
    text-align: center;
    font-size: 15px;
    color: #6c757d;
}

.eaca-dash-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e2e6ea;
    border-top-color: #4a90d9;
    border-radius: 50%;
    animation: eaca-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes eaca-spin {
    to { transform: rotate(360deg); }
}

.eaca-dash-empty {
    padding: 60px 20px;
    text-align: center;
    color: #999;
}

.eaca-dash-empty-icon {
    display: block;
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.eaca-dash-empty p {
    margin: 0;
    font-size: 15px;
}

/* Summary stats bar */
.eaca-dash-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.eaca-dash-summary-item {
    flex: 1;
    min-width: 90px;
    text-align: center;
    padding: 14px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.eaca-dash-summary-val {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
}

.eaca-dash-summary-lbl {
    display: block;
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Search */
.eaca-dash-filter {
    margin-bottom: 16px;
}

.eaca-dash-search {
    width: 100%;
    max-width: 320px;
    padding: 9px 14px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.eaca-dash-search:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

/* Trainee table */
.eaca-dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.eaca-dash-table thead {
    background: #f1f3f5;
}

.eaca-dash-table th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #6c757d;
    border-bottom: 2px solid #dee2e6;
}

.eaca-dash-th-num,
.eaca-dash-td-num {
    text-align: center !important;
}

.eaca-dash-th-action,
.eaca-dash-td-action {
    text-align: right !important;
    width: 100px;
}

.eaca-dash-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.eaca-dash-table tbody tr:hover {
    background: #f8f9ff;
}

.eaca-dash-table td {
    padding: 12px 14px;
    vertical-align: middle;
}

/* Trainee info cell */
.eaca-dash-trainee-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.eaca-dash-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.eaca-dash-avatar--lg {
    width: 48px;
    height: 48px;
    font-size: 16px;
}

.eaca-dash-trainee-name {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.eaca-dash-trainee-email {
    display: block;
    font-size: 12px;
    color: #999;
}

/* Score badges */
.eaca-dash-score {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 13px;
}

.eaca-dash-score--good {
    background: #d4edda;
    color: #155724;
}

.eaca-dash-score--low {
    background: #f8d7da;
    color: #721c24;
}

.eaca-dash-score--neutral {
    background: #e9ecef;
    color: #6c757d;
}

.eaca-dash-pending-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff3cd;
    color: #856404;
    font-size: 12px;
    font-weight: 700;
}

.eaca-dash-check {
    color: #27ae60;
    font-size: 16px;
    font-weight: 700;
}

/* Buttons */
.eaca-dash-btn {
    display: inline-block;
    padding: 7px 16px;
    border: 1px solid #4a90d9;
    border-radius: 6px;
    background: #fff;
    color: #4a90d9;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    line-height: 1.4;
}

.eaca-dash-btn:hover {
    background: #4a90d9;
    color: #fff;
}

.eaca-dash-btn-back {
    border-color: #6c757d;
    color: #6c757d;
}

.eaca-dash-btn-back:hover {
    background: #6c757d;
    color: #fff;
}

.eaca-dash-btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

/* ============================
 *  Detail panel
 * ============================ */

.eaca-detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e6ea;
    flex-wrap: wrap;
}

.eaca-detail-trainee {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.eaca-detail-name {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
}

.eaca-detail-meta {
    font-size: 13px;
    color: #6c757d;
}

/* Essay accordion cards */
.eaca-detail-card {
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e6ea;
    background: #fff;
    transition: box-shadow 0.2s;
}

.eaca-detail-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.eaca-detail-card--pass {
    border-left: 4px solid #27ae60;
}

.eaca-detail-card--fail {
    border-left: 4px solid #c0392b;
}

.eaca-detail-card--pending {
    border-left: 4px solid #e67e22;
}

.eaca-detail-card--error {
    border-left: 4px solid #e67e22;
}

.eaca-detail-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    gap: 12px;
    transition: background 0.15s;
}

.eaca-detail-card-header:hover {
    background: #f8f9fa;
}

.eaca-detail-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.eaca-detail-card-left .eaca-qr-item-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    background: #6c757d;
}

.eaca-detail-card-left .eaca-qr-badge--pass {
    background: #27ae60;
}

.eaca-detail-card-left .eaca-qr-badge--fail {
    background: #c0392b;
}

.eaca-detail-card-left .eaca-qr-badge--pending {
    background: #e67e22;
}

.eaca-detail-quiz-name {
    display: block;
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.eaca-detail-q-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.eaca-detail-card-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.eaca-detail-chevron {
    font-size: 11px;
    color: #999;
    transition: transform 0.25s;
}

.eaca-detail-chevron--open {
    transform: rotate(180deg);
}

/* Card body (expandable) */
.eaca-detail-card-body {
    border-top: 1px solid #f0f0f0;
}

.eaca-detail-section {
    padding: 12px 18px;
    border-bottom: 1px solid #f5f5f5;
}

.eaca-detail-section:last-child {
    border-bottom: none;
}

.eaca-detail-section h5 {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

.eaca-detail-block {
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.65;
}

.eaca-detail-block--question {
    background: #f0f4f8;
    color: #2c3e50;
}

.eaca-detail-block--answer {
    background: #fafafa;
    border-left: 3px solid #ccc;
    color: #555;
}

.eaca-detail-block--expected {
    background: #f0ffee;
    border-left: 3px solid #27ae60;
    color: #333;
    white-space: pre-wrap;
}

.eaca-detail-block--feedback {
    background: #eef6ff;
    border-left: 3px solid #4a90d9;
    color: #333;
}

.eaca-detail-block--areas {
    background: #fdf2f2;
    border-left: 3px solid #c0392b;
}

.eaca-detail-block--areas ul {
    margin: 0;
    padding: 0 0 0 18px;
    list-style: disc;
}

.eaca-detail-block--areas li {
    margin: 4px 0;
    color: #721c24;
    font-size: 14px;
}

.eaca-detail-block--note {
    background: #eef0ff;
    border-left: 3px solid #5c6bc0;
    color: #3949ab;
    font-style: italic;
}

.eaca-detail-block--error {
    background: #fce4d6;
    color: #8b3a0f;
}

.eaca-detail-block--pending {
    background: #fff8e1;
    color: #856404;
    font-style: italic;
}

.eaca-detail-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
}

.eaca-detail-date {
    font-size: 12px;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .eaca-dash-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .eaca-dash-select {
        width: 100%;
    }
    .eaca-dash-summary {
        flex-wrap: wrap;
    }
    .eaca-dash-summary-item {
        min-width: 70px;
    }
    .eaca-dash-table {
        font-size: 13px;
    }
    .eaca-dash-table th,
    .eaca-dash-table td {
        padding: 8px 6px;
    }
    .eaca-dash-trainee-email {
        display: none;
    }
    .eaca-detail-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Detail footer actions */
.eaca-detail-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.eaca-manual-grade-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.eaca-manual-pts-input {
    padding: 4px 6px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}

.eaca-manual-pts-input:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.15);
}

.eaca-manual-pts-max {
    font-size: 12px;
    color: #999;
    margin-right: 4px;
}

.eaca-dash-btn-reeval {
    border-color: #e67e22;
    color: #e67e22;
}

.eaca-dash-btn-reeval:hover {
    background: #e67e22;
    color: #fff;
}

.eaca-dash-btn-save-pts {
    border-color: #27ae60;
    color: #27ae60;
}

.eaca-dash-btn-save-pts:hover {
    background: #27ae60;
    color: #fff;
}

.eaca-detail-footer {
    flex-wrap: wrap;
}

/* Batch toolbar */
.eaca-batch-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    margin-bottom: 16px;
    background: #f8f9fa;
    border: 1px solid #e2e6ea;
    border-radius: 8px;
    flex-wrap: wrap;
}

.eaca-batch-select-all {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
}

.eaca-batch-count {
    font-size: 13px;
    color: #4a90d9;
    font-weight: 600;
}

/* Checkbox in card header */
.eaca-detail-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
    padding: 4px;
}

.eaca-detail-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4a90d9;
}

.eaca-detail-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.eaca-detail-card-left {
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.eaca-dash-btn-reeval-one {
    border-color: #e67e22;
    color: #e67e22;
}

.eaca-dash-btn-reeval-one:hover {
    background: #e67e22;
    color: #fff;
}

/* Correction count info bar */
.eaca-feedback-corrections-info {
    padding: 8px 20px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #888;
    text-align: right;
}

.eaca-feedback-corrections-info strong {
    color: #c0392b;
}

/* Detail footer left grouping */
.eaca-detail-footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.eaca-detail-corrections {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e9ecef;
    color: #6c757d;
    font-weight: 600;
}

.eaca-detail-corrections--exhausted {
    background: #f8d7da;
    color: #721c24;
}

/* Filters row */
.eaca-qr-filters {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.eaca-qr-filters label {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    gap: 4px;
}

.eaca-qr-filter-input {
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 13px;
    background: #fff;
}

.eaca-qr-filter-input:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 2px rgba(74,144,217,0.15);
}

/* Question number circles */
.eaca-qr-num--pass { background: #27ae60; }
.eaca-qr-num--fail { background: #c0392b; }
.eaca-qr-num--pending { background: #e67e22; }

/* Attempts label */
.eaca-qr-attempts-label {
    font-size: 11px;
    color: #999;
}

/* Points display */
.eaca-qr-pts {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-left: 6px;
}

/* Retry link */
.eaca-qr-actions {
    padding: 8px 20px;
    border-top: 1px solid #f0f0f0;
}

.eaca-qr-retry-link {
    display: inline-block;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #4a90d9;
    border: 1px solid #4a90d9;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s;
}

.eaca-qr-retry-link:hover {
    background: #4a90d9;
    color: #fff;
}

/* History toggle */
.eaca-qr-history-toggle {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #4a90d9;
    cursor: pointer;
    border-top: 1px solid #f0f0f0;
    user-select: none;
}

.eaca-qr-history-toggle:hover {
    background: #f8f9ff;
}

.eaca-chevron {
    display: inline-block;
    font-size: 10px;
    transition: transform 0.25s;
    margin-right: 6px;
}

.eaca-chevron--open {
    transform: rotate(180deg);
}

/* History items */
.eaca-qr-history {
    border-top: 1px solid #f0f0f0;
}

.eaca-qr-history-item {
    padding: 10px 20px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
}

.eaca-qr-history-item--pass { border-left: 3px solid #27ae60; }
.eaca-qr-history-item--fail { border-left: 3px solid #c0392b; }
.eaca-qr-history-item--pending { border-left: 3px solid #e67e22; }

.eaca-qr-history-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.eaca-qr-history-num {
    font-weight: 600;
    color: #333;
}

.eaca-qr-history-date {
    font-size: 12px;
    color: #999;
}

.eaca-qr-history-score {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.eaca-qr-history-feedback {
    margin-top: 6px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

/* Pending/Corrected message */
.eaca-qr-pending-msg {
    padding: 12px 20px;
    color: #856404;
    background: #fff8e1;
    font-style: italic;
    font-size: 14px;
    border-top: 1px solid #f0f0f0;
}



/* ============================
 *  Quiz submit wait overlay
 * ============================ */

#eaca-quiz-wait-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.eaca-quiz-wait-box {
    background: #fff;
    border-radius: 12px;
    padding: 40px 48px;
    max-width: 520px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: eaca-wait-appear 0.3s ease-out;
}

@keyframes eaca-wait-appear {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.eaca-quiz-wait-box h3 {
    margin: 16px 0 12px;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
}

.eaca-quiz-wait-box p {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

.eaca-quiz-wait-warning {
    margin-top: 16px !important;
    padding: 10px 16px;
    background: #fff8e1;
    border: 1px solid #e6a817;
    border-radius: 8px;
    color: #7a5d00 !important;
    font-size: 14px !important;
}

.eaca-quiz-wait-timer {
    margin-top: 16px !important;
    font-size: 13px !important;
    color: #999 !important;
}

.eaca-quiz-wait-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #e2e6ea;
    border-top-color: #4a90d9;
    border-radius: 50%;
    animation: eaca-spin 0.7s linear infinite;
}

@media (max-width: 600px) {
    .eaca-quiz-wait-box {
        margin: 16px;
        padding: 28px 24px;
    }
}

/* ============================
 *  Quiz prefill notice
 * ============================ */

.eaca-prefill-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    margin: 0 0 20px;
    background: #e8f5e9;
    border: 1px solid #81c784;
    border-radius: 8px;
    font-size: 14px;
    color: #2e7d32;
    line-height: 1.5;
    animation: eaca-prefill-slide 0.4s ease-out;
}

@keyframes eaca-prefill-slide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.eaca-prefill-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.eaca-prefill-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 20px;
    color: #2e7d32;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
}

.eaca-prefill-close:hover {
    color: #1b5e20;
}

/* ============================
 *  Quiz summary banner (on quiz page)
 * ============================ */

.eaca-quiz-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 24px 0;
    padding: 18px 24px;
    background: #f8f9fa;
    border: 1px solid #e2e6ea;
    border-radius: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    flex-wrap: wrap;
}

.eaca-quiz-banner-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.eaca-quiz-banner-stat {
    text-align: center;
    min-width: 80px;
}

.eaca-quiz-banner-val {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
}

.eaca-quiz-banner-lbl {
    display: block;
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.eaca-quiz-banner-link {
    display: inline-block;
    padding: 10px 22px;
    background: #4a90d9;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none !important;
    transition: background 0.2s;
    white-space: nowrap;
}

.eaca-quiz-banner-link:hover {
    background: #3578c0;
    color: #fff !important;
}

@media (max-width: 600px) {
    .eaca-quiz-banner {
        flex-direction: column;
        text-align: center;
    }
    .eaca-quiz-banner-stats {
        justify-content: center;
    }
}

/* Quiz results: section detail blocks */
.eaca-qr-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 6px 20px 10px;
    font-size: 13px;
    color: #999;
}

.eaca-qr-date {
    font-size: 12px;
    color: #aaa;
}

.eaca-qr-section {
    padding: 8px 20px;
    font-size: 14px;
    line-height: 1.65;
    color: #333;
}

.eaca-qr-section strong {
    display: block;
    margin-bottom: 4px;
    color: #555;
}

.eaca-qr-feedback-text {
    margin: 4px 0 0;
}

.eaca-qr-instructor-note {
    background: #eef0ff;
    border-top: 1px dashed #c5cae9;
    color: #3949ab;
    font-size: 13px;
    font-style: italic;
}

/* History answer preview */
.eaca-qr-history-answer {
    margin-top: 6px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.eaca-qr-history-answer strong {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Quiz wait message (inline, replaces LD text) */
.eaca-quiz-wait-msg {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #c0392b;
    font-size: 16px;
    line-height: 1.5;
}

.eaca-quiz-wait-msg strong {
    color: #c0392b;
}

.eaca-quiz-wait-spinner-inline {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e0e0e0;
    border-top-color: #c0392b;
    border-radius: 50%;
    animation: eaca-spin 0.7s linear infinite;
    flex-shrink: 0;
}
