/* CFMS Public Styles */

/* General Form Container */
.cfms-registration-wrapper,
.cfms-loan-wrapper {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 15px;
}

.cfms-form-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 40px;
    margin-bottom: 30px;
}

.cfms-form-title {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.cfms-form-subtitle {
    color: #7f8c8d;
    font-size: 14px;
    text-align: center;
    margin-bottom: 30px;
}

/* Progress Bar */
.cfms-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 0 20px;
}

.cfms-progress-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.cfms-progress-step::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.cfms-progress-step:first-child::before {
    display: none;
}

.cfms-progress-step .step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #7f8c8d;
    font-weight: bold;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.cfms-progress-step .step-label {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: #7f8c8d;
    font-weight: 500;
}

.cfms-progress-step.active .step-number {
    background: #3498db;
    color: #ffffff;
}

.cfms-progress-step.completed .step-number {
    background: #27ae60;
    color: #ffffff;
}

.cfms-progress-step.completed .step-label,
.cfms-progress-step.active .step-label {
    color: #2c3e50;
}

/* Form Steps */
.cfms-form-step {
    display: none;
}

.cfms-form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cfms-form-step h3 {
    color: #2c3e50;
    font-size: 22px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.cfms-form-step h4 {
    color: #34495e;
    font-size: 18px;
    margin-bottom: 15px;
    margin-top: 25px;
}

/* Form Layout */
.cfms-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.cfms-form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cfms-form-group.full-width {
    flex: 1 1 100%;
}

.cfms-form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.cfms-form-group .required {
    color: #e74c3c;
}

.cfms-form-group input[type="text"],
.cfms-form-group input[type="email"],
.cfms-form-group input[type="password"],
.cfms-form-group input[type="date"],
.cfms-form-group input[type="tel"],
.cfms-form-group select,
.cfms-form-group textarea {
    padding: 12px 15px;
    border: 1px solid #dce0e4;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.cfms-form-group input:focus,
.cfms-form-group select:focus,
.cfms-form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.cfms-form-group input.error {
    border-color: #e74c3c;
}

.cfms-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.cfms-help-text {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
    display: block;
}

.cfms-warning-text {
    font-size: 12px;
    color: #e67e22;
    margin-top: 5px;
    display: block;
    font-style: italic;
}

/* File Upload */
.cfms-form-group input[type="file"] {
    padding: 10px;
    border: 2px dashed #dce0e4;
    border-radius: 6px;
    cursor: pointer;
}

.cfms-form-group input[type="file"]:hover {
    border-color: #3498db;
}

.cfms-file-preview {
    margin-top: 10px;
}

.cfms-file-preview img {
    border-radius: 6px;
    border: 1px solid #dce0e4;
}

/* Password Strength */
.cfms-password-strength {
    font-size: 13px;
    margin-top: 5px;
    font-weight: 600;
}

/* Notification Options */
.cfms-notification-options {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.cfms-checkbox-group {
    margin-bottom: 15px;
}

.cfms-checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.cfms-checkbox-group label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.cfms-checkbox-group input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

/* Investment Options */
.cfms-investment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cfms-radio-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #dce0e4;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cfms-radio-option:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.cfms-radio-option input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.cfms-radio-option input[type="radio"]:checked + span {
    color: #3498db;
    font-weight: 600;
}

/* Buttons */
.cfms-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cfms-btn-primary {
    background: #3498db;
    color: #ffffff;
}

.cfms-btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.cfms-btn-secondary {
    background: #95a5a6;
    color: #ffffff;
}

.cfms-btn-secondary:hover {
    background: #7f8c8d;
}

.cfms-btn-success {
    background: #27ae60;
    color: #ffffff;
}

.cfms-btn-success:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.cfms-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    margin-left: 10px;
}

.cfms-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cfms-btn.verified {
    background: #27ae60;
    cursor: default;
}

/* Navigation */
.cfms-form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #ecf0f1;
}

/* OTP Section */
.cfms-otp-section {
    background: #e8f4f8;
    padding: 25px;
    border-radius: 8px;
    margin-top: 20px;
    border: 2px solid #3498db;
}

/* Messages */
.cfms-form-message {
    margin-top: 25px;
}

.cfms-alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.cfms-alert h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.cfms-alert p {
    margin: 5px 0;
}

.cfms-alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.cfms-alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.cfms-alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Loan Application Specific */
.cfms-cooperator-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #3498db;
}

.cfms-cooperator-info h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
}

.cfms-cooperator-info .info-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.cfms-cooperator-info .info-row:last-child {
    border-bottom: none;
}

