/**
 * Unified Admin/Dashboard Pages Stylesheet
 * Lesson View Theme Design System
 */

:root {
    /* Primary Colors - Blue/Purple Theme */
    --admin-primary: #3b82f6;
    --admin-primary-dark: #2563eb;
    --admin-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    
    /* Status Colors */
    --admin-success: #10b981;
    --admin-warning: #f59e0b;
    --admin-danger: #ef4444;
    --admin-info: #3b82f6;
    
    /* Neutral Colors - Updated to Lesson View Theme */
    --admin-bg: #e2e8f0;
    --admin-card: #ffffff;
    --admin-text: #1e293b;
    --admin-text-light: #475569;
    --admin-text-muted: #94a3b8;
    --admin-border: #cbd5e1;
    
    /* Spacing */
    --admin-page-padding: 1.5rem;
    --admin-card-padding: 1.5rem;
    --admin-card-radius: 0;
    
    /* Typography - Inter Font */
    --admin-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

/* =============================================
   GLOBAL DASHBOARD CONTAINER - No scrollbar design
============================================= */
.admin-page,
.dashboard-page {
    background: var(--admin-bg);
    min-height: calc(100vh - 56px);
    padding: 10px;
    font-family: var(--admin-font-family);
    color: var(--admin-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.admin-page .container-fluid,
.dashboard-page .container-fluid {
    max-width: 100%;
    padding: 0;
}

/* Responsive dashboard container */
@media (max-width: 992px) {
    .admin-page,
    .dashboard-page {
        padding: 1rem 0.75rem 0.75rem;
    }
}

@media (max-width: 576px) {
    .admin-page,
    .dashboard-page {
        padding: 0.75rem 0.5rem;
    }
}

/* =============================================
   BACK TO DASHBOARD BUTTON - Pill Style
============================================= */
.back-to-dashboard-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f1f5f9;
    color: var(--admin-text);
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    border: 1px solid var(--admin-border);
    border-radius: 0;
    margin-bottom: 0.65rem;
    transition: all 0.2s ease;
}

.back-to-dashboard-btn:hover {
    background: var(--admin-gradient);
    color: white;
    border-color: transparent;
    transform: translateX(-4px);
}

.back-to-dashboard-btn i {
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.back-to-dashboard-btn:hover i {
    transform: translateX(-3px);
}

/* =============================================
   PAGE WRAPPER - Additional container styles
============================================= */
.admin-page .container,
.admin-page .container-fluid {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* =============================================
   PAGE HEADER - Consistent across all pages
   Back button on left, title centered, actions on right
   Aligns with sidebar user section - no top gap
============================================= */
.admin-page-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    min-height: 70px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-bottom: none;
}

/* First page header should have no margin top */
.admin-page > .container > .admin-page-header:first-child,
.admin-page > .container-fluid > .admin-page-header:first-child {
    margin-top: 0;
}

.admin-page-header .header-back {
    display: flex;
    align-items: center;
}

.admin-page-header .header-back a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 0;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.admin-page-header .header-back a:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.admin-page-header .header-back a i {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.admin-page-header .header-content {
    text-align: center;
    min-width: 0;
}

.admin-page-title {
    font-size: 1.4rem;
    font-weight: 800;
    font-family: var(--admin-font-family);
    color: white;
    margin: 0 0 0.25rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    line-height: 1.3;
}

.admin-page-title .title-icon {
    width: 40px;
    height: 40px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.admin-page-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    font-family: var(--admin-font-family);
    margin: 0;
    font-weight: 500;
}

.admin-page-header .header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

/* =============================================
   TABS - Global tab styling - Lesson View Style
============================================= */
.admin-tabs {
    display: flex;
    flex-wrap: nowrap;
    margin-bottom: 0;
    background: #f8fafc;
    border-radius: 0;
    padding: 0.5rem;
    border: none;
    overflow-x: auto;
    min-height: 56px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    gap: 0.5rem;
}

.admin-tabs::-webkit-scrollbar {
    display: none;
}

.admin-tab {
    flex: 0 0 auto;
    min-width: 80px;
    padding: 0.75rem 1.25rem;
    border: none;
    background: #ffffff;
    color: var(--admin-text-light);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin-bottom: 0;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.admin-tab:last-child {
    border-right: none;
}

.admin-tab i {
    font-size: 1rem;
}

.admin-tab:hover {
    color: var(--admin-text);
    background: #f0f4f8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.admin-tab.active {
    color: white;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.admin-tab.active i {
    opacity: 1;
}

/* Tab badge */
.admin-tab .tab-badge {
    background: #e0e7ff;
    color: #4f46e5;
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 10px;
    font-weight: 700;
}

.admin-tab.active .tab-badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Tabs with colored active states - gradient style */
.admin-tab.active.pending {
    color: white;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.admin-tab.active.success {
    color: white;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.admin-tab.active.danger {
    color: white;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

/* Responsive tabs - keep text on mobile */
@media (max-width: 768px) {
    .admin-tabs {
        min-height: 56px;
        flex-wrap: wrap;
        padding: 0.4rem;
        gap: 0.4rem;
    }
    
    .admin-tab {
        padding: 0.65rem 0.75rem;
        font-size: 0.75rem;
        min-width: auto;
        flex: 1 1 auto;
        border-radius: 4px;
    }
    
    .admin-tab i {
        font-size: 0.8rem;
    }
    
    .admin-tab .tab-badge {
        font-size: 0.65rem;
        padding: 0.1rem 0.35rem;
    }
}

@media (max-width: 480px) {
    .admin-tabs {
        min-height: 48px;
        padding: 0.35rem;
        gap: 0.3rem;
    }
    
    .admin-tab {
        flex: 0 0 auto;
        padding: 0.5rem 0.75rem;
        font-size: 0.7rem;
        gap: 0.25rem;
        min-width: 75px;
        border-radius: 4px;
    }
    
    .admin-tab i {
        font-size: 0.75rem;
        flex-shrink: 0;
    }
    
    .admin-tab span {
        display: inline;
    }
    
    .admin-tab .tab-badge {
        font-size: 0.6rem;
        padding: 0.08rem 0.25rem;
        min-width: auto;
    }
}

@media (max-width: 380px) {
    .admin-tabs {
        min-height: 56px;
        padding: 0.3rem;
        gap: 0.25rem;
    }
    
    .admin-tab {
        flex: 0 0 auto;
        padding: 0.45rem 0.5rem;
        font-size: 0.65rem;
        gap: 0.15rem;
        min-width: 65px;
        border-radius: 4px;
    }
    
    .admin-tab i {
        font-size: 0.65rem;
        flex-shrink: 0;
    }
    
    .admin-tab span {
        display: inline;
    }
    
    .admin-tab .tab-badge {
        font-size: 0.5rem;
        padding: 0.05rem 0.15rem;
        min-width: auto;
        line-height: 1;
    }
}
}

/* Tab content - always visible for URL-based tabs */
.admin-tab-content {
    display: block;
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-top: none;
    padding: 1.5rem;
    animation: fadeIn 0.2s ease;
}

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

.admin-tab-content .card {
    border: none;
    box-shadow: none;
    margin-bottom: 1rem;
}

.admin-tab-content .card:last-child {
    margin-bottom: 0;
}

.admin-tab-content .card-body {
    padding: 0;
}

/* List items in tab content like the reference image */
.admin-tab-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-tab-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    color: #374151;
}

.admin-tab-list li:last-child {
    border-bottom: none;
}

.admin-tab-list li .count {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .admin-tab-content {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .admin-tab-content {
        padding: 0.75rem;
    }
    
    .admin-tab-list li {
        padding: 0.7rem 0;
        font-size: 0.85rem;
    }
}

/* =============================================
   STAT CARDS - Summary cards at top
============================================= */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.admin-stat-card {
    background: var(--admin-card);
    border-radius: 0;
    padding: var(--admin-card-padding);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.admin-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #cbd5e1;
}

/* Stat cards - simple border, no colored top border */
.admin-stat-card.success,
.admin-stat-card.warning,
.admin-stat-card.danger,
.admin-stat-card.info,
.admin-stat-card.purple {
    border-top: 1px solid #e2e8f0;
}

.admin-stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--admin-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.admin-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.admin-stat-value.success { color: var(--admin-success); }
.admin-stat-value.warning { color: var(--admin-warning); }
.admin-stat-value.danger { color: var(--admin-danger); }
.admin-stat-value.info { color: var(--admin-info); }
.admin-stat-value.purple { color: var(--admin-primary-dark); }
.admin-stat-value.primary { color: var(--admin-primary); }

.admin-stat-hint {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
}

.admin-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.admin-stat-card {
    position: relative;
}

/* =============================================
   OVERVIEW STATS - Square Card Style (Centered Icons) - Teal Theme
============================================= */
.overview-stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.overview-stat-card {
    background: #ffffff;
    border-radius: 0;
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    border: 1px solid var(--admin-border);
    transition: all 0.3s ease;
    position: relative;
    min-height: 180px;
    justify-content: center;
}

.overview-stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent, #6366f1);
}

.overview-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent, #6366f1);
    color: white;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.overview-stat-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.overview-stat-value {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--admin-font-family);
    color: var(--admin-text);
    line-height: 1.2;
    white-space: nowrap;
}

.overview-stat-label {
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--admin-font-family);
    color: var(--admin-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.overview-stat-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    background: var(--accent, #6366f1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* Responsive overview stats */
@media (max-width: 1400px) {
    .overview-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .overview-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    .overview-stat-card {
        min-height: 160px;
        padding: 1.25rem 1rem;
    }
    .overview-stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
    .overview-stat-value {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .overview-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .overview-stat-card {
        min-height: 150px;
    }
    .overview-stat-icon {
        width: 46px;
        height: 46px;
        font-size: 1.3rem;
    }
    .overview-stat-value {
        font-size: 1.5rem;
    }
    .overview-stat-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .overview-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .overview-stat-card {
        min-height: 140px;
        padding: 1rem 0.75rem;
    }
    .overview-stat-icon {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
        border-radius: 10px;
    }
    .overview-stat-value {
        font-size: 1.35rem;
    }
}

/* =============================================
   OVERVIEW LIST CARDS - Soft Bordered Design - Teal Theme
============================================= */
.overview-card {
    background: #ffffff;
    border-radius: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--admin-border);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.overview-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--admin-border);
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.overview-card-header h5 {
    font-weight: 600;
    color: white;
    margin: 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.overview-card-body {
    padding: 0.75rem 1.25rem 1rem;
    flex: 1;
}

.overview-empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--admin-text-muted);
}

.overview-empty-state i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
    opacity: 0.5;
}

.overview-empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

.overview-list {
    display: flex;
    flex-direction: column;
}

.overview-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

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

.overview-list-item.hidden-item {
    display: none;
}

.overview-list.expanded .hidden-item {
    display: flex;
}

.overview-list-item .item-content {
    flex: 1;
    min-width: 0;
}

.overview-list-item .item-title {
    font-weight: 600;
    color: var(--admin-text);
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.overview-list-item .item-subtitle {
    font-size: 0.75rem;
    color: var(--admin-text-light);
}

.overview-list-item .user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.65rem 1rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 0;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.expand-btn:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    transform: translateY(-1px);
}

.expand-btn.expanded i {
    transform: rotate(180deg);
}

.expand-btn i {
    transition: transform 0.3s ease;
}

/* =============================================
   QUICK ACTION CARDS - Bold Flat Design - Teal Theme
============================================= */
.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    border-radius: 0;
    padding: 1.5rem 1.25rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--admin-border);
    transition: all 0.25s ease;
    height: 100%;
}

.quick-action-card:hover {
    transform: translateY(-3px);
    border-color: #6366f1;
}

.quick-action-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    margin-bottom: 0.9rem;
}

.quick-action-title {
    font-weight: 600;
    font-family: var(--admin-font-family);
    color: var(--admin-text);
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.quick-action-desc {
    color: var(--admin-text-light);
    font-size: 0.85rem;
    font-family: var(--admin-font-family);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .quick-action-card {
        padding: 1.25rem 1rem;
        border-radius: 10px;
    }
    .quick-action-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
        border-radius: 10px;
    }
    .quick-action-title {
        font-size: 0.95rem;
    }
    .quick-action-desc {
        font-size: 0.8rem;
    }
}

@media (max-width: 992px) {
    .overview-card {
        border-radius: 4px;
    }
    .overview-card-header {
        padding: 0.85rem 1rem;
    }
    .overview-card-body {
        padding: 0.5rem 1rem 0.85rem;
    }
}

@media (max-width: 576px) {
    .overview-card {
        border-radius: 4px;
    }
    .overview-card-header h5 {
        font-size: 0.9rem;
    }
    .overview-list-item .item-title {
        font-size: 0.85rem;
    }
}

/* =============================================
   CONTENT CARDS
============================================= */
.admin-card {
    background: var(--admin-card);
    border-radius: var(--admin-card-radius);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.admin-card-header {
    padding: 1.25rem var(--admin-card-padding);
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--admin-font-family);
    color: var(--admin-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-card-title i {
    color: var(--admin-primary);
}

.admin-card-body {
    padding: var(--admin-card-padding);
}

.admin-card-body.no-padding {
    padding: 0;
}

/* =============================================
   CARD HEADER
============================================= */
.admin-card-header {
    padding: var(--admin-card-padding);
    border-bottom: 1px solid var(--admin-border);
    background: #f8fafc;
}

/* =============================================
   TABLES
============================================= */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table thead {
    background: #f8fafc;
}

.admin-table th {
    padding: 0.65rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #0f172a;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.admin-table td {
    padding: 0.6rem 0.75rem;
    color: #334155;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

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

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

/* Compact Expand Button */
.admin-table .expand-btn,
.table-expand-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.admin-table .expand-btn:hover,
.table-expand-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(99, 102, 241, 0.25);
}

.admin-table .expand-btn.active i,
.table-expand-btn.active i {
    transform: rotate(180deg);
}

.admin-table .expand-btn i,
.table-expand-btn i {
    transition: transform 0.2s ease;
}

/* Status badges in tables */
.admin-table .status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* =============================================
   BADGES & PILLS
============================================= */
.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

.admin-badge.success { background: #dcfce7; color: #065f46; }
.admin-badge.warning { background: #fef3c7; color: #92400e; }
.admin-badge.danger { background: #fee2e2; color: #991b1b; }
.admin-badge.info { background: #dbeafe; color: #1e40af; }
.admin-badge.primary { background: #e0e7ff; color: #3730a3; }
.admin-badge.secondary { background: #f1f5f9; color: #475569; }

/* =============================================
   BUTTONS - Theme Styled
============================================= */
.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 0;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.admin-btn.primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.admin-btn.primary:hover {
    transform: translateY(-1px);
    color: white;
}

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

.admin-btn.success:hover {
    transform: translateY(-1px);
    color: white;
}

.admin-btn.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.admin-btn.warning:hover {
    transform: translateY(-1px);
    color: white;
}

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

.admin-btn.danger:hover {
    transform: translateY(-1px);
    color: white;
}

.admin-btn.outline {
    background: transparent;
    border: 2px solid var(--admin-primary);
    color: var(--admin-primary);
}

.admin-btn.outline:hover {
    background: var(--admin-primary);
    color: white;
}

.admin-btn.outline.secondary {
    border-color: var(--admin-border);
    color: var(--admin-text);
}

.admin-btn.outline.secondary:hover {
    background: var(--admin-bg);
    border-color: var(--admin-text);
}

.admin-btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.admin-btn-primary {
    background: var(--admin-gradient);
    color: white;
}

.admin-btn-primary:hover {
    transform: translateY(-1px);
    color: white;
}

.admin-btn-outline {
    background: transparent;
    border: 2px solid var(--admin-border);
    color: var(--admin-text);
}

.admin-btn-outline:hover {
    background: var(--admin-bg);
    border-color: var(--admin-primary);
    color: var(--admin-primary);
}

.admin-btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

/* =============================================
   FILTERS & SEARCH
============================================= */
.admin-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.admin-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    min-width: 180px;
    max-width: 300px;
}

.admin-filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--admin-text-light);
}

.admin-filter-input,
.admin-filter-select {
    padding: 0.65rem 1rem;
    border: 2px solid var(--admin-border);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--admin-text);
    background: white;
    transition: all 0.2s ease;
}

.admin-filter-input:focus,
.admin-filter-select:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* =============================================
   EMPTY STATE
============================================= */
.admin-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--admin-text-light);
}

.admin-empty i {
    font-size: 3rem;
    color: var(--admin-border);
    margin-bottom: 1rem;
    display: block;
}

.admin-empty h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--admin-text);
    margin: 0 0 0.5rem;
}

.admin-empty p {
    color: var(--admin-text-muted);
    margin: 0 0 1.5rem;
}

.admin-empty.success {
    border: 2px dashed #d1fae5;
    border-radius: 16px;
}

.admin-empty.success i {
    color: #10b981;
}

.admin-empty.success h3 {
    color: #064e3b;
}

/* =============================================
   BACK LINK
============================================= */
.admin-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--admin-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

.admin-back-link:hover {
    color: var(--admin-primary-dark);
    text-decoration: none;
}

/* =============================================
   PAGE HINT TEXT
============================================= */
.admin-page-hint {
    margin-top: 1.5rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 768px) {
    :root {
        --admin-page-padding: 1rem;
        --admin-card-padding: 1rem;
    }
    
    .admin-page-title {
        font-size: 1.3rem;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        justify-content: flex-start;
    }
    
    .admin-page-title .title-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        flex-shrink: 0;
    }
    
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .admin-stat-card {
        padding: 1rem;
    }
    
    .admin-stat-value {
        font-size: 1.5rem;
    }
    
    .admin-table {
        font-size: 0.8rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.5rem 0.4rem;
    }
    
    .admin-table .expand-btn,
    .table-expand-btn {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .admin-page-header {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .admin-page-header .header-back {
        order: 1;
        justify-content: flex-start;
    }
    
    .admin-page-header .header-content {
        order: 2;
        text-align: left;
    }
    
    .admin-page-header .header-actions {
        order: 3;
        justify-content: flex-start;
    }
    
    .admin-page-title {
        justify-content: flex-start;
    }
    
    .admin-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    :root {
        --admin-page-padding: 0.75rem;
        --admin-card-padding: 0.75rem;
    }
    
    .admin-page-header .header-back a {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem 0.4rem 0.3rem;
    }
    
    .admin-page-title {
        font-size: 1.05rem;
        flex-direction: row;
        gap: 0.35rem;
    }
    
    .admin-page-title .title-icon {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
        border-radius: 6px;
        flex-shrink: 0;
    }
    
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem;
    }
    
    .admin-stat-card {
        padding: 0.75rem;
    }
    
    .admin-stat-label {
        font-size: 0.65rem;
    }
    
    .admin-stat-value {
        font-size: 1.25rem;
    }
    
    .admin-stat-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        top: 0.75rem;
        right: 0.75rem;
    }
    
    .admin-filter-group {
        min-width: 100%;
        max-width: 100%;
    }
    
    .admin-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Medium screens - 2 columns */
@media (min-width: 577px) and (max-width: 992px) {
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
/* =============================================
   QUICK NAVIGATION BUTTONS - Blue/Purple Theme Colors
============================================= */
.quick-nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0;
    background: transparent;
    border: none;
}

.quick-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    min-width: 120px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: var(--admin-font-family);
    text-decoration: none;
    border: none;
    border-radius: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
    flex: 1 1 auto;
}

.quick-nav-btn:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.quick-nav-btn i {
    font-size: 0.9rem;
}

.quick-nav-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

@media (max-width: 992px) {
    .quick-nav-btn {
        min-width: 100px;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .quick-nav-buttons {
        gap: 0.4rem;
    }
    .quick-nav-btn {
        min-width: 80px;
        padding: 0.55rem 0.85rem;
        font-size: 0.78rem;
    }
}

@media (max-width: 480px) {
    .quick-nav-btn {
        min-width: 70px;
        padding: 0.5rem 0.7rem;
        font-size: 0.72rem;
        gap: 0.35rem;
    }
    .quick-nav-btn i {
        font-size: 0.8rem;
    }
}

/* =============================================
   MOBILE OPTIMIZATIONS - Cards, Content, Tables
============================================= */
/* Tighter gaps on mobile for Bootstrap grid */
@media (max-width: 768px) {
    .row.g-4 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
    
    .row.g-3 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
    }
    
    .card {
        border-radius: 10px;
        margin-bottom: 0.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card h5 {
        font-size: 1rem;
        margin-bottom: 1rem !important;
    }
    
    /* Tighter form controls */
    .form-label {
        font-size: 0.85rem;
        margin-bottom: 0.35rem;
    }
    
    .form-control,
    .form-select {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .btn-sm {
        padding: 0.35rem 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Badge sizing */
    .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 576px) {
    .row.g-4 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
    }
    
    .card {
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .card h5 {
        font-size: 0.95rem;
    }
    
    /* Better mobile table scrolling - avoid horizontal overflow */
    .table-responsive {
        margin: 0;
        padding: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Prevent container overflow */
    .container {
        overflow: hidden;
    }
    
    table {
        font-size: 0.8rem;
        min-width: 100%;
    }
    
    table th,
    table td {
        padding: 0.5rem 0.4rem;
        white-space: nowrap;
    }
    
    /* Mobile card details */
    [style*="background: #f8fafc"] {
        padding: 0.75rem !important;
        font-size: 0.8rem !important;
    }
    
    /* Buttons in row */
    [style*="display: flex"][style*="gap: 0.5rem"] {
        flex-wrap: wrap;
    }
}

/* =============================================
   UNIFIED DASHBOARD CARDS - For all dashboards
   (Tutor, Student, Admin) - Consistent styling
============================================= */
.dashboard-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
    max-width: 100%;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    min-height: 200px;
}

.dashboard-card:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.dashboard-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 0;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Icon color variants */
.dashboard-card-icon.courses { background: #dbeafe; color: #2563eb; }
.dashboard-card-icon.payments { background: #fef3c7; color: #d97706; }
.dashboard-card-icon.qa { background: #dcfce7; color: #16a34a; }
.dashboard-card-icon.earnings { background: #d1fae5; color: #059669; }
.dashboard-card-icon.payouts { background: #ffedd5; color: #ea580c; }
.dashboard-card-icon.methods { background: #ede9fe; color: #7c3aed; }
.dashboard-card-icon.users { background: #dcfce7; color: #16a34a; }
.dashboard-card-icon.settings { background: #f3f4f6; color: #374151; }
.dashboard-card-icon.activity { background: #e0e7ff; color: #4f46e5; }
.dashboard-card-icon.errors { background: #fee2e2; color: #dc2626; }
.dashboard-card-icon.profile { background: #f1f5f9; color: #475569; }
.dashboard-card-icon.browse { background: #fce7f3; color: #db2777; }
.dashboard-card-icon.comments { background: #ede9fe; color: #7c3aed; }

.dashboard-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.35rem;
    line-height: 1;
}

.dashboard-card p {
    font-size: 0.6rem;
    color: #6b7280;
    margin: 0 0 0.5rem;
    line-height: 1.2;
    display: none;
}

.dashboard-card-stats {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.dashboard-card-stat {
    text-align: center;
    padding: 0.3rem 0.4rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0;
}

.dashboard-card-stat-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1f2937;
    display: block;
    line-height: 1;
}

.dashboard-card-stat-label {
    font-size: 0.6rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.25px;
    line-height: 1;
}

.dashboard-card-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 0;
}

.dashboard-card-badge.warning {
    background: #fef3c7;
    color: #d97706;
}

.dashboard-card-badge.info {
    background: #dbeafe;
    color: #2563eb;
}

.dashboard-card-badge.danger {
    background: #fee2e2;
    color: #dc2626;
}

/* Dashboard Header - Mobile Full Width Button */
@media (max-width: 768px) {
    .admin-page-header {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 0.75rem;
        padding: 1rem;
        grid-template-columns: unset;
        flex-wrap: wrap;
    }
    
    .admin-page-header .header-back {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        order: 1;
        flex-shrink: 0;
    }
    
    .admin-page-header .header-content {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        order: 2;
        flex: 1;
        min-width: 0;
    }
    
    .admin-page-title {
        flex-direction: row;
        font-size: 1.25rem;
        justify-content: flex-start;
        align-items: center;
        gap: 0.5rem;
        margin: 0;
    }
    
    .admin-page-title .title-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        border-radius: 8px;
        flex-shrink: 0;
    }
    
    .admin-page-subtitle {
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.85);
        margin: 0;
    }
    
    .admin-page-header .header-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        order: 3;
    }
    
    /* All buttons in header - full width and stacked on mobile */
    .admin-page-header .header-actions .admin-btn,
    .admin-page-header .header-actions > a,
    .admin-page-header .header-actions > button {
        width: 100%;
    }
}

/* Dashboard Cards - Tablet (2 columns) */
@media (max-width: 992px) {
    .dashboard-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .dashboard-card {
        min-height: 220px;
        padding: 1.5rem 1rem;
    }
    
    .dashboard-card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .dashboard-card h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .dashboard-card p {
        display: block;
    }
}

/* Dashboard Cards - Mobile (2 columns) */
@media (max-width: 640px) {
    .dashboard-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .dashboard-card {
        padding: 1.25rem 0.75rem;
        min-height: 220px;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
    }
    
    .dashboard-card-icon {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
        margin: 0 auto 0.75rem;
        flex-shrink: 0;
        border-radius: 6px;
    }
    
    .dashboard-card-content {
        flex: 1;
        min-width: 0;
        width: 100%;
    }
    
    .dashboard-card h3 {
        font-size: 0.9rem;
        margin-bottom: 0.35rem;
        font-weight: 600;
        line-height: 1.2;
        color: #0f172a;
    }
    
    .dashboard-card p {
        font-size: 0.75rem;
        margin-bottom: 0.6rem;
        display: block;
        line-height: 1.3;
        color: #64748b;
    }
    
    .dashboard-card-stats {
        justify-content: center;
        margin-bottom: 0.6rem;
        gap: 0.4rem;
        flex-wrap: wrap;
    }
    
    .dashboard-card-stat {
        padding: 0.3rem 0.5rem;
        min-width: 0;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 4px;
    }
    
    .dashboard-card-stat-value {
        font-size: 0.95rem;
        font-weight: 700;
        color: #0f172a;
    }
    
    .dashboard-card-stat-label {
        font-size: 0.6rem;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }
    
    .dashboard-card-badge {
        padding: 0.35rem 0.85rem;
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-radius: 4px;
        margin-top: auto;
    }
}
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }
    
    /* Page header mobile adjustments */
    .admin-page-header {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .admin-page-subtitle {
        font-size: 0.8rem;
    }
}

/* =============================================
   UNIFIED FORM PAGE STYLING
   For tutor course/lesson forms and other form pages
============================================= */

/* Ensure form pages use admin page background */
.course-form-page,
.lesson-form-page,
.form-page {
    background: var(--admin-bg) !important;
    min-height: calc(100vh - 56px);
    padding: 10px;
    font-family: var(--admin-font-family);
}

/* Convert old page-header-card to match admin-page-header */
.page-header-card {
    background: transparent;
    border: none;
    margin-bottom: 1.5rem;
    padding: 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 0;
    margin-bottom: 1rem;
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--admin-text);
    margin: 0;
    font-family: var(--admin-font-family);
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--admin-text-light);
    margin: 0.5rem 0 0 0;
    font-family: var(--admin-font-family);
}

/* Back button styling unified */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border: 1px solid var(--admin-border);
    background: var(--admin-card);
    color: var(--admin-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: var(--admin-font-family);
}

.back-btn:hover {
    background: var(--admin-primary);
    color: white;
    border-color: var(--admin-primary);
    transform: translateY(-1px);
}

.back-btn i {
    font-size: 0.95rem;
}

/* Form sections for tutor pages */
.form-section {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-radius: 0;
}

.section-header {
    background: var(--admin-gradient);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 0;
}

.section-title {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    font-family: var(--admin-font-family);
}

.section-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.95rem;
    border-radius: 0;
}

.section-body {
    padding: 1.5rem;
    background: var(--admin-card);
}

/* Mobile adjustments for form pages */
@media (max-width: 768px) {
    .page-header {
        gap: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-header-left {
        width: 100%;
        flex-direction: column;
        gap: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .back-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .section-body {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .page-header-card {
        margin-bottom: 1rem;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .page-subtitle {
        font-size: 0.75rem;
    }
    
    .section-header {
        padding: 0.75rem 1rem;
    }
    
    .section-body {
        padding: 0.75rem;
    }
    
    /* Better header actions responsiveness */
    .header-actions {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .filter-btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        min-width: 0;
    }
    
    .filter-btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.5rem;
        white-space: nowrap;
    }
    
    #search-users {
        width: 100%;
        max-width: none !important;
    }
}

@media (max-width: 1024px) {
    /* Prevent overflow on tablets */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100%;
    }
    
    .expand-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    .expand-content {
        padding: 1.5rem 1rem;
        overflow-x: hidden;
    }
}

@media (max-width: 768px) {
    /* Ensure no horizontal scrollbar */
    .admin-page,
    .dashboard-page {
        padding: 1rem 0.75rem 2rem;
        overflow-x: hidden;
    }
    
    .container,
    .container-fluid {
        max-width: 100%;
        margin: 0 auto;
        padding: 0 0.75rem;
        overflow-x: hidden;
    }
    
    .table-responsive {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0;
        padding: 0;
    }
    
    .expand-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .expand-content {
        padding: 1rem 0.75rem;
        overflow-x: hidden;
    }
    
    .expand-section {
        overflow-x: hidden;
    }
    
    .course-list {
        gap: 0.5rem;
    }
    
    .course-badge {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

@media (max-width: 576px) {
    .admin-page,
    .dashboard-page {
        padding: 0.75rem 0.5rem 1.5rem;
    }
    
    .container,
    .container-fluid {
        padding: 0 0.5rem;
    }
    
    .table-responsive {
        margin: 0;
        padding: 0;
    }
}

