/* Custom CSS for School Management System */

/* Import Jessoreboard Theme */
@import url('jessoreboard-theme.css');

/* Import Bengali Fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Bengali:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&display=swap');

/* Global Styles */
/* Force Hind Siliguri across UI */
html, body, button, input, select, textarea, .table, .navbar, .btn, .card, .alert, .form-label, label, .dropdown-item {
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', 'SolaimanLipi', 'Kalpurush', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}
body {
    background-color: #f8f9fa;
    line-height: 1.6;
}

/* Bengali Font Support */
.bengali-text {
    font-family: 'Noto Sans Bengali', 'Hind Siliguri', 'SolaimanLipi', 'Kalpurush', sans-serif;
    font-weight: 400;
    line-height: 1.7;
}

/* Form inputs with Bengali support */
.form-control, .form-select, textarea {
    font-family: 'Noto Sans Bengali', 'Hind Siliguri', 'SolaimanLipi', 'Kalpurush', 'Segoe UI', sans-serif;
    line-height: 1.6;
}

/* Table content with Bengali support */
.table td, .table th {
    font-family: 'Noto Sans Bengali', 'Hind Siliguri', 'SolaimanLipi', 'Kalpurush', sans-serif;
    line-height: 1.6;
}

/* Navigation with Bengali support */
.navbar-nav .nav-link, .navbar-brand {
    font-family: 'Noto Sans Bengali', 'Hind Siliguri', 'SolaimanLipi', 'Kalpurush', sans-serif;
    font-weight: 500;
}

/* Button text with Bengali support */
.btn {
    font-family: 'Noto Sans Bengali', 'Hind Siliguri', 'SolaimanLipi', 'Kalpurush', sans-serif;
    font-weight: 500;
}

/* Card headers with Bengali support */
.card-header {
    font-family: 'Noto Sans Bengali', 'Hind Siliguri', 'SolaimanLipi', 'Kalpurush', sans-serif;
    font-weight: 600;
}

/* Alert messages with Bengali support */
.alert {
    font-family: 'Noto Sans Bengali', 'Hind Siliguri', 'SolaimanLipi', 'Kalpurush', sans-serif;
    line-height: 1.6;
}

/* Labels with Bengali support */
.form-label, label {
    font-family: 'Noto Sans Bengali', 'Hind Siliguri', 'SolaimanLipi', 'Kalpurush', sans-serif;
    font-weight: 500;
}

/* Dropdown items with Bengali support */
.dropdown-item {
    font-family: 'Noto Sans Bengali', 'Hind Siliguri', 'SolaimanLipi', 'Kalpurush', sans-serif;
    line-height: 1.6;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    transform: translateY(-2px);
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

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

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0 !important;
    border: none;
    font-weight: 600;
}

/* Dashboard Cards */
.card.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.card.bg-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%) !important;
}

.card.bg-info {
    background: linear-gradient(135deg, #3498db 0%, #85c1e9 100%) !important;
}

.card.bg-warning {
    background: linear-gradient(135deg, #f39c12 0%, #f7dc6f 100%) !important;
}

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    border: none;
}

.btn-info {
    background: linear-gradient(135deg, #3498db 0%, #85c1e9 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #f7dc6f 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #f1948a 100%);
    border: none;
}

/* Forms */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    transform: translateY(-2px);
}

.form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
}

.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Tables */
.table {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.02);
}

/* Alerts */
.alert {
    border-radius: 15px;
    border: none;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #f1948a 100%);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, #f39c12 0%, #f7dc6f 100%);
    color: white;
}

.alert-info {
    background: linear-gradient(135deg, #3498db 0%, #85c1e9 100%);
    color: white;
}

/* Badges */
.badge {
    border-radius: 10px;
    font-weight: 500;
    padding: 8px 12px;
}

/* Custom Classes */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.shadow-custom {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.border-radius-custom {
    border-radius: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        border-radius: 15px;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading Spinner */
.spinner-border-custom {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .table {
        box-shadow: none;
    }
}

/* Status Indicators */
.status-active {
    color: #28a745;
    font-weight: bold;
}

.status-inactive {
    color: #dc3545;
    font-weight: bold;
}

.status-pending {
    color: #ffc107;
    font-weight: bold;
}

/* Profile Image */
.profile-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.profile-img-small {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
}

/* Dashboard Stats */
.stat-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: #6c757d;
    font-weight: 500;
}

/* Calendar Styles */
.calendar-day {
    padding: 10px;
    border: 1px solid #e9ecef;
    min-height: 100px;
    transition: all 0.3s ease;
}

.calendar-day:hover {
    background-color: #f8f9fa;
}

.calendar-event {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.8rem;
    margin-bottom: 2px;
}

/* File Upload */
.file-upload {
    border: 2px dashed #667eea;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.file-upload:hover {
    border-color: #764ba2;
    background-color: #f8f9fa;
}

.file-upload-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

/* Progress Bar */
.progress {
    border-radius: 10px;
    height: 20px;
}

.progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

/* Sidebar */
.sidebar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 2rem 0;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 1rem 2rem;
    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);
    transform: translateX(10px);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: white;
}

