/*
 * Simba Results - Teacher Portal Professional Styles
 */

/* ========================================
   TEACHER PORTAL LAYOUT
   ======================================== */
.teacher-portal {
    background-color: var(--simba-bg-light);
    min-height: 100vh;
    padding-bottom: 2rem;
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100%;
    overflow-x: hidden;
}

/* ========================================
   PAGE HEADER BANNER
   ======================================== */
.teacher-portal .tp-page-header {
    background: linear-gradient(135deg, var(--simba-primary) 0%, var(--simba-primary-dark) 100%);
    color: #fff;
    border-radius: 14px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.75rem;
    position: relative;
    overflow: hidden;
}

.teacher-portal .tp-page-header::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -8%;
    width: 280px;
    height: 280px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
}

.teacher-portal .tp-page-header::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -5%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    pointer-events: none;
}

.tp-page-header .tp-avatar {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.tp-page-header h2 {
    color: #fff;
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.tp-page-header .tp-subtitle {
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 0;
    font-size: 0.9rem;
}

.tp-page-header .tp-back-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 8px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.tp-page-header .tp-back-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

/* ========================================
   STAT CARDS
   ======================================== */
.tp-stat-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

.tp-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.tp-stat-clickable {
    cursor: pointer;
}

.tp-stat-card .tp-stat-accent {
    height: 0;
    display: none;
}

.tp-stat-card .tp-stat-body {
    padding: 1.35rem 1rem 1.15rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Decorative circle for depth */
.tp-stat-card .tp-stat-body::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.tp-stat-card .tp-stat-body::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.tp-stat-card .tp-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto 0.65rem;
    position: relative;
    z-index: 1;
}

.tp-stat-card .tp-stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
    position: relative;
    z-index: 1;
}

.tp-stat-card .tp-stat-value-sm {
    font-size: 0.95rem;
}

.tp-stat-card .tp-stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-weight: 700;
    margin-top: 0.2rem;
    position: relative;
    z-index: 1;
}

/* ---------- PRIMARY (Green) ---------- */
.tp-stat-card:has(.accent-primary),
.tp-stat-card:has(.icon-primary) {
    background: linear-gradient(135deg, #195D1B 0%, #2F7A31 100%);
    box-shadow: 0 4px 16px rgba(25, 93, 27, 0.25);
}

.tp-stat-card:has(.accent-primary) .tp-stat-icon,
.tp-stat-card:has(.icon-primary) .tp-stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.tp-stat-card:has(.accent-primary) .tp-stat-value,
.tp-stat-card:has(.icon-primary) .tp-stat-value {
    color: #fff;
}

.tp-stat-card:has(.accent-primary) .tp-stat-label,
.tp-stat-card:has(.icon-primary) .tp-stat-label {
    color: rgba(255, 255, 255, 0.8);
}

/* ---------- SUCCESS (Emerald) ---------- */
.tp-stat-card:has(.accent-success),
.tp-stat-card:has(.icon-success) {
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.25);
}

.tp-stat-card:has(.accent-success) .tp-stat-icon,
.tp-stat-card:has(.icon-success) .tp-stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.tp-stat-card:has(.accent-success) .tp-stat-value,
.tp-stat-card:has(.icon-success) .tp-stat-value {
    color: #fff;
}

.tp-stat-card:has(.accent-success) .tp-stat-label,
.tp-stat-card:has(.icon-success) .tp-stat-label {
    color: rgba(255, 255, 255, 0.8);
}

/* ---------- INFO (Blue) ---------- */
.tp-stat-card:has(.accent-info),
.tp-stat-card:has(.icon-info) {
    background: linear-gradient(135deg, #0576B3 0%, #0EA5E9 100%);
    box-shadow: 0 4px 16px rgba(5, 118, 179, 0.25);
}

.tp-stat-card:has(.accent-info) .tp-stat-icon,
.tp-stat-card:has(.icon-info) .tp-stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.tp-stat-card:has(.accent-info) .tp-stat-value,
.tp-stat-card:has(.icon-info) .tp-stat-value {
    color: #fff;
}

.tp-stat-card:has(.accent-info) .tp-stat-label,
.tp-stat-card:has(.icon-info) .tp-stat-label {
    color: rgba(255, 255, 255, 0.8);
}

/* ---------- WARNING (Gold) ---------- */
.tp-stat-card:has(.accent-warning),
.tp-stat-card:has(.icon-warning) {
    background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%);
    box-shadow: 0 4px 16px rgba(217, 119, 6, 0.25);
}

.tp-stat-card:has(.accent-warning) .tp-stat-icon,
.tp-stat-card:has(.icon-warning) .tp-stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.tp-stat-card:has(.accent-warning) .tp-stat-value,
.tp-stat-card:has(.icon-warning) .tp-stat-value {
    color: #fff;
}

.tp-stat-card:has(.accent-warning) .tp-stat-label,
.tp-stat-card:has(.icon-warning) .tp-stat-label {
    color: rgba(255, 255, 255, 0.8);
}

/* ---------- DANGER (Red) ---------- */
.tp-stat-card:has(.accent-danger),
.tp-stat-card:has(.icon-danger) {
    background: linear-gradient(135deg, #B91C1C 0%, #EF4444 100%);
    box-shadow: 0 4px 16px rgba(185, 28, 28, 0.25);
}

.tp-stat-card:has(.accent-danger) .tp-stat-icon,
.tp-stat-card:has(.icon-danger) .tp-stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.tp-stat-card:has(.accent-danger) .tp-stat-value,
.tp-stat-card:has(.icon-danger) .tp-stat-value {
    color: #fff;
}

.tp-stat-card:has(.accent-danger) .tp-stat-label,
.tp-stat-card:has(.icon-danger) .tp-stat-label {
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   SECTION CARDS (TABLES, SIDEBARS)
   ======================================== */
.tp-section {
    border: none;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,0.10), 0 1.5px 6px rgba(0,0,0,0.06);
    margin-bottom: 1.75rem;
    background: linear-gradient(135deg, #f8fafc 60%, #e0e7ef 100%);
    position: relative;
    border-top: 5px solid var(--simba-primary);
    transition: box-shadow 0.2s, transform 0.2s;
    text-align: center;
}

.tp-section:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.10);
    transform: translateY(-2px) scale(1.01);
}

