/*
 * Simba Results - Parent Portal Professional Styles
 * Zimbabwe Primary School Report Styling
 * Modern, polished & mobile-first
 */

/* ========================================
   PARENT PORTAL LAYOUT
   ======================================== */
.parent-portal {
    background-color: var(--simba-bg-light, #F8FAFC);
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.parent-portal .page-header {
    background: linear-gradient(135deg, var(--simba-primary) 0%, var(--simba-primary-dark) 50%, var(--simba-primary) 100%);
    background-size: 200% 200%;
    color: #fff;
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(25, 93, 27, 0.25), 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.parent-portal .page-header::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -15%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.parent-portal .page-header::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.parent-portal .page-header h2 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

.parent-portal .page-header p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.parent-portal .page-header .header-icon {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease, background 0.2s ease;
}

.parent-portal .page-header .header-icon:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   CHILD CARDS
   ======================================== */
.child-card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
    border-top: 4px solid var(--simba-primary);
    position: relative;
    background: #fff;
    text-align: center;
    padding: 0;
}

.child-card:hover {
    box-shadow: 0 12px 40px rgba(25, 93, 27, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-4px);
}

.child-card .card-header {
    background: linear-gradient(135deg, var(--simba-primary) 0%, var(--simba-primary-light) 100%);
    border-bottom: none;
    padding: 1.1rem 1.5rem;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.child-card .card-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.child-card .card-header h5,
.child-card .card-header h6 {
    color: #fff;
    margin-bottom: 0;
    font-size: 1.05rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.child-card .card-header small {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.child-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--simba-secondary) 0%, var(--simba-secondary-dark) 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    transition: transform 0.2s ease;
}

.child-card:hover .child-avatar {
    transform: scale(1.08);
}

.child-avatar-lg {
    width: 68px;
    height: 68px;
    font-size: 1.6rem;
    border-width: 3px;
}

.child-card .card-body {
    padding: 1.25rem 1.5rem;
}

.child-card .info-label {
    font-size: 0.72rem;
    color: var(--simba-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 2px;
}

.child-card .info-value {
    font-weight: 600;
    color: var(--simba-text-primary);
}

.child-card .card-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: transparent;
}

.child-card .card-footer .btn {
    border-radius: 0;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
}

.child-card .card-footer .btn:first-child {
    border-bottom-left-radius: 16px;
}

.child-card .card-footer .btn:last-child {
    border-bottom-right-radius: 16px;
}

/* ========================================
   STAT CARDS (PARENT PORTAL)
   ======================================== */
.parent-stat-card {
    border: none;
    border-radius: 18px;
    padding: 1.5rem 1.5rem 1.25rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background: #fff;
}

.parent-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--simba-primary-light);
    transition: height 0.3s ease;
}

.parent-stat-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
    transform: translateY(-3px);
}

.parent-stat-card:hover::before {
    height: 5px;
}

.parent-stat-clickable {
    cursor: pointer;
}

.parent-stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    display: block;
    letter-spacing: -0.02em;
}

.parent-stat-card .stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    color: var(--simba-text-muted);
    margin-top: 0.35rem;
    text-align: center;
    display: block;
}

.parent-stat-card .stat-sub {
    font-size: 0.75rem;
    color: var(--simba-text-muted);
    margin-top: 0.25rem;
    text-align: center;
    display: block;
}

.parent-stat-card.stat-primary::before {
    background: linear-gradient(90deg, var(--simba-primary), var(--simba-primary-light));
}

.parent-stat-card.stat-primary {
    border-left: none;
}

