/* Modern Dashboard Styles */

/* Dashboard Hero Section - Matching Study Plan Style */
.dashboard-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #8b5cf6 100%) !important;
    padding: 50px 30px !important;
    margin-bottom: 40px !important;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.3) !important;
    color: white;
}

.dashboard-hero h2 {
    color: white !important;
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    margin-bottom: 15px !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
}

.dashboard-hero p {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 1.2rem !important;
    margin: 0 !important;
}

/* Modern Stats Cards */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card-modern {
    background: white;
    border-radius: 18px;
    padding: 30px 25px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.stat-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--secondary-color), var(--accent-color));
    transform: scaleY(0);
    transition: transform 0.4s ease;
}

.stat-card-modern:hover::before {
    transform: scaleY(1);
}

.stat-card-modern:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(59, 130, 246, 0.25);
    border-color: var(--secondary-color);
}

.stat-card-modern.active-stat {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.4);
}

.stat-card-modern.active-stat .stat-label-modern {
    color: white;
}

.stat-card-modern.active-stat .stat-number-modern {
    color: white;
}

.stat-card-modern.active-stat .stat-icon-modern {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stat-icon-modern {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.stat-icon-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-icon-green { background: linear-gradient(135deg, #10b981, #059669); }
.stat-icon-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-icon-purple { background: linear-gradient(135deg, #3b82f6, #8b5cf6); }
.stat-icon-red { background: linear-gradient(135deg, #ef4444, #dc2626); }

.stat-number-modern {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label-modern {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 600;
    margin-top: 8px;
}

/* Modern Card Design */
.modern-card {
    background: white;
    border-radius: 18px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.modern-card-header {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 25px 30px;
    border-bottom: 2px solid var(--border-color);
}

.modern-card-header h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Default: desktop title text for overall performance */
.overall-title-desktop {
    display: inline;
}

.overall-title-mobile {
    display: none;
}

.modern-card-header h3 i {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.modern-card-body {
    padding: 30px;
}

/* Assignment Item Modern */
/* Redesigned Upcoming Assignments Cards */
.upcoming-assignments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.assignment-card-modern {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(59, 130, 246, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.assignment-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.assignment-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.25);
}

.assignment-card-modern:hover::before {
    transform: scaleY(1);
}

.assignment-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.assignment-icon-modern {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.assignment-card-modern:hover .assignment-icon-modern {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    transform: scale(1.05);
}

.assignment-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e3a8a;
    line-height: 1.4;
    flex: 1;
}

.assignment-card-desc {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.assignment-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
}

.assignment-due-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #64748b;
}

.assignment-due-date i {
    color: #f59e0b;
    font-size: 0.9rem;
}

.assignment-due-date strong {
    color: #1e3a8a;
    font-weight: 600;
}

.assignment-download-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.assignment-download-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Legacy styles for backward compatibility */
.assignment-item-modern {
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 4px solid var(--secondary-color);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.assignment-item-modern:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 25px rgba(59, 130, 246, 0.15);
}

.assignment-title-modern {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.assignment-desc-modern {
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 15px;
}

.assignment-meta-modern {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.assignment-meta-modern i {
    color: var(--secondary-color);
    margin-right: 5px;
}

.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary-modern {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4);
}

.btn-success-modern {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-danger-modern {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

/* Grade Badge Modern */
.grade-badge-modern {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.grade-badge-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.grade-badge-info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.grade-badge-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

/* Modern Table */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.table-modern thead th {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    text-align: left;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

.table-modern tbody tr {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

/* Alternate row shading for easy recognition - Desktop only */
@media (min-width: 769px) {
    .table-modern tbody tr:nth-child(even) {
        background: #f8fafc;
    }
    
    .table-modern tbody tr:hover {
        transform: scale(1.02);
        box-shadow: 0 5px 20px rgba(59, 130, 246, 0.15);
        background: #f1f5f9 !important;
    }
}

.table-modern tbody td {
    padding: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table-modern tbody td:first-child {
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 10px 0 0 10px;
}

.table-modern tbody td:last-child {
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0 10px 10px 0;
}

/* Session Timeline Modern */
.session-timeline {
    position: relative;
    padding-left: 40px;
}

.session-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--secondary-color), var(--accent-color));
}

.session-item-modern {
    position: relative;
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.session-item-modern::before {
    content: '';
    position: absolute;
    left: -33px;
    top: 25px;
    width: 15px;
    height: 15px;
    background: var(--secondary-color);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--secondary-color);
}

.session-item-modern:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.2);
}

.session-date-modern {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 10px;
}

.session-topic-modern {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 10px;
}

.session-remarks-modern {
    color: var(--text-light);
    line-height: 1.7;
}

/* Quick Actions */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.quick-actions-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.quick-link-compact {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.quick-link-compact i {
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.quick-link-compact:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.quick-link-compact:hover i {
    color: white;
}

/* Redesigned Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.quick-action-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quick-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #3b82f6, #60a5fa);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.quick-action-card:hover::before {
    transform: scaleY(1);
}

.quick-action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.25);
}

.quick-action-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

.quick-action-blue {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.quick-action-green {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
}

.quick-action-purple {
    background: linear-gradient(135deg, #e9d5ff 0%, #d8b4fe 100%);
    color: #7c3aed;
}

.quick-action-orange {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
    color: #ea580c;
}

.quick-action-red {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}

.quick-action-card:hover .quick-action-icon.quick-action-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    transform: scale(1.05);
}

.quick-action-card:hover .quick-action-icon.quick-action-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    transform: scale(1.05);
}

.quick-action-card:hover .quick-action-icon.quick-action-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    transform: scale(1.05);
}

.quick-action-card:hover .quick-action-icon.quick-action-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    transform: scale(1.05);
}

.quick-action-card:hover .quick-action-icon.quick-action-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    transform: scale(1.05);
}

.quick-action-content h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e3a8a;
    margin: 0 0 4px 0;
}

.quick-action-content p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* Status Badges */
.badge-success {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-warning {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-danger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-info {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Red stat icon for overdue */
.stat-icon-red {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
}

/* Compact Inline Filter Bar */
.filter-bar-compact {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.filter-form-inline {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-input-group {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.filter-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.95rem;
    pointer-events: none;
}

.filter-input-inline {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.2s ease;
    font-weight: 500;
    cursor: pointer;
}

.filter-input-inline:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.filter-input-inline:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-filter-apply {
    padding: 11px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-filter-apply:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-filter-apply:active {
    transform: translateY(0);
}

.btn-filter-reset {
    padding: 11px 20px;
    background: #f1f5f9;
    color: #64748b;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}

.btn-filter-reset:hover {
    background: #e2e8f0;
    color: #475569;
}

/* Recent Sessions card: remove extra white board behind the table on desktop */
body .container .recent-sessions-card {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

body .container .recent-sessions-card .modern-card-body {
    background: transparent !important;
    padding: 0 !important;
}

/* Recent Sessions table on student dashboard - force same structure/look as admin Recent Logins */
body .container .recent-sessions-card .modern-card-body table.table-modern {
    border-spacing: 0 10px !important;
    width: 100% !important;
    border-collapse: separate !important;
}

body .container .recent-sessions-card .modern-card-body table.table-modern thead th {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%) !important;
    padding: 12px 15px !important;
    text-align: left !important;
    font-weight: 700 !important;
    color: white !important;
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

body .container .recent-sessions-card .modern-card-body table.table-modern thead th:first-child {
    border-radius: 10px 0 0 10px !important;
}

body .container .recent-sessions-card .modern-card-body table.table-modern thead th:last-child {
    border-radius: 0 10px 10px 0 !important;
}

body .container .recent-sessions-card .modern-card-body table.table-modern tbody tr {
    background: white !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
}

/* Alternate row shading for recent sessions table - Desktop only */
@media (min-width: 769px) {
    body .container .recent-sessions-card .modern-card-body table.table-modern tbody tr:nth-child(even) {
        background: #f8fafc !important;
    }

    body .container .recent-sessions-card .modern-card-body table.table-modern tbody tr:hover {
        transform: translateX(5px) !important;
        box-shadow: 0 5px 20px rgba(59, 130, 246, 0.1) !important;
        background: #f1f5f9 !important;
    }
}

body .container .recent-sessions-card .modern-card-body table.table-modern tbody td {
    padding: 12px 15px !important;
    color: var(--text-dark) !important;
    border-top: 1px solid #f1f5f9 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    font-size: 0.9rem !important;
}

body .container .recent-sessions-card .modern-card-body table.table-modern tbody td:first-child {
    border-left: 1px solid #f1f5f9 !important;
    border-radius: 10px 0 0 10px !important;
}

body .container .recent-sessions-card .modern-card-body table.table-modern tbody td:last-child {
    border-right: 1px solid #f1f5f9 !important;
    border-radius: 0 10px 10px 0 !important;
}

@media (max-width: 768px) {
    /* Restore some padding around table on mobile for better card layout */
    body .container .recent-sessions-card .modern-card-body {
        padding: 20px !important;
    }
}

/* Force Recent Sessions table on student dashboard to use admin dashboard table styles exactly */
/* Mobile-only tab simplification for My Academic Dashboard (student assignments) */
.mobile-tab-title {
    display: none;
}

/* Mobile-only table headers attached to cards */
.mobile-table-header {
    display: none;
}

/* Apply past paper card color theme to all student dashboard tables */
body.student-dashboard .table-modern thead th,
body .student-dashboard .table-modern thead th,
.student-dashboard .table-modern thead th,
.student .table-modern thead th,
.modern-card .table-modern thead th,
.table-modern.assignments-table thead th,
.table-modern.lessons-table thead th,
.table-modern.practice-papers-table thead th,
.table-modern.assignment-unit-summary-table thead th,
.table-modern.practice-unit-summary-table thead th {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%) !important;
    color: white !important;
}

/* Alternate row shading for all student dashboard tables - Desktop only */
@media (min-width: 769px) {
    body.student-dashboard .table-modern tbody tr:nth-child(even),
    body .student-dashboard .table-modern tbody tr:nth-child(even),
    .student-dashboard .table-modern tbody tr:nth-child(even),
    .student .table-modern tbody tr:nth-child(even),
    .modern-card .table-modern tbody tr:nth-child(even),
    .table-modern.assignments-table tbody tr:nth-child(even),
    .table-modern.lessons-table tbody tr:nth-child(even),
    .table-modern.practice-papers-table tbody tr:nth-child(even),
    .table-modern.assignment-unit-summary-table tbody tr:nth-child(even),
    .table-modern.practice-unit-summary-table tbody tr:nth-child(even) {
        background: #f8fafc !important;
    }

    /* Hover effect for alternate rows */
    body.student-dashboard .table-modern tbody tr:hover,
    body .student-dashboard .table-modern tbody tr:hover,
    .student-dashboard .table-modern tbody tr:hover,
    .student .table-modern tbody tr:hover,
    .modern-card .table-modern tbody tr:hover,
    .table-modern.assignments-table tbody tr:hover,
    .table-modern.lessons-table tbody tr:hover,
    .table-modern.practice-papers-table tbody tr:hover {
        background: #f1f5f9 !important;
    }
}

/* Make percentage text slightly smaller in practice papers table - Desktop only */
@media (min-width: 769px) {
    .table-modern.practice-papers-table tbody td:nth-child(5) span {
        font-size: 0.95rem !important;
    }
    
    /* Make exam name unbold for desktop view */
    .table-modern.practice-papers-table tbody td:nth-child(1) strong {
        font-weight: 400 !important;
    }
}

/* Practice Papers Table - Card view on mobile */
@media (max-width: 768px) {
    /* Hide table header on mobile */
    body .container .modern-card .modern-card-body table.table-modern.practice-papers-table thead,
    .table-modern.practice-papers-table thead {
        display: none !important;
    }
    
    /* Make table body display as block */
    body .container .modern-card .modern-card-body table.table-modern.practice-papers-table tbody,
    .table-modern.practice-papers-table tbody {
        display: block !important;
    }
    
    /* Make each row a separate card - override existing styles */
    body .container .modern-card .modern-card-body table.table-modern.practice-papers-table tbody tr,
    .table-modern.practice-papers-table tbody tr {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        background: white !important;
        border-radius: 12px !important;
        padding: 20px !important;
        margin-bottom: 15px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
        border: 1px solid #e2e8f0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Make table cells display as flex items with labels */
    body .container .modern-card .modern-card-body table.table-modern.practice-papers-table tbody td,
    .table-modern.practice-papers-table tbody td {
        padding: 12px 0 !important;
        border: none !important;
        text-align: left !important;
        box-sizing: border-box !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }
    
    /* Exam Name - Full width, first row */
    body .container .modern-card .modern-card-body table.table-modern.practice-papers-table tbody td:nth-child(1),
    .table-modern.practice-papers-table tbody td:nth-child(1) {
        order: 0 !important;
        flex: 0 0 100% !important;
        width: 100% !important;
    }
    
    /* Unit and Date - Side by side in second row */
    body .container .modern-card .modern-card-body table.table-modern.practice-papers-table tbody td:nth-child(2),
    .table-modern.practice-papers-table tbody td:nth-child(2) {
        order: 1 !important;
        flex: 0 0 calc(50% - 5px) !important;
        width: calc(50% - 5px) !important;
        padding-right: 10px !important;
    }
    
    body .container .modern-card .modern-card-body table.table-modern.practice-papers-table tbody td:nth-child(3),
    .table-modern.practice-papers-table tbody td:nth-child(3) {
        order: 2 !important;
        flex: 0 0 calc(50% - 5px) !important;
        width: calc(50% - 5px) !important;
        padding-left: 10px !important;
    }
    
    /* Marks and Percentage - Side by side in third row */
    body .container .modern-card .modern-card-body table.table-modern.practice-papers-table tbody td:nth-child(4),
    .table-modern.practice-papers-table tbody td:nth-child(4) {
        order: 3 !important;
        flex: 0 0 calc(50% - 5px) !important;
        width: calc(50% - 5px) !important;
        padding-right: 10px !important;
    }
    
    body .container .modern-card .modern-card-body table.table-modern.practice-papers-table tbody td:nth-child(5),
    .table-modern.practice-papers-table tbody td:nth-child(5) {
        order: 4 !important;
        flex: 0 0 calc(50% - 5px) !important;
        width: calc(50% - 5px) !important;
        padding-left: 10px !important;
    }
    
    /* Remarks and Download - Side by side in fourth row */
    body .container .modern-card .modern-card-body table.table-modern.practice-papers-table tbody td:nth-child(6),
    .table-modern.practice-papers-table tbody td:nth-child(6) {
        order: 5 !important;
        flex: 0 0 calc(50% - 5px) !important;
        width: calc(50% - 5px) !important;
        padding-right: 10px !important;
    }
    
    /* Download - Side by side with Remarks */
    body .container .modern-card .modern-card-body table.table-modern.practice-papers-table tbody td:nth-child(7),
    .table-modern.practice-papers-table tbody td:nth-child(7) {
        order: 6 !important;
        flex: 0 0 calc(50% - 5px) !important;
        width: calc(50% - 5px) !important;
        padding-left: 10px !important;
        border-bottom: none !important;
    }
    
    body .container .modern-card .modern-card-body table.table-modern.practice-papers-table tbody td:last-child,
    .table-modern.practice-papers-table tbody td:last-child {
        border-bottom: none !important;
    }
    
    body .container .modern-card .modern-card-body table.table-modern.practice-papers-table tbody td:last-child,
    .table-modern.practice-papers-table tbody td:last-child {
        border-bottom: none !important;
    }
    
    /* Add labels before each cell */
    body .container .modern-card .modern-card-body table.table-modern.practice-papers-table tbody td:before,
    .table-modern.practice-papers-table tbody td:before {
        content: attr(data-label) !important;
        font-weight: 700 !important;
        color: #3b82f6 !important;
        display: block !important;
        margin-bottom: 6px !important;
        font-size: 0.75rem !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }
}

/* Responsive Dashboard */
@media (max-width: 768px) {
    /* Student dashboard: use shorter title on mobile for overall performance */
    .overall-title-desktop {
        display: none;
    }

    .overall-title-mobile {
        display: inline;
    }

    /* Hide Quick Access card only on mobile */
    .quick-access-card {
        display: none;
    }
    .dashboard-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .stat-icon-modern {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .stat-number-modern {
        font-size: 2rem;
    }
    
    /* Reduce space around page title hero on mobile */
    .dashboard-hero {
        padding: 24px 20px !important;
        margin-bottom: 16px !important;
    }
    
    .dashboard-hero h2 {
        font-size: 1.8rem !important;
    }
    
    .dashboard-hero p {
        font-size: 1rem !important;
    }
    
    .assignment-item-modern {
        padding: 20px;
    }
    
    .upcoming-assignments-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .assignment-card-modern {
        padding: 18px;
    }
    
    .modern-card-body {
        padding: 20px;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-action-card {
        padding: 15px;
    }
    
    .quick-action-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .filter-bar-compact {
        padding: 15px;
    }
    
    .filter-form-inline {
        gap: 10px;
    }
    
    .filter-input-group {
        min-width: 100%;
        flex: none;
    }
    
    .btn-filter-apply,
    .btn-filter-reset {
        flex: 1;
        justify-content: center;
    }

    /* Hide tab strip and show simple titles per tab on mobile */
    .tabs-modern {
        display: none;
    }

    /* Keep standalone mobile tab titles hidden now that headers are on cards */
    .mobile-tab-title {
        display: none;
    }

    .mobile-table-header {
        display: block;
    }
}

@media (max-width: 480px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .assignment-meta-modern {
        flex-direction: column;
        gap: 10px;
    }
    
    .upcoming-assignments-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .assignment-card-modern {
        padding: 15px;
    }
    
    .assignment-card-title {
        font-size: 0.95rem;
    }
    
    .assignment-card-desc {
        font-size: 0.85rem;
    }
    
    .assignment-icon-modern {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}