/* Subjects Container Styles */
#subjects-container {
    background: #f8f9fa;
    transition: all 0.3s ease;
}

#subjects-container:hover {
    background: #e9ecef;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.subject-checkbox {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    transition: all 0.3s ease;
}

.subject-checkbox:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.subject-checkbox input:checked + label {
    color: #667eea;
    font-weight: 600;
}

.subjects-actions {
    background: #e9ecef;
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 15px;
}

.subjects-actions .btn {
    margin: 2px;
    font-size: 0.875rem;
}

/* Subject Badge Styles */
.subject-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 2px;
    display: inline-block;
}

.subject-count {
    color: #6c757d;
    font-size: 0.8rem;
    font-style: italic;
}

/* Loading Animation for Subjects */
.subjects-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    color: #6c757d;
}

.subjects-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== CLASS RESET FUNCTIONALITY STYLES ===== */

/* Reset Warning Alert */
.reset-warning-alert {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    border: 2px solid #ff4757;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0% { box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3); }
    50% { box-shadow: 0 6px 20px rgba(255, 71, 87, 0.5); }
    100% { box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3); }
}

/* Danger Zone Styling */
.danger-zone {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border: 3px solid #f44336;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.danger-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(244, 67, 54, 0.1), transparent);
    animation: danger-sweep 3s infinite;
}

@keyframes danger-sweep {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Reset Button Styles */
.btn-reset-danger {
    background: linear-gradient(135deg, #ff4757 0%, #c44569 100%);
    border: none;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-reset-danger:hover {
    background: linear-gradient(135deg, #c44569 0%, #ff4757 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(196, 69, 105, 0.4);
}

.btn-reset-danger:active {
    transform: translateY(-1px);
}

/* Quick Reset Modal */
.modal-reset .modal-content {
    border: 3px solid #f44336;
    border-radius: 15px;
    overflow: hidden;
}

.modal-reset .modal-header {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    border: none;
}

/* Confirmation Input */
.confirm-input {
    border: 3px solid #f44336 !important;
    background-color: #fff !important;
    font-weight: bold;
    text-align: center;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.confirm-input:focus {
    border-color: #d32f2f !important;
    box-shadow: 0 0 0 0.3rem rgba(244, 67, 54, 0.25) !important;
    background-color: #ffebee !important;
}

/* Student Count Info */
.student-count-info {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 10px;
    font-weight: 500;
}

/* Reset Success Message */
.reset-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    color: #155724;
    font-weight: 600;
    animation: success-glow 1s ease-in-out;
}

@keyframes success-glow {
    0% { box-shadow: 0 0 5px rgba(40, 167, 69, 0.3); }
    50% { box-shadow: 0 0 20px rgba(40, 167, 69, 0.6); }
    100% { box-shadow: 0 0 5px rgba(40, 167, 69, 0.3); }
}

/* Reset Error Message */
.reset-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #dc3545;
    color: #721c24;
    font-weight: 600;
    animation: error-shake 0.5s ease-in-out;
}

@keyframes error-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Warning Icons */
.warning-icon {
    color: #ff4757;
    animation: warning-pulse 1.5s infinite;
}

@keyframes warning-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Reset Progress Indicator */
.reset-progress {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 4px;
    border-radius: 2px;
    animation: progress-loading 2s infinite;
}

@keyframes progress-loading {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Mobile Responsive for Reset */
@media (max-width: 768px) {
    .danger-zone {
        padding: 15px;
        margin: 15px 0;
    }
    
    .btn-reset-danger {
        font-size: 0.9rem;
        padding: 10px 15px;
    }
    
    .confirm-input {
        font-size: 1rem;
        letter-spacing: 1px;
    }
    
    .reset-warning-alert {
        font-size: 0.9rem;
        padding: 12px;
    }
}

/* ===== SESSION, GROUP & MARKS SYSTEM STYLES ===== */

/* Main System Card */
.marks-system-card {
    border: 2px solid #007bff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
    transition: all 0.3s ease;
    overflow: hidden;
}

.marks-system-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 123, 255, 0.25);
}

.marks-system-card .card-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 13px 13px 0 0;
    border: none;
    position: relative;
    overflow: hidden;
}

.marks-system-card .card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.marks-system-card:hover .card-header::before {
    left: 100%;
}

/* System Status Boxes */
.system-status-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    position: relative;
    overflow: hidden;
}