.tp-section .tp-section-header {
    padding: 1rem 1.5rem;
    background: transparent;
    border-bottom: 2px solid var(--simba-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
}

.tp-section .tp-section-header .tp-section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0;
    justify-content: center;
    width: 100%;
}

.tp-section .tp-section-header .tp-section-title .tp-section-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--simba-primary) 0%, var(--simba-primary-light) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.tp-section .tp-section-header .tp-section-title h5 {
    margin-bottom: 0;
    font-weight: 700;
    font-size: 1rem;
    color: var(--simba-text-primary);
}

.tp-section .tp-section-body {
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.tp-section .tp-section-body.p-0 {
    padding: 0;
}

/* ========================================
   TABLES
   ======================================== */
.tp-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
    margin-bottom: 0;
}

.tp-table thead th {
    background: var(--simba-bg-light);
    color: var(--simba-text-secondary);
    padding: 0.7rem 1rem;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.tp-table tbody td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: var(--simba-text-primary);
}

.tp-table tbody tr:last-child td {
    border-bottom: none;
}

.tp-table tbody tr {
    transition: background-color 0.15s ease;
}

.tp-table tbody tr:hover {
    background-color: rgba(var(--simba-primary-rgb), 0.03);
}

/* ========================================
   CLASS CARDS (MY CLASSES PAGE)
   ======================================== */

.tp-class-card {
    border: none;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,0.10), 0 1.5px 6px rgba(0,0,0,0.06);
    margin-bottom: 1.75rem;
    background: #fff;
    transition: box-shadow 0.2s, transform 0.2s;
    border-top: 5px solid var(--simba-primary-light);
    position: relative;
}

.tp-class-card:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.10);
    transform: translateY(-2px) scale(1.01);
}

.tp-class-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.tp-class-card .tp-class-header {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--simba-primary) 0%, var(--simba-primary-light) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tp-class-card .tp-class-header .tp-class-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.tp-class-card .tp-class-header h5 {
    color: #fff;
    margin-bottom: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.tp-class-card .tp-class-header small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
}

.tp-class-card .tp-class-header .tp-student-count {
    background: rgba(255, 255, 255, 0.18);
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
}

.tp-class-card .tp-class-body {
    padding: 0;
}

/* ========================================
   MARKS ENTRY
   ======================================== */

.tp-marks-header {
    background: linear-gradient(135deg, #f8fafc 60%, #e0e7ef 100%);
    color: var(--simba-text-primary);
    border-radius: 18px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 6px 24px rgba(0,0,0,0.10), 0 1.5px 6px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
    border-top: 5px solid var(--simba-primary-dark);
    transition: box-shadow 0.2s, transform 0.2s;
    text-align: center;
}
.tp-marks-header:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.10);
    transform: translateY(-2px) scale(1.01);
}

.tp-marks-header::after {
    content: '';
    position: absolute;
    top: -60%;
    right: -8%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
}

.tp-marks-header h2 {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
}

.tp-marks-header p {
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 0;
    font-size: 0.9rem;
}

.tp-marks-header .tp-marks-actions .btn {
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.45rem 1.25rem;
}

.tp-marks-header .btn-save {
    background: var(--simba-secondary) !important;
    border-color: var(--simba-secondary) !important;
    color: #fff !important;
}

.tp-marks-header .btn-save:hover {
    background: var(--simba-secondary-dark) !important;
}

.tp-marks-header .btn-cancel {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.tp-marks-header .btn-cancel:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

/* Marks Table */
.tp-marks-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.tp-marks-table thead th {
    background: var(--simba-primary);
    color: #fff;
    padding: 0.65rem 0.75rem;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}

.tp-marks-table thead th:first-child,
.tp-marks-table thead th:nth-child(2),
.tp-marks-table thead th:nth-child(3) {
    text-align: left;
}

.tp-marks-table tbody td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    text-align: center;
    vertical-align: middle;
}

.tp-marks-table tbody td:first-child,
.tp-marks-table tbody td:nth-child(2),
.tp-marks-table tbody td:nth-child(3) {
    text-align: left;
}

.tp-marks-table tbody tr:nth-child(even) {
    background-color: rgba(248, 250, 252, 0.7);
}

.tp-marks-table tbody tr:hover {
    background-color: rgba(var(--simba-primary-rgb), 0.04);
}

.tp-marks-table .mark-input {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    font-size: 0.875rem;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 90px;
}

.tp-marks-table .mark-input:focus {
    border-color: var(--simba-primary);
    box-shadow: 0 0 0 3px rgba(var(--simba-primary-rgb), 0.1);
    outline: none;
}

.tp-marks-table .comment-input {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
    transition: border-color 0.2s;
    width: 100%;
    min-width: 160px;
}

.tp-marks-table .comment-input:focus {
    border-color: var(--simba-primary);
    box-shadow: 0 0 0 3px rgba(var(--simba-primary-rgb), 0.1);
    outline: none;
}

/* Stats Footer */
.tp-marks-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--simba-primary) 0%, var(--simba-primary-dark) 100%);
    color: #fff;
    border-radius: 0 0 12px 12px;
}

.tp-marks-stats .stat-item {
    text-align: center;
}

.tp-marks-stats .stat-item .stat-num {
    font-size: 1.25rem;
    font-weight: 800;
}

.tp-marks-stats .stat-item .stat-lbl {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.tp-grade-legend {
    padding: 0.5rem 1.5rem;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    line-height: 1.6;
}

/* ========================================
   QUICK ACTIONS SIDEBAR
   ======================================== */
.tp-quick-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
    color: var(--simba-text-primary);
    background: #fff;
    margin-bottom: 0.5rem;
}

.tp-quick-action:last-child {
    margin-bottom: 0;
}

.tp-quick-action:hover {
    border-color: var(--simba-primary);
    background: rgba(var(--simba-primary-rgb), 0.04);
    color: var(--simba-primary);
    transform: translateX(4px);
}

.tp-quick-action .tp-qa-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.tp-quick-action .tp-qa-icon.qa-primary {
    background: rgba(var(--simba-primary-rgb), 0.1);
    color: var(--simba-primary);
}

