/**
 * Exam Monitor V2 - Shared Styles
 */

/* --- Student Report Wrapper --- */
.sr-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.sr-wrapper .report-header {
    background: #1d2327;
    color: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.sr-wrapper .report-title {
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0;
    color: #fff !important;
    word-break: break-word;
}

.sr-wrapper .target-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.1);
    padding: 10px 15px;
    border-radius: 6px;
}

.sr-wrapper .target-input-group label {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

.sr-wrapper .target-input-group span.sr-target-value {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

.sr-wrapper .sr-target-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.sr-wrapper .sr-target-metric {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin: 0;
    line-height: 1;
}

.sr-wrapper .sr-target-main {
    font-size: 32px;
    font-weight: 700;
    color: #fbbf24;
    line-height: 1;
}

.sr-wrapper .sr-target-sub {
    font-size: 18px;
    font-weight: 600;
    color: #fcd34d;
}

.sr-wrapper .sr-target-helper {
    font-size: 11px;
    color: #fbbf24;
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: baseline;
    justify-content: center;
    column-gap: 8px;
    row-gap: 3px;
    flex-wrap: wrap;
    text-align: center;
    line-height: 1.5;
}

.sr-wrapper .sr-target-helper-word {
    color: #fcd34d;
    white-space: nowrap;
}

.sr-wrapper .sr-target-helper-value {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
}

.sr-wrapper .sr-target-helper-main {
    font-size: 14px;
    font-weight: 800;
    color: #ef4444;
}

.sr-wrapper .sr-target-helper-sub {
    font-size: 12px;
    font-weight: 700;
    color: #fca5a5;
}

.sr-wrapper .sr-target-helper-value.is-success .sr-target-helper-main {
    color: #22c55e;
}

.sr-wrapper .sr-target-helper-value.is-success .sr-target-helper-sub {
    color: #86efac;
}

.sr-wrapper .report-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.sr-wrapper .report-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e4e7;
}

.sr-wrapper .report-card.full-width {
    grid-column: 1 / -1;
}

.sr-wrapper .card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #f0f0f1;
    padding-bottom: 12px;
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.model-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.1;
    white-space: nowrap;
}

.model-badge--compact {
    font-size: 9px;
    padding: 2px 6px;
}

.badge-dyn {
    background: #fff5f5;
    color: #d63638;
    border: 1px solid #d63638;
}

.badge-stat {
    background: #e6f4ea;
    color: #1e8e3e;
    border: 1px solid #1e8e3e;
}

.sr-wrapper .avg-display {
    text-align: center;
    padding: 10px 0;
}

.sr-wrapper .avg-number {
    font-size: 56px;
    font-weight: 700;
    color: #007cba;
    line-height: 1;
}

.sr-wrapper .avg-label {
    font-size: 13px;
    color: #646970;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 10px;
}

/* --- Modern Table --- */
.sr-wrapper .modern-table,
.em-modern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    text-align: center;
    color: #000;
    font-weight: 700;
    border: 1px solid #ccd0d4;
}

.sr-wrapper .modern-table th,
.em-modern-table th {
    background: #f0f0f1;
    color: #000;
    font-weight: 800;
    padding: 14px 10px;
    border: 1px solid #ccd0d4;
    border-bottom: 2px solid #ccd0d4;
    text-transform: uppercase;
    font-size: 13px;
}
.sr-wrapper .modern-table th {
    text-align: center;
}

.sr-wrapper .modern-table td,
.em-modern-table td {
    padding: 14px 10px;
    border: 1px solid #e2e4e7;
    vertical-align: middle;
    color: #000;
}

.sr-wrapper .modern-table tr:hover td,
.em-modern-table tr:hover td {
    background: #f9f9f9;
}

.sr-wrapper .table-highlight-grade {
    color: #d63638;
    font-weight: 800;
    font-size: 16px;
    background-color: #fff0f0;
}

.sr-wrapper .table-highlight-test {
    background: #e5e5e5;
    font-weight: 800;
    border: 1px solid #ccd0d4 !important;
    border-radius: 0;
    color: #000;
}

