/* ============================================
   ROOT VARIABLES (YOUR PROVIDED THEME)
============================================ */
:root {
    --primary-glow: #007aff;
    /* أزرق حيوي للمسات التفاعلية */
    --accent-gold: #d4af37;
    /* ذهبي خفيف للعقارات المميزة (Premium) */
    --bg-main: #fafafa;
    /* بطاقات بيضاء ناصعة */
    --bg-card: #ffff;
    /* خلفية فاتحة مريحة */
    --text-main: #1a1a1b;
    /* نصوص واضحة جداً */
    --text-muted: #666666;
    --glass-border: rgba(0, 122, 255, 0.1);
    --blue-bg: rgba(0, 122, 255, 0.08);
    --text-black: #000;
    --transition: ease all 0.3s;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --warning-color: #ff9800;
}

body[data-theme="dark"] {
    --primary-glow: #007aff;
    --accent-gold: #e6c766;
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --glass-border: rgba(77, 163, 255, 0.15);
    --blue-bg: rgba(77, 163, 255, 0.12);
    --text-black: #fff;
    --border-color: #334155;
}

/* ============================================
   GENERAL STYLES
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Poppins', sans-serif;
    background: var(--bg-main);
    min-height: 100vh;
    padding: 2rem 1rem;
    direction: rtl;
    transition: var(--transition);
}

/* ============================================
   AUTH CONTAINER
============================================ */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
    padding: 20px;
    transition: background 0.3s ease;
}

.auth-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   AUTH HEADER
============================================ */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #53afff, #3a8fd4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 24px;
    transition: var(--transition);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.logo-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.logo-image {
    max-width: 250px;
    overflow: hidden;
    border-radius: 10px;
}

    .logo-image img {
        width: 100%;
        transition: transform 0.3s ease;
    }

        .logo-image img:hover {
            transform: scale(1.05);
        }

/* ============================================
   TAB NAVIGATION
============================================ */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    transition: 0.3s ease;
}

.auth-tab {
    flex: 1;
    padding: 15px 20px;
    text-align: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: "Poppins", sans-serif;
}

    .auth-tab:hover {
        color: var(--primary-glow);
    }

    .auth-tab.active {
        color: var(--primary-glow);
        position: relative;
    }

        .auth-tab.active::after {
            content: "";
            position: absolute;
            bottom: 0;
            height: 3px;
            border-radius: 20px;
            width: 100%;
            background-color: var(--primary-glow);
        }

/* ============================================
   STEPS INDICATOR
============================================ */
.signup-steps {
    margin-bottom: 3rem;
    color: var(--text-black);
}

.single-step {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 30px;
    background: var(--bg-main);
    color: var(--text-muted);
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .single-step.active {
        background-color: var(--primary-glow);
        color: white;
        transform: scale(1.05);
    }

.steps-icon {
    transform: rotateY(180deg);
    font-size: 2rem;
    color: var(--primary-glow);
    position: relative;
    display: block;
}

/* ============================================
   FORM STYLES
============================================ */
.auth-form {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-black);
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    background-color: #fff;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    color: var(--text-dark);
    font-size: 14px;
    font-family: "Poppins", sans-serif;
    transition: var(--transition);
}

body[data-theme="dark"] .form-input {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-main);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-glow);
    box-shadow: 0 0 0 3px rgba(83, 175, 255, 0.15);
    background-color: #ffffff;
}

.form-input.is-invalid {
    border-color: var(--danger-color);
}

