/* ============================================================
   EduMaster ERP — Real-time Module Styles
   Modals, Data Tables, Notices, Attendance, Role Badges
   ============================================================ */

/* ─── Modal ──────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 28px;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideUp {
    from { transform: translateY(30px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #F1F5F9;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #EF4444;
    color: white;
}

/* ─── Data Table ────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.85rem;
}

.data-table thead th {
    background: #F8FAFC;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #E2E8F0;
}

.data-table thead th:first-child { border-radius: 10px 0 0 0; }
.data-table thead th:last-child { border-radius: 0 10px 0 0; }

.data-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #F1F5F9;
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: #F8FAFC;
}

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

/* ─── Small Action Buttons ──────────────────────────────── */
.btn-sm {
    padding: 4px 10px;
    border-radius: 6px;
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.15s;
    margin-right: 4px;
}

.btn-approve {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}
.btn-approve:hover { background: rgba(16, 185, 129, 0.2); }

.btn-reject {
    background: rgba(239, 68, 68, 0.1);
    color: #DC2626;
}
.btn-reject:hover { background: rgba(239, 68, 68, 0.2); }

/* ─── Role Tags ─────────────────────────────────────────── */
.role-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
}

.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.3px;
    margin-left: 4px;
    white-space: nowrap;
}

/* ─── Attendance Buttons ────────────────────────────────── */
.att-toggle {
    display: flex;
    gap: 4px;
}

.att-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 2px solid #E2E8F0;
    background: transparent;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
    color: var(--text-secondary);
}

.att-btn:hover {
    border-color: var(--att-color);
    color: var(--att-color);
}

.att-btn.active {
    background: var(--att-color);
    border-color: var(--att-color);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ─── Notice Board ──────────────────────────────────────── */
.notice-item {
    background: #F8FAFC;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 12px;
    border: 1px solid #E2E8F0;
    transition: all 0.2s;
}

.notice-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #CBD5E1;
}

.notice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.notice-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.notice-priority {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
}

.notice-body {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
}

.notice-footer {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ─── Form Row ──────────────────────────────────────────── */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}

/* ─── Form Select ───────────────────────────────────────── */
.form-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-family: var(--font-body);
    border: 1.5px solid #E2E8F0;
    border-radius: 10px;
    background: #F8FAFC;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.form-select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ─── Loading State ─────────────────────────────────────── */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #E2E8F0;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

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

.empty-state-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 24px;
}

/* ─── Dashboard Grid 2-col ──────────────────────────────── */
.dashboard-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .dashboard-grid-2 { grid-template-columns: 1fr; }
}

/* ─── Page Header ───────────────────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ─── Chart Legends ─────────────────────────────────────── */
.chart-legend,
.ring-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 0 8px;
}

.chart-legend .legend-item,
.ring-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* ─── Live Class Cards ──────────────────────────────────── */
.live-class-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.live-class-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: #CBD5E1;
    transform: translateY(-1px);
}

.live-thumbnail {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4F46E5, #06B6D4);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.live-thumbnail svg {
    width: 22px;
    height: 22px;
    color: white;
}

.live-class-info {
    flex: 1;
    min-width: 0;
}

.live-class-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-class-teacher {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ─── Jitsi Container ───────────────────────────────────── */
#jitsi-container-card {
    min-height: 200px;
}

#jitsi-meet-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

/* ─── Settings Page Info Cards ──────────────────────────── */
.settings-info-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border-radius: 12px;
    margin-top: 12px;
}

/* ─── Live Indicator Pulse ──────────────────────────────── */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(239, 68, 68, 0.08);
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #EF4444;
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* ─── Btn Logout ────────────────────────────────────────── */
.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    margin-top: 10px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    color: #EF4444;
}

.btn-logout svg {
    width: 18px;
    height: 18px;
}

/* ─── Grade Badges (Report Card) ────────────────────────── */
.grade-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.84rem;
    margin: 12px 0;
}

.grade-table th,
.grade-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #F1F5F9;
    text-align: left;
}

