html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
}

#auth-view {
    padding: 20px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px; /* Provides space for vertical centering */
}

#auth-form {
    width: 100%;
}

.card-title {
    font-size: 22px;
    color: #1a237e;
    margin-bottom: 10px;
    text-align: center;
}

.card-intro {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
    text-align: center;
}

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

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

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-primary {
    color: #fff;
    background-color: #3949ab;
    width: 100%;
}

.btn-primary:hover {
    background-color: #1a237e;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.btn-secondary {
    color: #fff;
    background-color: #757575;
}

.btn-secondary:hover {
    background-color: #555;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.error-message {
    color: #d32f2f;
    margin-top: 10px;
    font-weight: bold;
    display: none;
    text-align: center;
}


.loading-indicator,
.success-message {
    text-align: center;
    font-size: 1em;
    font-weight: bold;
    color: #3949ab;
    display: flex; /* Changed to flex */
    flex-direction: column; /* Stack children vertically */
    align-items: center; /* Center horizontally */
    margin-top: 15px;
    width: 100%; /* Ensure it takes width for progress bar */
}

/* New Progress Bar */
.progress-bar {
    width: 0;
    height: 4px;
    background-color: #3949ab;
    border-radius: 2px;
    margin-bottom: 20px;
}

/* New Typewriter Effect */
.typewriter {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

/* New SVG Checkmark Styles */
.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: #3949ab; /* Blue color for the stroke */
    stroke-miterlimit: 10;
    animation: fill-green .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
    margin: 0 auto 10px auto; /* Centered horizontally, 10px bottom margin */
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke-miterlimit: 10;
    stroke: #3949ab; /* Blue color */
    fill: none;
    animation: stroke .6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: #fff; /* White checkmark */
    animation: stroke .3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes fill-green {
    100% {
        background-color: #4CAF50;
        stroke: #4CAF50;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

#wizard-view {
    width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.wizard-header {
    text-align: center;
    padding-bottom: 10px;
    margin-bottom: 10px;
    position: relative;
    left: -20px;
}

.wizard-header h1 {
    font-size: 20px;
    color: #1a237e;
    margin: 0;
}

.wizard-header .company-name {
    font-size: 14px;
    color: #555;
    margin-bottom: 5px;
}

.wizard-header .company-name {
    animation: fadeIn 0.5s ease-in-out;
}

.wizard-header h1 {
    animation: fadeIn 0.5s ease-in-out 0.2s;
    animation-fill-mode: both;
}

#wizard-progress {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    width: 90%;
    margin: 20px auto;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
}

.progress-step:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 15px;
    right: 50%;
    height: 4px;
    width: 100%;
    background-color: #e0e0e0;
    z-index: 1;
}

.progress-step.completed:not(:first-child)::before {
    background-color: #3949ab;
}

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #fff;
    border: 3px solid #e0e0e0;
    color: #999;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    transition: all 0.4s ease;
    z-index: 2;
}

.step-label {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
    transition: color 0.4s ease;
}

/* Active State */
.progress-step.active .step-circle {
    border-color: #3949ab;
    color: #3949ab;
}

.progress-step.active .step-label {
    color: #3949ab;
    font-weight: bold;
}

/* Completed State */
.progress-step.completed .step-circle {
    border-color: #3949ab;
    background-color: #3949ab;
    color: #fff;
    font-size: 0;
}

.progress-step.completed .step-circle::after {
    content: '\2713';
    font-size: 20px;
    color: #fff;
}

.progress-step.completed .step-label {
    color: #333;
}

.wizard-step {
    display: none;
    animation: fadeIn 0.5s;
    margin-top: 20px;
}

.wizard-step.active {
    display: block;
}

.step-title {
    text-align: center;
    font-size: 18px;
    color: #1a237e;
    margin-bottom: 5px; /* Reduced margin */
}

.step-title.centered {
    text-align: center;
    color: #000; /* Black heading */
}

/* New Details Card Styles */
.details-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 20px;
    margin: 0 auto;
    max-width: 500px;
    width: 90%;
    box-sizing: border-box;
    position: relative;
    left: -15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
    color: #555;
}

.detail-value {
    color: #333;
    font-weight: bold;
}

