/* Custom Styles for Barcode Attendance System */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
}

.navbar-brand {
    font-weight: bold;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

.btn {
    border-radius: 5px;
    padding: 8px 20px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, var(--primary-color));
}

.table {
    background: white;
}

.table thead {
    background-color: #f8f9fa;
}

.badge {
    padding: 5px 10px;
    border-radius: 5px;
}

/* Admin notice alerts */
.admin-notice {
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.admin-notice .admin-notice-icon {
    line-height: 1;
    opacity: 0.9;
}

.admin-notice.alert-warning {
    background: #fff8e6;
    color: #664d03;
}

.admin-notice.alert-warning .admin-notice-icon {
    color: #f0ad4e;
}

.admin-notice.alert-success .admin-notice-icon {
    color: var(--success-color);
}

.admin-notice.alert-danger .admin-notice-icon {
    color: var(--danger-color);
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    max-width: 400px;
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-card .card-header {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card .card-body {
    padding: 40px;
}

/* Barcode Scanner Styles */
.scanner-container {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.scanner-input {
    font-size: 24px;
    padding: 15px;
    text-align: center;
    letter-spacing: 5px;
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
}

.scanner-input:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 10px rgba(13, 110, 253, 0.3);
}

/* Camera Scanner Styles */
#interactive {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

#interactive video {
    width: 100%;
    height: auto;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
}

.drawingBuffer {
    position: absolute;
    top: 0;
    left: 0;
}

.btn-group .btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.barcode-display {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    margin: 10px 0;
}

/* Attendance Status Badges */
.status-present {
    background-color: var(--success-color);
    color: white;
}

.status-absent {
    background-color: var(--danger-color);
    color: white;
}

.status-late {
    background-color: var(--warning-color);
    color: #000;
}

/* Dashboard Stats */
.stat-card {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    color: white;
    margin-bottom: 20px;
}

.stat-card.primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
}

.stat-card.success {
    background: linear-gradient(135deg, var(--success-color), #146c43);
}

.stat-card.warning {
    background: linear-gradient(135deg, var(--warning-color), #ffcd39);
    color: #000;
}

.stat-card.info {
    background: linear-gradient(135deg, var(--info-color), #0aa2c0);
}

.stat-card h3 {
    font-size: 2.5rem;
    margin: 10px 0;
    font-weight: bold;
}

.stat-card p {
    margin: 0;
    font-size: 1.1rem;
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

/* Success Message Styles */
.success-message {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 5px solid #28a745;
    color: #155724;
}

.success-message .success-icon {
    color: #28a745;
    animation: scaleIn 0.5s ease-out;
}

.success-message .info-item {
    padding: 8px 0;
    font-size: 0.95rem;
}

.success-message .info-item i {
    margin-right: 8px;
    width: 20px;
}

/* Error Message Styles */
.error-message {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left: 5px solid #dc3545;
    color: #721c24;
}

.error-message .error-icon {
    color: #dc3545;
    animation: pulse 1s ease-in-out;
}

.error-message .error-content {
    font-size: 0.95rem;
}

/* Animations */
@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.animated-fade-in {
    animation: fadeIn 0.5s ease-in;
}

.animated-shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Form Styles */
.form-label {
    font-weight: 600;
    margin-bottom: 8px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .scanner-input {
        font-size: 18px;
        padding: 12px;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    .navbar, .btn, .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
