/* =============================================
   AUTH FORMS - Login & Register Shared Styles
============================================= */

.ph-login-wrapper,
.ph-register-wrapper {
    width: 100%;
    max-width: 520px;
    margin: 40px auto;
    padding: 0 20px;
}

.ph-auth-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.ph-register-wrapper .ph-auth-card {
    max-width: 600px;
}

/* Typography */
.ph-auth-card h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-align: center;
    color: #111827;
}

.ph-auth-subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 16px;
    margin: 0 0 32px 0;
}

.ph-auth-footer {
    text-align: center;
    font-size: 14px;
    color: #6b7280;
    margin: 24px 0 0 0;
}

.ph-auth-footer a {
    color: #B8860B;
    text-decoration: none;
    font-weight: 600;
}

.ph-auth-footer a:hover {
    text-decoration: underline;
    color: #996515;
}

/* Messages */
.ph-auth-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.ph-msg-success {
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
}

.ph-msg-error {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

/* Form Grid */
.ph-auth-card .ph-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Form Fields */
.ph-auth-card .ph-form-field {
    margin-bottom: 20px;
}

.ph-auth-card label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 6px;
}

.ph-auth-card label .required {
    color: #ef4444;
    margin-left: 2px;
}

.ph-auth-card input[type="text"],
.ph-auth-card input[type="email"],
.ph-auth-card input[type="password"],
.ph-auth-card input[type="file"],
.ph-auth-card select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    background: #ffffff;
    color: #111827;
    transition: all 0.2s ease;
    box-sizing: border-box;
    outline: none;
}

.ph-auth-card input[type="text"]:focus,
.ph-auth-card input[type="email"]:focus,
.ph-auth-card input[type="password"]:focus,
.ph-auth-card select:focus {
    border-color: #FFD230;
    box-shadow: 0 0 0 3px rgba(255, 210, 48, 0.2);
}

.ph-auth-card input.ph-error {
    border-color: #ef4444;
}

.ph-field-error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 4px;
    display: none;
}

.ph-field-error.ph-visible {
    display: block;
}

/* Role Selector */
.ph-role-selector {
    display: flex;
    gap: 16px;
}

.ph-role-option {
    flex: 1;
    position: relative;
}

.ph-role-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ph-role-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    text-align: center;
    transition: all 0.2s ease;
    background: #ffffff;
}

.ph-role-label:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.ph-role-option input[type="radio"]:checked + .ph-role-label {
    border-color: #FFD230;
    background: #FFF8E1;
    color: #8B6914;
}

/* Photo Upload */
.ph-auth-card .ph-photo-preview {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ph-auth-card .ph-photo-preview img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
}

/* Submit Button */
.ph-auth-submit {
    width: 100%;
    background: #FFD230;
    color: #111827;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.ph-auth-submit:hover {
    background: #E6BC00;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 210, 48, 0.4);
}

.ph-auth-submit.ph-loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

/* Login Options Row */
.ph-login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.ph-remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

.ph-remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.ph-forgot-password {
    color: #B8860B;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
}

.ph-forgot-password:hover {
    text-decoration: underline;
    color: #996515;
}

/* Already Logged In */
.ph-auth-logged-in {
    text-align: center;
    padding: 40px 20px;
}

.ph-auth-logged-in p {
    font-size: 16px;
    color: #374151;
    margin: 0 0 16px 0;
}

.ph-auth-logged-in a {
    color: #B8860B;
    font-weight: 600;
    text-decoration: none;
}

.ph-auth-logged-in a:hover {
    text-decoration: underline;
    color: #996515;
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 768px) {
    .ph-login-wrapper,
    .ph-register-wrapper {
        margin: 20px auto;
        padding: 0 16px;
    }

    .ph-auth-card {
        padding: 28px 24px;
    }

    .ph-auth-card h2 {
        font-size: 26px;
    }

    .ph-auth-card .ph-form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .ph-role-selector {
        flex-direction: column;
        gap: 12px;
    }

    .ph-login-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .ph-auth-card {
        padding: 24px 20px;
    }

    .ph-auth-card h2 {
        font-size: 24px;
    }

    .ph-auth-subtitle {
        font-size: 14px;
    }
}

/* =============================================
   ELEMENTOR COMPATIBILITY
============================================= */
.ph-login-wrapper button.ph-auth-submit,
.ph-register-wrapper button.ph-auth-submit {
    background: #FFD230;
    color: #111827;
    border: none;
    cursor: pointer;
}
.ph-login-wrapper button.ph-auth-submit:hover,
.ph-register-wrapper button.ph-auth-submit:hover {
    background: #E6BC00;
    color: #111827;
}
.ph-login-wrapper .ph-auth-card input[type="text"],
.ph-login-wrapper .ph-auth-card input[type="email"],
.ph-login-wrapper .ph-auth-card input[type="password"],
.ph-register-wrapper .ph-auth-card input[type="text"],
.ph-register-wrapper .ph-auth-card input[type="email"],
.ph-register-wrapper .ph-auth-card input[type="password"] {
    border: 2px solid #e5e7eb;
    background: #ffffff;
    color: #111827;
}
.ph-login-wrapper a,
.ph-register-wrapper a {
    color: #B8860B;
    text-decoration: none;
}
.ph-login-wrapper a:hover,
.ph-register-wrapper a:hover {
    color: #996515;
}
.ph-login-wrapper a.ph-forgot-password,
.ph-register-wrapper a.ph-forgot-password {
    color: #B8860B;
}
