/* صفحة إنشاء الحساب: حقول بتحقق لحظي، كود الدولة بالعلم، وفحص اسم صفحة الدخول، وإظهار/إخفاء كلمة المرور */
.field .req { color: #dc2626; font-weight: 800; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.6; }
.field .err { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; font-weight: 600; color: #dc2626; }
.field .err[hidden] { display: none; }
.field .err::before { content: "!"; flex: none; width: 17px; height: 17px; border-radius: 50%; background: #dc2626; color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; line-height: 1; }
.field.invalid input, .field.invalid .cc-btn { border-color: #dc2626 !important; background: #fff7f7; }
.field.invalid input:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }
.field.valid > input, .field.valid .phone-row input, .field.valid .pw-wrap input, .field.valid .slug-row { border-color: #16a34a; }

/* الموبايل + كود الدولة */
.phone-row { display: flex; align-items: stretch; gap: 0; }
.phone-row > input { border-start-start-radius: 0; border-end-start-radius: 0; flex: 1; min-width: 0; text-align: left; }
.cc { position: relative; flex: none; }
.cc-btn { height: 48px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 1.5px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; background: #fff; font: inherit; cursor: pointer; color: var(--ink); }
.cc-btn:hover, .cc-btn[aria-expanded="true"] { background: #f8fafc; border-color: var(--brand); }
.cc-btn .fi { width: 26px; height: 19px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); background-size: cover; }
.cc-btn b { font-size: 15px; letter-spacing: .2px; } .cc-btn .bi { font-size: 11px; color: var(--muted); }
.cc-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; width: min(340px, 86vw); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(15, 23, 42, .18); overflow: hidden; }
.cc-menu[hidden] { display: none; }
.cc-search { padding: 10px; border-bottom: 1px solid var(--line); } .cc-search input { height: 40px !important; }
#ccList { list-style: none; margin: 0; padding: 4px; max-height: 280px; overflow: auto; }
#ccList li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 14.5px; direction: ltr; }
#ccList li .fi { width: 24px; height: 18px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); background-size: cover; flex: none; }
#ccList li .nm { flex: 1; direction: auto; unicode-bidi: plaintext; text-align: start; } #ccList li .dl { color: var(--muted); font-weight: 700; font-size: 13.5px; }
#ccList li:hover, #ccList li.active { background: #eff6ff; } #ccList li[aria-selected="true"] { background: color-mix(in srgb, var(--brand) 12%, #fff); font-weight: 700; }
#ccList li[hidden] { display: none; }
html.js .cc-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
html:not(.js) .cc-btn { display: none; } html:not(.js) .cc-native { height: 48px; border: 1.5px solid var(--line); border-radius: 10px 0 0 10px; border-right: 0; background: #fff; font: inherit; }

/* اسم صفحة الدخول */
.slug-row { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.slug-row:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.slug-row .pre { padding: 0 4px 0 12px; color: var(--muted); font-size: 14px; white-space: nowrap; background: #f8fafc; align-self: stretch; display: flex; align-items: center; border-right: 1.5px solid var(--line); padding-right: 10px; }
.slug-row input { border: 0 !important; box-shadow: none !important; flex: 1; min-width: 0; background: transparent !important; text-align: left; }
.slug-row .st { flex: none; width: 34px; text-align: center; font-size: 17px; }
.slug-row .st.ok { color: #16a34a; } .slug-row .st.bad { color: #dc2626; } .slug-row .st.wait::after { content: ""; display: inline-block; width: 15px; height: 15px; border: 2px solid #cbd5e1; border-top-color: var(--brand); border-radius: 50%; animation: suSpin .7s linear infinite; vertical-align: middle; }
.field.invalid .slug-row { border-color: #dc2626; background: #fff7f7; }

/* كلمة المرور */
.pw-wrap { position: relative; } .pw-wrap input { padding-inline-end: 46px; }
.pw-toggle { position: absolute; inset-block: 0; inset-inline-end: 4px; width: 42px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; border-radius: 8px; }
.pw-toggle:hover { color: var(--brand); }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 8px; } .meter i { height: 5px; border-radius: 99px; background: #e5e7eb; transition: background .2s; }
.meter[data-score="1"] i:nth-child(-n+1) { background: #ef4444; } .meter[data-score="2"] i:nth-child(-n+2) { background: #f59e0b; } .meter[data-score="3"] i:nth-child(-n+3) { background: #84cc16; } .meter[data-score="4"] i { background: #16a34a; }

/* زر الإرسال */
#signup-btn { position: relative; margin-top: 6px; } #signup-btn .spin { display: none; width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: suSpin .7s linear infinite; margin-inline-start: 10px; vertical-align: middle; }
#signup-btn.busy { pointer-events: none; opacity: .85; } #signup-btn.busy .spin { display: inline-block; }
@keyframes suSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .slug-row .st.wait::after, #signup-btn .spin { animation-duration: 1.6s; } }
