/* Mobile Table Styles */

@media (max-width: 768px) {
    /* Hide regular tables on mobile */
    .table-responsive-mobile {
        display: none;
    }
    
    /* Show mobile card layout */
    .mobile-table-cards {
        display: block;
    }
    
    .mobile-table-card {
        background: white;
        border-radius: 12px;
        padding: 1rem;
        margin-bottom: 1rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        border: 1px solid #eee;
    }
    
    .mobile-table-card .card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #eee;
    }
    
    .mobile-table-card .card-title {
        font-weight: 600;
        font-size: 1rem;
        margin: 0;
        color: #333;
    }
    
    .mobile-table-card .card-subtitle {
        font-size: 0.875rem;
        color: #666;
        margin: 0;
    }
    
    .mobile-table-card .card-body {
        padding: 0;
    }
    
    .mobile-table-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid #f5f5f5;
    }
    
    .mobile-table-row:last-child {
        border-bottom: none;
    }
    
    .mobile-table-label {
        font-weight: 500;
        color: #666;
        font-size: 0.875rem;
    }
    
    .mobile-table-value {
        font-weight: 500;
        color: #333;
        text-align: right;
    }
    
    .mobile-table-actions {
        display: flex;
        gap: 0.5rem;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid #eee;
    }
    
    .mobile-table-actions .btn {
        flex: 1;
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Status badges in mobile cards */
    .mobile-status-badge {
        padding: 0.25rem 0.75rem;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 500;
    }
    
    .mobile-status-badge.status-active {
        background-color: #d4edda;
        color: #155724;
    }
    
    .mobile-status-badge.status-inactive {
        background-color: #f8d7da;
        color: #721c24;
    }
    
    .mobile-status-badge.status-pending {
        background-color: #fff3cd;
        color: #856404;
    }
    
    /* Student/Teacher/Parent specific mobile cards */
    .student-mobile-card .card-header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-radius: 12px 12px 0 0;
        margin: -1rem -1rem 0.75rem -1rem;
        padding: 1rem;
    }
    
    .teacher-mobile-card .card-header {
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        color: white;
        border-radius: 12px 12px 0 0;
        margin: -1rem -1rem 0.75rem -1rem;
        padding: 1rem;
    }
    
    .parent-mobile-card .card-header {
        background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
        color: white;
        border-radius: 12px 12px 0 0;
        margin: -1rem -1rem 0.75rem -1rem;
        padding: 1rem;
    }
    
    /* Assignment mobile cards */
    .assignment-mobile-card {
        border-left: 4px solid #667eea;
    }
    
    .assignment-mobile-card.overdue {
        border-left-color: #dc3545;
    }
    
    .assignment-mobile-card.submitted {
        border-left-color: #28a745;
    }
    
    /* Attendance mobile cards */
    .attendance-mobile-card.present {
        border-left: 4px solid #28a745;
    }
    
    .attendance-mobile-card.absent {
        border-left: 4px solid #dc3545;
    }
    
    .attendance-mobile-card.late {
        border-left: 4px solid #ffc107;
    }
    
    /* Fee mobile cards */
    .fee-mobile-card.paid {
        border-left: 4px solid #28a745;
    }
    
    .fee-mobile-card.pending {
        border-left: 4px solid #ffc107;
    }
    
    .fee-mobile-card.overdue {
        border-left: 4px solid #dc3545;
    }
    
    /* Exam result mobile cards */
    .result-mobile-card {
        position: relative;
    }
    
    .result-mobile-card .grade-circle {
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        color: white;
        font-size: 0.875rem;
    }
    
    .result-mobile-card .grade-circle.grade-a {
        background: linear-gradient(135deg, #28a745, #20c997);
    }
    
    .result-mobile-card .grade-circle.grade-b {
        background: linear-gradient(135deg, #17a2b8, #6f42c1);
    }
    
    .result-mobile-card .grade-circle.grade-c {
        background: linear-gradient(135deg, #ffc107, #fd7e14);
    }
    
    .result-mobile-card .grade-circle.grade-d {
        background: linear-gradient(135deg, #fd7e14, #dc3545);
    }
    
    .result-mobile-card .grade-circle.grade-f {
        background: linear-gradient(135deg, #dc3545, #6c757d);
    }
    
    /* Mobile search and filters */
    .mobile-search-filters {
        background: white;
        padding: 1rem;
        border-radius: 12px;
        margin-bottom: 1rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .mobile-search-filters .form-control {
        margin-bottom: 0.75rem;
    }
    
    .mobile-search-filters .btn-group {
        width: 100%;
        display: flex;
    }
    
    .mobile-search-filters .btn-group .btn {
        flex: 1;
        font-size: 0.875rem;
        padding: 0.5rem;
    }
    
    /* Mobile pagination */
    .mobile-pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        margin-top: 1.5rem;
    }
    
    .mobile-pagination .btn {
        min-width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-pagination .page-info {
        font-size: 0.875rem;
        color: #666;
        margin: 0 1rem;
    }
}

/* Desktop - Hide mobile elements */
@media (min-width: 769px) {
    .mobile-table-cards {
        display: none;
    }
    
    .table-responsive-mobile {
        display: block;
    }
    
    .mobile-search-filters {
        display: none;
    }
    
    .mobile-pagination {
        display: none;
    }
}

/* Loading states for mobile tables */
.mobile-table-loading {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.mobile-table-loading .spinner-border {
    width: 2rem;
    height: 2rem;
    margin-bottom: 1rem;
}

/* Empty state for mobile tables */
.mobile-table-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.mobile-table-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.mobile-table-empty h5 {
    margin-bottom: 0.5rem;
    color: #333;
}

.mobile-table-empty p {
    margin-bottom: 1.5rem;
    opacity: 0.8;
}