.detail-item.total {
    font-size: 1.1em;
    border-top: 2px solid #3949ab;
    margin-top: 10px;
    padding-top: 10px;
}

.detail-item.total .detail-label,
.detail-item.total .detail-value {
    color: #3949ab;
}



.disclaimer-text {
    text-align: center;
}

.id-upload {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    justify-content: center;
}

.id-upload-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    position: relative;
    left: -15px;
}



.custom-upload-box {
    width: 150px;
    height: 100px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    background-color: #f0f0f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.custom-upload-box:hover {
    background-color: #e0e0e0;
}

.custom-upload-box input[type="file"] {

    position: absolute;

    left: 0;

    top: 0;

    width: 100%;

    height: 100%;

    opacity: 0;

    cursor: pointer;

    z-index: 10;

}



.custom-upload-box .preview {

    width: 100%;

    height: 100%;

    object-fit: contain; /* Ensure the entire image is visible */

    position: absolute;

    top: 0;

    left: 0;

}



.wizard-nav {

    display: flex;

    flex-direction: column;

    align-items: stretch; /* Changed from center to stretch */

    margin: 10px auto 0; /* Set top margin to 10px and centered horizontally */

    padding-top: 10px;

    gap: 10px;

    width: 90%; /* Match details-card */

    max-width: 500px; /* Match details-card */

    position: relative; /* Match details-card */

    left: -15px; /* Match details-card */

    box-sizing: border-box; /* Add for consistent sizing */

}

/* Existing media query, adding details-card padding */
@media (max-width: 400px) {
    .details-card {
        padding: 10px 5px; /* Reduce padding on very small screens and add 5px horizontal padding */
    }
    .detail-item {
        padding: 8px 0; /* Make detail items more compact */
    }
    .detail-item.total {
        padding-top: 8px;
    }
}

/* New Camera Modal Styles */
#camera-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#camera-feed {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This will make the video fill the screen */
}

#camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.id-outline {
    width: 85.6mm; /* Standard ID card width */
    height: 53.98mm; /* Standard ID card height */
    border: 2px solid #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7); /* This creates the "cutout" effect */
}

#camera-instruction {
    color: #fff;
    font-weight: bold;
    margin-top: 20px;
    font-size: 1.2em;
}

#capture-button {
    position: absolute;
    bottom: 40px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #fff;
    border: 5px solid #ccc;
    cursor: pointer;
}

/* Signature Pad Styles */
.signature-section {
    width: 90%;
    margin: 0 auto;
    max-width: 500px;
    position: relative;
    left: -15px;
}

.agreement-text {
    font-size: 12px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
    border: 2px solid #4CAF50; /* Green outline */
    padding: 10px;
    border-radius: 8px;
}

.signature-pad {
    border: 2px solid #3949ab; /* Solid border for signature area */
    border-radius: 8px;
    position: relative;
    height: 200px; /* Explicit height */
}

#signature-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

#clear-signature {
    position: absolute;
    top: 10px;
    right: 10px;
    transform: translateY(0);
    padding: 5px 10px;
    font-size: 12px;
}

#clear-signature:hover {
    background: #e0e0e0;
}
.consent-container {
    display: flex;
    align-items: flex-start;
    margin: 20px auto;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 8px;
    font-size: 12px;
    max-width: 500px;
    width: 90%;
    box-sizing: border-box;
    position: relative;
    left: -15px;
}

.consent-container input[type="checkbox"] {
    margin-top: 2px;
    margin-right: 10px;
    min-width: 16px;
    min-height: 16px;
}

.consent-container label {
    color: #333;
    line-height: 1.5;
}

.consent-container a {
    color: #3949ab;
    text-decoration: none;
    font-weight: bold;
}

.consent-container a:hover {
    text-decoration: underline;
}

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.pdf-viewer-container {
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin: 20px auto;
    max-width: 500px;
    width: 90%;
    position: relative;
    left: -15px;
}

.final-success-view {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-direction: column;
}

.final-success-view .checkmark-circle {
    width: 100px;
    height: 100px;
    background-color: #4CAF50;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.final-success-view .checkmark-circle::after {
    content: '\2713';
    color: white;
    font-size: 50px;
}

.final-success-view p {
    font-size: 20px;
    color: #333;
    margin-top: 20px;
}