/* Custom CSS for Muhammad Umar's Classfellows list at UOPeople */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Jumbotron */
.jumbotron {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    border-radius: 0.5rem;
}

/* Statistics Cards */
.card.border-primary {
    border-left: 4px solid var(--primary-color) !important;
}

.card.border-success {
    border-left: 4px solid var(--success-color) !important;
}

.card.border-info {
    border-left: 4px solid var(--info-color) !important;
}

.card.border-warning {
    border-left: 4px solid var(--warning-color) !important;
}

/* Tables */
.table {
    background-color: #fff;
    table-layout: fixed;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.table th {
    border-top: none;
    font-weight: 600;
    color: var(--dark-color);
    background-color: #f8f9fa;
    white-space: nowrap;
}


/* Table styling for student list */
.table th:first-child,
.table td:first-child {
    width: 60px;
    text-align: center;
}

.table th:nth-child(2),
.table td:nth-child(2) {
    width: 200px;
}

.table th:nth-child(3),
.table td:nth-child(3) {
    width: 100px;
}

.table th:nth-child(4),
.table td:nth-child(4) {
    width: 200px;
}

.table th:nth-child(5),
.table td:nth-child(5) {
    width: 150px;
}

.table th:nth-child(6),
.table td:nth-child(6) {
    width: 200px;
}

.table th:nth-child(7),
.table td:nth-child(7) {
    width: 120px;
}

.table th:nth-child(8),
.table td:nth-child(8) {
    width: 100px;
}


/* Prevent text wrapping in table cells */
.table td {
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.75rem 0.5rem;
}

.table td:nth-child(2) {
    white-space: normal;
}

.table td:nth-child(4) {
    white-space: normal;
}

.table td:nth-child(6) {
    white-space: normal;
}

/* Prevent layout shifts */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


/* Smooth transitions for table interactions */
.table-hover tbody tr {
    transition: background-color 0.15s ease-in-out;
}

/* Prevent content jumping */
.table th,
.table td {
    min-height: 50px;
    line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table th:nth-child(4),
    .table td:nth-child(4) {
        display: none;
    }
    
    .table th:nth-child(6),
    .table td:nth-child(6) {
        display: none;
    }
    
    .table th:nth-child(7),
    .table td:nth-child(7) {
        display: none;
    }
}

/* Pagination Info */
.pagination-info {
    font-size: 0.875rem;
    color: #6c757d;
}

.pagination-info small {
    font-weight: 500;
}

/* Badges */
.badge {
    font-size: 0.75em;
    font-weight: 500;
}

.badge-sm {
    font-size: 0.65em;
}

/* Progress Bars */
.progress {
    border-radius: 0.5rem;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 0.5rem;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* Forms */
.form-control, .form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Pagination */
.pagination .page-link {
    border-radius: 0.375rem;
    margin: 0 0.125rem;
    border: 1px solid #dee2e6;
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: var(--success-color);
    background-color: rgba(25, 135, 84, 0.1);
}

.alert-info {
    border-left-color: var(--info-color);
    background-color: rgba(13, 202, 240, 0.1);
}

.alert-warning {
    border-left-color: var(--warning-color);
    background-color: rgba(255, 193, 7, 0.1);
}

.alert-danger {
    border-left-color: var(--danger-color);
    background-color: rgba(220, 53, 69, 0.1);
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .jumbotron {
        padding: 2rem 1rem !important;
    }
    
    .jumbotron h1 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn {
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .jumbotron h1 {
        font-size: 1.75rem;
    }
    
    .jumbotron .lead {
        font-size: 1rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-in-out;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Text utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Icon spacing */
.fas, .far, .fab {
    margin-right: 0.25rem;
}

/* Custom badge styles */
.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

.badge.bg-success {
    background-color: var(--success-color) !important;
}

.badge.bg-info {
    background-color: var(--info-color) !important;
}

.badge.bg-warning {
    background-color: var(--warning-color) !important;
    color: var(--dark-color) !important;
}

.badge.bg-secondary {
    background-color: var(--secondary-color) !important;
}