.parent-stat-card.stat-success::before {
    background: linear-gradient(90deg, var(--simba-success), #22c55e);
}

.parent-stat-card.stat-success {
    border-left: none;
}

.parent-stat-card.stat-info::before {
    background: linear-gradient(90deg, var(--simba-info), #38bdf8);
}

.parent-stat-card.stat-info {
    border-left: none;
}

.parent-stat-card.stat-warning::before {
    background: linear-gradient(90deg, var(--simba-secondary), var(--simba-secondary-light));
}

.parent-stat-card.stat-warning {
    border-left: none;
}

.parent-stat-card.stat-danger::before {
    background: linear-gradient(90deg, var(--simba-danger), #ef4444);
}

.parent-stat-card.stat-danger {
    border-left: none;
}

/* ========================================
   REPORT CARD DOCUMENT (MODAL)
   ======================================== */
.report-document {
    background: #fff;
    max-width: 900px;
    margin: 0 auto;
}

.report-document .report-letterhead {
    background: linear-gradient(135deg, var(--simba-primary) 0%, var(--simba-primary-dark) 100%);
    color: #fff;
    padding: 1.75rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.report-document .report-letterhead::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.report-document .report-letterhead h3 {
    color: #fff;
    font-weight: 800;
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.report-document .report-letterhead .school-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 500;
}

.report-document .report-letterhead .report-title {
    background: var(--simba-secondary);
    color: #fff;
    display: inline-block;
    padding: 0.35rem 1.5rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.75rem;
}

.report-document .student-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 2rem;
    padding: 1.25rem 2rem;
    background: var(--simba-bg-light);
    border-bottom: 2px solid #e2e8f0;
}

.report-document .student-info-grid .info-item {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
    padding: 0.25rem 0;
}

.report-document .student-info-grid .info-item .label {
    color: var(--simba-text-muted);
    font-weight: 600;
    min-width: 110px;
    flex-shrink: 0;
}

.report-document .student-info-grid .info-item .value {
    color: var(--simba-text-primary);
    font-weight: 600;
}

/* Report Marks Table */
.report-marks-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.report-marks-table thead th {
    background: var(--simba-primary);
    color: #fff;
    padding: 0.65rem 0.75rem;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid var(--simba-primary-dark);
    text-align: center;
    white-space: nowrap;
}

.report-marks-table thead th:first-child {
    text-align: left;
}

.report-marks-table tbody td {
    padding: 0.55rem 0.75rem;
    border: 1px solid #e2e8f0;
    text-align: center;
    vertical-align: middle;
}

.report-marks-table tbody td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--simba-text-primary);
}

.report-marks-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.report-marks-table tbody tr:hover {
    background-color: rgba(var(--simba-primary-rgb), 0.04);
}

.report-marks-table tfoot td {
    padding: 0.65rem 0.75rem;
    border: 1px solid #e2e8f0;
    background: var(--simba-bg-light);
    font-weight: 700;
    text-align: center;
}

.report-marks-table tfoot td:first-child {
    text-align: right;
}

/* Subject Name Truncation */
.subject-truncate {
    display: block;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Grade Pill */
.grade-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.78rem;
    color: #fff;
}

.grade-pill.grade-a {
    background-color: var(--simba-grade-a);
}

.grade-pill.grade-b {
    background-color: var(--simba-grade-b);
}

.grade-pill.grade-c {
    background-color: var(--simba-grade-c);
}

.grade-pill.grade-d {
    background-color: var(--simba-grade-d);
}

.grade-pill.grade-e {
    background-color: var(--simba-grade-e);
}

.grade-pill.grade-u {
    background-color: var(--simba-grade-u);
}

/* Report Summary Bar */
.report-summary-bar {
    display: flex;
    justify-content: space-around;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--simba-primary) 0%, var(--simba-primary-dark) 100%);
    color: #fff;
    gap: 1rem;
}

.report-summary-bar .summary-item {
    text-align: center;
}

.report-summary-bar .summary-item .summary-value {
    font-size: 1.5rem;
    font-weight: 800;
}

.report-summary-bar .summary-item .summary-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
}

/* Report Comments Section */
.report-comments {
    padding: 1.25rem 2rem;
}

.report-comment-block {
    padding: 0.75rem 1rem;
    background: var(--simba-bg-light);
    border-left: 3px solid var(--simba-primary);
    border-radius: 0 8px 8px 0;
    margin-bottom: 0.75rem;
}

.report-comment-block .comment-role {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--simba-primary);
    margin-bottom: 0.25rem;
}

.report-comment-block .comment-text {
    font-size: 0.875rem;
    color: var(--simba-text-primary);
    line-height: 1.5;
    margin-bottom: 0;
}

/* Report Attendance Bar */
.report-attendance {
    padding: 1rem 2rem;
    background: var(--simba-bg-light);
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.report-attendance .att-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.report-attendance .att-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.report-attendance .att-dot.present {
    background-color: var(--simba-success);
}

.report-attendance .att-dot.absent {
    background-color: var(--simba-danger);
}

/* Grade Legend */
.grade-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-top: 1px solid #e2e8f0;
    background: var(--simba-bg-light);
}

.grade-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--simba-text-muted);
}

.grade-legend .legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* ========================================
   REPORT CARD GRID (LIST VIEW)
   ======================================== */
.report-grid-card {
    border: none;
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    background: #fff;
    text-align: left;
    padding: 0;
}

.report-grid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(25, 93, 27, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
}

.report-grid-card .card-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--simba-primary) 0%, var(--simba-secondary) 100%);
}

.report-grid-card .card-body {
    padding: 1.25rem;
}

.report-grid-card .report-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.report-grid-card .report-term {
    font-size: 1rem;
    font-weight: 700;
    color: var(--simba-text-primary);
}

.report-grid-card .report-year {
    font-size: 0.8rem;
    color: var(--simba-text-muted);
}

.report-grid-card .report-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.report-grid-card .report-stat-box {
    text-align: center;
    padding: 0.65rem 0.5rem;
    background: var(--simba-bg-light);
    border-radius: 8px;
}

.report-grid-card .report-stat-box .stat-num {
    font-size: 1.2rem;
    font-weight: 800;
}

.report-grid-card .report-stat-box .stat-lbl {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--simba-text-muted);
    font-weight: 600;
}

/* ========================================
   SECTION CARDS
   ======================================== */
.section-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.03);
    margin-bottom: 1.5rem;
    background: #fff;
    transition: box-shadow 0.3s ease;
}

