/* ============================================================================
   DFMS Registration Form - Clean & Professional Styling
   ============================================================================ */

/* Container */
.dfms-registration-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header */
.dfms-registration-header {
    text-align: center;
    margin-bottom: 40px;
}

.dfms-registration-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 10px 0;
}

.dfms-registration-header p {
    font-size: 16px;
    color: #718096;
    margin: 0;
}

/* Form Sections */
.dfms-form-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.section-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 5px 0;
}

.section-desc {
    font-size: 14px;
    color: #718096;
    margin: 8px 0 0 0;
}

/* Form Elements */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
}

.required {
    color: #e53e3e;
}

/* ALL INPUT FIELDS - UNIVERSAL STYLING - MAXIMUM OVERRIDE */
#dfms-register-form input[type="text"],
#dfms-register-form input[type="email"],
#dfms-register-form input[type="tel"],
#dfms-register-form input[type="date"],
#dfms-register-form textarea,
#dfms-register-form .form-input,
.dfms-registration-container input[type="text"],
.dfms-registration-container input[type="email"],
.dfms-registration-container input[type="tel"],
.dfms-registration-container input[type="date"],
.dfms-registration-container textarea,
input#first_name,
input#last_name,
input#email,
input#phone,
input#dob,
input#city,
input#country,
textarea#address {
    display: block;
    visibility: visible;
    opacity: 1;
    width: 100%;
    height: auto;
    min-height: 45px;
    max-height: none;
    padding: 12px 16px;
    margin: 0;
    border: 2px solid #2271b1;
    border-radius: 8px;
    font-size: 15px;
    color: #000000;
    background-color: #ffffff;
    background-image: none;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    position: relative;
    z-index: 1;
    clip: auto;
    overflow: visible;
    text-indent: 0;
    transform: none;
}

input.form-input:focus,
textarea.form-input:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66,153,225,0.1);
}

input.form-input::placeholder,
textarea.form-input::placeholder,
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a0aec0;
}

/* Account Type Cards */
.account-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.account-type-card {
    position: relative;
    cursor: pointer;
    display: block;
}

.account-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.account-type-card .card-content {
    padding: 25px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
    background: white;
}

.account-type-card input[type="radio"]:checked + .card-content {
    border-color: #4299e1;
    background: #ebf8ff;
    box-shadow: 0 4px 12px rgba(66,153,225,0.2);
}

.account-type-card .card-content:hover {
    border-color: #4299e1;
    transform: translateY(-2px);
}

.account-type-card .card-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.account-type-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 8px 0;
}

.account-type-card p {
    font-size: 13px;
    color: #718096;
    margin: 0;
    line-height: 1.5;
}

/* KYC Documents */
.kyc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.kyc-upload-box {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    background: #f7fafc;
    transition: all 0.3s;
    position: relative;
}

.kyc-upload-box:hover {
    border-color: #4299e1;
    background: #ebf8ff;
}

.kyc-upload-box.optional {
    opacity: 0.7;
}

.kyc-upload-box label {
    cursor: pointer;
    display: block;
}

.kyc-upload-box .upload-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.kyc-upload-box h4 {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 5px 0;
}

.kyc-upload-box p {
    font-size: 13px;
    color: #718096;
    margin: 0 0 15px 0;
}

.kyc-upload-box input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

.kyc-upload-box .upload-button {
    display: inline-block;
    padding: 10px 24px;
    background: #4299e1;
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

.kyc-upload-box:hover .upload-button {
    background: #3182ce;
}

.file-preview {
    margin-top: 15px;
    display: none;
    text-align: left;
}

.file-preview.active {
    display: block;
    padding: 12px;
    background: white;
    border: 2px solid #48bb78;
    border-radius: 8px;
}

.file-preview img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.file-preview .file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-preview .file-name {
    font-size: 13px;
    color: #2d3748;
    font-weight: 500;
    flex: 1;
    word-break: break-all;
}

.file-preview .file-size {
    font-size: 12px;
    color: #718096;
}

.doc-upload.has-file + .upload-button {
    background: #48bb78;
}

/* Terms & Submit */
.terms-checkbox {
    margin-bottom: 25px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 8px;
}

.terms-checkbox label {
    display: flex;
    align-items: start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.terms-checkbox a {
    color: #4299e1;
    text-decoration: none;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

.dfms-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

.dfms-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102,126,234,0.5);
}

.dfms-submit-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-loader {
    display: none;
}

.login-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #718096;
}

.login-link a {
    color: #4299e1;
    font-weight: 500;
    text-decoration: none;
}

.login-link a:hover {
    text-decoration: underline;
}

/* Messages */
#dfms-registration-message {
    display: none;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-size: 15px;
}

#dfms-registration-message.success {
    display: block;
    background: #c6f6d5;
    color: #22543d;
    border: 2px solid #9ae6b4;
}

#dfms-registration-message.error {
    display: block;
    background: #fed7d7;
    color: #742a2a;
    border: 2px solid #fc8181;
}

#dfms-registration-message p {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .dfms-registration-container {
        padding: 0 15px;
    }

    .dfms-registration-header h1 {
        font-size: 24px;
    }

    .dfms-form-section {
        padding: 20px;
    }

    .form-row,
    .account-type-grid,
    .kyc-grid {
        grid-template-columns: 1fr;
    }

    .section-header h3 {
        font-size: 18px;
    }
}
