/* Custom Styles for QR Attendance System */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Card Styling */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

/* Button Styling */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 8px 20px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1a252f;
    border-color: #1a252f;
}

/* Table Styling */
.table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

/* Form Styling */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 10px 15px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* QR Scanner Styling */
#qr-reader {
    border: 2px solid var(--secondary-color) !important;
    border-radius: 10px;
    padding: 10px;
}

#qr-reader__dashboard_section_csr {
    margin-bottom: 15px;
}

/* Badge Styling */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Dashboard Stats */
.stats-card {
    border-left: 4px solid;
}

.stats-card.bg-primary {
    border-left-color: #1a5276;
}

.stats-card.bg-success {
    border-left-color: #196f3d;
}

.stats-card.bg-warning {
    border-left-color: #9c640c;
}

/* Responsive */
@media (max-width: 768px) {
    .card {
        margin-bottom: 20px;
    }
    
    .table-responsive {
        font-size: 14px;
    }
}

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

/* Alert Styling */
.alert {
    border-radius: 8px;
    border: none;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0;
    margin-top: 40px;
}

/* QR Display */
.qr-container {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.qr-code {
    max-width: 300px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    display: inline-block;
}

.session-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

/* Active QR Page Specific Styles */
.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.qr-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

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

.qr-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    position: relative;
}

.qr-timer {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.qr-body {
    padding: 20px;
    text-align: center;
}

.qr-footer {
    background: #f8f9fa;
    padding: 15px;
    border-top: 1px solid #e9ecef;
}

/* Animation for new session */
@keyframes highlightNew {
    0% { background-color: rgba(40, 167, 69, 0.3); }
    100% { background-color: transparent; }
}

.session-new {
    animation: highlightNew 2s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .qr-grid {
        grid-template-columns: 1fr;
    }
    
    .qr-container {
        max-width: 200px;
    }
}

/* Print styles */
@media print {
    .navbar, .btn, .dropdown, .qr-overlay {
        display: none !important;
    }
    
    .qr-code {
        border: 2px solid #000 !important;
    }
    
    .session-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