.section-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.section-card .section-header {
    background: #fff;
    padding: 1rem 1.5rem;
    border-bottom: 2px solid var(--simba-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-card .section-header .section-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--simba-primary) 0%, var(--simba-primary-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(25, 93, 27, 0.2);
}

.section-card .section-header h5 {
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.section-card .section-body {
    padding: 1.25rem 1.5rem;
}

/* ========================================
   PERFORMANCE TABLE (VIEW RESULTS)
   ======================================== */
.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.results-table thead th {
    background: linear-gradient(135deg, var(--simba-primary) 0%, var(--simba-primary-dark) 100%);
    color: #fff;
    padding: 0.75rem 0.85rem;
    font-weight: 600;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-align: center;
    white-space: nowrap;
}

.results-table thead th:first-child {
    text-align: left;
}

.results-table tbody td {
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    text-align: center;
    vertical-align: middle;
    transition: background 0.15s ease;
}

.results-table tbody td:first-child {
    text-align: left;
    font-weight: 600;
}

.results-table tbody tr:last-child td {
    border-bottom: none;
}

.results-table tbody tr:hover {
    background-color: rgba(25, 93, 27, 0.03);
}

.results-table tfoot td {
    background: var(--simba-bg-light);
    padding: 0.75rem 0.85rem;
    font-weight: 700;
    border-top: 2px solid var(--simba-primary);
    text-align: center;
}

/* Mark Color Classes */
.mark-excellent {
    color: var(--simba-grade-a);
    font-weight: 700;
}

.mark-good {
    color: var(--simba-grade-b);
    font-weight: 600;
}

.mark-average {
    color: var(--simba-grade-c);
    font-weight: 600;
}

.mark-satisfactory {
    color: var(--simba-grade-d);
}

.mark-weak {
    color: var(--simba-grade-e);
}

.mark-fail {
    color: var(--simba-grade-u);
    font-weight: 600;
}

/* ========================================
   PROGRESS BARS (THEMED)
   ======================================== */
.progress-themed {
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    overflow: hidden;
}

.progress-themed .progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.progress-themed.progress-lg {
    height: 24px;
    border-radius: 12px;
}

.progress-themed.progress-lg .progress-fill {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    border-radius: 12px;
    padding: 0 0.75rem;
}

/* ========================================
   ANALYSIS CARDS (STRENGTHS/WEAKNESSES)
   ======================================== */
.analysis-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.03);
    background: #fff;
    transition: box-shadow 0.3s ease;
}

.analysis-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.analysis-card.strength {
    border-top: 3px solid var(--simba-success);
}

.analysis-card.weakness {
    border-top: 3px solid var(--simba-danger);
}

.analysis-card .analysis-header {
    padding: 1rem 1.25rem 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-card .analysis-body {
    padding: 0.5rem 1.25rem 1.25rem;
}

.analysis-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.analysis-item:last-child {
    border-bottom: none;
}

.analysis-item .analysis-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.analysis-item .analysis-subject {
    font-weight: 600;
    color: var(--simba-text-primary);
    font-size: 0.875rem;
}

.analysis-item .analysis-score {
    margin-left: auto;
    font-weight: 700;
    font-size: 0.875rem;
}

/* ========================================
   SELECTOR BAR
   ======================================== */
.selector-bar {
    background: #fff;
    border: none;
    border-radius: 14px;
    padding: 1.1rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.selector-bar:focus-within {
    box-shadow: 0 4px 20px rgba(25, 93, 27, 0.1), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.selector-bar .form-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    color: var(--simba-text-muted);
    margin-bottom: 0.35rem;
}

.selector-bar .form-select {
    border-radius: 10px;
    font-size: 0.875rem;
    padding: 0.55rem 0.85rem;
    border: 1.5px solid #e2e8f0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.selector-bar .form-select:focus {
    border-color: var(--simba-primary);
    box-shadow: 0 0 0 3px rgba(25, 93, 27, 0.12);
}

/* ========================================
   STUDENT INFO BANNER
   ======================================== */
.student-banner {
    background: linear-gradient(135deg, var(--simba-primary) 0%, var(--simba-primary-dark) 100%);
    color: #fff;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(25, 93, 27, 0.2), 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.student-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -15%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.student-banner h4 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.student-banner .student-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 0.75rem;
}

.student-banner .meta-item {
    display: flex;
    flex-direction: column;
}

.student-banner .meta-item .meta-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.student-banner .meta-item .meta-value {
    font-weight: 700;
    font-size: 0.95rem;
}

.student-banner .score-badges {
    display: flex;
    gap: 1rem;
}

.student-banner .score-badge {
    text-align: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease;
}

.student-banner .score-badge:hover {
    background: rgba(255, 255, 255, 0.18);
}

.student-banner .score-badge .score-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
}

.student-banner .score-badge .score-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    opacity: 0.8;
    letter-spacing: 0.5px;
}

/* ========================================
   SUBJECT CARDS (PROGRESS PAGE)
   ======================================== */
.subject-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease;
}

.subject-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.subject-card .subject-header {
    padding: 0.75rem 1rem;
    background: var(--simba-bg-light);
    border-bottom: 2px solid var(--simba-primary);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--simba-text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subject-card .subject-body {
    padding: 1rem;
}

.subject-card .subject-score {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.subject-card .subject-detail {
    font-size: 0.78rem;
    color: var(--simba-text-muted);
    margin-top: 0.25rem;
}

.subject-card .trend-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.trend-badge.trend-up {
    background: rgba(22, 163, 74, 0.1);
    color: var(--simba-success);
}

.trend-badge.trend-down {
    background: rgba(220, 38, 38, 0.1);
    color: var(--simba-danger);
}

.trend-badge.trend-stable {
    background: rgba(100, 116, 139, 0.1);
    color: var(--simba-text-muted);
}

/* ========================================
   RECOMMENDATION CARDS
   ======================================== */
.recommendation-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.recommendation-card .rec-header {
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recommendation-card .rec-header.rec-strengths {
    background: rgba(22, 163, 74, 0.08);
    color: var(--simba-success);
    border-bottom: 2px solid var(--simba-success);
}

.recommendation-card .rec-header.rec-improvements {
    background: rgba(245, 158, 11, 0.08);
    color: var(--simba-secondary-dark);
    border-bottom: 2px solid var(--simba-secondary);
}

.recommendation-card .rec-header.rec-suggestions {
    background: rgba(14, 165, 233, 0.08);
    color: var(--simba-info);
    border-bottom: 2px solid var(--simba-info);
}

.recommendation-card .rec-body {
    padding: 1rem 1.25rem;
}

.recommendation-card .rec-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--simba-text-primary);
}

.recommendation-card .rec-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
    font-weight: 700;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: 3.5rem 2rem;
}

