/* ========================================
   COMPREHENSIVE STUDENT REPORT STYLES
   ======================================== */

/* Select Student Message */
.select-student-message {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    margin: 30px 0;
    border: 2px dashed #cbd5e1;
}

.select-student-message .message-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.select-student-message h3 {
    font-size: 24px;
    color: #1e293b;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.select-student-message p {
    font-size: 16px;
    color: #64748b;
    margin: 0;
    max-width: 500px;
    margin: 0 auto;
}

.comprehensive-student-report {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Report Header */
.report-header {
    text-align: center;
    padding-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 40px;
}

.report-title {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 10px 0;
}

.report-subtitle {
    font-size: 16px;
    color: #64748b;
    font-weight: 500;
}

.report-subtitle a {
    color: inherit;
    text-decoration: none;
}

.report-subtitle a:hover {
    color: #2563eb;
}

/* Section Styles */
.report-section {
    margin-bottom: 40px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #3b82f6;
}

/* Four stat groups (quiz, lesson, essay, speaking) inside one card */
.stats-overview-card {
    padding: 28px 25px 20px;
}

.stats-overview-group {
    padding: 0 0 24px;
    margin: 0 0 24px;
    border-bottom: 1px solid #e2e8f0;
}

.stats-overview-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.stats-overview-heading {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px;
    padding: 0 0 0 12px;
    border-left: 3px solid #3b82f6;
    line-height: 1.3;
}

.stats-overview-group .quiz-stats-cards,
.stats-overview-group .quiz-overview-cards,
.stats-overview-group .lesson-stats-grid {
    margin-bottom: 12px;
}

.comprehensive-student-report .quiz-overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.comprehensive-student-report .overview-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.comprehensive-student-report .overview-card .card-icon {
    font-size: 40px;
    line-height: 1;
    flex-shrink: 0;
}

.comprehensive-student-report .overview-card .card-content {
    flex: 1;
}

.comprehensive-student-report .overview-card .card-value {
    font-size: 32px;
    font-weight: 900;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 8px;
}

.comprehensive-student-report .overview-card .card-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-overview-group .lesson-completion-bar {
    margin-top: 8px;
}

.stats-overview-group-table .recent-quizzes {
    margin-top: 0;
}

/* Scoreboard inside supervisor/parent comprehensive report (same as student SCOREBOARD) */
.comprehensive-student-report .owlypia-top-scores.owlypia-scoreboard-section {
    margin: 0 0 40px;
    max-width: none;
}

/* Beat other plugins' `.stats-box { background: #fff }` on this page */
.comprehensive-student-report .owlypia-top-scores .stats-box.rank-box {
    background: linear-gradient(165deg, #ecfdf5 0%, #86efac 52%, #4ade80 100%) !important;
    border-color: #22c55e;
    box-shadow: 0 10px 24px rgba(34, 197, 94, 0.22);
}

.comprehensive-student-report .owlypia-top-scores .stats-box.points-box {
    background: linear-gradient(165deg, #fef3c7 0%, #fbbf24 52%, #f59e0b 100%) !important;
    border-color: #d97706;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.22);
}

.comprehensive-student-report .owlypia-top-scores .stats-box.badge-box {
    background: linear-gradient(165deg, #f3e8ff 0%, #c084fc 52%, #a855f7 100%) !important;
    border-color: #9333ea;
    box-shadow: 0 10px 24px rgba(168, 85, 247, 0.22);
}

.comprehensive-student-report .owlypia-top-scores .stats-box .stats-value,
.comprehensive-student-report .owlypia-top-scores .stats-box .badge-count {
    font-size: 40px !important;
    font-weight: 700;
    font-style: normal;
    line-height: 1.2;
    letter-spacing: 0;
    text-align: center;
    margin: 0;
}

/* ========== GAMIFY STATS SECTION ========== */
.gamify-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.gamify-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.gamify-card:hover {
    transform: translateY(-5px);
}

.gamify-icon,
.gamify-rank-badge {
    font-size: 48px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gamify-icon {
    font-size: 80px;
    margin-bottom: 15px;
}

.gamify-rank-badge {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.gamify-rank-badge .rank-badge-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

.gamify-value.rank-name {
    font-size: 24px;
    font-weight: 600;
    margin: 10px 0;
}

.gamify-value {
    font-size: 36px;
    font-weight: 800;
    margin: 10px 0;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gamify-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.earned-badges {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

.earned-badges h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #475569;
}

.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #f1f5f9;
    border-radius: 8px;
    border: 2px solid #cbd5e1;
}

.badge-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.badge-emoji {
    font-size: 24px;
    flex-shrink: 0;
}

.badge-name {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

/* ========== COURSE PROGRESS SECTION (PIE CHARTS) ========== */
.course-progress-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
}

.owlypia-course-lessons {
    width: 100%;
}

.owlypia-lesson-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.owlypia-lesson-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 22px;
}

.owlypia-lesson-check {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    box-sizing: border-box;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.owlypia-lesson-check--empty {
    border: 2px solid #cbd5e1;
    background: #fff;
}

.owlypia-lesson-check--outline {
    border: 2px solid #10b981;
    background: #fff;
}

.owlypia-lesson-check--done {
    border: 2px solid #10b981;
    background: #10b981;
    color: #fff;
}

.owlypia-lesson-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.owlypia-lesson-row--scored {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 88px 52px;
    column-gap: 10px;
}

.owlypia-lesson-row--scored .owlypia-lesson-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.owlypia-lesson-bar-wrap {
    width: 88px;
    height: 12px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    overflow: hidden;
    box-sizing: border-box;
}

.owlypia-lesson-bar {
    display: block;
    height: 100%;
    background: #3b82f6;
    border-radius: 3px;
}

.owlypia-lesson-score {
    width: 52px;
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    text-align: right;
    white-space: nowrap;
}

.owlypia-activity-wheel {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 6px 0 4px;
}

.owlypia-activity-wheel-title {
    align-self: stretch;
    width: 100%;
}

.owlypia-activity-minis {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 18px 28px;
    width: 100%;
    margin-top: 8px;
}

.owlypia-activity-mini {
    flex: 1 1 140px;
    max-width: 180px;
    text-align: center;
}

.owlypia-mini-ring {
    position: relative;
    width: min(148px, 100%);
    margin: 0 auto;
}

.owlypia-mini-ring svg {
    display: block;
    width: 100%;
    height: auto;
}

.owlypia-mini-track,
.owlypia-mini-progress {
    fill: none;
    stroke-width: 10;
}

.owlypia-mini-progress {
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 70px 70px;
}

.owlypia-mini-dot {
    stroke: #fff;
    stroke-width: 3;
}

.owlypia-mini-center {
    position: absolute;
    inset: 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    pointer-events: none;
}

.owlypia-mini-icon {
    display: flex;
    width: 42px;
    height: 42px;
}

.owlypia-mini-icon svg {
    width: 42px;
    height: 42px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.owlypia-mini-count {
    display: block;
    margin-top: 10px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    color: #1e293b;
}

.owlypia-mini-label {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.owlypia-activity-mini--quiz .owlypia-mini-track { stroke: #dbeafe; }
.owlypia-activity-mini--quiz .owlypia-mini-progress,
.owlypia-activity-mini--quiz .owlypia-mini-dot,
.owlypia-activity-mini--quiz .owlypia-mini-icon { stroke: #2563eb; color: #2563eb; }
.owlypia-activity-mini--quiz .owlypia-mini-dot { fill: #2563eb; }
.owlypia-activity-mini--quiz .owlypia-mini-label { background: #dbeafe; color: #1d4ed8; }

.owlypia-activity-mini--essay .owlypia-mini-track { stroke: #ffedd5; }
.owlypia-activity-mini--essay .owlypia-mini-progress,
.owlypia-activity-mini--essay .owlypia-mini-icon { stroke: #ea580c; color: #ea580c; }
.owlypia-activity-mini--essay .owlypia-mini-dot { fill: #ea580c; stroke: #ea580c; }
.owlypia-activity-mini--essay .owlypia-mini-label { background: #ffedd5; color: #c2410c; }

.owlypia-activity-mini--speaking .owlypia-mini-track { stroke: #f3e8ff; }
.owlypia-activity-mini--speaking .owlypia-mini-progress,
.owlypia-activity-mini--speaking .owlypia-mini-icon { stroke: #7c3aed; color: #7c3aed; }
.owlypia-activity-mini--speaking .owlypia-mini-dot { fill: #7c3aed; stroke: #7c3aed; }
.owlypia-activity-mini--speaking .owlypia-mini-label { background: #f3e8ff; color: #6d28d9; }

.owlypia-activity-mini--h5p .owlypia-mini-track { stroke: #d1fae5; }
.owlypia-activity-mini--h5p .owlypia-mini-progress,
.owlypia-activity-mini--h5p .owlypia-mini-icon { stroke: #059669; color: #059669; }
.owlypia-activity-mini--h5p .owlypia-mini-dot { fill: #059669; stroke: #059669; }
.owlypia-activity-mini--h5p .owlypia-mini-label { background: #d1fae5; color: #047857; }

.owlypia-lesson-empty {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.owlypia-journey {
    background: #f8fafc;
    min-width: 0;
    max-width: 100%;
}

.owlypia-journey-scroll {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.owlypia-journey-cards {
    display: none;
}

.owlypia-journey-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px 10px;
}

.owlypia-journey-card h4 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 800;
    color: #1e293b;
}

.owlypia-journey-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.owlypia-journey-card li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.owlypia-journey-card-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.owlypia-journey-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: #fff;
}

.owlypia-journey-table th,
.owlypia-journey-table td {
    border: 1px solid #cbd5e1;
    padding: 12px 8px;
    text-align: center;
    vertical-align: middle;
    font-size: 14px;
    color: #334155;
    font-weight: 600;
}

.owlypia-journey-table thead th {
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
}

.owlypia-journey-course {
    text-align: left;
    white-space: nowrap;
    min-width: 110px;
    background: #fff;
    position: sticky;
    left: 0;
    z-index: 1;
}

.owlypia-journey-table thead .owlypia-journey-course {
    z-index: 2;
}

.owlypia-journey-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.owlypia-journey-score {
    color: #10b981;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.owlypia-journey-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px 28px;
    margin-top: 18px;
}

.owlypia-journey-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.course-pie-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

/* Progress-based background colors - Soft pastel tones */
.course-pie-card.progress-0-25 {
    background: #fef2f2; /* Soft light red */
    border-color: #fecaca;
}

.course-pie-card.progress-26-50 {
    background: #fff7ed; /* Soft light orange */
    border-color: #fed7aa;
}

.course-pie-card.progress-51-75 {
    background: #f0fdf4; /* Soft light green */
    border-color: #bbf7d0;
}

.course-pie-card.progress-76-99 {
    background: #d1fae5; /* Soft green */
    border-color: #86efac;
}

.course-pie-card.progress-100 {
    background: #dbeafe; /* Soft light blue */
    border-color: #93c5fd;
}

.course-pie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.course-pie-header {
    margin-bottom: 20px;
}

.course-pie-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.course-pie-stats {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.course-pie-chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    min-height: 200px;
}

.course-pie-chart-container canvas {
    max-width: 200px;
    max-height: 200px;
}

.course-pie-percentage {
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    color: #10b981;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #f1f5f9;
}

/* ========== QUIZ PERFORMANCE SECTION ========== */
.quiz-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.quiz-stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.quiz-stat-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.stat-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
    margin: 8px 0;
}

.stat-label {
    font-size: 13px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recent-quizzes {
    margin-top: 25px;
    background: white;
    padding: 20px;
    border-radius: 10px;
}

.recent-quizzes h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #475569;
}

.quiz-table {
    width: 100%;
    border-collapse: collapse;
}

.quiz-table thead {
    background: #f1f5f9;
}

.quiz-table th {
    padding: 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quiz-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    color: #334155;
}

.quiz-table tbody tr:last-child td {
    border-bottom: none;
}

.quiz-table tbody tr:hover {
    background: #f8fafc;
}

/* ========== LESSON COMPLETION SECTION ========== */
.lesson-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.lesson-stat-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #e2e8f0;
    transition: transform 0.3s ease;
}

.lesson-stat-box:hover {
    transform: translateY(-3px);
}

.lesson-stat-box.completed {
    border-color: #10b981;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.lesson-stat-box.in-progress {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fed7aa 0%, #fbbf24 100%);
}

.lesson-stat-box.pending {
    border-color: #94a3b8;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.lesson-stat-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.lesson-stat-value {
    font-size: 36px;
    font-weight: 800;
    color: #1e293b;
    margin: 8px 0;
}

.lesson-stat-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.lesson-completion-bar {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 10px;
}

.lesson-completion-bar h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #475569;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1100px) {
    .owlypia-journey-scroll {
        display: none;
    }

    .owlypia-journey-cards {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .course-progress-grid {
        grid-template-columns: 1fr !important;
    }

    .owlypia-activity-minis {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: min(560px, 100%);
        gap: 14px;
    }

    .owlypia-activity-mini {
        max-width: none;
        width: 100%;
    }

    .owlypia-mini-ring {
        width: min(128px, 100%);
    }
}

@media (max-width: 768px) {
    .comprehensive-student-report,
    .report-section {
        padding: 16px;
    }

    .report-title {
        font-size: 24px;
    }

    .section-title {
        font-size: 18px;
    }

    .owlypia-journey-table th,
    .owlypia-journey-table td {
        padding: 10px 6px;
        font-size: 13px;
    }

    .owlypia-lesson-row--scored {
        grid-template-columns: 18px minmax(0, 1fr) 28px 36px;
        column-gap: 4px;
    }

    .owlypia-lesson-row--scored .owlypia-lesson-name {
        margin-left: 4px;
    }

    .owlypia-lesson-bar-wrap {
        width: 28px;
        justify-self: end;
    }

    .owlypia-lesson-score {
        width: 36px;
        font-size: 12px;
    }

    .gamify-cards,
    .quiz-stats-cards,
    .quiz-overview-cards,
    .lesson-stats-grid,
    .course-progress-grid {
        grid-template-columns: 1fr !important;
    }

    .gamify-value,
    .stat-value,
    .lesson-stat-value {
        font-size: 28px;
    }

    .course-pie-chart-container canvas {
        max-width: 180px;
        max-height: 180px;
    }
}

@media (max-width: 480px) {
    .report-title {
        font-size: 20px;
    }

    .owlypia-journey-legend {
        gap: 10px 14px;
        justify-content: flex-start;
    }

    .quiz-table {
        font-size: 12px;
    }

    .quiz-table th,
    .quiz-table td {
        padding: 8px;
    }
}

