:root {
    --brand-primary: #6A7650;
    --brand-primary-hover: #556040;
    --brand-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --error-color: #ef4444;
    --success-color: #10b981;
}

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    background-color: var(--brand-bg);
    margin: 0; padding: 40px 20px;
    color: var(--text-main);
    min-height: 100vh;
    display: flex; justify-content: center; align-items: center;
    background-image: radial-gradient(circle at 50% 0%, #eef1e8, var(--brand-bg) 60%);
}

.auth-wrapper {
    background: var(--card-bg);
    width: 100%; max-width: 850px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
    padding: 40px 50px;
}

@media (max-width: 768px) {
    .auth-wrapper { padding: 30px 20px; border-radius: 16px; }
}

.auth-header { text-align: center; margin-bottom: 30px; }
.auth-logo { margin-bottom: 15px; color: var(--brand-primary); font-size: 35px; }
.auth-header h1 { font-size: 26px; font-weight: 700; margin-bottom: 8px; color: var(--text-main); }
.auth-header p { font-size: 15px; color: var(--text-muted); margin-bottom: 0; }

/* 🟢 شريط الخطوات الاحترافي (Stepper) */
.stepper-container {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 40px; position: relative;
    max-width: 600px; margin-left: auto; margin-right: auto;
}
.stepper-line {
    position: absolute; top: 15px; left: 0; right: 0; height: 3px;
    background: #e2e8f0; z-index: 1;
}
.stepper-line-active {
    position: absolute; top: 15px; right: 0; height: 3px;
    background: var(--brand-primary); z-index: 2; transition: 0.4s ease;
    width: 0%; /* يتغير برمجياً */
}
.step-circle {
    width: 34px; height: 34px; border-radius: 50%;
    background: #fff; border: 3px solid #e2e8f0;
    display: flex; justify-content: center; align-items: center;
    font-weight: bold; color: var(--text-muted); font-size: 14px;
    position: relative; z-index: 3; transition: 0.4s ease;
}
.step-circle.active { border-color: var(--brand-primary); color: var(--brand-primary); }
.step-circle.completed { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }

/* الخطوات والفورم */
.wizard-step { display: none; animation: fadeIn 0.4s ease; }
.wizard-step.active { display: block; }

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

.step-title {
    font-size: 18px; font-weight: 700; color: var(--brand-primary);
    margin-bottom: 25px; display: flex; align-items: center; gap: 8px;
    border-bottom: 2px solid #f1f5f9; padding-bottom: 15px;
}

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; gap: 15px; } }

.form-group { position: relative; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #475569; font-size: 13px; }

.form-control {
    width: 100%; height: 50px; padding: 0 15px; border: 1px solid var(--border-color);
    border-radius: 12px; background: #f8fafc; font-family: inherit; font-size: 14px;
    color: var(--text-main); transition: 0.3s; box-sizing: border-box; outline: none;
}
.form-control:focus { border-color: var(--brand-primary); background: #fff; box-shadow: 0 0 0 3px rgba(106, 118, 80, 0.1); }

input[type="file"] { padding: 10px; cursor: pointer; }
input[type="file"]::file-selector-button {
    background: #e2e8f0; color: var(--text-main); border: none; padding: 6px 15px;
    border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 12px; font-weight: 600; margin-left: 10px; transition: 0.2s;
}
input[type="file"]::file-selector-button:hover { background: #cbd5e1; }

.error-msg { display: none; color: var(--error-color); font-size: 12px; margin-top: 6px; font-weight: 600; }

.otp-input { letter-spacing: 15px; font-size: 26px; font-weight: bold; text-align: center; color: var(--brand-primary); height: 65px; border-radius: 16px; }

.wizard-actions {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 35px; border-top: 1px solid #f1f5f9; padding-top: 25px;
}
.btn-next, .btn-submit {
    background: var(--brand-primary); color: white; border: none;
    padding: 14px 40px; border-radius: 12px; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: 8px;
}
.btn-next:hover, .btn-submit:hover { background: var(--brand-primary-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(106, 118, 80, 0.2); }
.btn-prev {
    background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1;
    padding: 14px 30px; border-radius: 12px; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: 0.3s;
}
.btn-prev:hover { background: #e2e8f0; }

.success-screen { text-align: center; padding: 20px 0; }
.success-icon { font-size: 80px; color: var(--success-color); margin-bottom: 20px; }
.btn-login { background: var(--brand-primary); color: white; padding: 14px 35px; border-radius: 12px; font-weight: bold; text-decoration: none; display: inline-block; margin-top: 25px; }

.iti { width: 100%; direction: ltr; }
.iti__selected-flag { border-radius: 12px 0 0 12px; }
.iti__country-list { direction: ltr; text-align: left; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); border: 1px solid #e2e8f0; }
.form-control.iti__tel-input { direction: ltr; text-align: left; }

.terms-box { background: #f8fafc; border: 1px solid #e2e8f0; padding: 25px; border-radius: 16px; font-size: 14px; line-height: 1.8; color: #475569; height: 260px; overflow-y: auto; margin-bottom: 20px; }
.terms-box h4 { margin-top: 0; color: var(--brand-primary); font-size: 16px; }
.checkbox-container { display: flex; align-items: center; gap: 10px; background: #fff; padding: 15px; border: 1px solid #e2e8f0; border-radius: 12px; cursor: pointer; }
.checkbox-container input { width: 20px; height: 20px; accent-color: var(--brand-primary); cursor: pointer; }