.empty-state .empty-icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--simba-bg-light) 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 1.25rem;
    color: var(--simba-text-muted);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.empty-state h5 {
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--simba-text-primary);
    letter-spacing: -0.01em;
}

.empty-state p {
    color: var(--simba-text-muted);
    font-size: 0.9rem;
    max-width: 320px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ========================================
   LOADING STATE
   ======================================== */
.parent-loading {
    text-align: center;
    padding: 4rem 2rem;
}

.parent-loading .spinner-ring {
    width: 48px;
    height: 48px;
    border: 3.5px solid #e2e8f0;
    border-top: 3.5px solid var(--simba-primary);
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    margin: 0 auto 1.25rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.parent-loading p {
    color: var(--simba-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ========================================
   MODAL - REPORT OVERLAY
   ======================================== */
.report-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1050;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    overflow-y: auto;
}

.report-modal-content {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: modalSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.report-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.1rem 2rem;
    background: var(--simba-bg-light);
    border-top: 1px solid #e2e8f0;
}

.report-modal-footer .btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.55rem 1.25rem;
    transition: all 0.2s ease;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* --- Tablet (≤992px) --- */
@media (max-width: 992px) {
    .student-banner .score-badges {
        gap: 0.5rem;
    }

    .student-banner .score-badge {
        padding: 0.6rem 0.85rem;
    }

    .student-banner .score-badge .score-value {
        font-size: 1.35rem;
    }

    .report-summary-bar {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.85rem 1.25rem;
    }

    .report-summary-bar .summary-item .summary-value {
        font-size: 1.2rem;
    }

    .report-document .student-info-grid .info-item .label {
        min-width: 90px;
    }
}

/* --- Small Tablet / Large Phone (≤768px) --- */
@media (max-width: 768px) {

    /* Page Header */
    .parent-portal .page-header {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .parent-portal .page-header h2 {
        font-size: 1.25rem;
    }

    .parent-portal .page-header p {
        font-size: 0.85rem;
    }

    .parent-portal .page-header .header-icon {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
        border-radius: 11px;
    }

    /* Student Banner */
    .student-banner {
        padding: 1.1rem 1.25rem;
        border-radius: 14px;
    }

    .student-banner .row {
        gap: 1rem;
    }

    .student-banner .col-md-5,
    .student-banner .col-md-4 {
        text-align: start !important;
    }

    .student-banner .score-badges {
        justify-content: flex-start !important;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.75rem;
    }

    .student-banner .score-badge {
        padding: 0.5rem 0.75rem;
        border-radius: 10px;
        flex: 1;
        min-width: 0;
    }

    .student-banner .score-badge .score-value {
        font-size: 1.2rem;
    }

    .student-banner .score-badge .score-label {
        font-size: 0.6rem;
    }

    .student-banner .student-meta {
        gap: 0.75rem;
    }

    .student-banner h4 {
        font-size: 1.1rem;
    }

    .child-avatar-lg {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
    }

    /* Selector Bar */
    .selector-bar {
        padding: 0.85rem 1rem;
        border-radius: 12px;
    }

    /* Section Cards */
    .section-card .section-header {
        padding: 0.85rem 1rem;
    }

    .section-card .section-header .section-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .section-card .section-header h5 {
        font-size: 0.9rem;
    }

    .section-card .section-body {
        padding: 1rem;
    }

    /* Stat Cards */
    .parent-stat-card {
        padding: 1.35rem;
        border-radius: 16px;
    }

    .parent-stat-card .stat-value {
        font-size: 1.85rem;
    }

    .parent-stat-card .stat-label {
        font-size: 0.76rem;
    }

    /* Report Modal / Document */
    .report-document .student-info-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 0.25rem;
    }

    .report-document .report-letterhead {
        padding: 1.1rem;
    }

    .report-document .report-letterhead h3 {
        font-size: 1.1rem;
    }

    .report-document .report-letterhead .report-title {
        font-size: 0.75rem;
        padding: 0.3rem 1rem;
    }

    .report-summary-bar {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .report-summary-bar .summary-item .summary-value {
        font-size: 1.1rem;
    }

    .report-summary-bar .summary-item .summary-label {
        font-size: 0.6rem;
    }

    .report-modal-backdrop {
        padding: 0.75rem 0.5rem;
    }

    .report-modal-content {
        border-radius: 16px;
    }

    .report-modal-footer {
        padding: 0.85rem 1rem;
        flex-wrap: wrap;
    }

    .report-modal-footer .btn {
        flex: 1;
        min-width: 0;
    }

    /* Tables */
    .results-table,
    .report-marks-table {
        font-size: 0.78rem;
    }

    .results-table thead th,
    .report-marks-table thead th {
        padding: 0.55rem 0.45rem;
        font-size: 0.68rem;
    }

    .results-table tbody td,
    .report-marks-table tbody td {
        padding: 0.45rem 0.4rem;
    }

    .subject-truncate {
        max-width: 130px;
    }

    .results-table tfoot td,
    .report-marks-table tfoot td {
        padding: 0.55rem 0.45rem;
        font-size: 0.78rem;
    }

    /* Grade Pill in tables - slightly smaller */
    .grade-pill {
        width: 24px;
        height: 24px;
        font-size: 0.68rem;
    }

    /* Report Grid Card */
    .report-grid-card .report-stat-box {
        padding: 0.5rem 0.4rem;
    }

    .report-grid-card .report-stat-box .stat-num {
        font-size: 1rem;
    }

    .report-grid-card .report-stat-box .stat-lbl {
        font-size: 0.6rem;
    }

    /* Child Cards */
    .child-card .card-header {
        padding: 1rem;
    }

    /* Grade Legend */
    .grade-legend {
        padding: 0.55rem 1rem;
        gap: 0.35rem;
    }

    .grade-legend .legend-item {
        font-size: 0.65rem;
    }

    /* Report Attendance */
    .report-attendance {
        padding: 0.75rem 1rem;
        gap: 1rem;
    }

    /* Report Comments */
    .report-comments {
        padding: 1rem;
    }

    .report-comment-block {
        padding: 0.6rem 0.85rem;
    }

    /* Analysis Cards */
    .analysis-card .analysis-header {
        padding: 0.85rem 1rem 0.45rem;
        font-size: 0.88rem;
    }

    .analysis-card .analysis-body {
        padding: 0.4rem 1rem 1rem;
    }

    .analysis-item {
        gap: 0.5rem;
    }

    .analysis-item .analysis-subject,
    .analysis-item .analysis-score {
        font-size: 0.8rem;
    }

    /* Subject Cards */
    .subject-card .subject-score {
        font-size: 1.4rem;
    }

    /* Recommendation Cards */
    .recommendation-card .rec-header {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }

    .recommendation-card .rec-body {
        padding: 0.75rem 1rem;
    }

    .recommendation-card .rec-item {
        font-size: 0.8rem;
    }
}

/* --- Phone (≤576px) --- */
@media (max-width: 576px) {

    /* Global container padding */
    .parent-portal .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Page Header: compact on phone */
    .parent-portal .page-header {
        padding: 1rem 1.1rem;
        border-radius: 12px;
        margin-bottom: 1rem;
    }

    .parent-portal .page-header h2 {
        font-size: 1.1rem;
    }

    .parent-portal .page-header p {
        font-size: 0.8rem;
    }

    .parent-portal .page-header .header-icon {
        width: 38px;
        height: 38px;
        font-size: 1.05rem;
        border-radius: 10px;
    }

    /* Student Banner */
    .student-banner {
        padding: 1rem 1.1rem;
        border-radius: 12px;
        margin-bottom: 1rem;
    }

    .student-banner h4 {
        font-size: 1rem;
    }

    .student-banner .student-meta {
        gap: 0.5rem;
        flex-direction: column;
    }

    .student-banner .meta-item {
        flex-direction: row;
        gap: 0.35rem;
        align-items: center;
    }

    .student-banner .meta-item .meta-label {
        font-size: 0.62rem;
        min-width: auto;
    }

    .student-banner .meta-item .meta-value {
        font-size: 0.82rem;
    }

    .child-avatar-lg {
        width: 48px;
        height: 48px;
        font-size: 1.15rem;
    }

    .child-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .student-banner .score-badge {
        padding: 0.45rem 0.6rem;
        border-radius: 8px;
    }

    .student-banner .score-badge .score-value {
        font-size: 1rem;
    }

    .student-banner .score-badge .score-label {
        font-size: 0.55rem;
    }

    /* Stat Cards - 2 columns on phone */
    .parent-stat-card {
        padding: 1.1rem 0.85rem;
        border-radius: 14px;
    }

    .parent-stat-card .stat-value {
        font-size: 1.5rem;
    }

    .parent-stat-card .stat-label {
        font-size: 0.7rem;
        letter-spacing: 0.4px;
    }

    .parent-stat-card .stat-sub {
        font-size: 0.68rem;
    }

    /* Selector Bar */
    .selector-bar {
        padding: 0.75rem 0.85rem;
        border-radius: 12px;
        margin-bottom: 1rem;
    }

    .selector-bar .form-select {
        font-size: 0.82rem;
        padding: 0.45rem 0.65rem;
    }

    .selector-bar .form-label {
        font-size: 0.68rem;
        margin-bottom: 0.2rem;
    }

    /* Section Cards */
    .section-card {
        border-radius: 12px;
        margin-bottom: 1rem;
    }

    .section-card .section-header {
        padding: 0.75rem 0.95rem;
        gap: 0.5rem;
    }

    .section-card .section-header .section-icon {
        width: 30px;
        height: 30px;
        font-size: 0.82rem;
        border-radius: 8px;
    }

    .section-card .section-header h5 {
        font-size: 0.88rem;
    }

    .section-card .section-body {
        padding: 0.85rem;
    }

    /* Tables - make scrollable with min-width */
    .table-responsive {
        margin: 0 -0.85rem;
        padding: 0 0.85rem;
        -webkit-overflow-scrolling: touch;
    }

    .results-table,
    .report-marks-table {
        font-size: 0.72rem;
        min-width: 520px;
    }

    .results-table thead th,
    .report-marks-table thead th {
        padding: 0.45rem 0.35rem;
        font-size: 0.64rem;
    }

    .results-table tbody td,
    .report-marks-table tbody td {
        padding: 0.4rem 0.35rem;
    }

    .subject-truncate {
        max-width: 100px;
    }

    .grade-pill {
        width: 22px;
        height: 22px;
        font-size: 0.62rem;
    }

    /* Report Grid Cards */
    .report-grid-card {
        border-radius: 14px;
    }

    .report-grid-card .card-body {
        padding: 1rem;
    }

    .report-grid-card .report-stats {
        gap: 0.35rem;
    }

    .report-grid-card .report-stat-box {
        padding: 0.45rem 0.3rem;
        border-radius: 8px;
    }

    .report-grid-card .report-stat-box .stat-num {
        font-size: 0.9rem;
    }

    .report-grid-card .report-stat-box .stat-lbl {
        font-size: 0.56rem;
    }

    .report-grid-card .report-meta {
        margin-bottom: 0.75rem;
    }

    .report-grid-card .report-term {
        font-size: 0.9rem;
    }

    /* Child Cards */
    .child-card {
        border-radius: 14px;
    }

    .child-card .card-header {
        padding: 0.85rem 1rem;
    }

    .child-card .card-header h5,
    .child-card .card-header h6 {
        font-size: 0.95rem;
    }

    .child-card .info-label {
        font-size: 0.68rem;
    }

    .child-card .card-body {
        padding: 1rem;
    }

    /* Modal - near full-screen on phone */
    .report-modal-backdrop {
        padding: 0.5rem;
        align-items: flex-start;
    }

    .report-modal-content {
        border-radius: 14px;
        max-width: 100%;
    }

    .report-modal-footer {
        padding: 0.75rem 0.85rem;
        gap: 0.5rem;
    }

    .report-modal-footer .btn {
        font-size: 0.82rem;
        padding: 0.5rem 0.85rem;
    }

    /* Report Document */
    .report-document .report-letterhead h3 {
        font-size: 0.95rem;
        letter-spacing: 0.5px;
    }

    .report-document .report-letterhead .school-subtitle {
        font-size: 0.72rem;
    }

    .report-document .report-letterhead .report-title {
        font-size: 0.68rem;
        padding: 0.25rem 0.75rem;
    }
    .report-document .student-info-grid {
        padding: 0.75rem;
        gap: 0.15rem;
    }

    .report-document .student-info-grid .info-item {
        font-size: 0.78rem;
        gap: 0.35rem;
    }

    .report-document .student-info-grid .info-item .label {
        min-width: 80px;
        font-size: 0.72rem;
    }

    .report-summary-bar {
        padding: 0.65rem 0.75rem;
        gap: 0.25rem 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .report-summary-bar .summary-item {
        flex: 0 0 auto;
        min-width: 60px;
    }

    .report-summary-bar .summary-item .summary-value {
        font-size: 0.95rem;
    }

    .report-summary-bar .summary-item .summary-label {
        font-size: 0.55rem;
    }

    /* Report Marks Table in document */
    .report-document table.report-marks-table {
        min-width: 480px;
    }

    .report-document>div:has(> table) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 0.5rem;
    }

    /* Attendance & comments */
    .report-attendance {
        padding: 0.65rem 0.75rem;
        gap: 0.75rem;
        flex-direction: column;
    }

    .report-attendance .att-item {
        font-size: 0.78rem;
    }

    .report-comments {
        padding: 0.75rem;
    }

    .report-comment-block {
        padding: 0.4rem 0.65rem;
    }

    .report-comment-block .comment-role {
        font-size: 0.68rem;
    }

    .report-comment-block .comment-text {
        font-size: 0.78rem;
    }

    .grade-legend {
        padding: 0.4rem 0.75rem;
        gap: 0.25rem;
    }

    .grade-legend .legend-item {
        font-size: 0.6rem;
    }

    .grade-legend .legend-dot {
        width: 10px;
        height: 10px;
    }

    /* Analysis cards */
    .analysis-card .analysis-header {
        padding: 0.65rem 0.85rem 0.25rem;
        font-size: 0.82rem;
    }

    .analysis-card .analysis-body {
        padding: 0.25rem 0.85rem 0.85rem;
    }

    .analysis-item .analysis-subject {
        font-size: 0.75rem;
    }

    .analysis-item .analysis-score {
        font-size: 0.75rem;
    }

    /* Subject Cards */
    .subject-card .subject-header {
        padding: 0.6rem 0.75rem;
        font-size: 0.82rem;
    }

    .subject-card .subject-body {
        padding: 0.75rem;
    }

    .subject-card .subject-score {
        font-size: 1.25rem;
    }

    .subject-card .subject-detail {
        font-size: 0.7rem;
    }

    .subject-card .trend-badge {
        font-size: 0.68rem;
        padding: 0.2rem 0.5rem;
    }

    /* Recommendation Cards */
    .recommendation-card .rec-header {
        padding: 0.5rem 0.85rem;
        font-size: 0.82rem;
    }

    .recommendation-card .rec-body {
        padding: 0.65rem 0.85rem;
    }

    .recommendation-card .rec-item {
        font-size: 0.75rem;
        gap: 0.5rem;
    }

    .recommendation-card .rec-icon {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
    }

    /* Empty & Loading states */
    .empty-state {
        padding: 2rem 1rem;
    }

    .empty-state .empty-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .empty-state h5 {
        font-size: 0.95rem;
    }

    .empty-state p {
        font-size: 0.82rem;
    }

    .parent-loading {
        padding: 2.5rem 1rem;
    }

    .parent-loading .spinner-ring {
        width: 40px;
        height: 40px;
    }

    /* Progress bars */
    .progress-themed.progress-lg {
        height: 20px;
    }

    .progress-themed.progress-lg .progress-fill {
        font-size: 0.65rem;
    }
}

/* --- Extra Small (≤400px) --- */
@media (max-width: 400px) {
    .parent-portal .page-header {
        padding: 0.85rem 0.95rem;
        border-radius: 10px;
    }

    .parent-portal .page-header h2 {
        font-size: 1rem;
    }

    .student-banner .score-badges {
        flex-direction: column;
        gap: 0.35rem;
    }

    .student-banner .score-badge {
        flex-direction: row;
        gap: 0.35rem;
        justify-content: center;
        padding: 0.4rem 0.7rem;
    }

    .student-banner .score-badge .score-value {
        font-size: 0.95rem;
    }

    .parent-stat-card .stat-value {
        font-size: 1.25rem;
    }

    .parent-stat-card .stat-label {
        font-size: 0.62rem;
    }

    .report-summary-bar .summary-item .summary-value {
        font-size: 0.85rem;
    }

    .report-grid-card .report-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.25rem;
    }

    .report-grid-card .report-stat-box .stat-num {
        font-size: 0.8rem;
    }

    .report-grid-card .report-stat-box .stat-lbl {
        font-size: 0.5rem;
    }

    .child-card .card-header h5,
    .child-card .card-header h6 {
        font-size: 0.88rem;
    }

    .child-card .card-body {
        padding: 0.85rem;
    }
}

@media print {

    .report-modal-footer,
    .btn {
        display: none !important;
    }

    .report-document {
        box-shadow: none;
    }

    .report-modal-backdrop {
        position: static;
        background: none;
        backdrop-filter: none;
        padding: 0;
    }

    .report-modal-content {
        box-shadow: none;
        border-radius: 0;
    }
}

/* ========================================
   CHILD PROGRESS PAGE
   ======================================== */

/* --- Hero --- */
.cp-hero {
    position: relative;
    background: linear-gradient(135deg, var(--simba-primary) 0%, var(--simba-primary-dark, #152d6b) 50%, var(--simba-primary) 100%);
    background-size: 200% 200%;
    color: #fff;
    border-radius: 20px;
    padding: 2rem 2.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
    box-shadow: 0 8px 32px rgba(25, 93, 27, 0.25), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cp-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.cp-back-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 10px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.cp-back-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-2px);
}

.cp-back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.cp-hero-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.cp-hero-info {
    min-width: 0;
    overflow: hidden;
}

.cp-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 1px;
    flex-shrink: 0;
    border: 2.5px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.cp-hero-name {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cp-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    font-size: 0.85rem;
    opacity: 0.85;
}

.cp-hero-meta span {
    white-space: nowrap;
}

.cp-hero-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 14px;
    padding: 0.85rem 1.5rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cp-hero-stat {
    text-align: center;
    min-width: 56px;
}

.cp-hero-stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
}

.cp-hero-stat-of {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.7;
}

.cp-hero-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    opacity: 0.7;
    margin-top: 2px;
    font-weight: 600;
}

.cp-hero-stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
}

.cp-trend-up {
    color: #4ade80 !important;
}

.cp-trend-down {
    color: #f87171 !important;
}

.cp-trend-stable {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* --- Sections --- */
.cp-section {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.03);
    margin-bottom: 1.5rem;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
    transition: box-shadow 0.3s ease;
}

.cp-section:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.cp-section-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(30, 58, 138, 0.06);
}

