        :root {
            --primary-color: #4f46e5;
            --primary-dark: #3730a3;
            --secondary-color: #f8fafc;
            --accent-color: #06b6d4;
            --text-dark: #1e293b;
            --text-light: #64748b;
            --border-light: #e2e8f0;
            --success-color: #10b981;
            --danger-color: #ef4444;
        }

        body {
            background: linear-gradient(135deg, #d32f2f 0%, #f57c00 50%, #ffca28 100%);
            background-size: cover;
            background-position: center center;
            background-repeat: no-repeat;
            background-attachment: fixed;
            min-height: 100vh;
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .login-container {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            border-radius: 24px;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.2);
            padding: 40px;
            width: 100%;
            max-width: 420px;
            animation: slideUp 0.6s ease-out;
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .hidden {
            display: none !important;
        }

        .login-header {
            text-align: center;
            margin-bottom: 40px;
        }

        .login-icon {
            width: 80px;
            height: 80px;
            /*background: linear-gradient(135deg, var(--primary-color), var(--accent-color));*/
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 20px;
            box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
            overflow: hidden;
            /* Prevents image from spilling out */
        }

        .logo-image {
            width: 100%;
            height: 100%;
            object-fit: contain;
            /* Keeps aspect ratio */
        }

        .login-title {
            color: var(--text-dark);
            font-weight: 700;
            font-size: 1.75rem;
            margin-bottom: 8px;
        }

        .login-subtitle {
            color: var(--text-light);
            font-size: 1rem;
            margin-bottom: 0;
        }

        .volunteer-id-display {
            background: var(--secondary-color);
            border: 2px solid var(--border-light);
            border-radius: 16px;
            /*padding: 20px;*/
            text-align: center;
            margin-bottom: 30px;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .volunteer-id-display:focus-within {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }

        .id-label {
            color: var(--text-light);
            font-size: 0.875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 8px;
        }

        .id-value {
            font-size: 2rem;
            font-weight: 700;
            color: var(--text-dark);
            font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
            letter-spacing: 4px;
            min-height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.3s ease;
        }

        .pin-input-container {
            background: #f8f9fa;
            border: 2px solid #e9ecef;
            border-radius: 10px;
            padding: 1rem;
            margin-bottom: 1rem;
            text-align: center;
        }

        .pin-input {
            width: 100%;
            padding: 0.75rem;
            font-size: 1.2rem;
            border: 2px solid #dee2e6;
            border-radius: 8px;
            text-align: center;
            font-family: 'Courier New', monospace;
            letter-spacing: 0.5rem;
            background: white;
        }

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

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .keypad {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
            margin-bottom: 30px;
        }

        .keypad-btn {
            background: white;
            border: 2px solid var(--border-light);
            border-radius: 16px;
            padding: 20px;
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--text-dark);
            transition: all 0.2s ease;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            height: 70px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .keypad-btn::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            background: var(--primary-color);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            transition: all 0.3s ease;
            z-index: 0;
        }

        .keypad-btn span {
            position: relative;
            z-index: 1;
            transition: color 0.3s ease;
        }

        .keypad-btn:hover {
            border-color: var(--primary-color);
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(79, 70, 229, 0.2);
        }

        .keypad-btn:hover::before {
            width: 120%;
            height: 120%;
        }

        .keypad-btn:hover span {
            color: white;
        }

        .keypad-btn:active {
            transform: translateY(0);
            box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
        }

        .keypad-btn.special {
            background: var(--secondary-color);
            color: var(--text-light);
        }

        .keypad-btn.special:hover {
            background: var(--danger-color);
            border-color: var(--danger-color);
        }

        .keypad-btn.special:hover::before {
            background: var(--danger-color);
        }

        .action-buttons {
            display: flex;
            gap: 15px;
            margin-bottom: 15px;
            justify-content: space-between;
        }

        .btn-signin {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: 2px solid var(--border-light);
            border-radius: 16px;
            padding: 16px 24px;
            color: var(--text-light);
            font-weight: 600;
            font-size: 1.1rem;
            color: #ffffff;
            transition: all 0.3s ease;
            flex: 1;
        }

        .btn-signin:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
            background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
        }

        .btn-signin:active {
            transform: translateY(0);
            box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
        }

        .btn-signin:disabled {
            cursor: not-allowed;
            opacity: 0.7;
            transform: none;
        }

        .btn-signin:focus {
            outline: none;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.5);
        }

        .btn-signout {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: 2px solid var(--border-light);
            border-radius: 16px;
            padding: 16px 24px;
            color: var(--text-light);
            font-weight: 600;
            font-size: 1.1rem;
            color: #ffffff;
            transition: all 0.3s ease;
            flex: 1;
        }

        .btn-signout:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
            background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
        }

        .btn-signout:active {
            transform: translateY(0);
            box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
        }

        .btn-signout:disabled {
            cursor: not-allowed;
            opacity: 0.7;
            transform: none;
        }

        .btn-signout:focus {
            outline: none;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.5);
        }

        /* Loading spinner styles */
        .loading-spinner {
            width: 20px;
            height: 20px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-top: 2px solid #ffffff;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-right: 8px;
            display: none;
        }

        /* Show spinner when loading */
        .btn-signin.loading .loading-spinner {
            display: block;
        }

        /* Hide icon when loading */
        .btn-signin.loading .fas {
            display: none;
        }

        /* Spinner animation */
        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }


        .btn-next {
            background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
            border: none;
            border-radius: 16px;
            padding: 16px 32px;
            color: white;
            font-weight: 600;
            font-size: 1.1rem;
            transition: all 0.3s ease;
            flex: 1;
            position: relative;
            overflow: hidden;
        }

        .btn-next::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 ease;
        }

        .btn-next:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
        }

        .btn-next:hover::before {
            left: 100%;
        }

        .btn-next:active {
            transform: translateY(0);
        }

        .btn-visitor {
            display: inline-block;
            width: 100%;
            padding: 16px 24px;
            border: 2px solid #ddd;
            border-radius: 16px;
            background-color: #b9c2ca;
            color: #3b4044;
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .btn-visitor:hover {
            background-color: #6c737a;
            border-color: #adb5bd;
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
        }

        .btn-clear {
            background: rgb(250, 183, 183);
            border: 2px solid var(--border-light);
            border-radius: 16px;
            padding: 16px 24px;
            color: var(--text-light);
            font-weight: 600;
            font-size: 1.1rem;
            transition: all 0.3s ease;
            flex: 1;
        }

        .btn-clear:hover {
            border-color: var(--danger-color);
            color: var(--danger-color);
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(239, 68, 68, 0.2);
        }


        @keyframes shake {

            0%,
            20%,
            40%,
            60%,
            80% {
                transform: translateX(0);
            }

            10%,
            30%,
            50%,
            70%,
            90% {
                transform: translateX(-5px);
            }
        }

        /* Mobile responsiveness */
        @media (max-width: 480px) {
            .login-container {
                padding: 30px 20px;
                margin: 10px;
                border-radius: 20px;
            }

            .keypad-btn {
                padding: 16px;
                height: 60px;
                font-size: 1.3rem;
            }

            .id-value {
                font-size: 1.5rem;
                letter-spacing: 2px;
            }

            .login-title {
                font-size: 1.5rem;
            }
        }

        /* Focus styles for accessibility */
        .keypad-btn:focus,
        .btn-next:focus,
        .btn-clear:focus {
            outline: 3px solid rgba(79, 70, 229, 0.5);
            outline-offset: 2px;
        }

        /* Loading state */
        .btn-next.loading {
            pointer-events: none;
            opacity: 0.7;
        }

        .btn-next.loading::after {
            content: '';
            position: absolute;
            width: 20px;
            height: 20px;
            border: 2px solid transparent;
            border-top: 2px solid white;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            right: 20px;
            top: 50%;
            transform: translateY(-50%);
        }

        @keyframes spin {
            0% {
                transform: translateY(-50%) rotate(0deg);
            }

            100% {
                transform: translateY(-50%) rotate(360deg);
            }
        }

        .me-2 {
            margin-right: 0.5rem;
        }

        .ms-2 {
            margin-left: 0.5rem;
        }

        .required {
            color: #dc3545;
        }

        /* Visitor/Volunteer Styling */
        .form-container {
            max-width: 500px;
            margin: 0 auto;
            background: white;
            padding: 30px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
            color: #333;
        }

        .form-group input,
        .form-group select {
            width: 100%;
            padding: 12px;
            border: 2px solid #ddd;
            border-radius: 6px;
            font-size: 16px;
            box-sizing: border-box;
        }

        .form-group input:focus,
        .form-group select:focus {
            outline: none;
            border-color: #007bff;
        }

        .conditional-field {
            margin-top: 15px;
            display: none;
        }

        .conditional-field.show {
            display: block;
        }

        /* End Visitor/Volunteer Styling */
        #pinSection {
            margin-top: 1em;
            transition: all 0.3s ease;
        }
.pin-input {
        font-family: 'password-dots', sans-serif;
        -webkit-text-security: disc; /* Chrome/Safari */
        text-security: disc; /* Firefox (future), Edge (partial) */
    }
    /* Validation styles for date/time inputs */
.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Alert container styling */
#alertContainer {
    margin-bottom: 1rem;
}

#alertContainer .alert {
    margin-bottom: 0;
}

/* Optional: Add smooth transitions */
.form-control {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Custom styling for datetime labels */
.datetimeout-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}
.success-message {
            background: #d4edda;
            color: #155724;
            padding: 15px;
            border-radius: 10px;
            margin-bottom: 20px;
            border: 1px solid #c3e6cb;
            display: none;
        }

        .error-message {
            background: #f8d7da;
            color: #721c24;
            padding: 15px;
            border-radius: 10px;
            margin-bottom: 20px;
            border: 1px solid #f5c6cb;
            display: none;
        }