.cfms-cooperator-info .info-label {
    font-weight: 600;
    color: #7f8c8d;
    width: 150px;
}

.cfms-cooperator-info .info-value {
    color: #2c3e50;
    font-weight: 500;
}

.cfms-guarantor-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.cfms-guarantor-section h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 18px;
}

.cfms-guarantor-status {
    margin-top: 10px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .cfms-form-container {
        padding: 25px 20px;
    }
    
    .cfms-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .cfms-progress-bar {
        padding: 0;
    }
    
    .cfms-progress-step .step-label {
        font-size: 11px;
    }
    
    .cfms-form-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .cfms-btn {
        width: 100%;
    }
}

/* Error State */
.cfms-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
}

/* reCAPTCHA Container */
.g-recaptcha {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* Login and Forgot Password Styles */
.cfms-login-wrapper {
    max-width: 500px;
    margin: 40px auto;
    padding: 0 15px;
}

.cfms-login-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 40px;
}

.cfms-login-title {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.cfms-login-subtitle {
    color: #7f8c8d;
    font-size: 14px;
    text-align: center;
    margin-bottom: 30px;
}

.cfms-login-step {
    display: block;
}

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

.cfms-form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.cfms-form-group input[type="text"],
.cfms-form-group input[type="email"],
.cfms-form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.cfms-form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.cfms-password-wrapper {
    position: relative;
}

.cfms-password-wrapper input {
    padding-right: 45px;
}

.cfms-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    user-select: none;
}

.cfms-toggle-password:hover {
    opacity: 0.7;
}

.cfms-field-help {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
}

.cfms-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.cfms-btn-primary {
    background: #3498db;
    color: #ffffff;
}

.cfms-btn-primary:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.cfms-btn-primary:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.cfms-btn-block {
    width: 100%;
    display: block;
}

.btn-spinner {
    display: inline-block;
}

.cfms-form-message {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.cfms-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cfms-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.cfms-form-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.cfms-form-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.cfms-login-footer {
    margin-top: 20px;
    text-align: center;
}

.cfms-forgot-password-link,
.cfms-back-to-login {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

.cfms-forgot-password-link:hover,
.cfms-back-to-login:hover {
    color: #2980b9;
    text-decoration: underline;
}

.cfms-otp-info {
    background: #e8f4f8;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.cfms-otp-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #2c3e50;
}

.cfms-otp-info small {
    color: #7f8c8d;
}

/* Responsive */
@media (max-width: 768px) {
    .cfms-login-wrapper {
        margin: 20px auto;
    }
    
    .cfms-login-container {
        padding: 30px 20px;
    }
    
    .cfms-login-title {
        font-size: 24px;
    }
}

/* Dashboard Styles (keep existing) */
.cfms-dashboard {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cfms-dashboard h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

/* Dashboard Header with Logout Button */
.cfms-dashboard-header,
.cfms-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.cfms-dashboard-title h2,
.cfms-admin-title h1 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.cfms-dashboard-welcome {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
}

.cfms-admin-title p {
    margin: 5px 0 0 0;
    color: #7f8c8d;
    font-size: 14px;
}

.cfms-dashboard-actions,
.cfms-admin-actions {
    display: flex;
    align-items: center;
}

/* Logout Button */
.cfms-btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #e74c3c;
    color: #ffffff !important;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.2);
}

.cfms-btn-logout:hover {
    background: #c0392b;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
    transform: translateY(-1px);
}

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

.logout-icon {
    font-size: 16px;
}

/* Dashboard Content */
.cfms-dashboard-content {
    margin-top: 20px;
}

/* Admin Dashboard Specific Styles */
.cfms-admin-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cfms-dashboard-header,
    .cfms-admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .cfms-dashboard-actions,
    .cfms-admin-actions {
        width: 100%;
    }
    
    .cfms-btn-logout,
    .cfms-btn-menu {
        width: 100%;
        justify-content: center;
    }
}

/* Menu Button Styles */
.cfms-btn-menu {
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cfms-btn-menu:hover {
    background: #218838;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.menu-icon {
    font-size: 16px;
}

/* Space between Menu and Logout buttons */
.cfms-dashboard-actions,
.cfms-admin-actions {
    display: flex;
    gap: 10px;
}

/* Age Badge Styles */
.cfms-age-badge {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
    display: inline-block;
    vertical-align: middle;
}

/* Age Error Input Styling */
input.error {
    border-color: #dc3545 !important;
    background-color: #fff5f5;
}