.cp-section-header i {
    color: var(--simba-primary);
    font-size: 1.1rem;
}

.cp-section-header h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--simba-primary);
}

/* --- Timeline --- */
.cp-timeline {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cp-timeline-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.cp-timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.65rem;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.07);
}

.cp-timeline-card {
    flex: 1;
    background: #f8fafc;
    border-radius: 12px;
    padding: 0.95rem 1.15rem;
    border: 1px solid rgba(30, 58, 138, 0.06);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.cp-timeline-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border-color: rgba(25, 93, 27, 0.12);
}

.cp-timeline-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.cp-timeline-term {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--simba-text);
}

.cp-timeline-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cp-position-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--simba-text-muted, #6b7280);
    background: rgba(30, 58, 138, 0.06);
    padding: 0.15rem 0.55rem;
    border-radius: 50px;
    white-space: nowrap;
}

.cp-position-badge i {
    font-size: 0.65rem;
    margin-right: 2px;
    color: var(--simba-secondary, #F59E0B);
}

.cp-position-badge-sm {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
}

.cp-timeline-bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cp-timeline-bar-track {
    flex: 1;
    height: 10px;
    background: #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.cp-timeline-bar-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.6s ease;
}

.cp-timeline-bar-value {
    font-weight: 800;
    font-size: 0.85rem;
    min-width: 50px;
    text-align: right;
}

/* Subject chips inside timeline cards */
.cp-timeline-subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.cp-timeline-subj-chip {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: #fff;
    border: 1px solid rgba(30, 58, 138, 0.08);
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    font-size: 0.72rem;
}

.cp-timeline-subj-name {
    color: var(--simba-text-muted, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.cp-timeline-subj-score {
    font-weight: 700;
    white-space: nowrap;
}

.cp-timeline-footer {
    margin-top: 0.35rem;
}

.cp-timeline-class-avg {
    font-size: 0.75rem;
    color: var(--simba-text-muted, #6b7280);
}

/* --- Comparison Table --- */
.cp-table-wrapper {
    overflow-x: auto;
    padding: 0 0 0.5rem;
}

.cp-comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 500px;
}

.cp-comparison-table thead th {
    background: var(--simba-primary);
    color: #fff;
    padding: 0.65rem 0.75rem;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    text-align: center;
}

.cp-comparison-table thead th:first-child {
    text-align: left;
    padding-left: 1.25rem;
}

.cp-th-sticky {
    position: sticky;
    left: 0;
    z-index: 2;
}

.cp-comparison-table tbody tr {
    border-bottom: 1px solid rgba(30, 58, 138, 0.05);
    transition: background 0.15s;
}

.cp-comparison-table tbody tr:hover {
    background: rgba(30, 58, 138, 0.03);
}

.cp-comparison-table tbody td {
    padding: 0.6rem 0.75rem;
    text-align: center;
    vertical-align: middle;
}

.cp-td-term {
    text-align: left !important;
    padding-left: 1.25rem !important;
    white-space: nowrap;
}

.cp-td-year {
    display: block;
    font-size: 0.7rem;
    color: var(--simba-text-muted, #6b7280);
    line-height: 1.2;
}

.cp-cell-score {
    font-weight: 700;
    font-size: 0.85rem;
}

.cp-cell-empty {
    color: #d1d5db;
    font-size: 0.8rem;
}

/* --- Subject Grid --- */
.cp-subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 1rem;
    padding: 1.25rem 1.5rem;
}

.cp-subject-card {
    position: relative;
    background: #f8fafc;
    border-radius: 14px;
    padding: 1.1rem 1.15rem 0.95rem;
    border: 1px solid rgba(30, 58, 138, 0.06);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cp-subject-card:hover {
    box-shadow: 0 8px 24px rgba(25, 93, 27, 0.1);
    transform: translateY(-2px);
    border-color: rgba(25, 93, 27, 0.1);
}

.cp-subject-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

.cp-subject-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.cp-subject-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--simba-text);
}

.cp-subject-score-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.cp-subject-score {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
}

/* Assessment chips */
.cp-assessment-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
}

.cp-assessment-chip {
    font-size: 0.7rem;
    background: rgba(30, 58, 138, 0.04);
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.cp-chip-label {
    color: var(--simba-text-muted, #6b7280);
}

.cp-chip-value {
    font-weight: 700;
}

/* Subject bar */
.cp-subject-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.cp-subject-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* --- Insights row --- */
.cp-insights-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.cp-insight-panel {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.cp-insight-panel:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.cp-insight-panel .cp-section-header {
    border-bottom: 1px solid rgba(30, 58, 138, 0.06);
}

.cp-attendance-list {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.cp-attendance-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cp-attendance-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

/* Recommendations */
.cp-recs {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.cp-rec {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.45;
}

.cp-rec-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.cp-rec-strength {
    background: rgba(22, 163, 74, 0.06);
}

.cp-rec-strength .cp-rec-icon {
    background: rgba(22, 163, 74, 0.12);
    color: var(--simba-success);
}

.cp-rec-warning {
    background: rgba(245, 158, 11, 0.06);
}

.cp-rec-warning .cp-rec-icon {
    background: rgba(245, 158, 11, 0.12);
    color: var(--simba-secondary-dark, #d97706);
}

.cp-rec-tip {
    background: rgba(14, 165, 233, 0.06);
}

.cp-rec-tip .cp-rec-icon {
    background: rgba(14, 165, 233, 0.12);
    color: var(--simba-info);
}

/* --- Child Progress Responsive --- */
@media (max-width: 992px) {
    .cp-hero {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .cp-hero-stats {
        width: 100%;
        justify-content: center;
    }

    .cp-insights-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .cp-hero {
        padding: 1.25rem;
        border-radius: 14px;
        gap: 1rem;
    }

    .cp-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.15rem;
    }

    .cp-hero-name {
        font-size: 1.2rem;
    }

    .cp-hero-stats {
        padding: 0.7rem 1rem;
        gap: 1rem;
        border-radius: 12px;
    }

    .cp-hero-stat-value {
        font-size: 1.1rem;
    }

    .cp-section-header {
        padding: 0.85rem 1.1rem;
    }

    .cp-timeline {
        padding: 1rem 1.1rem;
    }

    .cp-subjects-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .cp-insights-row {
        gap: 1rem;
    }

    .cp-recs {
        padding: 0.85rem 1rem;
    }

    .cp-section {
        border-radius: 14px;
    }
}

@media (max-width: 480px) {
    .cp-hero {
        padding: 1rem;
        border-radius: 12px;
    }

    .cp-hero-content {
        gap: 0.75rem;
    }

    .cp-hero-meta {
        font-size: 0.75rem;
        gap: 0.35rem 0.75rem;
    }

    .cp-hero-stats {
        gap: 0.75rem;
        padding: 0.55rem 0.85rem;
        border-radius: 10px;
    }

    .cp-hero-stat-value {
        font-size: 0.95rem;
    }

    .cp-comparison-table {
        font-size: 0.75rem;
    }

    .cp-subjects-grid {
        padding: 0.85rem;
        gap: 0.75rem;
    }

    .cp-section {
        border-radius: 12px;
    }

    .cp-timeline-card {
        padding: 0.75rem 0.85rem;
    }
}