﻿:root {
    --primary: #203F80; /* لون الزر */
    --title: #0b1426; /* عنوان */
    --muted: #6b7280; /* نص ثانوي */
    --field-border: #e6e9ee; /* حدود الحقل */
    --field-bg: #ffffff; /* خلفية الحقل */
    --panel-bg: #fff; /* خلفية عامة */
    --panel-shadow: 0 12px 28px rgba(0,0,0,.06);
    --radius: 14px;
}

/* اتجاه يمين لصفحة عربية */
.auth-rtl {
    direction: rtl;
    display: grid;
    place-items: center;
    padding: 32px 16px;
}

/* كارت النموذج */
.auth-card {
    width: min(480px, 92vw);
    background: var(--panel-bg);
    box-shadow: var(--panel-shadow);
    border-radius: 20px;
    border:0.5px solid #e6e9ee;
    padding: 28px 22px;
    text-align: center;
    z-index:100;
}

/* العنوان والوصف */
.auth-title {
    margin: 0 0 8px;
    color: var(--title);
    font-weight: 800;
    font-size: 1.5rem;
}

.auth-subtitle {
    margin: 0 0 18px;
    color: #8b98a8;
    font-size: .95rem;
    line-height: 1.8;
}

/* الحقول */
.auth-field {
    margin-bottom: 12px;
}

    .auth-field input {
        width: 100%;
        height: 56px;
        background: var(--field-bg);
        border: 1px solid var(--field-border);
        border-radius: var(--radius);
        padding-inline: 16px;
        font-size: 1rem;
        color: #111827;
        text-align: right;
    }

        .auth-field input::placeholder {
            color: #a0a8b3;
        }

        .auth-field input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(45,108,223,.12);
        }

/* الشروط */
.auth-terms {
    margin: 6px 0 16px;
    color: #4b5563;
    font-size: .9rem;
}

    .auth-terms a {
        color: var(--primary);
        font-weight: 700;
        text-decoration: none;
    }

/* الزر */
.auth-btn {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    cursor: pointer;
    transition: transform .05s ease, filter .2s ease;
}

    .auth-btn:hover {
        filter: brightness(.96);
    }

    .auth-btn:active {
        transform: translateY(1px);
    }

/* الفوتر */
.auth-footer {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: .95rem;
}

    .auth-footer a {
        color: var(--primary);
        font-weight: 700;
        text-decoration: none;
    }

/* موبايل */
@media (max-width:360px) {
    .auth-card {
        padding: 24px 16px;
    }

    .auth-title {
        font-size: 1.35rem;
    }
}
/* إضافات للّوجين */
.flex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0 16px;
}

.chk {
    color: #374151;
    font-size: .95rem;
    display: flex;
    gap: 8px;
    align-items: center;
}

.link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.pw-toggle {
    position: absolute;
    inset-inline-start: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 1rem;
    opacity: .6;
}

    .pw-toggle:hover {
        opacity: 1;
    }

.text-danger {
    color: #e11d48;
}

/* Dropdown مفتاح الدولة */
.country-code-dropdown {
    position: relative;
}

#countryCodeBtn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 15px;
    border: 1px solid var(--field-border);
    border-radius: var(--radius);
    background: var(--field-bg);
    cursor: pointer;
    font-size: 14px;
    min-width: 100px;
    justify-content: center;
    transition: all 0.2s ease;
    height: 56px;
}

#countryCodeBtn:hover {
    border-color: var(--primary);
}

#countryCodeBtn:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45,108,223,.12);
}

.country-code-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; /* على اليسار لأن dropdown على اليسار */
    background: white;
    border: 1px solid var(--field-border);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    min-width: 200px;
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.country-code-dropdown-menu.show {
    display: block;
}

.country-code-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align:left;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.country-code-item:hover {
    background: #f5f5f5;
}

.country-code-item.selected {
    background: #f0f4ff;
    font-weight: 600;
}

.country-flag {
    font-size: 20px;
}

.country-name {
    flex: 1;
    text-align: right;
    color: #333;
}

.country-code {
    font-weight: 600;
    color: #666;
}

/* Mobile field container */
.mobile-field-container {
    display: flex;
    gap: 8px;
    align-items: stretch;
    flex-direction: row; /* للعربية: dropdown على اليسار */
}

.mobile-field-container input {
    flex: 1;
}

/* تقييد الإدخال لأرقام فقط */
.mobile-field-container input[type="tel"] {
    -moz-appearance: textfield; /* Firefox */
}

.mobile-field-container input[type="tel"]::-webkit-outer-spin-button,
.mobile-field-container input[type="tel"]::-webkit-inner-spin-button {
    -webkit-appearance: none; /* Chrome, Safari */
    margin: 0;
}