.tp-quick-action .tp-qa-icon.qa-info {
    background: rgba(14, 165, 233, 0.1);
    color: var(--simba-info);
}

.tp-quick-action .tp-qa-icon.qa-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--simba-secondary);
}

/* ========================================
   TERM INFO CARD
   ======================================== */
.tp-term-info .tp-term-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
}

.tp-term-info .tp-term-row:last-child {
    border-bottom: none;
}

.tp-term-info .tp-term-label {
    color: var(--simba-text-muted);
    font-weight: 500;
}

.tp-term-info .tp-term-value {
    font-weight: 700;
    color: var(--simba-text-primary);
}

/* ========================================
   REPORT LIST ITEM
   ======================================== */
.tp-report-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.tp-report-item:last-child {
    border-bottom: none;
}

.tp-report-item:hover {
    background: rgba(var(--simba-primary-rgb), 0.02);
}

.tp-report-item .tp-report-name {
    font-weight: 600;
    color: var(--simba-text-primary);
    font-size: 0.875rem;
}

.tp-report-item .tp-report-meta {
    font-size: 0.78rem;
    color: var(--simba-text-muted);
}

/* ========================================
   BADGES & PILLS
   ======================================== */
.tp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.tp-badge.badge-complete {
    background: rgba(22, 163, 74, 0.1);
    color: var(--simba-success);
}

.tp-badge.badge-progress {
    background: rgba(245, 158, 11, 0.1);
    color: var(--simba-secondary-dark);
}

.tp-badge.badge-pending {
    background: rgba(148, 163, 184, 0.15);
    color: var(--simba-text-muted);
}

.tp-badge.badge-entered {
    background: rgba(22, 163, 74, 0.1);
    color: var(--simba-success);
}

.tp-grade-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.78rem;
    color: #fff;
}

.tp-grade-pill.grade-a {
    background: var(--simba-grade-a);
}

.tp-grade-pill.grade-b {
    background: var(--simba-grade-b);
}

.tp-grade-pill.grade-c {
    background: var(--simba-grade-c);
}

.tp-grade-pill.grade-d {
    background: var(--simba-grade-d);
}

.tp-grade-pill.grade-e {
    background: var(--simba-grade-e);
}

.tp-grade-pill.grade-u {
    background: var(--simba-grade-u);
}

/* Average Pill */
.tp-avg-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
}

.tp-avg-pill.avg-high {
    background: rgba(22, 163, 74, 0.1);
    color: var(--simba-success);
}

.tp-avg-pill.avg-mid {
    background: rgba(245, 158, 11, 0.1);
    color: var(--simba-secondary-dark);
}

.tp-avg-pill.avg-low {
    background: rgba(220, 38, 38, 0.1);
    color: var(--simba-danger);
}

/* ========================================
   PERFORMANCE BAR (REPORTS SIDEBAR)
   ======================================== */
.tp-perf-bar {
    height: 7px;
    border-radius: 4px;
    background: #e2e8f0;
    overflow: hidden;
}

.tp-perf-bar .tp-perf-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ========================================
   FILTER CARD
   ======================================== */
.tp-filter-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    background: #fff;
}

.tp-filter-card .tp-filter-header {
    padding: 1rem 1.25rem;
    border-bottom: 2px solid var(--simba-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tp-filter-card .tp-filter-header h6 {
    margin-bottom: 0;
    font-weight: 700;
    color: var(--simba-text-primary);
}

.tp-filter-card .tp-filter-body {
    padding: 1.25rem;
}

.tp-filter-card .form-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--simba-text-muted);
}

.tp-filter-card .form-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.2s;
}

.tp-filter-card .form-select:focus {
    border-color: var(--simba-primary);
    box-shadow: 0 0 0 3px rgba(var(--simba-primary-rgb), 0.1);
}

/* ========================================
   EMPTY & LOADING STATES
   ======================================== */
.tp-empty {
    text-align: center;
    padding: 3.5rem 2rem;
}

.tp-empty .tp-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--simba-bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--simba-text-muted);
    margin: 0 auto 1rem;
}

.tp-empty h5 {
    font-weight: 700;
    color: var(--simba-text-primary);
    margin-bottom: 0.35rem;
}

.tp-empty p {
    color: var(--simba-text-muted);
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto;
}

/* ========================================
   SEARCH BOX
   ======================================== */
.tp-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.tp-search-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--simba-text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.tp-search-input {
    width: 100%;
    min-width: 200px;
    padding: 0.45rem 2rem 0.45rem 2.1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--simba-text-primary);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tp-search-input::placeholder {
    color: #94a3b8;
}

.tp-search-input:focus {
    outline: none;
    border-color: var(--simba-primary);
    box-shadow: 0 0 0 3px rgba(var(--simba-primary-rgb), 0.1);
}

.tp-search-clear {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--simba-text-muted);
    cursor: pointer;
    padding: 0.15rem;
    font-size: 0.65rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.tp-search-clear:hover {
    opacity: 1;
}

/* ========================================
   TABLE WRAP (desktop)
   ======================================== */
.tp-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ========================================
   EXPANDED REPORT DETAIL
   ======================================== */
.tp-expanded-detail {
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--simba-primary);
}

.tp-expanded-detail .tp-expanded-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--simba-text-muted);
    margin-bottom: 0.5rem;
}

.tp-expanded-detail .tp-detail-th {
    font-weight: 600;
    color: var(--simba-text-muted);
}

.tp-expanded-detail .tp-detail-comment {
    text-align: left;
    color: var(--simba-text-muted);
    font-size: 0.8rem;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   PERFORMANCE BAR FILL COLORS
   ======================================== */
.tp-perf-fill.fill-high {
    background: var(--simba-success);
}

.tp-perf-fill.fill-mid {
    background: var(--simba-secondary);
}

.tp-perf-fill.fill-low {
    background: var(--simba-danger);
}

.tp-loading {
    text-align: center;
    padding: 4rem 2rem;
}

.tp-loading .tp-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--simba-primary);
    border-radius: 50%;
    animation: tp-spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes tp-spin {
    to {
        transform: rotate(360deg);
    }
}

