﻿
/* Loading Screen */
#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
    transition: opacity 0.5s ease;
}

    #loadingScreen .spinner {
        width: 60px;
        height: 60px;
        border: 4px solid rgba(255,255,255,0.3);
        border-radius: 50%;
        border-top: 4px solid white;
        animation: spin 1s linear infinite;
        margin-bottom: 20px;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Offline Banner */
#offlineBanner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 12px;
    text-align: center;
    z-index: 9998;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

    #offlineBanner.show {
        transform: translateY(0);
    }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

/* iOS Safe Area */
@supports (-webkit-touch-callout: none) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* Prevent iOS zoom on input focus */
input, select, textarea {
    font-size: 16px !important;
}

/* Touch device optimizations */
@media (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
}





:root {
    --primary-color: #3c8dbc;
    --success-color: #00a65a;
    --danger-color: #dd4b39;
    --warning-color: #f39c12;
    --info-color: #00c0ef;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Source Sans Pro', sans-serif;
}

.content-wrapper {
    background: transparent !important;
    padding: 15px;
}

.attendance-card {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    background: white;
    margin-bottom: 20px;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d6ca5 100%);
    color: white;
    padding: 20px;
    border-bottom: none;
}

    .card-header h3 {
        margin: 0;
        font-size: 1.5rem;
        font-weight: 600;
    }

.card-body {
    padding: 25px;
}

#reader {
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid #e0e0e0;
    max-width: 100%;
}

    #reader video {
        width: 100% !important;
        height: auto !important;
        border-radius: 10px;
    }

#video {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
    border: 3px solid var(--primary-color);
}

.form-control {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s;
}

    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem rgba(60, 141, 188, 0.25);
    }

.btn-custom {
    border-radius: 8px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d6ca5 100%);
    border: none;
    color: white;
}

    .btn-primary-custom:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(60, 141, 188, 0.4);
        background: linear-gradient(135deg, #2d6ca5 0%, var(--primary-color) 100%);
    }

.btn-success-custom {
    background: linear-gradient(135deg, var(--success-color) 0%, #008d4c 100%);
    border: none;
    color: white;
}

    .btn-success-custom:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 166, 90, 0.4);
    }

.btn-danger-custom {
    background: linear-gradient(135deg, var(--danger-color) 0%, #c23321 100%);
    border: none;
    color: white;
}

    .btn-danger-custom:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(221, 75, 57, 0.4);
    }

.btn-warning-custom {
    background: linear-gradient(135deg, var(--warning-color) 0%, #db8b0b 100%);
    border: none;
    color: white;
}

    .btn-warning-custom:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
    }

.info-box {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

    .info-box:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    }

.info-box-icon {
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    font-size: 2rem;
}

.attendance-summary {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.attendance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

    .attendance-item:last-child {
        margin-bottom: 0;
    }

.badge-custom {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d6ca5 100%);
    color: white;
    padding: 20px 25px;
    border-bottom: none;
}

.modal-body {
    padding: 30px 25px;
}

.spinner-border-custom {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 0.2em;
    margin-right: 10px;
}

.alert-custom {
    border-radius: 10px;
    padding: 15px 20px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 10px;
    }

    .card-header h3 {
        font-size: 1.25rem;
    }

    .card-body {
        padding: 15px;
    }

    .btn-custom {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .info-box {
        padding: 15px;
    }

    .info-box-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    #video {
        max-height: 300px;
    }
}

@media (max-width: 576px) {
    .modal-body {
        padding: 20px 15px;
    }

    .attendance-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* iOS Specific Fixes */
@supports (-webkit-touch-callout: none) {
    .content-wrapper {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

.success-icon {
    font-size: 5rem;
    color: var(--success-color);
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}