.sr-wrapper .col-diff { background-color: #f0f8ff; }
.sr-wrapper .col-passed { background-color: #fff9e6; }
.sr-wrapper .col-est { background-color: #f0fff0; }
.sr-wrapper .modern-table th.col-diff { background-color: #e1f0fa; }
.sr-wrapper .modern-table th.col-passed { background-color: #fdf1d6; }
.sr-wrapper .modern-table th.col-grade { background-color: #fde5e5; }
.sr-wrapper .modern-table th.col-est { background-color: #e6f9e6; }

.sr-wrapper .em-ghost-row .table-highlight-grade,
.exam-report-wrapper .em-ghost-row .table-highlight-grade { background-color: #fff7ed; color: #b45309; }
.sr-wrapper .em-ghost-row .col-est,
.exam-report-wrapper .em-ghost-row .col-est { background-color: #fff7ed; }

.sr-wrapper .disclaimer-text {
    font-size: 12px;
    color: #666;
    margin-top: 15px;
    line-height: 1.5;
    padding: 10px;
    background: #f9f9f9;
    border-left: 3px solid #007cba;
    border-radius: 4px;
}

.em-help-details {
    --em-help-color: #007cba;
    background: #f8f9f9;
    border: 1px solid #e2e4e7;
    border-left: 4px solid var(--em-help-color);
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.em-help-details > summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    background: rgba(255,255,255,0.45);
}

.em-help-details > summary::-webkit-details-marker {
    display: none;
}

.em-help-details > summary::before {
    content: '▸';
    font-size: 14px;
    line-height: 1;
    color: var(--em-help-color);
}

.em-help-details[open] > summary::before {
    content: '▾';
}

.em-help-details > summary::after {
    content: 'Πάτησε για άνοιγμα';
    margin-left: auto;
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

.em-help-details[open] > summary::after {
    content: 'Πάτησε για κλείσιμο';
}

.em-help-details[open] > summary {
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.em-help-details > .disclaimer-text,
.em-help-details > .em-collapsible-help {
    margin: 0 !important;
    background: transparent !important;
    border-left: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 14px 15px 15px !important;
}

.sr-wrapper .report-card:fullscreen,
.sr-wrapper .report-card.em-fullscreen-card,
.exam-report-wrapper .report-card:fullscreen,
.exam-report-wrapper .report-card.em-fullscreen-card {
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box;
    overflow: hidden !important;
    height: 100vh !important;
    background-color: #fff !important;
    padding: 20px !important;
}

.sr-wrapper .report-card:-webkit-full-screen,
.exam-report-wrapper .report-card:-webkit-full-screen {
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box;
    overflow: hidden !important;
    height: 100vh !important;
    background-color: #fff !important;
    padding: 20px !important;
}

.sr-wrapper .report-card:fullscreen .em-stats-table-scroll,
.sr-wrapper .report-card.em-fullscreen-card .em-stats-table-scroll,
.exam-report-wrapper .report-card:fullscreen .em-stats-table-scroll,
.exam-report-wrapper .report-card.em-fullscreen-card .em-stats-table-scroll,
.sr-wrapper .report-card:-webkit-full-screen .em-stats-table-scroll,
.exam-report-wrapper .report-card:-webkit-full-screen .em-stats-table-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto !important;
}

.sr-wrapper .report-card:fullscreen .modern-table,
.sr-wrapper .report-card.em-fullscreen-card .modern-table,
.exam-report-wrapper .report-card:fullscreen .modern-table,
.exam-report-wrapper .report-card.em-fullscreen-card .modern-table,
.sr-wrapper .report-card:-webkit-full-screen .modern-table,
.exam-report-wrapper .report-card:-webkit-full-screen .modern-table {
    min-width: max-content;
}

.sr-ai-report-viewer-backdrop {
    position: fixed !important;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: stretch;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(3px);
}

.sr-ai-report-viewer-backdrop.is-visible {
    display: flex;
}

.sr-ai-report-viewer-backdrop[aria-hidden="true"] {
    display: none !important;
}

.sr-ai-report-viewer-backdrop[aria-hidden="false"] {
    display: flex !important;
}

.sr-ai-report-viewer-backdrop:fullscreen {
    padding: 0;
    background: rgba(15, 23, 42, 0.9);
}

.sr-ai-report-viewer-card {
    width: min(96vw, 1380px);
    height: min(94vh, 980px);
    margin: auto;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #dbe3ea;
    border-radius: 18px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}

.sr-ai-report-viewer-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #eff6ff;
    border-bottom: 1px solid #dbe3ea;
}

.sr-ai-report-viewer-frame {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    border: 0;
    background: #f8fafc;
}

.sr-hero-highlight-card {
    flex: 1;
    text-align: center;
    border-radius: 10px;
    padding: 22px 20px;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.16);
    position: relative;
    z-index: 2;
}

.sr-hero-highlight-card--target {
    background: linear-gradient(145deg, rgba(96,165,250,0.12), rgba(59,130,246,0.04));
    border: 1px solid rgba(96, 165, 250, 0.28);
    box-shadow: 0 8px 20px rgba(0,0,0,0.16), inset 0 0 18px rgba(96,165,250,0.06);
}

.sr-hero-highlight-card--average {
    background: linear-gradient(145deg, rgba(99,102,241,0.12), rgba(59,130,246,0.04));
    border: 1px solid rgba(129, 140, 248, 0.26);
    box-shadow: 0 8px 20px rgba(0,0,0,0.16), inset 0 0 18px rgba(129,140,248,0.06);
}

.sr-hero-highlight-card--estimate {
    background: linear-gradient(145deg, rgba(74,222,128,0.08), rgba(34,197,94,0.02));
    border: 1px solid rgba(74, 222, 128, 0.25);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2), inset 0 0 20px rgba(74,222,128,0.05);
    transform: scale(1.05);
}

.sr-hero-highlight-card--range {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(251, 191, 36, 0.15);
}

.sr-hero-highlight-card--cohort {
    background: linear-gradient(145deg, rgba(148,163,184,0.12), rgba(71,85,105,0.05));
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 8px 20px rgba(0,0,0,0.16), inset 0 0 18px rgba(148,163,184,0.06);
}

.sr-hero-highlight-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 900;
    margin-bottom: 14px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

.sr-hero-highlight-card--target .sr-hero-highlight-label {
    color: #93c5fd;
}

.sr-hero-highlight-card--average .sr-hero-highlight-label {
    color: #bfdbfe;
}

.sr-hero-highlight-card--estimate .sr-hero-highlight-label {
    color: #86efac;
    letter-spacing: 1.5px;
}

.sr-hero-highlight-card--range .sr-hero-highlight-label {
    color: #fde68a;
}

.sr-hero-highlight-card--cohort .sr-hero-highlight-label {
    color: #cbd5e1;
}

.sr-hero-highlight-metric {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
}

.sr-hero-highlight-main {
    font-size: 52px;
    font-weight: 900;
    line-height: 1;
}

.sr-hero-highlight-sub {
    font-size: 18px;
    font-weight: 600;
}

.sr-hero-highlight-card--target .sr-hero-highlight-main {
    color: #93c5fd;
    text-shadow: 0 2px 8px rgba(96,165,250,0.22);
}

.sr-hero-highlight-card--target .sr-hero-highlight-sub {
    color: #dbeafe;
}

.sr-hero-highlight-card--average .sr-hero-highlight-main {
    color: #e5e7eb;
    text-shadow: 0 2px 8px rgba(129,140,248,0.18);
}

.sr-hero-highlight-card--average .sr-hero-highlight-sub {
    color: #94a3b8;
}

.sr-hero-highlight-card--estimate .sr-hero-highlight-main {
    color: #4ade80;
    text-shadow: 0 2px 8px rgba(74,222,128,0.3);
}

.sr-hero-highlight-card--estimate .sr-hero-highlight-sub {
    color: #dcfce7;
}

.sr-hero-highlight-card--cohort .sr-hero-highlight-main {
    color: #e2e8f0;
    text-shadow: 0 2px 8px rgba(148,163,184,0.18);
}

.sr-hero-highlight-card--cohort .sr-hero-highlight-sub {
    color: #cbd5e1;
}

.sr-hero-highlight-helper {
    font-size: 11px;
    margin-top: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sr-hero-highlight-card--average .sr-hero-highlight-helper {
    color: #94a3b8;
}

.sr-hero-highlight-card--estimate .sr-hero-highlight-helper {
    color: #4ade80;
    background: rgba(74,222,128,0.1);
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 1px;
}

.sr-hero-highlight-card--cohort .sr-hero-highlight-helper {
    color: #cbd5e1;
}

.sr-hero-highlight-meta {
    margin-top: 10px;
    font-size: 11px;
    line-height: 1.5;
    color: #94a3b8;
    font-weight: 700;
    text-align: center;
}

.sr-hero-highlight-card--cohort.is-positive .sr-hero-highlight-main {
    color: #4ade80;
    text-shadow: 0 2px 8px rgba(74,222,128,0.26);
}

.sr-hero-highlight-card--cohort.is-positive .sr-hero-highlight-sub,
.sr-hero-highlight-card--cohort.is-positive .sr-hero-highlight-helper {
    color: #bbf7d0;
}

.sr-hero-highlight-card--cohort.is-negative .sr-hero-highlight-main {
    color: #f87171;
    text-shadow: 0 2px 8px rgba(248,113,113,0.22);
}

.sr-hero-highlight-card--cohort.is-negative .sr-hero-highlight-sub,
.sr-hero-highlight-card--cohort.is-negative .sr-hero-highlight-helper {
    color: #fecaca;
}

.sr-hero-highlight-card--cohort.is-neutral .sr-hero-highlight-main {
    color: #fbbf24;
    text-shadow: 0 2px 8px rgba(251,191,36,0.22);
}

.sr-hero-highlight-card--cohort.is-neutral .sr-hero-highlight-sub,
.sr-hero-highlight-card--cohort.is-neutral .sr-hero-highlight-helper {
    color: #fde68a;
}

.sr-hero-highlight-card--cohort.is-no-data .sr-hero-highlight-main,
.sr-hero-highlight-card--cohort.is-no-data .sr-hero-highlight-sub,
.sr-hero-highlight-card--cohort.is-no-data .sr-hero-highlight-helper {
    color: #cbd5e1;
}

.sr-hero-highlight-card--target .sr-target-helper {
    color: #bfdbfe;
}

.sr-hero-highlight-card--target .sr-target-helper-word {
    color: #dbeafe;
}

.sr-hero-highlight-card--target .sr-target-helper-main {
    color: #60a5fa;
}

.sr-hero-highlight-card--target .sr-target-helper-sub {
    color: #bfdbfe;
}

.sr-wrapper .em-model-preview-panel {
    margin: -6px 0 26px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #dbe4ee;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    padding: 18px 20px;
}

.sr-wrapper .em-model-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.sr-wrapper .em-model-preview-copy {
    flex: 1 1 420px;
    min-width: 280px;
}

.sr-wrapper .em-model-preview-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.sr-wrapper .em-model-preview-text {
    font-size: 13px;
    line-height: 1.55;
    color: #334155;
    margin: 0;
}

.sr-wrapper .em-model-preview-text + .em-model-preview-text {
    margin-top: 6px;
}

.sr-wrapper .em-model-preview-text.is-muted {
    color: #64748b;
}

.sr-wrapper .em-model-preview-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 1 420px;
}

.sr-wrapper .em-model-preview-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    border: 1px solid transparent;
    background: #eef2ff;
    color: #3730a3;
}

.sr-wrapper .em-model-preview-chip strong {
    font-size: 12px;
}

.sr-wrapper .em-model-preview-chip--saved {
    background: #f8fafc;
    color: #475569;
    border-color: #cbd5e1;
}

.sr-wrapper .em-model-preview-chip--active {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.sr-wrapper .em-model-preview-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sr-wrapper .em-model-preview-button.button {
    min-height: 38px;
    padding: 7px 12px;
    border-radius: 999px;
    border-color: #cbd5e1;
    background: #fff;
    color: #1e293b;
    font-weight: 700;
    line-height: 1.35;
    box-shadow: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.sr-wrapper .em-model-preview-button.button:hover {
    border-color: #93c5fd;
    color: #1d4ed8;
    background: #f8fbff;
    transform: translateY(-1px);
}

.sr-wrapper .em-model-preview-button.button.is-active,
.sr-wrapper .em-model-preview-button.button.is-active:hover {
    background: #1d4ed8;
    color: #fff;
    border-color: #1d4ed8;
    box-shadow: 0 8px 18px rgba(29, 78, 216, 0.18);
}

.sr-wrapper .em-model-preview-button.button:focus {
    box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.18);
}

.sp-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.sp-wrapper .report-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.sp-wrapper .report-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e4e7;
}

.sp-wrapper .report-card.full-width {
    grid-column: 1 / -1;
}

.sp-wrapper .card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #f0f0f1;
    padding-bottom: 12px;
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sp-wrapper .prob-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #f0f0f1;
}

.sp-wrapper .prob-row:last-child {
    border-bottom: none;
}

.sp-wrapper .prob-label {
    font-size: 15px;
    font-weight: 600;
    color: #3c434a;
}

.sp-wrapper .prob-value {
    font-size: 18px;
    font-weight: bold;
    color: #007cba;
    background: #e5f5fa;
    padding: 4px 12px;
    border-radius: 20px;
}

.sp-wrapper .sens-bar-container {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.sp-wrapper .sens-bar-label {
    width: 100px;
    font-weight: 600;
    font-size: 13px;
    color: #646970;
}

.sp-wrapper .sens-bar-bg {
    flex: 1;
    height: 12px;
    background: #f0f0f1;
    border-radius: 6px;
    overflow: hidden;
    margin: 0 15px;
}

.sp-wrapper .sens-bar-fill {
    height: 100%;
    background: #007cba;
    border-radius: 6px;
    transition: width 0.3s;
}

.sp-wrapper .sens-bar-value {
    width: 60px;
    text-align: right;
    font-weight: bold;
    font-size: 13px;
    color: #1d2327;
}

.sp-wrapper .sim-input {
    width: 100px;
    font-size: 24px;
    text-align: center;
    padding: 10px;
    border: 2px solid #007cba;
    border-radius: 8px;
    color: #007cba;
    font-weight: bold;
}

.sp-wrapper .sim-result {
    font-size: 42px;
    font-weight: 700;
    color: #10b981;
    margin-top: 15px;
}

.sp-wrapper .badge-risk {
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    color: #fff;
}

.sp-wrapper .risk-low { background-color: #00a32a; }
.sp-wrapper .risk-med { background-color: #f59e0b; }
.sp-wrapper .risk-high { background-color: #d63638; }

.sp-wrapper .phase-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    background: #f0f0f1;
    border: 1px solid #ccc;
    display: inline-block;
}

.sp-wrapper .disclaimer-text {
    font-size: 12px;
    color: #666;
    margin-top: 15px;
    line-height: 1.5;
    padding: 10px;
    background: #f9f9f9;
    border-left: 3px solid #007cba;
    border-radius: 4px;
}

.sr-wrapper .fc .fc-daygrid-event {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    line-height: 1.4;
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: default !important;
}

.sr-wrapper .fc .fc-event,
.sr-wrapper .fc a.fc-event {
    cursor: default !important;
    text-decoration: none !important;
}

.sr-wrapper .fc .fc-daygrid-day-frame {
    min-height: 85px;
}

.sr-wrapper .fc .fc-daygrid-event-harness {
    margin-bottom: 2px;
}

.sr-wrapper .fc .fc-event-title {
    font-weight: 600;
}

.sr-wrapper .fc .fc-daygrid-more-link {
    font-size: 11px;
    font-weight: 700;
    color: #007cba;
}

.sr-wrapper .fc .fc-event-time {
    font-weight: 700;
    margin-right: 3px;
}

/* --- Dashboard admin table --- */
.em-dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.em-dashboard-table th {
    background: #1d2327;
    color: #fff;
    padding: 8px 4px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 10;
}

.em-dashboard-table td {
    padding: 4px;
    border: 1px solid #e2e4e7;
    text-align: center;
    vertical-align: middle;
}

.em-dashboard-table tr:hover td {
    background-color: #f0f6fc !important;
}

/* --- Year filter bar --- */
.em-year-filter-bar {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

/* --- Settings page sections --- */
.em-settings-section {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.em-settings-section h3 {
    margin-top: 0;
    cursor: pointer;
    user-select: none;
}

/* --- Inline edit cells --- */
.inline-edit-cell {
    cursor: pointer;
    transition: background-color 0.2s;
}

.inline-edit-cell:hover {
    background-color: #f0f0f1 !important;
    box-shadow: inset 0 0 0 2px #007cba;
}

/* --- Progress Bar --- */
.em-progress-bar-container {
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    height: 24px;
    margin: 15px 0;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.em-progress-bar-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    background-size: 1rem 1rem;
    background-image: linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
    animation: em-progress-stripes 1s linear infinite;
}

@keyframes em-progress-stripes {
    0% { background-position: 1rem 0; }
    100% { background-position: 0 0; }
}

.em-progress-bar-fill.low { background-color: #ef4444; }
.em-progress-bar-fill.medium { background-color: #f59e0b; }
.em-progress-bar-fill.high { background-color: #10b981; }

/* --- Leaderboard --- */
.em-leaderboard {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e4e7;
    padding: 20px;
    margin: 20px 0;
}

.em-leaderboard-row {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f1;
    gap: 15px;
}

.em-leaderboard-row:last-child { border-bottom: none; }

.em-leaderboard-row.is-me {
    background: linear-gradient(135deg, rgba(74,222,128,0.1), rgba(34,197,94,0.05));
    border-radius: 6px;
    border: 1px solid rgba(74,222,128,0.3);
}

.em-leaderboard-rank {
    font-size: 20px;
    font-weight: 900;
    min-width: 40px;
    text-align: center;
    color: #6b7280;
}

.em-leaderboard-rank.top-3 { color: #f59e0b; }

.em-leaderboard-name {
    font-weight: 600;
    flex: 1;
    color: #1d2327;
}

.em-leaderboard-score {
    font-size: 18px;
    font-weight: 800;
    color: #007cba;
}

/* --- Calendar --- */
.em-calendar-wrapper {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e4e7;
    padding: 20px;
    margin: 20px 0;
}

/* --- Grade notes tooltip --- */
.em-grade-note-icon {
    cursor: help;
    font-size: 10px;
    vertical-align: super;
    color: #007cba;
    margin-left: 2px;
}

.em-grade-note-tooltip {
    position: absolute;
    background: #1d2327;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    max-width: 250px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    pointer-events: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .sr-wrapper .report-grid { grid-template-columns: 1fr; }
    .sr-ai-report-viewer-backdrop {
        padding: 10px;
    }

    .sr-ai-report-viewer-card {
        width: 100%;
        height: 100%;
        border-radius: 12px;
    }

    .sr-ai-report-viewer-topbar {
        padding: 12px 14px;
    }

    .sp-wrapper .report-grid {
        grid-template-columns: 1fr;
    }

    .sp-wrapper .report-card {
        padding: 15px;
    }

    .sr-wrapper .fc .fc-daygrid-event {
        font-size: 10px;
        padding: 2px 4px;
    }

    .sr-wrapper .fc .fc-toolbar {
        flex-direction: column;
        gap: 8px;
    }

    .sr-wrapper .fc .fc-toolbar-title {
        font-size: 16px !important;
    }

    .sr-wrapper .fc .fc-daygrid-day-frame {
        min-height: 60px;
    }
}

/* --- BEST badge & cell highlight (top student of an exam) --- */
.em-best-cell,
.sr-wrapper .modern-table td.em-best-cell,
.em-modern-table td.em-best-cell {
    background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 100%) !important;
    border: 2px solid #d97706 !important;
    box-shadow: inset 0 0 14px rgba(217, 119, 6, 0.18);
    color: #78350f !important;
}

.em-best-cell .table-highlight-grade-inner,
.em-best-cell > span {
    color: #78350f !important;
}

.em-best-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
    color: #ffffff !important;
    font-weight: 900 !important;
    font-size: 13px !important;
    padding: 5px 12px;
    border-radius: 999px;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.55), 0 2px 4px rgba(0,0,0,0.25);
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
    letter-spacing: 0.6px;
    animation: em-best-pulse 2.4s ease-in-out infinite;
    white-space: nowrap;
}

@keyframes em-best-pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(245, 158, 11, 0.55), 0 2px 4px rgba(0,0,0,0.25);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 18px rgba(245, 158, 11, 0.9), 0 2px 6px rgba(0,0,0,0.3);
        transform: scale(1.06);
    }
}

@media (prefers-reduced-motion: reduce) {
    .em-best-badge { animation: none; }
}

/* --- Leaderboard button (admin context, per-exam) --- */
.em-leaderboard-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #5b21b6;
    box-shadow: 0 2px 5px rgba(109, 40, 217, 0.35);
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    line-height: 1.2;
    letter-spacing: 0.3px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

.em-leaderboard-btn:hover,
.em-leaderboard-btn:focus {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    box-shadow: 0 4px 10px rgba(109, 40, 217, 0.5);
    transform: scale(1.06);
    outline: none;
}

.em-leaderboard-btn:active {
    transform: scale(0.98);
    box-shadow: 0 1px 3px rgba(109, 40, 217, 0.35);
}

/* --- Repetition Priority Analysis (νέα Ανάλυση Ευαισθησίας) --- */
.em-rep-row {
    display: grid;
    grid-template-columns: 40px 1fr 140px 130px;
    grid-template-areas:
        "rank label value actions"
        "rank bar   bar   bar";
    column-gap: 12px;
    row-gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: help;
    border: 1px solid transparent;
}
.em-rep-rank    { grid-area: rank;    align-self: center; }
.em-rep-label   { grid-area: label; }
.em-rep-value   { grid-area: value; }
.em-rep-actions { grid-area: actions; }
.em-rep-bar-bg  { grid-area: bar;     align-self: end; }
.em-rep-row:hover {
    transform: translateX(4px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}
.em-rep-high {
    background: linear-gradient(90deg, #fef2f2 0%, #fff5f0 100%);
    border-left: 4px solid #dc2626;
}
.em-rep-mid {
    background: linear-gradient(90deg, #fff7ed 0%, #fffbeb 100%);
    border-left: 4px solid #f97316;
}
.em-rep-low {
    background: linear-gradient(90deg, #f0fdf4 0%, #ecfdf5 100%);
    border-left: 4px solid #10b981;
}
.em-rep-neg {
    background: linear-gradient(90deg, #f1f5f9 0%, #f8fafc 100%);
    border-left: 4px solid #94a3b8;
    opacity: 0.85;
}

.em-rep-rank {
    font-size: 22px;
    text-align: center;
    line-height: 1.1;
}

.em-rep-label { display: flex; flex-direction: column; gap: 2px; }
.em-rep-label strong { font-size: 14px; color: #1d2327; font-weight: 800; }
.em-rep-grade { font-size: 11px; color: #6b7280; }

.em-rep-bar-bg {
    height: 16px;
    background: rgba(15, 23, 42, 0.06);
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    min-width: 0;
}
.em-rep-bar-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.5s ease;
    box-shadow: inset 0 -1px 2px rgba(0,0,0,0.1);
    min-width: 4px;
}
.em-rep-high .em-rep-bar-fill { background: linear-gradient(90deg, #ef4444, #b91c1c); }
.em-rep-mid  .em-rep-bar-fill { background: linear-gradient(90deg, #fb923c, #ea580c); }
.em-rep-low  .em-rep-bar-fill { background: linear-gradient(90deg, #34d399, #059669); }
.em-rep-neg  .em-rep-bar-fill { background: linear-gradient(90deg, #cbd5e1, #94a3b8); }

.em-rep-value { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.em-rep-lift { font-size: 17px; font-weight: 900; line-height: 1.1; }
.em-rep-high .em-rep-lift { color: #b91c1c; }
.em-rep-mid  .em-rep-lift { color: #c2410c; }
.em-rep-low  .em-rep-lift { color: #047857; }
.em-rep-neg  .em-rep-lift { color: #64748b; }
.em-rep-explanation { font-size: 10px; color: #6b7280; margin-top: 2px; }

.em-rep-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    font-size: 11px;
    color: #475569;
}
.em-rep-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.em-rep-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.em-rep-legend-dot.high { background: #dc2626; }
.em-rep-legend-dot.mid  { background: #f97316; }
.em-rep-legend-dot.low  { background: #10b981; }

@media (max-width: 600px) {
    .em-rep-row {
        grid-template-columns: 32px 1fr;
        grid-template-areas:
            "rank label"
            "rank value"
            "rank actions"
            "bar  bar";
        gap: 6px 10px;
        padding: 10px 12px;
    }
    .em-rep-value, .em-rep-actions { justify-self: start; }
}

/* --- Header strip: deadline countdown + stats --- */
.em-rep-strategy-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 18px;
    color: #f1f5f9;
    box-shadow: 0 4px 12px rgba(15,23,42,0.15);
}
.em-rep-strategy-header .em-rep-countdown {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.em-rep-strategy-header .em-rep-countdown-icon {
    font-size: 28px;
}
.em-rep-strategy-header .em-rep-countdown-text {
    flex: 1; min-width: 200px;
}
.em-rep-strategy-header .em-rep-countdown-days {
    font-size: 26px; font-weight: 900; color: #fbbf24; line-height: 1;
}
.em-rep-strategy-header .em-rep-countdown-label {
    font-size: 12px; color: #cbd5e1;
    text-transform: uppercase; letter-spacing: 0.8px; margin-top: 4px;
}
.em-rep-strategy-header .em-rep-stats {
    display: flex; gap: 10px; flex-wrap: wrap;
    margin-left: auto;
}
.em-rep-strategy-header .em-rep-stat {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
    min-width: 70px;
}
.em-rep-strategy-header .em-rep-stat-value {
    font-size: 18px; font-weight: 800; line-height: 1;
}
.em-rep-strategy-header .em-rep-stat-label {
    font-size: 10px; color: #cbd5e1;
    text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px;
}
.em-rep-stat.is-high  .em-rep-stat-value { color: #fca5a5; }
.em-rep-stat.is-mid   .em-rep-stat-value { color: #fdba74; }
.em-rep-stat.is-low   .em-rep-stat-value { color: #86efac; }
.em-rep-stat.is-priority1 .em-rep-stat-value { color: #fca5a5; }
.em-rep-stat.is-maintain  .em-rep-stat-value { color: #fdba74; }
.em-rep-stat.is-easywin   .em-rep-stat-value { color: #86efac; }
.em-rep-stat.is-ignore    .em-rep-stat-value { color: #cbd5e1; }

/* --- 2×2 Quadrant matrix (Strength/Weakness) --- */
.em-rep-quadrant-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}
.em-rep-quadrant {
    border-radius: 10px;
    padding: 12px 14px;
    border: 2px solid transparent;
    min-height: 80px;
    display: flex; flex-direction: column;
}
.em-rep-quadrant-title {
    font-size: 11px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.4px;
    margin-bottom: 6px;
}
.em-rep-quadrant-tags {
    display: flex; flex-wrap: wrap; gap: 4px;
}
.em-rep-quadrant-tag {
    background: rgba(255,255,255,0.85);
    padding: 2px 8px; border-radius: 999px;
    font-size: 11px; font-weight: 700;
    border: 1px solid rgba(0,0,0,0.08);
}
.em-rep-quadrant.q-priority1 { background: linear-gradient(135deg, #fef2f2, #fff5f5); border-color: #dc2626; }
.em-rep-quadrant.q-priority1 .em-rep-quadrant-title { color: #b91c1c; }
.em-rep-quadrant.q-maintain  { background: linear-gradient(135deg, #fffbeb, #fef9c3); border-color: #d97706; }
.em-rep-quadrant.q-maintain .em-rep-quadrant-title { color: #92400e; }
.em-rep-quadrant.q-easywin   { background: linear-gradient(135deg, #f0fdf4, #ecfdf5); border-color: #10b981; }
.em-rep-quadrant.q-easywin  .em-rep-quadrant-title { color: #047857; }
.em-rep-quadrant.q-ignore    { background: linear-gradient(135deg, #f8fafc, #f1f5f9); border-color: #94a3b8; opacity: 0.85; }
.em-rep-quadrant.q-ignore   .em-rep-quadrant-title { color: #64748b; }

/* --- Enhanced row layout with extras --- */
.em-rep-row .em-rep-label strong {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.em-rep-row .em-rep-syllabus {
    font-size: 10.5px; color: #475569; font-weight: 600;
    margin-top: 2px; line-height: 1.3;
}
.em-rep-row .em-rep-cohort {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 7px; border-radius: 999px;
    font-size: 10.5px; font-weight: 700;
    background: rgba(15,23,42,0.06);
    margin-top: 3px;
    white-space: nowrap;
}
.em-rep-row .em-rep-cohort.is-below { background: #fee2e2; color: #b91c1c; }
.em-rep-row .em-rep-cohort.is-above { background: #dcfce7; color: #047857; }
.em-rep-row .em-rep-cohort.is-equal { background: #f1f5f9; color: #475569; }

.em-rep-quadbadge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px; border-radius: 999px;
    font-size: 10px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.4px;
    line-height: 1.2; white-space: nowrap;
    border: 1px solid;
}
.em-rep-quadbadge.q-priority1 { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.em-rep-quadbadge.q-maintain  { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.em-rep-quadbadge.q-easywin   { background: #dcfce7; color: #047857; border-color: #86efac; }
.em-rep-quadbadge.q-ignore    { background: #e2e8f0; color: #64748b; border-color: #cbd5e1; }

.em-rep-risk {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10.5px; font-weight: 700;
    color: #475569; margin-top: 3px;
}
.em-rep-risk-bar {
    width: 50px; height: 5px;
    background: rgba(0,0,0,0.08); border-radius: 3px;
    overflow: hidden; display: inline-block; vertical-align: middle;
}
.em-rep-risk-fill { height: 100%; background: linear-gradient(90deg, #fbbf24, #dc2626); border-radius: 3px; }

.em-rep-actions {
    display: flex; flex-direction: column; gap: 5px;
    align-items: stretch;
}
.em-rep-action-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    padding: 5px 10px; border-radius: 6px;
    font-size: 11px; font-weight: 700;
    text-decoration: none !important;
    text-align: center;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    white-space: nowrap;
}
.em-rep-action-themes {
    background: #e0f2fe; color: #0369a1 !important; border: 1px solid #7dd3fc;
}
.em-rep-action-solutions {
    background: #dcfce7; color: #047857 !important; border: 1px solid #86efac;
}
.em-rep-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.12);
}
.em-rep-action-disabled {
    background: #f8fafc; color: #94a3b8 !important;
    border: 1px dashed #cbd5e1; cursor: not-allowed; opacity: 0.6;
}

@media (max-width: 900px) {
    .em-rep-row {
        grid-template-columns: 36px 1fr auto;
        grid-template-areas:
            "rank label    value"
            "rank actions  actions"
            "bar  bar      bar";
        column-gap: 10px;
        row-gap: 6px;
    }
    .em-rep-actions { justify-self: start; }
    .em-rep-strategy-header .em-rep-stats { width: 100%; margin-left: 0; }
}