.tp-loading p {
    color: var(--simba-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ========================================
   ALERT BANNER
   ======================================== */
.tp-alert {
    border: none;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.tp-alert.tp-alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--simba-secondary-dark);
    border-left: 4px solid var(--simba-secondary);
}

/* ========================================
   ASSESSMENT TYPE SELECTOR
   ======================================== */
.tp-assessment-select {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--simba-text-secondary);
    background: #fff;
    transition: border-color 0.2s;
}

.tp-assessment-select:focus {
    border-color: var(--simba-primary);
    box-shadow: 0 0 0 3px rgba(var(--simba-primary-rgb), 0.1);
    outline: none;
}

/* ========================================
   CHART BARS (Horizontal Bar Graph)
   ======================================== */
.tp-chart-bars {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.tp-bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tp-bar-label {
    min-width: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--simba-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-bar-track {
    flex: 1;
    height: 22px;
    background: #f1f5f9;
    border-radius: 6px;
    overflow: hidden;
}

.tp-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s ease;
}

.tp-bar-fill.bar-high {
    background: linear-gradient(90deg, #16a34a, #22c55e);
}

.tp-bar-fill.bar-mid {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.tp-bar-fill.bar-low {
    background: linear-gradient(90deg, #dc2626, #ef4444);
}

.tp-bar-fill.bar-none {
    background: #e2e8f0;
    width: 3% !important;
}

.tp-bar-value {
    min-width: 55px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: right;
}

.tp-bar-value.bar-high { color: #16a34a; }
.tp-bar-value.bar-mid { color: #d97706; }
.tp-bar-value.bar-low { color: #dc2626; }
.tp-bar-value.bar-none { color: #94a3b8; }

/* ========================================
   COMPLETION RING (SVG circle)
   ======================================== */
.tp-ring-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.tp-ring-svg {
    width: 100%;
    height: 100%;
}

.tp-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tp-ring-pct {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--simba-primary);
}

.tp-ring-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--simba-text-muted);
    font-weight: 600;
}

/* ========================================
   CLASS DASHBOARD CARDS (Clickable Cards)
   ======================================== */
.tp-class-dash-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tp-class-dash-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.tp-class-dash-header {
    background: linear-gradient(135deg, var(--simba-primary) 0%, var(--simba-primary-dark) 100%);
    padding: 0.85rem 1rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tp-class-dash-body {
    padding: 1rem;
    flex: 1;
}

/* ========================================
   PROGRESS BAR
   ======================================== */
.tp-progress-track {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.tp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--simba-primary), var(--simba-primary-light));
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* ========================================
   SUBJECT CHIPS
   ======================================== */
.tp-subject-chip {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    white-space: nowrap;
}

.tp-subject-chip.chip-done {
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
}

.tp-subject-chip.chip-pending {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
}

.tp-subject-chip.chip-more {
    background: #f1f5f9;
    color: var(--simba-text-muted);
}

/* ========================================
   STUDENT AVATAR (Small)
   ======================================== */
.tp-student-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.tp-student-avatar.avatar-male {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.tp-student-avatar.avatar-female {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

/* ========================================
   INFO GRID (Key-Value Pairs)
   ======================================== */
.tp-info-grid {
    display: flex;
    flex-direction: column;
}

.tp-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f1f5f9;
    gap: 1rem;
}

.tp-info-row:last-child {
    border-bottom: none;
}

.tp-info-label {
    font-size: 0.82rem;
    color: var(--simba-text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.tp-info-value {
    font-size: 0.85rem;
    color: var(--simba-text-primary);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

/* ========================================
   TABLE ROW HOVER
   ======================================== */
.tp-table tbody tr.tp-row-hover:hover {
    background: rgba(var(--simba-primary-rgb), 0.04);
}

/* ========================================
   BADGE VARIANTS (Additional)
   ======================================== */
.tp-badge.badge-primary {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.tp-badge.badge-info {
    background: rgba(14, 165, 233, 0.1);
    color: #0284c7;
}

.tp-badge.badge-danger {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.tp-badge.badge-secondary {
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
}

/* Accent colors for stat cards */
.tp-stat-accent.accent-danger {
    background: linear-gradient(180deg, #dc2626, #b91c1c);
}

.tp-stat-accent.accent-secondary {
    background: linear-gradient(180deg, #64748b, #475569);
}

.tp-stat-card .tp-stat-icon.icon-danger {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.tp-stat-card .tp-stat-icon.icon-secondary {
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
}

/* ========================================
   RESPONSIVE - TABLET (≤992px)
   ======================================== */
@media (max-width: 992px) {
    .tp-page-header {
        padding: 1.25rem 1.5rem;
    }

    .tp-page-header .tp-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }

    .tp-page-header h2 {
        font-size: 1.25rem;
    }

    .tp-stat-card .tp-stat-value {
        font-size: 1.5rem;
    }

    .tp-marks-header {
        padding: 1.25rem 1.5rem;
    }

    .tp-marks-stats {
        gap: 1rem;
        padding: 0.85rem 1.25rem;
    }

    .tp-marks-stats .stat-item .stat-num {
        font-size: 1.1rem;
    }

    .tp-section .tp-section-body {
        padding: 1rem;
    }
}

/* ========================================
   RESPONSIVE - SMALL TABLET (≤768px)
   ======================================== */
@media (max-width: 768px) {
    .teacher-portal {
        padding-bottom: 1.5rem;
    }

    .tp-page-header {
        padding: 1rem 1.25rem;
        border-radius: 10px;
        margin-bottom: 1.25rem;
    }

    .tp-page-header .tp-avatar {
        width: 42px;
        height: 42px;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    .tp-page-header h2 {
        font-size: 1.1rem;
    }

    .tp-page-header .tp-subtitle {
        font-size: 0.8rem;
    }

    .tp-page-header .tp-back-btn {
        font-size: 0.78rem;
        padding: 0.3rem 0.75rem;
    }

    /* Stat Cards - restore original sizing for better readability */
    .tp-stat-card .tp-stat-body {
        padding: 1.15rem 1rem;
    }

    .tp-stat-card .tp-stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .tp-stat-card .tp-stat-value {
        font-size: 1.85rem;
    }

    .tp-stat-card .tp-stat-label {
        font-size: 0.72rem;
    }

    /* Sections */
    .tp-section .tp-section-header {
        padding: 0.75rem 1rem;
    }

    .tp-section .tp-section-header .tp-section-title .tp-section-icon {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }

    .tp-section .tp-section-header .tp-section-title h5 {
        font-size: 0.9rem;
    }

    .tp-section .tp-section-body {
        padding: 0.85rem 1rem;
    }

    /* Class Cards */
    .tp-class-card .tp-class-header {
        padding: 0.85rem 1rem;
    }

    .tp-class-card .tp-class-header .tp-class-avatar {
        width: 34px;
        height: 34px;
        font-size: 0.75rem;
        border-radius: 8px;
    }

    .tp-class-card .tp-class-header h5 {
        font-size: 0.95rem;
    }

    /* Marks Entry */
    .tp-marks-header {
        padding: 1rem 1.25rem;
        border-radius: 10px;
    }

    .tp-marks-header h2 {
        font-size: 1.1rem;
    }

    .tp-marks-header .tp-marks-actions {
        flex-direction: column;
        width: 100%;
        margin-top: 0.75rem;
    }

    .tp-marks-header .tp-marks-actions .btn {
        width: 100%;
    }

    .tp-marks-table thead th {
        font-size: 0.65rem;
        padding: 0.5rem;
    }

    .tp-marks-table tbody td {
        padding: 0.45rem 0.5rem;
        font-size: 0.8rem;
    }

    .tp-marks-table .mark-input {
        font-size: 0.8rem;
        padding: 0.3rem 0.4rem;
        max-width: 70px;
    }

    .tp-marks-table .comment-input {
        min-width: 120px;
        font-size: 0.78rem;
    }

    .tp-marks-stats {
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        justify-content: space-around;
    }

    .tp-marks-stats .stat-item .stat-num {
        font-size: 1rem;
    }

    .tp-marks-stats .stat-item .stat-lbl {
        font-size: 0.6rem;
    }

    /* Tables Scroll */
    .tp-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1px;
    }

    .tp-table,
    .tp-marks-table {
        width: 100%;
        min-width: 0;
        max-width: 100vw;
        box-sizing: border-box;
        table-layout: auto;
    }

    /* Quick Actions */
    .tp-quick-action {
        padding: 0.6rem 0.85rem;
    }

    .tp-quick-action .tp-qa-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    /* Filter Card */
    .tp-filter-card .tp-filter-body {
        padding: 1rem;
    }

    /* Empty State */
    .tp-empty {
        padding: 2.5rem 1.5rem;
    }

    .tp-empty .tp-empty-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    /* Chart bars */
    .tp-bar-label {
        min-width: 80px;
        font-size: 0.75rem;
    }

    .tp-bar-track {
        height: 18px;
    }

    .tp-bar-value {
        min-width: 48px;
        font-size: 0.72rem;
    }

    /* Class dashboard cards */
    .tp-class-dash-header .tp-class-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.7rem;
    }

    /* Info grid */
    .tp-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
    }

    .tp-info-value {
        text-align: left;
    }
}

/* ========================================
   RESPONSIVE - PHONE (≤576px)
   ======================================== */
@media (max-width: 576px) {
    .teacher-portal {
        padding-bottom: 1rem;
    }

    .teacher-portal .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Prevent horizontal overflow */
    .tp-section,
    .tp-class-card,
    .tp-marks-header,
    .tp-filter-card {
        overflow: hidden;
    }

    .tp-page-header {
        padding: 0.85rem 1rem;
        border-radius: 8px;
        margin-bottom: 1rem;
    }

    .tp-page-header .d-flex {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .tp-page-header .tp-avatar {
        width: 38px;
        height: 38px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .tp-page-header h2 {
        font-size: 1rem;
    }

    .tp-page-header .tp-subtitle {
        font-size: 0.75rem;
    }

    .tp-page-header .tp-back-btn {
        font-size: 0.72rem;
        padding: 0.25rem 0.6rem;
    }

    /* Stat Cards - keep readable on small screens */
    .tp-stat-card .tp-stat-body {
        padding: 1rem 0.85rem;
    }

    .tp-stat-card .tp-stat-icon {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
        border-radius: 10px;
        margin-bottom: 0.35rem;
    }

    .tp-stat-card .tp-stat-value {
        font-size: 1.5rem;
    }

    .tp-stat-card .tp-stat-label {
        font-size: 0.65rem;
        letter-spacing: 0.4px;
    }

    /* Section Headers */
    .tp-section .tp-section-header {
        padding: 0.65rem 0.85rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .tp-section .tp-section-header .tp-section-title h5 {
        font-size: 0.85rem;
    }

    /* Class Cards */
    .tp-class-card .tp-class-header {
        padding: 0.75rem 0.85rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Marks Entry */
    .tp-marks-header {
        padding: 0.85rem 1rem;
        border-radius: 8px;
    }

    .tp-marks-header h2 {
        font-size: 0.95rem;
    }

    .tp-marks-table thead th {
        font-size: 0.6rem;
        padding: 0.4rem;
    }

    .tp-marks-table tbody td {
        padding: 0.35rem 0.4rem;
        font-size: 0.75rem;
    }

    .tp-marks-table .mark-input {
        font-size: 0.75rem;
        padding: 0.25rem 0.35rem;
        max-width: 60px;
    }

    .tp-marks-table .comment-input {
        min-width: 90px;
        font-size: 0.72rem;
    }

    /* Tables: horizontal scroll with min-width */
    .tp-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tp-table,
    .tp-marks-table {
        min-width: 580px;
    }

    .tp-marks-stats {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    /* Reports Page - Stack sidebar */
    .tp-filter-card .tp-filter-body {
        padding: 0.85rem;
    }

    /* Empty State */
    .tp-empty {
        padding: 2rem 1rem;
    }

    .tp-empty .tp-empty-icon {
        width: 56px;
        height: 56px;
        font-size: 1.35rem;
    }

    .tp-empty h5 {
        font-size: 0.95rem;
    }

    .tp-empty p {
        font-size: 0.82rem;
    }

    /* Quick Actions stack */
    .tp-quick-action {
        padding: 0.5rem 0.75rem;
        font-size: 0.82rem;
    }

    .tp-quick-action .tp-qa-icon {
        width: 30px;
        height: 30px;
        font-size: 0.82rem;
        border-radius: 7px;
    }

    /* Header buttons: full-width stacking */
    .tp-page-header .d-flex.gap-2 .btn,
    .tp-page-header .tp-back-btn {
        font-size: 0.72rem;
        padding: 0.3rem 0.65rem;
    }

    /* Marks header actions: full width */
    .tp-marks-header .d-flex.gap-2 {
        flex-wrap: wrap;
        width: 100%;
    }

    .tp-marks-header .d-flex.gap-2 .btn {
        flex: 1 1 auto;
    }

    /* Filters: full width selects */
    .tp-filter-select {
        font-size: 0.82rem;
    }

    /* Chart bars mobile */
    .tp-bar-row {
        gap: 0.5rem;
    }

    .tp-bar-label {
        min-width: 65px;
        font-size: 0.7rem;
    }

    .tp-bar-track {
        height: 16px;
    }

    .tp-bar-value {
        min-width: 42px;
        font-size: 0.68rem;
    }

    /* Completion ring */
    .tp-ring-wrapper {
        width: 100px;
        height: 100px;
    }

    .tp-ring-pct {
        font-size: 1.2rem;
    }

    /* Class dashboard cards */
    .tp-class-dash-card .tp-class-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.65rem;
    }

    .tp-class-dash-header h5 {
        font-size: 0.9rem;
    }

    .tp-class-dash-body {
        padding: 0.75rem;
    }

    /* Student avatar */
    .tp-student-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.6rem;
    }

    /* Subject chips */
    .tp-subject-chip {
        font-size: 0.62rem;
        padding: 0.1rem 0.4rem;
    }

    /* Expanded detail in reports */
    .tp-expanded-detail {
        padding: 0.5rem 0.65rem;
    }

    .tp-expanded-detail .tp-detail-th {
        font-size: 0.7rem;
        padding: 0.3rem;
        white-space: nowrap;
    }

    .tp-expanded-detail .tp-detail-comment {
        max-width: 120px;
        font-size: 0.72rem;
    }

    /* Trend chart scroll hint */
    .tp-trend-chart {
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
    }

    /* Info grid tighter */
    .tp-info-row {
        padding: 0.45rem 0;
        gap: 0.5rem;
    }

    .tp-info-label {
        font-size: 0.72rem;
    }

    .tp-info-value {
        font-size: 0.78rem;
    }

    /* Avg pill smaller */
    .tp-avg-pill {
        font-size: 0.68rem;
        padding: 0.15rem 0.45rem;
    }
}

/* ========================================
   RESPONSIVE - SMALL PHONE (≤400px)
   ======================================== */
@media (max-width: 400px) {
    .tp-page-header {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .tp-page-header h2 {
        font-size: 0.92rem;
    }

    .tp-stat-card .tp-stat-value {
        font-size: 1.15rem;
    }

    .tp-stat-card .tp-stat-label {
        font-size: 0.6rem;
    }

    .tp-stat-card .tp-stat-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        display: flex;
    }

    .tp-section .tp-section-header .tp-section-title .tp-section-icon {
        display: none;
    }

    .tp-marks-header {
        padding: 0.75rem;
    }

    .tp-class-card .tp-class-header .tp-class-avatar {
        display: none;
    }

    /* Full-width buttons on tiny screens */
    .tp-marks-header .d-flex.gap-2 .btn {
        font-size: 0.72rem;
        padding: 0.3rem 0.5rem;
    }

    .tp-page-header .tp-back-btn {
        font-size: 0.68rem;
    }

    .tp-event-title {
        font-size: 0.85rem;
    }

    .tp-event-desc {
        font-size: 0.75rem;
    }
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.tp-toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: 420px;
    width: calc(100% - 2rem);
}

.tp-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    animation: tpToastSlideIn 0.35s ease;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.tp-toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.15;
    animation: tpToastTimer 4s linear forwards;
}

.tp-toast-exit {
    animation: tpToastSlideOut 0.3s ease forwards;
}

.tp-toast-success {
    border-left-color: var(--simba-success);
}

.tp-toast-error {
    border-left-color: var(--simba-danger);
}

.tp-toast-warning {
    border-left-color: var(--simba-secondary);
}

.tp-toast-info {
    border-left-color: var(--simba-info);
}

.tp-toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.tp-toast-success .tp-toast-icon {
    background: rgba(22, 163, 74, 0.1);
    color: var(--simba-success);
}

.tp-toast-error .tp-toast-icon {
    background: rgba(220, 38, 38, 0.1);
    color: var(--simba-danger);
}

.tp-toast-warning .tp-toast-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--simba-secondary);
}

.tp-toast-info .tp-toast-icon {
    background: rgba(14, 165, 233, 0.1);
    color: var(--simba-info);
}

.tp-toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.tp-toast-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--simba-text-primary);
}

.tp-toast-message {
    font-size: 0.8rem;
    color: var(--simba-text-muted);
    line-height: 1.4;
}

.tp-toast-close {
    background: none;
    border: none;
    color: var(--simba-text-muted);
    cursor: pointer;
    padding: 0.15rem;
    font-size: 0.7rem;
    opacity: 0.5;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.tp-toast-close:hover {
    opacity: 1;
}

@keyframes tpToastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes tpToastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes tpToastTimer {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* ========================================
   CONFIRM DIALOG
   ======================================== */
.tp-confirm-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: tpConfirmFadeIn 0.2s ease;
}

.tp-confirm-dialog {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    animation: tpConfirmPopIn 0.25s ease;
}

.tp-confirm-exit {
    animation: tpConfirmPopOut 0.2s ease forwards;
}

.tp-confirm-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.tp-confirm-icon-warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--simba-secondary);
}

.tp-confirm-icon-danger {
    background: rgba(220, 38, 38, 0.12);
    color: var(--simba-danger);
}

.tp-confirm-icon-info {
    background: rgba(14, 165, 233, 0.12);
    color: var(--simba-info);
}

.tp-confirm-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--simba-text-primary);
    margin-bottom: 0.5rem;
}

.tp-confirm-message {
    font-size: 0.875rem;
    color: var(--simba-text-muted);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.tp-confirm-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.tp-confirm-btn-cancel {
    background: #f1f5f9;
    color: var(--simba-text-primary);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.55rem 1.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.tp-confirm-btn-cancel:hover {
    background: #e2e8f0;
}

.tp-confirm-btn-confirm {
    border: none;
    border-radius: 10px;
    padding: 0.55rem 1.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
    transition: filter 0.2s;
}

.tp-confirm-btn-confirm:hover {
    filter: brightness(1.1);
    color: #fff;
}

.tp-confirm-btn-warning {
    background: var(--simba-secondary);
}

.tp-confirm-btn-danger {
    background: var(--simba-danger);
}

.tp-confirm-btn-info {
    background: var(--simba-info);
}

@keyframes tpConfirmFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes tpConfirmPopIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes tpConfirmPopOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* ========================================
   SEARCH BOX
   ======================================== */
.tp-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.tp-search-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--simba-text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.tp-search-input {
    width: 100%;
    min-width: 200px;
    padding: 0.45rem 2rem 0.45rem 2.1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--simba-text-primary);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tp-search-input::placeholder {
    color: #94a3b8;
}

.tp-search-input:focus {
    outline: none;
    border-color: var(--simba-primary);
    box-shadow: 0 0 0 3px rgba(var(--simba-primary-rgb), 0.1);
}

.tp-search-clear {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--simba-text-muted);
    cursor: pointer;
    padding: 0.15rem;
    font-size: 0.65rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.tp-search-clear:hover {
    opacity: 1;
}

/* ========================================
   RESPONSIVE - SEARCH & TOAST
   ======================================== */
@media (max-width: 768px) {
    .tp-toast-container {
        top: 0.75rem;
        right: 0.75rem;
        max-width: 340px;
    }

    .tp-search-input {
        min-width: 160px;
    }

    .tp-confirm-dialog {
        max-width: 320px;
        padding: 1.5rem;
    }

    .tp-confirm-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .tp-toast-container {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
        width: auto;
    }

    .tp-search-input {
        min-width: 140px;
        font-size: 0.78rem;
    }
}

/* Notification Bell and Dropdown */
.nav-bell-wrapper {
    position: relative;
    display: inline-block;
}

.nav-bell {
    position: relative;
    background: none;
    border: none;
    color: var(--simba-text-primary);
    cursor: pointer;
    outline: none;
    padding: 0.25rem 0.5rem;
}

.nav-bell-badge {
    position: absolute;
    top: 0.1rem;
    right: 0.1rem;
    background: var(--simba-danger);
    color: #fff;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15em 0.5em;
    min-width: 1.2em;
    text-align: center;
    z-index: 2;
}

.notification-list-dropdown {
    position: absolute;
    right: 0;
    top: 2.5rem;
    width: 340px;
    max-height: 420px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.08);
    z-index: 10000;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.notification-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem 0.5rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 700;
    font-size: 1rem;
    color: var(--simba-text-primary);
}

.notification-list-header .mark-all-read {
    background: none;
    border: none;
    color: var(--simba-info);
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 600;
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
    transition: background 0.15s;
}

.notification-list-header .mark-all-read:hover {
    background: var(--simba-bg-light);
}

.notification-list-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.notification-item {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background: rgba(var(--simba-info-rgb, 14,165,233), 0.08);
    font-weight: 600;
}

.notification-item.read {
    background: #fff;
    color: var(--simba-text-muted);
}

.notification-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--simba-text-primary);
}

.notification-body {
    font-size: 0.85rem;
    color: var(--simba-text-muted);
    margin-top: 0.1rem;
}

.notification-date {
    font-size: 0.75rem;
    color: var(--simba-text-muted);
    margin-top: 0.2rem;
}

.notification-loading, .notification-empty {
    text-align: center;
    color: var(--simba-text-muted);
    padding: 2rem 0;
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s;
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #ede9fe;
    color: #7c3aed;
    font-size: 0.9rem;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--simba-primary);
    flex-shrink: 0;
    margin-top: 6px;
}

.notification-list-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

.notification-list-footer .view-all-link {
    color: var(--simba-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.notification-list-footer .view-all-link:hover {
    text-decoration: underline;
}

@media (max-width: 400px) {
    .notification-list-dropdown {
        width: 98vw;
        left: 1vw;
        right: 1vw;
        min-width: unset;
    }
}

/* End Notification Bell and Dropdown */

/* ========================================
   TIMETABLE GRID
   ======================================== */
.tt-grid {
    display: grid;
    grid-template-columns: 80px repeat(5, minmax(140px, 1fr));
    grid-template-rows: auto repeat(18, 50px);
    gap: 1px;
    background: #e2e8f0;
    min-width: 800px;
    border-radius: 0 0 18px 18px;
    overflow: hidden;
}

.tt-header {
    background: var(--simba-bg-light);
    font-weight: 700;
    padding: 0.6rem 0.5rem;
    text-align: center;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--simba-text-secondary);
}

.tt-time-label {
    grid-column: 1;
    background: #fff;
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--simba-text-muted);
    letter-spacing: 0.2px;
}

.tt-cell {
    background: #fff;
}

.tt-cell-alt {
    background: #fafbfc;
}

.tt-slot {
    margin: 2px;
    padding: 0.4rem 0.55rem;
    font-size: 0.78rem;
    overflow: hidden;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s, box-shadow 0.15s;
}

.tt-slot:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.tt-slot-subject {
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
}

.tt-slot-class {
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.72rem;
}

.tt-slot-time {
    opacity: 0.8;
    font-size: 0.68rem;
}

.tt-slot-venue {
    opacity: 0.8;
    font-size: 0.68rem;
    margin-top: 0.1rem;
}

/* ========================================
   FILTER LABELS
   ======================================== */
.tp-filter-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--simba-text-muted);
    margin-bottom: 0.35rem;
    display: block;
}

.tp-filter-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.2s;
}

.tp-filter-select:focus {
    border-color: var(--simba-primary);
    box-shadow: 0 0 0 3px rgba(var(--simba-primary-rgb), 0.1);
}

/* ========================================
   TAB GROUP
   ======================================== */
.tp-tab-group {
    display: flex;
    gap: 0.25rem;
    background: rgba(var(--simba-primary-rgb), 0.06);
    padding: 0.25rem;
    border-radius: 10px;
}

.tp-tab {
    background: transparent;
    border: none;
    padding: 0.5rem 1.15rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--simba-text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tp-tab:hover {
    color: var(--simba-primary);
    background: rgba(var(--simba-primary-rgb), 0.06);
}

.tp-tab.tp-tab-active {
    background: var(--simba-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(var(--simba-primary-rgb), 0.25);
}

/* ========================================
   EVENT CARDS
   ======================================== */
.tp-event-card {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tp-event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.tp-event-header {
    background: linear-gradient(135deg, var(--simba-primary) 0%, var(--simba-primary-light) 100%);
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.tp-event-body {
    padding: 1rem 1.15rem;
    flex: 1;
}

.tp-event-title {
    font-weight: 700;
    color: var(--simba-text-primary);
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}

.tp-event-desc {
    color: var(--simba-text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
    margin-bottom: 0.65rem;
}

.tp-event-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.78rem;
    color: var(--simba-text-secondary);
    font-weight: 500;
}

.tp-event-footer {
    padding: 0.65rem 1rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

/* ========================================
   MODAL (TEACHER PORTAL)
   ======================================== */
.tp-modal-dialog {
    background: #fff;
    border-radius: 18px;
    max-width: 640px;
    width: 100%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    animation: tpConfirmPopIn 0.25s ease;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.tp-modal-header {
    background: linear-gradient(135deg, var(--simba-primary) 0%, var(--simba-primary-dark) 100%);
    color: #fff;
    padding: 1.15rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tp-modal-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
}

.tp-modal-close {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.tp-modal-close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.tp-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.tp-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}

/* ========================================
   TIMETABLE RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .tt-grid {
        grid-template-columns: 60px repeat(5, minmax(100px, 1fr));
        grid-template-rows: auto repeat(18, 42px);
    }

    .tt-header {
        font-size: 0.72rem;
        padding: 0.45rem 0.25rem;
    }

    .tt-time-label {
        font-size: 0.68rem;
    }

    .tt-slot {
        padding: 0.25rem 0.35rem;
    }

    .tt-slot-subject {
        font-size: 0.7rem;
    }

    .tt-slot-class,
    .tt-slot-time,
    .tt-slot-venue {
        font-size: 0.6rem;
    }

    .tp-tab-group {
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    .tt-grid {
        grid-template-columns: 50px repeat(5, minmax(80px, 1fr));
        grid-template-rows: auto repeat(18, 38px);
    }

    .tt-header {
        font-size: 0.62rem;
    }

    .tt-slot-subject {
        font-size: 0.62rem;
    }

    .tt-slot-class,
    .tt-slot-time {
        display: none;
    }

    .tp-modal-dialog {
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }

    .tp-modal-header {
        padding: 0.85rem 1rem;
    }

    .tp-modal-body {
        padding: 1rem;
    }

    .tp-modal-footer {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }

    .tp-event-card .tp-event-header {
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .tp-tab {
        padding: 0.4rem 0.85rem;
        font-size: 0.75rem;
    }
}

/* ========================================
   CALENDAR (Unified Timetable + Events)
   ======================================== */
.cal-filter-chip {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--simba-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cal-filter-chip:hover {
    border-color: var(--simba-primary);
    color: var(--simba-primary);
}

.cal-chip-active {
    color: #fff !important;
    border-color: transparent !important;
}

.cal-chip-timetable.cal-chip-active {
    background: #195D1B;
}

.cal-chip-school.cal-chip-active {
    background: #0EA5E9;
}

.cal-chip-personal.cal-chip-active {
    background: #8B5CF6;
}

.tt-header-today {
    background: rgba(var(--simba-primary-rgb), 0.12) !important;
    color: var(--simba-primary) !important;
}

.cal-event-slot {
    cursor: default;
    opacity: 0.92;
}

.cal-cell-clickable {
    cursor: pointer;
    transition: background 0.15s;
}

.cal-cell-clickable:hover {
    background: rgba(var(--simba-primary-rgb), 0.06) !important;
}

.cal-slot-clickable {
    cursor: pointer;
}

.cal-slot-clickable:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    outline: 2px solid rgba(255, 255, 255, 0.5);
}

.cal-day-chip {
    width: 44px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    background: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--simba-text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.cal-day-chip:hover {
    border-color: #195D1B;
    color: #195D1B;
}

.cal-day-chip-active {
    background: #195D1B;
    border-color: #195D1B;
    color: #fff;
}

.cal-day-chip-active:hover {
    background: #14532d;
    border-color: #14532d;
    color: #fff;
}

/* ---- Month Grid ---- */
.cal-month-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border-radius: 0 0 18px 18px;
    overflow: hidden;
}

.cal-month-header {
    background: var(--simba-bg-light);
    font-weight: 700;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--simba-text-secondary);
}

.cal-month-cell {
    background: #fff;
    min-height: 90px;
    padding: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cal-month-cell-empty {
    background: #fafbfc;
}

.cal-month-cell-today {
    background: rgba(var(--simba-primary-rgb), 0.04);
}

.cal-month-day-num {
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--simba-text-secondary);
    margin-bottom: 2px;
}

.cal-today-num {
    background: var(--simba-primary);
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
}

.cal-month-item {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.cal-item-timetable {
    opacity: 0.85;
}

.cal-item-school {
    background: #0EA5E9;
}

.cal-item-personal {
    background: #8B5CF6;
}

.cal-month-more {
    font-size: 0.62rem;
    color: var(--simba-text-muted);
    font-weight: 600;
    padding-left: 2px;
}

.cal-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* ---- Calendar Responsive ---- */
@media (max-width: 768px) {
    .cal-month-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .cal-month-cell {
        min-height: 65px;
        padding: 0.25rem;
    }

    .cal-month-item {
        font-size: 0.58rem;
        padding: 1px 3px;
    }
}

@media (max-width: 576px) {
    .cal-month-cell {
        min-height: 50px;
    }

    .cal-month-item {
        font-size: 0.52rem;
    }

    .cal-filter-chip {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
    }
}
