    :root {
        --primary: linear-gradient(85deg, rgba(26, 44, 121, 0.8) 30%, rgba(232, 5, 102, 0.9) 100%) !important;
        --primary-dark: #1d4ed8;
        --secondary: #64748b;
        --light: #f8fafc;
        --dark: #1e293b;
        --success: #10b981;
        --error: #ef4444;
        --border: #e2e8f0;
        --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    }

    .kyc-form-container {
        width: 100%;
        max-width: 900px;
        margin: 40px auto;
        background: white;
        border-radius: 16px;
        box-shadow: var(--card-shadow);
        overflow: hidden;
    }

    .top {
        color: white;
        padding: 30px;
        text-align: center;
        border-bottom: 2px solid var(--border);
    }

    .top h2 {
        font-size: 24px;
        font-weight: 600;
        margin: 0;
    }

    .top p {
        margin-top: 8px;
        opacity: 0.9;
        font-size: 14px;
    }

    .progress-container {
        background: white;
        padding: 20px 30px;
        display: flex;
        justify-content: space-between;
        position: relative;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .progress-step {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        z-index: 2;
    }

    .step-icon {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--light);
        border: 2px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 8px;
        color: var(--secondary);
        font-weight: bold;
        transition: all 0.3s ease;
    }

    .step-label {
        font-size: 12px;
        font-weight: 500;
        color: var(--secondary);
        transition: all 0.3s ease;
        text-align: center;
    }

    .progress-step.active .step-icon {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }

    .progress-step.active .step-label {
        color: var(--primary);
        font-weight: 600;
    }

    .progress-step.completed .step-icon {
        background: var(--success);
        color: white;
        border-color: var(--success);
    }

    .progress-bar {
        position: absolute;
        height: 3px;
        background: var(--border);
        top: 40px;
        left: 30px;
        right: 30px;
        z-index: 1;
    }

    .progress-fill {
        height: 100%;
        background: var(--success);
        width: 0%;
        transition: width 0.5s ease;
    }

    .form-content {
        padding: 30px;
    }

    .form-section {
        display: none;
    }

    .form-section.active {
        display: block;
        animation: fadeIn 0.5s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .section-title {
        font-size: 18px;
        font-weight: 600;
        color: var(--primary);
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--border);
        display: flex;
        align-items: center;
    }

    .section-title i {
        margin-right: 10px;
    }

    .form-row {
        display: flex;
        flex-wrap: wrap;
        margin: 0 -10px;
    }

    .form-group {
        flex: 1 0 calc(50% - 20px);
        margin: 0 10px 20px;
        min-width: 250px;
    }

    .form-group-full {
        flex: 1 0 100%;
        margin: 0 10px 20px;
    }

    label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        color: var(--dark);
        font-size: 14px;
    }

    label.required:after {
        content: " *";
        color: var(--error);
    }

    .input-with-icon {
        position: relative;
    }

    .input-with-icon i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--secondary);
    }

    .input-with-icon input,
    .input-with-icon select,
    .input-with-icon textarea {
        padding-left: 40px;
    }

    input,
    select,
    textarea {
        width: 100%;
        padding: 12px 16px;
        border: 1.5px solid var(--border);
        border-radius: 8px;
        font-size: 15px;
        color: var(--dark);
        transition: all 0.3s ease;
        background: var(--light);
    }

    input:focus,
    select:focus,
    textarea:focus {
        border-color: var(--primary);
        outline: none;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

    textarea {
        resize: vertical;
        min-height: 100px;
    }

    .form-footer {
        display: flex;
        justify-content: space-between;
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid var(--border);
    }

    .btn {
        padding: 12px 24px;
        border-radius: 8px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        border: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .btn i {
        margin-right: 8px;
    }

    .btn-next,
    .btn-submit,
    .btn-prev {
        background: var(--primary);
        color: white;
    }

    .btn-next:hover,
    .btn-submit:hover,
    .btn-prev:hover {
        background: var(--primary-dark);
    }

    .error-message {
        color: var(--error);
        font-size: 12px;
        margin-top: 5px;
        display: none;
    }

    input.error,
    select.error,
    textarea.error {
        border-color: var(--error);
    }

    input.error+.error-message,
    select.error+.error-message,
    textarea.error+.error-message {
        display: block;
    }

    .success-message {
        text-align: center;
        padding: 40px;
        display: none;
    }

    .success-message i {
        font-size: 60px;
        color: var(--success);
        margin-bottom: 20px;
    }

    .success-message h3 {
        font-size: 22px;
        margin-bottom: 10px;
        color: var(--success);
    }

    .success-message p {
        color: var(--secondary);
        margin-bottom: 20px;
    }

    /* Password Styles */
    .password-toggle {
        position: absolute;
        right: 40px;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
        color: var(--secondary);
    }

    /* File Upload Styles - HIDDEN */
    .file-upload {
        display: none !important;
    }

    .file-upload-label {
        display: none !important;
    }

    .file-upload-input {
        display: none !important;
    }

    .file-preview {
        display: none !important;
    }

    /* Declaration Styling */
    .declaration-container {
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 15px;
        margin: 20px 0;
    }

    .declaration-checkbox {
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }

    .declaration-checkbox input[type="checkbox"] {
        margin-top: 4px;
        width: 20px;
        height: 20px;
        min-width: 20px;
    }

    .declaration-checkbox label {
        font-size: 14px;
        color: #495057;
        line-height: 1.5;
        font-weight: normal;
        margin-bottom: 0;
    }

    /* Loading animation for referral name field */
    .loading-referral {
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="%23ddd" stroke-width="8"/><circle cx="50" cy="50" r="40" fill="none" stroke="%23007bff" stroke-width="8" stroke-dasharray="62.83 62.83" transform="rotate(-90 50 50)"><animate attributeName="stroke-dashoffset" values="0;125.66" dur="2s" repeatCount="indefinite"/></circle></svg>');
        background-position: right 10px center;
        background-repeat: no-repeat;
        background-size: 20px 20px;
    }

    /* Make the referral name field look readonly */
    .input-with-icon input[readonly] {
        background-color: #f8f9fa;
        cursor: not-allowed;
        opacity: 0.8;
    }

    /* Additional Responsive Styles */
    @media (max-width: 768px) {
        .form-group {
            flex: 1 0 100%;
        }
        
        .kyc-form-container {
            border-radius: 12px;
            margin: 20px auto;
        }
        
        .top {
            padding: 20px;
        }
        
        .form-content {
            padding: 20px;
        }
        
        .progress-container {
            padding: 15px 20px;
        }
        
        .step-label {
            font-size: 10px;
        }
        
        .progress-bar {
            top: 30px;
            left: 20px;
            right: 20px;
        }
        
        .declaration-checkbox {
            flex-direction: column;
            gap: 10px;
        }
        
        .declaration-checkbox label {
            font-size: 13px;
        }
    }
    /* Validation Styles */
.error {
    border: 2px solid #dc3545 !important;
    background-color: #fff5f5 !important;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.input-with-icon.error i {
    color: #dc3545;
}

/* Loading State for Referral */
.loading-referral {
    color: #6c757d !important;
    font-style: italic;
}

/* Form Validation Summary */
.validation-summary {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: none;
}

.validation-summary.show {
    display: block;
}

.validation-summary h4 {
    color: #856404;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.validation-summary h4 i {
    margin-right: 10px;
}

.validation-summary ul {
    margin: 0;
    padding-left: 20px;
    color: #856404;
}

.validation-summary li {
    margin-bottom: 5px;
}

/* Required Field Indicator */
.required::after {
    content: " *";
    color: #dc3545;
}

/* Step Indicator States */
.progress-step.error .step-icon {
    background-color: #dc3545;
    border-color: #dc3545;
}

.progress-step.error .step-label {
    color: #dc3545;
}

/* File Upload Error */
.upload-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.upload-error.show {
    display: block;
}

/* Button States */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-next:disabled:hover {
    background-color: #007bff;
}

/* Error Styles */
.error {
    border: 2px solid #dc3545 !important;
    background-color: #fff5f5 !important;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

/* Upload File Display */
.file-display {
    margin-top: 5px;
    padding: 5px 10px;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 13px;
}

.file-name {
    color: #28a745;
    font-weight: 500;
}

/* Camera Capture */
.camera-capture-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.camera-preview {
    width: 100%;
    max-width: 300px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.camera-preview video {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.camera-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.camera-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.capture-btn {
    background: #007bff;
    color: white;
}

.capture-btn:hover {
    background: #0056b3;
}

.retake-btn {
    background: #6c757d;
    color: white;
}

.retake-btn:hover {
    background: #545b62;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Camera Modal Styles */
.camera-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.camera-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.camera-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.camera-header h3 {
    margin: 0;
    color: #333;
}

.camera-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.camera-preview {
    width: 100%;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.camera-preview video, 
.camera-preview canvas,
.camera-preview img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.camera-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.camera-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    min-width: 120px;
    transition: all 0.3s;
}

.capture-btn {
    background: #007bff;
    color: white;
}

.capture-btn:hover {
    background: #0056b3;
}

.retake-btn {
    background: #6c757d;
    color: white;
}

.retake-btn:hover {
    background: #545b62;
}

.use-btn {
    background: #28a745;
    color: white;
}

.use-btn:hover {
    background: #1e7e34;
}

/* File upload with camera */
.file-upload-container {
    position: relative;
}

.camera-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
}

.camera-toggle-btn:hover {
    background: #138496;
}

/* File info */
.file-info {
    margin-top: 5px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.file-name {
    color: #28a745;
    font-weight: 500;
    word-break: break-all;
}

.file-size {
    color: #6c757d;
    font-size: 12px;
    margin-top: 3px;
}
/* Simple File Preview */
.file-preview-container {
    margin-top: 10px;
    display: none;
}

.preview-image {
    max-width: 150px;
    max-height: 150px;
    border-radius: 5px;
    border: 2px solid #dee2e6;
    margin-bottom: 5px;
}

.file-info {
    font-size: 13px;
}

.file-name {
    color: #28a745;
    font-weight: 500;
}

.file-size {
    color: #6c757d;
    font-size: 12px;
}

.remove-btn {
    color: #dc3545;
    cursor: pointer;
    font-size: 12px;
    display: inline-block;
    margin-top: 3px;
}

.remove-btn:hover {
    text-decoration: underline;
}

/* Simple Camera Option */
.camera-option {
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    border-top: 1px dashed #dee2e6;
}

.camera-btn-inline {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.camera-btn-inline:hover {
    background: #218838;
}

/* Simple Camera Modal */
.camera-modal-simple {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.camera-modal-simple .modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
}

.camera-modal-simple .camera-view {
    width: 100%;
    height: 250px;
    background: black;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.camera-modal-simple video,
.camera-modal-simple img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-modal-simple .camera-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.camera-modal-simple button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    min-width: 100px;
}

.camera-modal-simple .btn-capture {
    background: #007bff;
    color: white;
}

.camera-modal-simple .btn-retake {
    background: #6c757d;
    color: white;
}

.camera-modal-simple .btn-use {
    background: #28a745;
    color: white;
}

.camera-modal-simple .btn-close {
    background: #dc3545;
    color: white;
}