/* ============================================
   AUTH FORM - Inputs & Buttons
   ============================================ */

.auth-form {
    padding: 35px 35px 25px;
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

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

.form-group label i {
    margin-right: 10px;
    color: #ffc107;
    width: 18px;
    font-size: 14px;
}

.required {
    color: #dc3545;
    margin-left: 3px;
}

/* Account Role Selector - عمودي على الموبايل */
.user-type-selector {
    display: flex;
    gap: 15px;
    margin-top: 5px;
    flex-direction: row;
}

.type-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafbfc;
    position: relative;
}

.type-option:hover {
    border-color: #ffc107;
    background: #fff8e7;
}

.type-option.active {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fff8e7, #fff3cd);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.type-option i:first-child {
    font-size: 28px;
    width: 40px;
    text-align: center;
}

/* Client Role Icon */
.type-option[data-role="client"] i:first-child {
    color: #ffc107;
}

/* Provider Role Icon */
.type-option[data-role="provider"] i:first-child {
    color: #17a2b8;
}

.type-info {
    flex: 1;
}

.type-info strong {
    display: block;
    font-size: 14px;
    color: #1f2937;
}

.type-info small {
    font-size: 11px;
    color: #6b7280;
}

.check-mark {
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #28a745;
    font-size: 18px;
}

.type-option.active .check-mark {
    opacity: 1;
}

/* Responsive - عمودي على الموبايل */
@media (max-width: 768px) {
    .user-type-selector {
        flex-direction: column;
        gap: 12px;
    }
    
    .type-option {
        width: 100%;
    }
}

/* Input Fields */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafbfc;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ffc107;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.12);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #ffc107;
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
}

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

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 18px;
    transition: all 0.3s ease;
    padding: 5px;
}

.toggle-password:hover {
    color: #ffc107;
    transform: translateY(-50%) scale(1.1);
}

/* ============================================
   FORM OPTIONS - Remember Me & Forgot Password (FIXED)
   ============================================ */

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 25px;
    padding: 0;
    gap: 15px;
    flex-wrap: wrap;
    position: relative;
    min-height: 40px;
}

/* Remember Me Checkbox Styling - FIXED */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: #4b5563;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 28px;
    line-height: 1.4;
    min-height: 20px;
}

/* Hide default checkbox */
.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

/* Custom checkbox - FIXED */
.checkbox-label .checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: #fafbfc;
    border: 2px solid #d1d5db;
    border-radius: 5px;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* Checkbox icon */
.checkbox-label .checkmark i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 11px;
    color: white;
    transition: transform 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Checkbox hover effect */
.checkbox-label:hover .checkmark {
    border-color: #ffc107;
    background: #fff8e7;
}

/* Checkbox checked state - FIXED (removed animation that causes jumping) */
.checkbox-label input[type="checkbox"]:checked ~ .checkmark {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    border-color: #ffc107;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkmark i {
    transform: translate(-50%, -50%) scale(1);
}

/* Checkbox focus effect */
.checkbox-label input[type="checkbox"]:focus ~ .checkmark {
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2);
    border-color: #ffc107;
}

/* Checkbox text */
.checkbox-label span:last-child {
    margin-left: 0;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-block;
}

.checkbox-label:hover span:last-child {
    color: #ffc107;
}

/* Forgot Password Link */
.forgot-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 40px;
    transition: all 0.3s ease;
    background: transparent;
    position: relative;
    overflow: hidden;
    line-height: 1.4;
}

.forgot-link i {
    font-size: 13px;
    transition: transform 0.3s ease;
    color: #9ca3af;
}

.forgot-link span {
    position: relative;
    z-index: 1;
}

/* Forgot link hover effect */
.forgot-link:hover {
    color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
    transform: translateX(3px);
}

.forgot-link:hover i {
    transform: translateX(-3px);
    color: #ffc107;
}

/* Forgot link active effect */
.forgot-link:active {
    transform: translateX(1px);
}

/* Subtle underline effect */
.forgot-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ffc107, #ffb300);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.forgot-link:hover::after {
    width: calc(100% - 24px);
}

/* Responsive Design for Form Options */
@media (max-width: 480px) {
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin: 15px 0 20px;
        min-height: auto;
    }
    
    .checkbox-label {
        font-size: 13px;
        padding-left: 26px;
        min-height: 18px;
    }
    
    .checkbox-label .checkmark {
        width: 16px;
        height: 16px;
    }
    
    .forgot-link {
        padding: 6px 0;
        font-size: 13px;
    }
    
    .forgot-link::after {
        bottom: 2px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .checkbox-label {
        color: #9ca3af;
    }
    
    .checkbox-label .checkmark {
        background: #374151;
        border-color: #4b5563;
    }
    
    .forgot-link {
        color: #9ca3af;
    }
}

/* Extra fix to prevent any jumping */
.checkbox-label input[type="checkbox"]:active ~ .checkmark {
    transform: translateY(-50%) scale(0.95);
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #ffc107, #ffb300);
    color: #0b1f3a;
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 193, 7, 0.35);
    background: linear-gradient(135deg, #ffb300, #e6a800);
}

.btn-submit:hover::before {
    left: 100%;
}

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

.btn-submit i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.btn-submit:hover i {
    transform: translateX(4px);
}

/* Footer Links */
.auth-footer {
    padding: 20px 35px 30px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    background: #fefefe;
}

.auth-footer p {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 10px;
}

.auth-footer a {
    color: #4b4b4c;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.auth-footer a:hover {
    color: #313131;
    gap: 12px;
}

/* Button Login */
.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #ffc107, #ffb300);
    color: #374151;
    text-decoration: none;
    border-radius: 40px;
    font-weight: 700;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
    gap: 12px;
    color: #1f2937;
}