.system-status-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.system-status-box i {
    transition: all 0.3s ease;
}

.system-status-box:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* Quick Action Buttons */
.quick-action-btn {
    transition: all 0.3s ease;
    border-radius: 20px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.quick-action-btn:hover::before {
    width: 300px;
    height: 300px;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* System Info Alert */
.system-info-alert {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border: 1px solid #b6d4da;
    border-radius: 12px;
    position: relative;
}

.system-info-alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border-radius: 2px;
}

/* New Feature Badge */
.new-feature-badge {
    animation: pulse 2s infinite;
    background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
    color: #000;
    font-weight: 600;
    border-radius: 15px;
    padding: 4px 8px;
    font-size: 0.7em;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

@keyframes pulse {
    0% { 
        transform: scale(1); 
        box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.5);
    }
    100% { 
        transform: scale(1); 
        box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    }
}

/* Navigation Dropdown Styles */
.dropdown-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 600;
    color: #495057;
    border-radius: 8px;
    margin: 5px 10px;
    padding: 8px 15px;
    border: 1px solid #dee2e6;
}

.marks-dropdown-item {
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 2px 10px;
    position: relative;
}

.marks-dropdown-item:hover {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    transform: translateX(5px);
}

.marks-dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

/* Grade Badge Styles */
.grade-badge {
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.grade-badge:hover {
    transform: scale(1.1);
}

.grade-badge.bg-success { 
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important; 
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}
.grade-badge.bg-primary { 
    background: linear-gradient(135deg, #007bff 0%, #6610f2 100%) !important; 
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}
.grade-badge.bg-info { 
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%) !important; 
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}
.grade-badge.bg-warning { 
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%) !important; 
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    color: #000 !important;
}
.grade-badge.bg-secondary { 
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important; 
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}
.grade-badge.bg-dark { 
    background: linear-gradient(135deg, #343a40 0%, #212529 100%) !important; 
    box-shadow: 0 2px 8px rgba(52, 58, 64, 0.3);
}
.grade-badge.bg-danger { 
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important; 
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Marks Entry Table Styles */
.mark-input {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.mark-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    transform: scale(1.05);
    background: #ffffff;
}

.mark-input:invalid {
    border-color: #dc3545;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.total-marks {
    font-size: 1.2em;
    font-weight: 700;
    color: #007bff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.total-marks:hover {
    transform: scale(1.1);
    color: #0056b3;
}

/* Session & Group Info Styles */
.session-info {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.session-info::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
}

.group-info {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    position: relative;
    overflow: hidden;
}

.group-info::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 10s linear infinite reverse;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Marks Setup Form Styles */
.marks-summary {
    transition: all 0.3s ease;
    border-radius: 10px;
    font-weight: 600;
}

.marks-summary.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #b8dacc;
    color: #155724;
}

.marks-summary.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #f1b0b7;
    color: #721c24;
}

.marks-summary.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #ffeaa7;
    color: #856404;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .marks-system-card {
        margin-bottom: 20px;
    }
    
    .system-status-box {
        margin-bottom: 15px;
    }
    
    .quick-action-btn {
        margin-bottom: 8px;
        width: 100%;
        font-size: 0.9rem;
    }
    
    .mark-input {
        font-size: 0.9rem;
    }
    
    .grade-badge {
        font-size: 0.75em;
        padding: 4px 8px;
    }
    
    .new-feature-badge {
        font-size: 0.6em;
        padding: 2px 6px;
    }
}

/* Print Styles for Marks System */
@media print {
    .marks-system-card,
    .quick-action-btn,
    .new-feature-badge {
        display: none !important;
    }
    
    .mark-input {
        border: 1px solid #000;
        background: white;
    }
    
    .grade-badge {
        background: white !important;
        color: black !important;
        border: 1px solid #000;
    }
}

/* Fix: small select caret misaligned above control */
.form-select.form-select-sm {
    padding-right: 2rem; /* ensure space for caret */
    line-height: 1.5;    /* normalize height */
}
.form-select.form-select-sm, 
.form-select.form-select-sm option {
    background-position: right .5rem center !important; /* keep caret vertically centered */
}
/* In flex wrappers (e.g., morning/evening cell), prevent vertical stretch */
.d-flex .form-select.form-select-sm {
    align-self: center;
}