.grade-table th {
    background: #F8FAFC;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.grade-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.grade-a-plus { background: rgba(16, 185, 129, 0.12); color: #059669; }
.grade-a { background: rgba(6, 182, 212, 0.12); color: #0891B2; }
.grade-b-plus { background: rgba(245, 158, 11, 0.12); color: #D97706; }
.grade-b { background: rgba(245, 158, 11, 0.12); color: #D97706; }
.grade-c { background: rgba(239, 68, 68, 0.12); color: #DC2626; }

/* ─── Report Card ───────────────────────────────────────── */
.report-card {
    border: 2px solid #E2E8F0;
    border-radius: 14px;
    padding: 20px;
    background: #FAFBFC;
}

.report-header {
    text-align: center;
    padding-bottom: 14px;
    border-bottom: 2px solid #E2E8F0;
    margin-bottom: 14px;
}

.report-school {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.report-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.report-student-info {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr;
    gap: 6px 12px;
    margin-bottom: 14px;
    font-size: 0.84rem;
}

.report-student-info dt {
    font-weight: 600;
    color: var(--text-secondary);
}

.report-student-info dd {
    color: var(--text-primary);
    margin: 0;
}

/* ─── Assignment Items ──────────────────────────────────── */
.assignment-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.assignment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    transition: all 0.2s;
}

.assignment-item:hover {
    border-color: #CBD5E1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.assignment-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.assignment-icon svg {
    width: 20px;
    height: 20px;
}

.assignment-info {
    flex: 1;
    min-width: 0;
}

.assignment-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.assignment-due {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin: 3px 0 6px;
}

/* ─── Timetable Grid ────────────────────────────────────── */
.timetable-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
}

.timetable-grid th {
    background: #F8FAFC;
    padding: 12px 10px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #E2E8F0;
    text-align: center;
}

.timetable-grid td {
    padding: 10px;
    border-bottom: 1px solid #F1F5F9;
    text-align: center;
    vertical-align: middle;
}

.timetable-grid tr:hover td {
    background: #F8FAFC;
}

.tt-time {
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.tt-subject {
    font-weight: 500;
    color: var(--text-primary);
}

/* ─── Mobile Responsive Additions ───────────────────────── */
@media (max-width: 600px) {
    .modal-card {
        padding: 20px;
        max-height: 90vh;
        border-radius: 16px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header h2 {
        font-size: 1.1rem;
    }

    .live-class-card {
        flex-wrap: wrap;
    }

    .timetable-grid {
        font-size: 0.72rem;
    }

    .timetable-grid th,
    .timetable-grid td {
        padding: 6px 4px;
    }

    .report-student-info {
        grid-template-columns: auto 1fr;
    }
}

/* ─── Search Results Dropdown ───────────────────────────── */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #E2E8F0;
    margin-top: 6px;
    max-height: 360px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.search-result-item:hover {
    background: #F8FAFC;
}

.search-result-item:not(:last-child) {
    border-bottom: 1px solid #F1F5F9;
}

.search-result-icon {
    font-size: 1.2rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F1F5F9;
    border-radius: 8px;
    flex-shrink: 0;
}

.search-result-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
}

.search-result-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.search-loading,
.search-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ─── Notification Dropdown ─────────────────────────────── */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: #FFFFFF;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    border: 1px solid #E2E8F0;
    margin-top: 8px;
    max-height: 420px;
    overflow-y: auto;
    z-index: 200;
    display: none;
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #E2E8F0;
}

.notif-header h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.notif-mark-read {
    font-size: 0.75rem;
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
}

.notif-mark-read:hover {
    text-decoration: underline;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.notif-item:hover {
    background: #F8FAFC;
}

.notif-item:not(:last-child) {
    border-bottom: 1px solid #F1F5F9;
}

.notif-icon {
    font-size: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-weight: 600;
    font-size: 0.84rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ─── Marks Entry Input ─────────────────────────────────── */
.marks-input {
    width: 100px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.marks-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.grade-cell {
    text-align: center;
}

/* ─── Timetable Cell Editor ─────────────────────────────── */
.tt-cell-select {
    padding: 6px 8px;
    font-size: 0.8rem;
    border: 1.5px solid #CBD5E1;
    border-radius: 8px;
    background: white;
    min-width: 110px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.tt-cell-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.08);
}

/* ─── Print Hide ────────────────────────────────────────── */
@media print {
    .no-print { display: none !important; }
}

/* ─── Smooth Dropdown Animation ────────────────────────── */
.search-results-dropdown,
.notification-dropdown {
    animation: dropdownSlideIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    transform-origin: top center;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ─── Loading Skeleton ─────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
    min-height: 20px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Page Transition ──────────────────────────────────── */
.page-container {
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Stat Card Icon Hover Glow ────────────────────────── */
.stat-card .stat-icon {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

/* ─── Stat Number Counter Feel ─────────────────────────── */
.stat-value {
    transition: color 0.3s ease;
}

.stat-card:hover .stat-value {
    color: var(--primary-dark);
}

/* ─── Button Press Feedback ────────────────────────────── */
.btn:active,
.btn-sm:active,
.topnav-icon:active {
    transform: scale(0.95) !important;
    transition: transform 0.1s ease;
}

/* ─── Quick Action Button Shine ────────────────────────── */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::after {
    left: 100%;
}

/* ─── Smooth Nav Item Transition ───────────────────────── */
.nav-item {
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-item.active {
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Table Row Hover ──────────────────────────────────── */
.data-table tbody tr {
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: rgba(79, 70, 229, 0.03);
}

/* ─── Focus Ring for Accessibility ─────────────────────── */
.form-input:focus,
.form-select:focus {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ─── Empty State Illustration ─────────────────────────── */
.empty-state-text {
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Page Header Animation ────────────────────────────── */
.page-header {
    animation: fadeInUp 0.3s ease;
}

/* ─── Donut Chart Spin-In ──────────────────────────────── */
.donut-chart-container svg {
    animation: donutReveal 0.8s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes donutReveal {
    from {
        opacity: 0;
        transform: rotate(-90deg) scale(0.8);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* ─── Role Tag Styling Enhancement ─────────────────────── */
.role-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ─── Status Badge Pulse ───────────────────────────────── */
.status-badge.approved {
    position: relative;
}

.status-badge.approved::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: statusPulse 2s ease infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ─── Subscription Expired Overlay ─────────────────────── */
.subscription-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.3s ease;
}

.subscription-card {
    background: #FFFFFF;
    border-radius: 24px;
    padding: 40px 36px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.25);
    animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sub-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.sub-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.sub-message {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.sub-price {
    margin-bottom: 24px;
}

.price-amount {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #4F46E5, #06B6D4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.price-period {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sub-pay-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.05rem;
    margin-bottom: 12px;
}

.sub-logout-btn {
    width: 100%;
    padding: 12px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.sub-contact {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ─── Trial Badge (topnav) ─────────────────────────────── */
.trial-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #D97706;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    animation: trialPulse 3s ease infinite;
}

.trial-icon {
    font-size: 0.9rem;
}

@keyframes trialPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ─── Auth Footer (login page) ─────────────────────────── */
.auth-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.auth-branding {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
}

.powered-by {
    color: var(--text-muted);
}

.brand-name {
    font-weight: 700;
    background: linear-gradient(135deg, #4F46E5, #06B6D4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.privacy-link {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.privacy-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ─── Sidebar Branding ─────────────────────────────────── */
.sidebar-branding {
    text-align: center;
    padding: 8px 0;
    font-size: 0.7rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 8px;
}

.sidebar-branding strong {
    color: var(--primary);
    font-weight: 700;
}

/* ─── Nav Divider ──────────────────────────────────────── */
.nav-divider {
    padding: 12px 18px 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    opacity: 0.5;
}

/* ─── Billing Plan Card ────────────────────────────────── */
.billing-plan-card {
    transition: border-color 0.3s ease;
}

.billing-plan-card:hover {
    border-color: rgba(79, 70, 229, 0.3) !important;
}

/* ─── Stat Card Red ────────────────────────────────────── */
.stat-icon.red {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

/* ─── My Class — Folder View ──────────────────────────── */
.class-folder {
    overflow: hidden;
}

.class-folder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 16px 20px;
    margin: -20px -20px 0;
    border-radius: 16px 16px 0 0;
    transition: background 0.2s ease;
    user-select: none;
}

.class-folder-header:hover {
    background: rgba(79, 70, 229, 0.04);
}

.folder-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.folder-icon {
    font-size: 1.6rem;
    line-height: 1;
    transition: transform 0.3s ease;
}

.class-folder-header:hover .folder-icon {
    transform: scale(1.1);
}

.folder-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.folder-count {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
    display: block;
}

.folder-right {
    display: flex;
    align-items: center;
}

.folder-arrow {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: transform 0.3s ease, color 0.2s;
}

.class-folder-header:hover .folder-arrow {
    color: var(--primary);
}

.class-folder-body {
    padding-top: 16px;
    border-top: 1px solid #F1F5F9;
    margin-top: 16px;
}

.monitor-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(234, 179, 8, 0.1));
    color: #D97706;
    letter-spacing: 0.3px;
    white-space: nowrap;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ─── My Class — LMS Stats ────────────────────────────── */
.lms-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.lms-stat-item {
    text-align: center;
    padding: 12px 6px;
    border-radius: 12px;
    background: #F8FAFC;
    border: 1px solid #F1F5F9;
}

.lms-stat-value {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
}

.lms-stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 500;
}

@media (max-width: 600px) {
    .lms-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .class-folder-header {
        padding: 14px 16px;
        margin: -16px -16px 0;
    }

    .folder-icon {
        font-size: 1.3rem;
    }

    .folder-title {
        font-size: 0.92rem;
    }
}

/* ============================================================
   NEW MODULE STYLES
   Calendar, ID Cards, Certificates, Health, Charts, etc.
   ============================================================ */

/* ─── Calendar Grid ─────────────────────────────────────── */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-header {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0;
}

.cal-empty {
    aspect-ratio: 1;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    gap: 3px;
}

.cal-day:hover {
    background: #F1F5F9;
}

.cal-day-num {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
}

.cal-today {
    background: rgba(79, 70, 229, 0.1);
    border: 2px solid rgba(79, 70, 229, 0.3);
}

.cal-today .cal-day-num {
    font-weight: 700;
    color: var(--primary);
}

.cal-has-event::after {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary);
    position: absolute;
    bottom: 4px;
}

.cal-event-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ─── ID Cards ──────────────────────────────────────────── */
.id-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.id-card {
    width: 320px;
    border: 2px solid #E2E8F0;
    border-radius: 14px;
    overflow: hidden;
    background: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.2s;
}

.id-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.id-card-header {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: #fff;
    padding: 12px 16px;
    text-align: center;
}

.id-school-name {
    font-weight: 700;
    font-size: 0.88rem;
    font-family: var(--font-heading);
}

.id-card-subtitle {
    font-size: 0.65rem;
    letter-spacing: 2px;
    opacity: 0.8;
    margin-top: 2px;
}

.id-card-body {
    padding: 14px;
    display: flex;
    gap: 14px;
}

.id-photo {
    width: 64px;
    height: 76px;
    background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    border: 1px solid #E2E8F0;
}

.id-info {
    flex: 1;
}

.id-field {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    padding: 3px 0;
    border-bottom: 1px dotted #E2E8F0;
}

.id-label {
    font-weight: 600;
    color: var(--text-muted);
}

.id-value {
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
}

.id-card-footer {
    background: #F8FAFC;
    padding: 8px;
    text-align: center;
    font-size: 0.68rem;
    color: var(--text-muted);
    border-top: 1px solid #E2E8F0;
}

/* ─── Certificate Preview ───────────────────────────────── */
.certificate-preview {
    background: #FFFFFF;
    border: 2px solid #E2E8F0;
    border-radius: 14px;
    padding: 28px;
}

.cert-header {
    text-align: center;
    border-bottom: 3px double #4F46E5;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.cert-school {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: #4F46E5;
}

.cert-affiliation {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 4px 0;
}

.cert-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-top: 12px;
    text-decoration: underline;
    color: var(--text-primary);
}

.cert-no {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.cert-body {
    line-height: 1.9;
    font-size: 0.92rem;
    margin: 24px 0;
    color: var(--text-primary);
}

.cert-body p {
    margin-bottom: 12px;
}

.cert-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
}

.cert-sign {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.cert-sign-line {
    width: 140px;
    height: 40px;
    border-bottom: 1px solid #94A3B8;
    margin-bottom: 6px;
}

/* ─── Health Info Grid ──────────────────────────────────── */
.health-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.health-field {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #F8FAFC;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
}

.health-label {
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.health-value {
    font-weight: 500;
    font-size: 0.82rem;
    color: var(--text-primary);
}

/* ─── Bar Chart ─────────────────────────────────────────── */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 0;
}

.bar-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bar-label {
    min-width: 60px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
}

.bar-track {
    flex: 1;
    height: 24px;
    background: #F1F5F9;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: white;
    min-width: 0;
}

/* ─── Progress Bar Mini ─────────────────────────────────── */
.progress-bar-mini {
    height: 6px;
    background: #F1F5F9;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* ─── Nav Divider in Sidebar ────────────────────────────── */
.nav-divider {
    padding: 16px 20px 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    border-top: 1px solid #E2E8F0;
    margin-top: 8px;
}

/* ─── LMS Stats ─────────────────────────────────────────── */
.lms-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.lms-stat-item {
    text-align: center;
    padding: 12px;
    background: #F8FAFC;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
}

.lms-stat-value {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
}

.lms-stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

@media (max-width: 600px) {
    .id-cards-container { justify-content: center; }
    .id-card { width: 100%; max-width: 320px; }
    .calendar-grid { gap: 2px; }
    .cal-day-num { font-size: 0.72rem; }
    .health-info-grid { grid-template-columns: 1fr; }
    .cert-school { font-size: 1.1rem; }
    .bar-label { min-width: 40px; font-size: 0.7rem; }
}

/* ─── Dashboard Widget Cards ────────────────────────────── */
.widget-card {
    min-height: 120px;
}

.widget-header {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    padding-bottom: 8px;
    border-bottom: 1px solid #F1F5F9;
    margin-bottom: 8px;
}

.widget-body {
    max-height: 180px;
    overflow-y: auto;
}

.widget-item {
    font-size: 0.82rem;
    padding: 6px 0;
    border-bottom: 1px dotted #F1F5F9;
    color: var(--text-primary);
}

.widget-item:last-child {
    border-bottom: none;
}

.widget-stat {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 0;
}

.widget-stat-num {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.widget-stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ─── CSV Import Styles ─────────────────────────────────── */
.csv-drop-zone {
    border: 2px dashed #CBD5E1;
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #FAFBFC;
}

.csv-drop-zone:hover,
.csv-drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.04);
}

.csv-drop-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.csv-drop-text {
    font-size: 0.92rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.csv-drop-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.csv-preview-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.78rem;
    margin-top: 16px;
}

.csv-preview-table th {
    background: #4F46E5;
    color: white;
    padding: 8px 10px;
    font-weight: 600;
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.csv-preview-table th:first-child { border-radius: 8px 0 0 0; }
.csv-preview-table th:last-child { border-radius: 0 8px 0 0; }

.csv-preview-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #F1F5F9;
}

.csv-preview-table tr:hover td {
    background: #F8FAFC;
}

.csv-row-error td {
    background: rgba(239, 68, 68, 0.05) !important;
    color: #DC2626;
}

.csv-steps {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.csv-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    background: #F1F5F9;
    color: var(--text-muted);
    transition: all 0.2s;
}

.csv-step.active {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.csv-step.done {
    background: #10B981;
    color: white;
}

.csv-step-arrow {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ─── Visitor Gate Pass ─────────────────────────────────── */
.gate-pass {
    border: 2px solid #E2E8F0;
    border-radius: 14px;
    padding: 20px;
    background: #FFFFFF;
    max-width: 400px;
    text-align: center;
}

.gate-pass-header {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: white;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.gate-pass-header h3 {
    margin: 0;
    font-size: 0.92rem;
}

.gate-pass-info {
    text-align: left;
    font-size: 0.85rem;
}

.gate-pass-field {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dotted #E2E8F0;
}

.gate-pass-field span:first-child {
    font-weight: 600;
    color: var(--text-muted);
}

/* ─── Gallery Grid ──────────────────────────────────────── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.gallery-card {
    overflow: hidden;
    transition: all 0.2s;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.gallery-thumb {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px 12px 0 0;
}

@media (max-width: 600px) {
    .gallery-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .gallery-thumb { height: 100px; }
}

/* ============================================================
   NEW SWEEDU-EQUIVALENT MODULE STYLES
   Employee Mgmt, Markscard, Syllabus, Online Exam, CRM, etc.
   ============================================================ */

/* ─── Module Tabs ───────────────────────────────────────── */
.module-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 6px;
    background: rgba(241, 245, 249, 0.8);
    border-radius: 14px;
    border: 1px solid #E2E8F0;
}

.module-tab {
    padding: 10px 18px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.module-tab:hover {
    background: rgba(79, 70, 229, 0.06);
    color: var(--primary);
}

.module-tab.active {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* ─── Employee Cards Grid ───────────────────────────────── */
.employee-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.employee-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.employee-card:hover {
    border-color: rgba(79, 70, 229, 0.3);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.emp-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.08));
    color: #4F46E5;
    flex-shrink: 0;
}

.emp-info {
    flex: 1;
    min-width: 0;
}

.emp-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emp-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.emp-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

/* ─── Grade Cards Grid ──────────────────────────────────── */
.grade-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.grade-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    transition: all 0.2s;
}

.grade-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.grade-letter {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    flex-shrink: 0;
    min-width: 36px;
    text-align: center;
}

.grade-details {
    flex: 1;
}

.grade-range {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.grade-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.grade-gp {
    font-size: 0.72rem;
    color: #7C3AED;
    font-weight: 600;
    margin-top: 2px;
}

/* ─── Report Card Styles ────────────────────────────────── */
.report-cards-wrap {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.report-card-print {
    border: 2px solid #E2E8F0;
    border-radius: 16px;
    padding: 28px;
    background: #FFFFFF;
    max-width: 750px;
    margin: 0 auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.rc-header {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: white;
    padding: 18px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
}

.rc-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-family: var(--font-heading);
}

.rc-header p {
    margin: 4px 0 0;
    font-size: 0.82rem;
    opacity: 0.9;
    letter-spacing: 1px;
}

.rc-student-info {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #E2E8F0;
    margin-bottom: 16px;
    font-size: 0.88rem;
    flex-wrap: wrap;
    gap: 8px;
}

.rc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.rc-table th,
.rc-table td {
    border: 1px solid #E2E8F0;
    padding: 10px 12px;
    text-align: center;
}

.rc-table th {
    background: #F8FAFC;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.rc-total-row td {
    background: rgba(79, 70, 229, 0.05);
    font-weight: 700;
}

.rc-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ─── Admit Card Styles ─────────────────────────────────── */
.admit-cards-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.admit-card-print {
    border: 2px solid #E2E8F0;
    border-radius: 14px;
    padding: 20px;
    background: #FFFFFF;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.ac-header {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: white;
    padding: 14px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 16px;
}

.ac-header h3 {
    margin: 0;
    font-size: 1rem;
    font-family: var(--font-heading);
}

.ac-header p {
    margin: 4px 0 0;
    font-size: 0.78rem;
    opacity: 0.9;
    letter-spacing: 1px;
}

.ac-body {
    display: flex;
    gap: 16px;
    align-items: center;
    margin: 16px 0;
}

.ac-photo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #E2E8F0;
}

.ac-info {
    font-size: 0.85rem;
}

.ac-info div {
    margin: 5px 0;
    color: var(--text-primary);
}

.ac-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px dashed #E2E8F0;
    padding-top: 14px;
}

/* ─── Rank Badge ────────────────────────────────────────── */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 700;
    background: #F1F5F9;
    color: var(--text-primary);
    border: 1px solid #E2E8F0;
}

.rank-badge.top {
    background: linear-gradient(135deg, #F59E0B, #EAB308);
    color: #FFFFFF;
    border: none;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* ─── Exam List Items ───────────────────────────────────── */
.exam-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.exam-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    transition: all 0.2s;
}

.exam-item:hover {
    border-color: rgba(79, 70, 229, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.exam-date-badge {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.exam-info {
    min-width: 0;
}

.exam-subject {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.exam-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.exam-class-badge {
    display: inline-flex;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(79, 70, 229, 0.1);
    color: #4F46E5;
    white-space: nowrap;
}

/* ─── Small Action Buttons ─────────────────────────────── */
.btn-sm {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #E2E8F0;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.15s;
    background: #FFFFFF;
    font-weight: 600;
}

.btn-sm.btn-reject {
    color: #EF4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-sm.btn-reject:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: #EF4444;
}

.btn-sm.btn-approve {
    color: #10B981;
    border-color: rgba(16, 185, 129, 0.2);
}

.btn-sm.btn-approve:hover {
    background: rgba(16, 185, 129, 0.08);
    border-color: #10B981;
}

/* ─── Empty State ───────────────────────────────────────── */
.empty-state-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 32px 16px;
}

/* ─── Responsive New Modules ────────────────────────────── */
@media (max-width: 768px) {
    .module-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .module-tab {
        padding: 8px 14px;
        font-size: 0.75rem;
    }

    .employee-cards-grid {
        grid-template-columns: 1fr;
    }

    .grade-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .admit-cards-wrap {
        grid-template-columns: 1fr;
    }

    .exam-item {
        padding: 10px 12px;
    }

    .exam-date-badge {
        width: 40px;
        height: 40px;
    }

    .report-card-print {
        padding: 16px;
    }

    .rc-table th,
    .rc-table td {
        padding: 6px 8px;
        font-size: 0.72rem;
    }
}

@media (max-width: 480px) {
    .module-tab {
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .employee-card {
        padding: 12px;
    }

    .emp-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ============================================================
   EduMaster ERP — Sweedu Phase 1 Component Styles
   Tab Bar, Kanban, Status Badges, Progress Bar Mini
   ============================================================ */

/* --- Tab Bar --- */
.tab-bar {
    display: flex;
    gap: 4px;
    background: #F1F5F9;
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.tab-btn {
    flex: 1;
    min-width: 90px;
    padding: 9px 14px;
    border: none;
    border-radius: 10px;
    background: transparent;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-body);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.tab-btn:hover { background: rgba(255,255,255,0.7); color: var(--text-primary); }
.tab-btn.active { background: #FFFFFF; color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
@media (max-width: 640px) {
    .tab-bar { overflow-x: auto; flex-wrap: nowrap; }
    .tab-btn { min-width: 80px; font-size: 0.72rem; padding: 7px 10px; }
}

/* --- Kanban Board --- */
.kanban-board { overflow-x: auto; padding-bottom: 12px; }
.kanban-columns { display: flex; gap: 16px; min-width: fit-content; align-items: flex-start; }
.kanban-col {
    background: #F8FAFC;
    border-radius: 14px;
    min-width: 240px;
    width: 240px;
    flex-shrink: 0;
    border: 1px solid #E2E8F0;
}
.kanban-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--text-secondary);
    border-radius: 14px 14px 0 0;
    border-bottom: 1px solid #E2E8F0;
}
.kanban-count {
    background: #E2E8F0;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}
.kanban-cards { padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 80px; }
.kanban-empty { text-align: center; color: var(--text-muted); font-size: 0.78rem; padding: 16px 0; }
.kanban-card {
    background: #FFFFFF;
    border-radius: 10px;
    padding: 12px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: all 0.2s;
}
.kanban-card:hover { border-color: #CBD5E1; box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }
.kanban-card-name { font-weight: 700; font-size: 0.88rem; color: var(--text-primary); margin-bottom: 4px; }
.kanban-card-meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 2px; }

/* --- Status Badge --- */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.status-badge.approved, .status-badge.paid, .status-badge.complete { background: rgba(16,185,129,0.12); color: #059669; }
.status-badge.pending, .status-badge.open { background: rgba(245,158,11,0.12); color: #D97706; }
.status-badge.rejected, .status-badge.overdue { background: rgba(239,68,68,0.12); color: #DC2626; }

/* --- Progress Bar Mini --- */
.progress-bar-mini { height: 6px; background: #E2E8F0; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; background: linear-gradient(90deg, #4F46E5, #06B6D4); }

/* --- Star Rating --- */
#star-rating span { transition: all 0.15s; }
#star-rating span:hover { transform: scale(1.2); }
