/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    padding: 24px;
    box-sizing: border-box;
    overflow: hidden;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    width: min(800px, 95vw);
    max-height: calc(100vh - 64px);
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
    position: relative;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Progress Indicator Modal Styles */
#progressModal {
    z-index: 1100; /* Higher than confirmation modal */
}

#progressModal .modal-content {
    width: min(500px, 95vw);
    max-width: 500px;
}

.progress-container {
    padding: 20px 0;
}

.progress-icon {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.progress-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.progress-step.pending {
    opacity: 0.5;
}

.progress-step.active {
    background-color: var(--primary-blue-50, #eff6ff);
    opacity: 1;
}

.progress-step.completed {
    opacity: 1;
}

.step-indicator {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background-color: var(--neutral-gray-200, #e5e7eb);
    transition: all 0.3s ease;
    position: relative;
}

.progress-step.active .step-indicator {
    background-color: var(--primary-blue-500, #3b82f6);
    color: white;
    animation: spin 1s linear infinite;
}

.progress-step.completed .step-indicator {
    background-color: var(--success-green-500, #10b981);
    color: white;
}

.progress-step.completed .step-icon {
    display: none;
}

.progress-step.completed .step-check {
    display: inline-block !important;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.step-content {
    flex: 1;
    min-width: 0;
}

.step-label {
    font-weight: 500;
    color: var(--neutral-gray-900, #111827);
    font-size: 0.95rem;
}

.progress-step.active .step-label {
    color: var(--primary-blue-700, #1d4ed8);
}

.progress-step.completed .step-label {
    color: var(--success-green-700, #047857);
}

.step-detail {
    font-size: 0.85rem;
    color: var(--neutral-gray-600, #4b5563);
    margin-top: 4px;
}

/* Wider confirmation modal for long employee names */
#confirmationModal .modal-content {
    width: min(900px, 95vw);
    max-width: 900px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 24px 24px 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--neutral-gray-900);
}

#confirmationModal .modal-header h2 {
    flex: 1;
    text-align: center;
}

.close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--neutral-gray-400);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.close-button:hover {
    color: var(--neutral-gray-600);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
    box-sizing: border-box;
}

.modal-body p {
    color: var(--neutral-gray-600);
    margin-bottom: 24px;
    text-align: center;
}

.login-form {
    margin-top: 20px;
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-form .form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--neutral-gray-700);
    margin-bottom: 6px;
    display: block;
}

.login-form .form-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--neutral-gray-200);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: var(--font-family);
    transition: all 0.2s ease;
    background: var(--white);
}

.login-form .form-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 94, 184, 0.1);
}

.auth-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.auth-button {
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    width: 100%;
}

.auth-button.primary {
    background: var(--primary-blue);
    color: var(--white);
}

.auth-button.primary:hover {
    background: var(--primary-blue-dark);
}

.auth-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive Design */