/* Password Group Styles */
.password-group {
    position: relative;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-input {
    padding-right: 15px;
    padding-left: 45px !important;
}

.toggle-password {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
    padding: 5px;
    transition: var(--transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .toggle-password:hover {
        color: var(--primary-glow);
    }

/* ============================================
   UPLOAD CARDS (NEW - FOR IMAGES)
============================================ */
.upload-card {
    background: var(--bg-main);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

    .upload-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

.card-icon {
    font-size: 3rem;
    color: var(--primary-glow);
    margin-bottom: 1rem;
}

.preview-box {
    width: 100%;
    height: 200px;
    background: var(--bg-card);
    border-radius: 12px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px dashed var(--border-color);
    position: relative;
}

    .preview-box img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.file-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-glow);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

    .file-label:hover {
        transform: translateY(-2px);
        opacity: 0.9;
    }

input[type="file"] {
    display: none;
}

/* ============================================
   CAMERA SECTION (NEW)
============================================ */
.camera-section {
    background: var(--bg-main);
    border-radius: 20px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
}

.camera-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.camera-badge {
    background: var(--primary-glow);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
}

.camera-preview-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .camera-preview-area {
        grid-template-columns: 1fr;
    }
}

.video-container {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

#cameraVideo {
    width: 100%;
    height: auto;
    background: #000;
}

.camera-controls {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    justify-content: center;
}

.cam-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-glow);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .cam-btn:hover {
        transform: translateY(-2px);
        opacity: 0.9;
    }

.captured-selfie {
    text-align: center;
}

.selfie-preview-box {
    width: 100%;
    background: var(--bg-card);
    border-radius: 12px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px dashed var(--border-color);
}

    .selfie-preview-box img {
        max-width: 100%;
        max-height: 100%;
    }

.small-btn {
    padding: 0.5rem 1rem;
    background: var(--text-muted);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
}

    .small-btn:hover {
        background: var(--primary-glow);
        transform: translateY(-2px);
    }

/* ============================================
   STATUS BAR (NEW)
============================================ */
.verification-status {
    background: var(--bg-main);
    border-radius: 20px;
    padding: 1rem;
    margin: 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-around;
    border: 2px solid var(--border-color);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

    .status-item i {
        font-size: 1.2rem;
        color: var(--primary-glow);
    }

.d-none-status {
    display: none;
}

/* ============================================
   STEP CONTENT (NEW)
============================================ */
.step-content {
    display: none;
}

    .step-content.active-step {
        display: block;
        animation: fadeIn 0.3s ease;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   CHECKBOX & ICON TOGGLE
============================================ */
.form-checkbox-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

    .form-checkbox input[type="checkbox"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
        accent-color: var(--primary-glow);
    }

.icon-toggle {
    display: flex;
    gap: 10px;
    margin-right: auto;
}

/* ============================================
   BUTTONS
============================================ */
.btn-primary {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #53afff, #3a8fd4);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 20px;
    font-family: "Poppins", sans-serif;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(83, 175, 255, 0.3);
    }

    .btn-primary:active {
        transform: translateY(0);
    }

    .btn-primary:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

/* ============================================
   DIVIDER
============================================ */
.divider-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background-color: var(--text-muted);
    transition: background-color 0.3s ease;
}

.divider-text {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

/* ============================================
   SOCIAL LOGIN
============================================ */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    background-color: transparent;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-black);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: ease 0.2s all;
    font-family: "Poppins", sans-serif;
}

    .social-btn:hover {
        border-color: var(--primary-glow);
        background-color: rgba(83, 175, 255, 0.08);
        transform: translateY(-2px);
    }

    .social-btn i {
        font-size: 18px;
    }

/* ============================================
   FOOTER TEXT
============================================ */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

    .auth-footer a {
        color: var(--primary-glow);
        text-decoration: none;
        font-weight: 600;
        transition: var(--transition);
        cursor: pointer;
    }

        .auth-footer a:hover {
            text-decoration: underline;
        }

/* ============================================
   ALERT STYLES
============================================ */
.alert {
    position: fixed;
    top: 20px;
    left: 20px;
    right: auto;
    z-index: 9999;
    max-width: 400px;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    transition: var(--transition);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    color: #c92a2a;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid #28a745;
    color: #00cf29;
}

/* ============================================
   LOADING OVERLAY
============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 10000;
}

.spinner-custom {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-glow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 768px) {
    .auth-wrapper {
        padding: 1rem;
    }

    .verification-status {
        flex-direction: column;
    }

    .single-step {
        padding: 5px 12px;
        font-size: 12px;
    }

    .steps-icon {
        font-size: 1.2rem;
    }
}

/* ============================================
   UTILITIES
============================================ */
.text-danger {
    color: var(--danger-color);
}

.text-muted {
    color: var(--text-muted);
}

.w-100 {
    width: 100%;
}

.iti {
    width: 100%;
}
