/* users/assets/style.css - نسخة محسنة */

/* ========== المتغيرات ========== */
:root {
    --primary: #0da50d;
    --primary-dark: #0c960c;
    --secondary: #fcc316;
    --bg-general: #f2f3f6;
    --text-main: #1d1e20;
    --text-faded: #6d7081;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --border: #d8d9dd;
    --shadow: 0 6px 18px rgba(0,0,0,0.06);
    --radius: 14px;
}

/* ========== الهيكل الأساسي ========== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg-general);
    direction: rtl;
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

/* ========== بطاقة المستخدم ========== */
.user-card {
    max-width: 460px;
    margin: 40px auto;
    background: #fff;
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.user-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.card-header {
    text-align: center;
    margin-bottom: 28px;
}

.title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-faded);
    font-size: 14px;
}

/* ========== المجموعات والنماذج ========== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 14px;
}

/* ========== حقول الإدخال ========== */
.input-style {
    width: 100%;
    padding: 10px 9px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    background: #fff;
    transition: all 0.3s ease;
    color: var(--text-main);
    font-family: 'Cairo', sans-serif;
}

.input-style::placeholder {
    color: var(--text-faded);
    font-weight: 400;
}

.input-style:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 165, 13, 0.15);
    outline: none;
}

.input-error {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* ========== سطر رقم الهاتف ========== */
.phone-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.phone-input {
    flex: 1 1 auto;
}

.small-select {
    min-width: 120px;
    direction: ltr;
    text-align: left;
}

/* ========== كلمة المرور ========== */
.password-wrapper {
    position: relative;
}

.pass {
    direction: ltr !important;
    text-align: center;
    letter-spacing: 0.1em;
    padding-left: 45px !important;
    padding-right: 16px !important;
}

.show-pass {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-faded);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.show-pass:hover {
    color: var(--text-main);
    background: rgba(0,0,0,0.05);
}

/* ========== شريط قوة كلمة المرور ========== */
.strength-bar {
    width: 0;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    margin-top: 8px;
    transition: all 0.4s ease;
    position: relative;
}

.strength-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--danger), var(--warning), var(--success));
    opacity: 0.3;
    border-radius: 3px;
}

/* ========== الأزرار ========== */
.btn-primary {
    width: 100%;
    padding: 16px;
    border-radius: 10px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 165, 13, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-icon {
    position: relative;
    z-index: 2;
}

/* ========== الرسائل والتنبيهات ========== */
.alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.field-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ========== روابط المصادقة ========== */
.auth-links {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ========== صفحة التحقق ========== */
.verify-card {
    text-align: center;
}

.info-box {
    background: rgba(13, 165, 13, 0.05);
    border: 1px solid rgba(13, 165, 13, 0.2);
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.phone-display {
    font-family: monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 8px;
}

.resend-btn {
    background: none;
    border: none;
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    margin-top: 16px;
    font-size: 14px;
    transition: color 0.3s ease;
}

.resend-btn:hover {
    color: var(--primary-dark);
}

.resend-btn:disabled {
    color: var(--text-faded);
    cursor: not-allowed;
}

/* ========== Responsive ========== */
@media (max-width: 480px) {
    .user-card {
        margin: 20px;
        padding: 24px;
    }
    
    .phone-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .small-select {
        min-width: 100%;
    }
    
    .title {
        font-size: 20px;
    }
}

/* ========== تأثيرات الظهور ========== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== تحسينات reCAPTCHA ========== */
.g-recaptcha {
    transform: scale(0.9);
    transform-origin: right center;
}

@media (max-width: 480px) {
    .g-recaptcha {
        transform: scale(0.85);
    }
}

/* ========== تحسينات إضافية ========== */
.input-style:disabled {
    background: #f8f9fa;
    color: var(--text-faded);
    cursor: not-allowed;
}

/* إخفاء أسهم input number */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}


/* users/assets/style.css - إضافات للوظائف الجديدة */

/* ========== أنماط إضافية للصفحات الجديدة ========== */

/* زر التحميل */
.btn-loading {
    opacity: 0.8;
    cursor: not-allowed;
}

.btn-loading:hover {
    transform: none !important;
}

/* شريط قوة كلمة المرور المحسن */
.strength-bar {
    position: relative;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 3px;
    transition: all 0.4s ease;
}

.strength-weak { 
    background: var(--danger); 
    width: 25%; 
}
.strength-fair { 
    background: var(--warning); 
    width: 50%; 
}
.strength-good { 
    background: #ffb347; 
    width: 75%; 
}
.strength-strong { 
    background: var(--success); 
    width: 100%; 
}

/* مربع المعلومات */
.info-box {
    background: rgba(13, 165, 13, 0.05);
    border: 1px solid rgba(13, 165, 13, 0.2);
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

/* عرض رقم الهاتف */
.phone-display {
    font-family: monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin: 10px 0;
    direction: ltr;
    display: block;
}

/* معلومات المستخدم */
.user-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 25px;
    direction: ltr;
    font-weight: bold;
    color: var(--text-main);
}

/* زر إعادة الإرسال */
.resend-btn {
    background: var(--secondary);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.resend-btn:hover:not(:disabled) {
    background: #e0b015;
    transform: translateY(-2px);
}

.resend-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* المؤقت */
.timer-info {
    text-align: center;
    margin: 15px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-faded);
}

/* روابط المصادقة المحسنة */
.auth-links {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* إدخال رمز التحقق */
.code-input {
    direction: ltr !important;
    text-align: center;
    letter-spacing: 8px;
    font-size: 20px;
    font-weight: bold;
    padding: 12px;
}

/* خيارات تسجيل الدخول */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* مطالبة التسجيل */
.register-prompt {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 14px;
}

.register-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-right: 5px;
}

.register-link:hover {
    text-decoration: underline;
}

/* رابط العودة */
.back-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.back-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-link a:hover {
    text-decoration: underline;
}

/* إجراءات النجاح */
.success-actions {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.success-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.success-link:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    text-decoration: none;
}

/* متطلبات كلمة المرور */
.password-requirements {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 13px;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.requirement-met {
    color: var(--success);
}

.requirement-unmet {
    color: var(--text-faded);
}

/* رسالة التأكيد */
.confirm-message {
    font-size: 12px;
    margin-top: 5px;
    text-align: center;
}

/* تأثيرات التحميل */
.loading-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* تحسينات للاستجابة */
@media (max-width: 480px) {
    .login-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .code-input {
        font-size: 18px;
        letter-spacing: 6px;
        padding: 10px;
    }
    
    .phone-display {
        font-size: 16px;
    }
}