/* RFID Attendance System Styles */

:root {
    --primary: 210 100% 50%; /* #007bff */
    --success: 134 61% 41%; /* #28a745 */
    --danger: 354 70% 54%; /* #dc3545 */
    --warning: 45 100% 51%; /* #ffc107 */
    --info: 188 78% 41%; /* #17a2b8 */
    --light: 210 17% 95%; /* #f8f9fa */
    --dark: 210 11% 15%; /* #343a40 */
    --background: 210 11% 98%; /* #f5f7fa */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: hsl(var(--background));
    line-height: 1.6;
}

/* Background Gradients */
.bg-gradient {
    background: linear-gradient(135deg, 
        hsl(var(--primary)) 0%, 
        hsl(240, 100%, 70%) 100%);
}

.bg-gradient-light {
    background: linear-gradient(135deg, 
        hsl(var(--light)) 0%, 
        hsl(210, 20%, 92%) 100%);
}

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

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

.card-header {
    border-radius: 15px 15px 0 0 !important;
    border-bottom: none;
    padding: 1.5rem;
}

/* Feature Icons */
.feature-icon {
    margin-bottom: 1.5rem;
}

.feature-icon i {
    transition: transform 0.3s ease, color 0.3s ease;
}

.card:hover .feature-icon i {
    transform: scale(1.1);
}

/* Button Enhancements */
.btn {
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

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

/* Form Enhancements */
.form-control {
    border-radius: 10px;
    border: 2px solid hsl(var(--light));
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 0.2rem hsla(var(--primary), 0.25);
}

.input-group-text {
    border-radius: 10px 0 0 10px;
    border: 2px solid hsl(var(--light));
    border-right: none;
    background-color: hsl(var(--light));
}

/* Table Enhancements */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table th {
    background-color: hsl(var(--light));
    border: none;
    font-weight: 600;
    color: hsl(var(--dark));
    padding: 1rem;
}

.table td {
    border: none;
    padding: 1rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: hsla(var(--primary), 0.05);
}

/* Badge Enhancements */
.badge {
    border-radius: 20px;
    padding: 0.5em 1em;
    font-weight: 600;
}

/* Navigation Enhancements */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.nav-link {
    font-weight: 500;
    border-radius: 8px;
    margin: 0 0.25rem;
    transition: background-color 0.3s ease;
}

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

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

.modal-header {
    border-radius: 15px 15px 0 0;
    border-bottom: none;
}

.modal-footer {
    border-top: none;
    border-radius: 0 0 15px 15px;
}

/* Alert Enhancements */
.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-dismissible .btn-close {
    padding: 1rem 1.5rem;
}

/* Photo Styles */
.visitor-photo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* RFID Scanner Specific Styles */
.scanner-status {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

.scanner-ready {
    background-color: hsla(var(--success), 0.1);
    color: hsl(var(--success));
    border: 2px solid hsla(var(--success), 0.3);
}

.scanner-scanning {
    background-color: hsla(var(--warning), 0.1);
    color: hsl(var(--warning));
    border: 2px solid hsla(var(--warning), 0.3);
    animation: pulse 1.5s infinite;
}

.scanner-error {
    background-color: hsla(var(--danger), 0.1);
    color: hsl(var(--danger));
    border: 2px solid hsla(var(--danger), 0.3);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .modal,
    .card-footer {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .table {
        font-size: 12px;
    }
}

/* Accessibility Enhancements */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 3px solid hsla(var(--primary), 0.5);
    outline-offset: 2px;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-border-custom {
    width: 3rem;
    height: 3rem;
    border: 0.3rem solid hsla(var(--primary), 0.3);
    border-top: 0.3rem solid hsl(var(--primary));
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
