/* Custom CSS for Credit Bank LMS */

/* Global Styles */
body {
    font-family: 'Sarabun', 'Prompt', sans-serif;
    background-color: #f8f9fa;
}

.navbar-brand img {
    max-height: 40px;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

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

.card-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    border: none;
}

/* Button Styles */
.btn {
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border: none;
}

/* Form Styles */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 10px 15px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 8px;
    padding: 15px 20px;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

/* Dashboard Styles */
.dashboard-card {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-left: 4px solid #007bff;
}

.dashboard-card .card-body {
    padding: 2rem;
}

.dashboard-card .display-4 {
    font-weight: 700;
    color: #007bff;
}

/* Course Card Styles */
.course-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.course-card .card-img-top {
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.course-card .card-body {
    padding: 1.5rem;
}

.course-card .badge {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Assignment and Exam Styles */
.assignment-item, .exam-item {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #28a745;
    transition: all 0.3s ease;
}

.assignment-item:hover, .exam-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.exam-item {
    border-left-color: #ffc107;
}

.due-date {
    color: #dc3545;
    font-weight: 600;
}

.due-date.upcoming {
    color: #ffc107;
}

.due-date.completed {
    color: #28a745;
}

/* Grade Styles */
.grade-display {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    padding: 1rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.grade-A { color: #28a745; }
.grade-B { color: #17a2b8; }
.grade-C { color: #ffc107; }
.grade-D { color: #fd7e14; }
.grade-F { color: #dc3545; }

/* Progress Bar Styles */
.progress {
    height: 10px;
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(90deg, #28a745, #20c997);
}

/* Table Styles */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table thead th {
    background: linear-gradient(135deg, #495057, #343a40);
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    border-color: #e9ecef;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Pagination Styles */
.pagination .page-link {
    border: none;
    border-radius: 8px;
    margin: 0 2px;
    color: #007bff;
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 15px 15px 0 0;
    border: none;
}

.modal-footer {
    border: none;
    padding: 1.5rem;
}

/* Sidebar Styles */
.sidebar {
    background: linear-gradient(180deg, #343a40, #495057);
    min-height: calc(100vh - 76px);
    padding: 2rem 0;
}

.sidebar .nav-link {
    color: #adb5bd;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 20px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .dashboard-card .card-body {
        padding: 1.5rem;
    }
    
    .course-card .card-img-top {
        height: 150px;
    }
    
    .btn {
        padding: 6px 15px;
        font-size: 0.9rem;
    }
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* File Upload Styles */
.file-upload-area {
    border: 2px dashed #007bff;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    background-color: #e9ecef;
    border-color: #0056b3;
}

.file-upload-area.dragover {
    background-color: #e7f3ff;
    border-color: #0056b3;
}

/* Announcement Styles */
.announcement-item {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #17a2b8;
    position: relative;
}

.announcement-item.sticky {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fff3cd, #ffffff);
}

.announcement-item .badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

/* Rubric Styles */
.rubric-table {
    font-size: 0.9rem;
}

.rubric-table th,
.rubric-table td {
    text-align: center;
    vertical-align: middle;
    padding: 0.75rem 0.5rem;
}

.rubric-table .criterion-description {
    text-align: left;
    font-weight: 600;
}

.rubric-level {
    cursor: pointer;
    transition: all 0.3s ease;
}

.rubric-level:hover {
    background-color: #e9ecef;
}

.rubric-level.selected {
    background-color: #007bff;
    color: white;
}

/* Print Styles */
@media print {
    .navbar,
    .sidebar,
    .btn,
    .pagination,
    footer {
        display: none !important;
    }
    
    .container {
        max-width: 100% !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}

