/* =====================================================================
   وريد — صفحة الدخول والتسجيل (نفس هوية شاشة الدخول في التطبيق: luxury blue + gold)
   ===================================================================== */
:root {
    color-scheme: dark;
    --page-top: #123F82;
    --page-mid: #08285F;
    --page-bottom: #06163E;
    --card-top: #082B69;
    --card-bottom: #031039;
    --card-border: #89B7DE;
    --field-bg: #020C2B;
    --field-border: #A7C4DB;
    --field-focus: #3FD7EA;
    --chip-top: #174B86;
    --chip-bottom: #071936;
    --chip-border: #86B9DE;
    --chip-icon: #BDEBFF;
    --text: #FFFFFF;
    --text-soft: #AFC3DC;
    --text-muted: #8FA4BF;
    --text-faint: #64748B;
    --primary: #5ACDFF;
    --primary-deep: #174F91;
    --gold-top: #FFD36B;
    --gold-mid: #E79408;
    --gold-bottom: #9F5300;
    --gold-text: #FFF6DA;
    --gold-link: #FFC34D;
    --social-bg: #132A50;
    --social-border: #8EAFC9;
    --success: #34D399;
    --danger: #FF5C6C;
    --warning: #FFC34D;
    --radius-card: 28px;
    --radius-field: 17px;
    --shadow-card: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 22px rgba(28, 111, 208, 0.22);
    --font: "Tajawal", "Cairo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--font);
    color: var(--text);
    background-color: var(--page-bottom);
    background-image:
        radial-gradient(circle at 50% -8%, rgba(90, 205, 255, 0.20), transparent 55%),
        radial-gradient(circle at 12% 110%, rgba(23, 79, 145, 0.35), transparent 50%),
        linear-gradient(180deg, var(--page-top) 0%, var(--page-mid) 55%, var(--page-bottom) 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--field-focus); outline-offset: 2px; }

.ic { width: 1.15em; height: 1.15em; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic-fill { fill: currentColor; stroke: none; }
[dir="ltr"] .ic-flip { transform: scaleX(-1); }

/* ------------------------------ شاشة البداية ------------------------------ */
.splash {
    position: fixed; inset: 0; z-index: 50;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    background:
        radial-gradient(circle at 50% 34%, rgba(90, 205, 255, 0.16), transparent 55%),
        linear-gradient(180deg, var(--page-top) 0%, var(--page-mid) 55%, var(--page-bottom) 100%);
    transition: opacity .45s ease, visibility .45s ease;
}
.splash.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-icon { width: 150px; height: 150px; }
.splash-word { font-size: 31px; font-weight: 800; letter-spacing: .6px; text-shadow: 0 0 10px rgba(100, 201, 255, .85); }
.splash-tag { color: var(--text-soft); font-size: 14px; font-weight: 600; letter-spacing: .4px; min-height: 1.4em; }
.splash-bar { width: 210px; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 8px; }
.splash-bar span { display: block; height: 100%; width: 40%; border-radius: inherit; background: linear-gradient(90deg, transparent, var(--primary), transparent); animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-120%); } to { transform: translateX(320%); } }
[dir="rtl"] .splash-bar span { animation-name: slide-rtl; }
@keyframes slide-rtl { from { transform: translateX(120%); } to { transform: translateX(-320%); } }

/* ------------------------------ أيقونة التطبيق ------------------------------ */
/* شعار وريد: القلب الشفاف نفسه اللي في شاشة دخول التطبيق (WareedAuthLogo) —
   من غير مربع، بهالة زرقا ناعمة وراه ونبضة قلب. */
.app-icon {
    position: relative; margin: 0 auto; isolation: isolate;
    animation: heartbeat 1.05s ease-in-out infinite;
}
.app-icon img {
    display: block; width: 100%; height: 100%; object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45)) drop-shadow(0 0 14px rgba(58, 142, 255, .45));
}
.app-icon::after {
    content: ""; position: absolute; inset: -8%; border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 182, 255, .33), rgba(19, 63, 130, 0) 68%); z-index: -1;
}
/* نبضة قلب حقيقية (lub-dub) — نفس توقيت WareedAuthLogo في التطبيق */
@keyframes heartbeat {
    0% { transform: scale(1); }
    12% { transform: scale(1.07); }
    22% { transform: scale(.98); }
    31% { transform: scale(1.04); }
    40%, 100% { transform: scale(1); }
}

/* ------------------------------ الهيكل ------------------------------ */
.stage {
    min-height: 100vh; min-height: 100dvh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 24px 16px calc(18px + env(safe-area-inset-bottom));
    gap: 18px;
}
.card {
    position: relative;
    width: min(440px, 100%);
    padding: 22px 22px 20px;
    border-radius: var(--radius-card);
    border: 1.4px solid var(--card-border);
    background: linear-gradient(180deg, var(--card-top) 0%, var(--card-bottom) 100%);
    box-shadow: var(--shadow-card);
    animation: rise .55s cubic-bezier(.2, .8, .2, 1);
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.card-top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.icon-btn {
    width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
    background: linear-gradient(135deg, #294F7B, #07152F); border: 1px solid #AAC9DF; color: #E5F4FF;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .45); transition: transform .15s ease;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn .ic { width: 22px; height: 22px; }
.lang-pill {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
    border-radius: 99px; border: 1px solid rgba(169, 201, 223, .75);
    background: linear-gradient(180deg, rgba(41, 79, 123, .9), rgba(7, 21, 47, .9));
    color: #E7F4FF; font-weight: 700; font-size: 13px; margin-inline-start: auto;
}
.lang-pill .ic { width: 16px; height: 16px; color: var(--primary); }

.brand { text-align: center; margin: 4px 0 10px; }
.brand .app-icon { width: 108px; height: 108px; }
.wordmark { margin-top: 4px; font-size: 29px; font-weight: 700; letter-spacing: .6px; text-shadow: 0 0 9px rgba(100, 201, 255, .9); font-family: "Cairo", var(--font); }
.brand.is-compact .app-icon { width: 74px; height: 74px; }
.brand.is-compact .wordmark { font-size: 22px; margin-top: 2px; }

.view { display: none; }
.view.is-active { display: block; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.title { margin: 6px 0 6px; text-align: center; font-size: 22px; font-weight: 800; letter-spacing: .2px; outline: none; }
.subtitle { margin: 0 0 18px; text-align: center; font-size: 13.5px; line-height: 1.6; color: var(--text-soft); }
.subtitle strong { color: var(--text); font-weight: 700; }
.ltr-inline { direction: ltr; unicode-bidi: isolate; }

/* ------------------------------ تبديل طريقة الدخول ------------------------------ */
.seg {
    display: flex; gap: 2px; padding: 4px; margin-bottom: 12px;
    border-radius: 18px; background: var(--field-bg); border: 1.4px solid var(--field-border);
    box-shadow: 0 5px 9px rgba(0, 0, 0, .5);
}
.seg button {
    flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 6px; border: 1.2px solid transparent; border-radius: 14px; background: transparent;
    color: var(--text-muted); font-size: 12.5px; font-weight: 700; white-space: nowrap; transition: background .2s, color .2s;
}
.seg button span { overflow: hidden; text-overflow: ellipsis; }
.seg button .ic { width: 14px; height: 14px; }
.seg button[aria-selected="true"] {
    color: #fff; border-color: #B9E6FA;
    background: linear-gradient(180deg, var(--primary) 0%, var(--card-top) 55%, #06234F 100%);
}

/* ------------------------------ الحقول ------------------------------ */
.field { position: relative; margin-bottom: 12px; }
.field-box {
    position: relative; display: flex; align-items: center;
    border-radius: var(--radius-field); background: var(--field-bg); border: 1.5px solid var(--field-border);
    transition: border-color .2s, box-shadow .2s;
}
.field-box:focus-within { border-color: var(--field-focus); box-shadow: 0 0 0 3px rgba(63, 215, 234, .16), 0 0 14px rgba(63, 215, 234, .22); }
.field.is-invalid .field-box { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 92, 108, .14); }
.field.is-valid .field-box { border-color: rgba(52, 211, 153, .85); }
.chip {
    flex-shrink: 0; width: 32px; height: 32px; margin-inline-start: 10px; border-radius: 10px;
    display: grid; place-items: center; color: var(--chip-icon);
    background: linear-gradient(135deg, var(--chip-top), var(--chip-bottom)); border: 1px solid var(--chip-border);
}
.chip .ic { width: 16px; height: 16px; }
.field-box:focus-within .chip { color: var(--field-focus); }
.field input, .field select, .field textarea {
    flex: 1; min-width: 0; width: 100%; height: 54px; padding: 0 12px; border: 0; outline: none; background: transparent;
    font-size: 15px; color: #fff;
}
.field textarea { height: auto; min-height: 110px; padding: 14px 12px; resize: vertical; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: #6F86A6; }
.field input[dir="ltr"] { text-align: start; }
[dir="rtl"] .field input[dir="ltr"]::placeholder { text-align: right; }
.field input[type="date"] { color-scheme: dark; }
.field input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 40px var(--field-bg) inset; caret-color: #fff; }
.reveal {
    flex-shrink: 0; width: 44px; height: 44px; margin-inline-end: 5px; border: 0; background: transparent;
    color: #94A3B8; display: grid; place-items: center; border-radius: 12px;
}
.reveal:hover { color: var(--field-focus); }
.caps {
    flex-shrink: 0; margin-inline-end: 4px; padding: 3px 7px; border-radius: 8px; font-size: 11px; font-weight: 800;
    color: #1d1300; background: var(--warning);
}
.field-msg { margin: 6px 6px 0; font-size: 12.5px; line-height: 1.5; color: var(--text-soft); }
.field-msg.is-error { color: var(--danger); font-weight: 600; }
.field-msg.is-ok { color: var(--success); font-weight: 600; }
.field-msg.is-warn { color: var(--warning); }
.field-label { display: block; margin: 0 6px 6px; font-size: 12.5px; font-weight: 700; color: var(--text-soft); }

.hint-chip {
    display: inline-flex; align-items: center; gap: 6px; margin: -4px 4px 10px; padding: 7px 12px;
    border-radius: 99px; border: 1px dashed rgba(90, 205, 255, .7); background: rgba(90, 205, 255, .08);
    color: #CBEFFF; font-size: 12.5px;
}
.hint-chip b { color: #fff; direction: ltr; unicode-bidi: isolate; }

.suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 4px 12px; }
.suggestions button {
    padding: 6px 12px; border-radius: 99px; border: 1px solid rgba(90, 205, 255, .6); background: rgba(90, 205, 255, .08);
    color: #BFEFFF; font-size: 12px; direction: ltr;
}

.shake { animation: shake .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }

/* ------------------------------ الأزرار ------------------------------ */
.btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 52px; padding: 0 18px; border-radius: 15px; border: 0; font-size: 16px; font-weight: 800;
    transition: transform .15s ease, filter .2s ease, box-shadow .2s ease; text-decoration: none; text-align: center;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { cursor: not-allowed; opacity: .6; }
.btn-block { width: 100%; }
.btn-gold {
    color: var(--gold-text); text-shadow: 0 1px 2px rgba(80, 40, 0, .55);
    background: linear-gradient(180deg, var(--gold-top) 0%, var(--gold-mid) 48%, var(--gold-bottom) 100%);
    box-shadow: 0 6px 14px rgba(255, 160, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-gold:hover:not(:disabled) { filter: brightness(1.06); }
.btn-blue { color: #fff; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%); box-shadow: 0 6px 16px rgba(23, 79, 145, .45); }
.btn-ghost { color: #E5F4FF; background: rgba(255, 255, 255, .04); border: 1.2px solid rgba(169, 201, 223, .6); }
.btn-ghost:hover:not(:disabled) { background: rgba(90, 205, 255, .08); }
.btn-danger { color: #FFE4E7; background: rgba(255, 92, 108, .12); border: 1.2px solid rgba(255, 92, 108, .6); }
.btn-small { min-height: 42px; font-size: 14px; border-radius: 13px; padding: 0 14px; }
.btn.is-loading { color: transparent !important; text-shadow: none; pointer-events: none; }
.btn.is-loading::after {
    content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite;
}
.btn-gold.is-loading::after { border-color: rgba(80, 40, 0, .3); border-top-color: #5A2E00; }
@keyframes spin { to { transform: rotate(360deg); } }

.action-row { display: flex; gap: 10px; align-items: stretch; margin-top: 4px; }
.action-row .btn-gold { flex: 1; }
.square-btn {
    flex-shrink: 0; width: 58px; border-radius: 15px; display: grid; place-items: center;
    background: linear-gradient(135deg, #385B80, #0A1832); border: 1.5px solid #BDD7E9; color: #DFF5FF;
    box-shadow: 0 5px 9px rgba(0, 0, 0, .45);
}
.square-btn .ic { width: 26px; height: 26px; filter: drop-shadow(0 0 5px #62CEFF); }

.link-row { display: flex; justify-content: flex-end; margin: -2px 2px 10px; }
.link-btn { border: 0; background: none; padding: 6px 2px; color: var(--text-muted); font-size: 12.5px; font-weight: 600; }
.link-btn:hover { color: var(--field-focus); }
.link-gold { color: var(--gold-link); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.link-gold:hover { color: #FFD98A; }

.divider { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; color: var(--text-faint); font-size: 13px; font-weight: 700; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .1); }

.socials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.social-btn {
    min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    border-radius: 16px; background: var(--social-bg); border: 1.2px solid var(--social-border);
    color: #fff; font-size: 11px; font-weight: 800; transition: transform .15s ease, background .2s;
}
.social-btn:hover:not(:disabled) { background: #183562; }
.social-btn:active:not(:disabled) { transform: scale(.96); }
.social-btn .ic { width: 22px; height: 22px; }
.social-btn.is-facebook span { color: #8DB9FF; }
.social-btn.is-loading { pointer-events: none; opacity: .7; }

.switch-line { margin: 16px 0 0; text-align: center; font-size: 14px; color: var(--text-muted); }
.switch-line button { border: 0; background: none; padding: 0 4px; font-size: 14px; }
.legal { margin: 12px 0 0; text-align: center; font-size: 12px; line-height: 1.9; color: var(--text-muted); }
.legal a { color: var(--primary); font-weight: 700; text-decoration: none; }
.legal a:hover { text-decoration: underline; }

/* ------------------------------ الحسابات المحفوظة ------------------------------ */
.accounts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; max-height: 360px; overflow-y: auto; padding: 2px; }
.acc {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px;
    background: rgba(2, 12, 43, .7); border: 1px solid rgba(137, 183, 222, .35); text-align: start; width: 100%;
    transition: border-color .2s, background .2s;
}
.acc:hover { border-color: var(--field-focus); background: rgba(8, 43, 105, .6); }
.acc-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 0; text-align: start; color: inherit; }
.avatar {
    flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
    background: linear-gradient(135deg, #1D4E8F, #0A1F47); border: 1.5px solid rgba(90, 205, 255, .7);
    font-weight: 800; font-size: 19px; color: #DFF5FF;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.is-large { width: 84px; height: 84px; font-size: 32px; margin: 0 auto 12px; box-shadow: 0 0 18px rgba(90, 205, 255, .35); }
.acc-meta { flex: 1; min-width: 0; }
.acc-name { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-name .badge { color: var(--primary); width: 15px; height: 15px; }
.acc-email { font-size: 12px; color: var(--text-muted); direction: ltr; text-align: end; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[dir="ltr"] .acc-email { text-align: start; }
.acc-more { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .05); color: var(--text-muted); display: grid; place-items: center; flex-shrink: 0; }
.acc-more:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.add-account { width: 100%; border-style: dashed; }

/* ------------------------------ القوة / المعايير ------------------------------ */
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: -2px 6px 8px; }
.strength i { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); transition: background .3s; }
.strength[data-level="1"] i:nth-child(-n+1) { background: var(--danger); }
.strength[data-level="2"] i:nth-child(-n+2) { background: var(--warning); }
.strength[data-level="3"] i:nth-child(-n+3) { background: #7DD3FC; }
.strength[data-level="4"] i { background: var(--success); }

.check { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 14px; padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .06); font-size: 13px; line-height: 1.7; color: var(--text-soft); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--primary); flex-shrink: 0; }
.check a { color: var(--primary); font-weight: 700; text-decoration: none; }

.genders { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.gender {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px;
    border-radius: 16px; border: 1.5px solid rgba(169, 201, 223, .45); background: rgba(2, 12, 43, .6); cursor: pointer;
    color: var(--text-soft); font-weight: 700; font-size: 14px; transition: all .2s;
}
.gender input { position: absolute; opacity: 0; pointer-events: none; }
.gender .ic { width: 24px; height: 24px; }
.gender:has(input:checked) { color: #fff; border-color: var(--field-focus); background: rgba(63, 215, 234, .1); box-shadow: 0 0 14px rgba(63, 215, 234, .2); }
.gender:has(input:focus-visible) { outline: 2px solid var(--field-focus); outline-offset: 2px; }

/* ------------------------------ حالات خاصة ------------------------------ */
.hero-icon {
    width: 76px; height: 76px; margin: 4px auto 12px; border-radius: 24px; display: grid; place-items: center;
    background: linear-gradient(135deg, rgba(90, 205, 255, .22), rgba(23, 79, 145, .25)); border: 1px solid rgba(90, 205, 255, .5);
    color: var(--primary); box-shadow: 0 0 24px rgba(90, 205, 255, .2);
}
.hero-icon .ic { width: 36px; height: 36px; }
.hero-icon.is-danger { color: var(--danger); background: rgba(255, 92, 108, .12); border-color: rgba(255, 92, 108, .5); box-shadow: 0 0 24px rgba(255, 92, 108, .18); }
.hero-icon.is-warn { color: var(--warning); background: rgba(255, 195, 77, .1); border-color: rgba(255, 195, 77, .5); }
.hero-icon.is-ok { color: var(--success); background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .5); }

.note {
    display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 12px 14px; border-radius: 14px;
    background: rgba(90, 205, 255, .07); border: 1px dashed rgba(90, 205, 255, .45); color: #CFEFFF; font-size: 13px; line-height: 1.7;
}
.note .ic { margin-top: 3px; color: var(--primary); }
.note.is-warn { background: rgba(255, 195, 77, .07); border-color: rgba(255, 195, 77, .5); color: #FFE7B3; }
.note.is-warn .ic { color: var(--warning); }
.note.is-danger { background: rgba(255, 92, 108, .08); border-color: rgba(255, 92, 108, .5); color: #FFD5DA; }
.note.is-danger .ic { color: var(--danger); }

.waiting { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 14px; font-size: 13px; color: var(--text-soft); }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 0 rgba(90, 205, 255, .6); animation: ping 1.4s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(90, 205, 255, .6); } 80%, 100% { box-shadow: 0 0 0 12px rgba(90, 205, 255, 0); } }

.otp-input { text-align: center !important; letter-spacing: 10px; font-size: 24px !important; font-weight: 800; direction: ltr; font-variant-numeric: tabular-nums; }

.stack { display: flex; flex-direction: column; gap: 10px; }
.stack-row { display: flex; gap: 10px; }
.stack-row > * { flex: 1; }

.timer-btn { display: block; width: 100%; margin-top: 12px; border: 0; background: none; color: var(--primary); font-weight: 700; font-size: 13.5px; padding: 8px; font-variant-numeric: tabular-nums; }
.timer-btn:disabled { color: var(--text-faint); cursor: not-allowed; }

.qr-box {
    width: min(250px, 72vw); aspect-ratio: 1; margin: 4px auto 12px; padding: 10px; border-radius: 22px; background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 4px rgba(90, 205, 255, .35); display: grid; place-items: center; position: relative;
}
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-box .qr-state { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 18px; border-radius: inherit; background: rgba(255, 255, 255, .94); color: #06163E; font-weight: 800; font-size: 14px; line-height: 1.6; }
.qr-steps { margin: 0 0 12px; padding-inline-start: 22px; color: var(--text-soft); font-size: 13px; line-height: 1.9; }
.qr-steps b { color: #fff; }
.qr-timer { text-align: center; color: var(--text-muted); font-size: 12.5px; margin-bottom: 12px; font-variant-numeric: tabular-nums; }

.info-rows { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: rgba(2, 12, 43, .6); border: 1px solid rgba(137, 183, 222, .25); font-size: 13px; line-height: 1.8; color: var(--text-soft); }
.info-rows div { display: flex; justify-content: space-between; gap: 12px; }
.info-rows b { color: #fff; text-align: end; overflow-wrap: anywhere; }

.ticket { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 14px; padding: 14px; border-radius: 16px; background: rgba(2, 12, 43, .7); border: 1px dashed var(--gold-link); font-size: 24px; font-weight: 800; letter-spacing: 4px; direction: ltr; color: var(--gold-link); }

.file-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 12px; }
.file-pick label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; border: 1px dashed rgba(169, 201, 223, .6); color: var(--text-soft); font-size: 12.5px; cursor: pointer; }
.file-pick .file-name { font-size: 12px; color: var(--text-muted); align-self: center; }

/* ------------------------------ النوافذ (dialog) ------------------------------ */
dialog.sheet {
    width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; background: transparent; color: var(--text); overflow: visible;
}
dialog.sheet::backdrop { background: rgba(1, 6, 20, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
dialog.sheet[open] { animation: pop .28s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.sheet-card {
    position: relative; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px 20px 20px; border-radius: 24px;
    border: 1.2px solid rgba(137, 183, 222, .8); background: linear-gradient(180deg, #0A2F70 0%, #041342 100%); box-shadow: var(--shadow-card);
}
.sheet-close { position: absolute; top: 12px; inset-inline-end: 12px; width: 38px; height: 38px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .06); color: var(--text-soft); display: grid; place-items: center; }
.sheet-close:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.sheet-title { margin: 2px 0 8px; text-align: center; font-size: 19px; font-weight: 800; }
.sheet-desc { margin: 0 0 16px; text-align: center; font-size: 13.5px; line-height: 1.7; color: var(--text-soft); }
.sheet-actions { display: flex; gap: 10px; margin-top: 6px; }
.sheet-actions .btn { flex: 1; }
.clock { text-align: center; font-size: 36px; font-weight: 800; color: var(--primary); margin: 6px 0 10px; font-variant-numeric: tabular-nums; direction: ltr; }

.lang-list { display: flex; flex-direction: column; gap: 8px; }
.lang-list button {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px;
    border: 1px solid rgba(137, 183, 222, .35); background: rgba(2, 12, 43, .6); font-weight: 700; font-size: 15px; color: #fff;
}
.lang-list button[aria-checked="true"] { border-color: var(--field-focus); background: rgba(63, 215, 234, .1); }
.lang-list button .ic { color: var(--field-focus); visibility: hidden; }
.lang-list button[aria-checked="true"] .ic { visibility: visible; }

.menu-list { display: flex; flex-direction: column; gap: 10px; }

#recaptchaBox { display: flex; justify-content: center; margin: 0 0 12px; min-height: 0; }

/* ------------------------------ Toast ------------------------------ */
.toast {
    position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 100; max-width: min(92vw, 460px);
    transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    padding: 12px 18px; border-radius: 16px; background: rgba(4, 14, 38, .96); border: 1px solid rgba(90, 205, 255, .6);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .5); color: #fff; font-size: 14px; font-weight: 600; line-height: 1.6; text-align: center;
    transition: opacity .3s ease, transform .3s ease;
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { border-color: rgba(255, 92, 108, .8); }
.toast.is-ok { border-color: rgba(52, 211, 153, .8); }

/* ------------------------------ تذييل الصفحة ------------------------------ */
.page-foot { width: min(440px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-faint); font-size: 12px; text-align: center; }
.get-app {
    display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 14px; text-decoration: none;
    background: rgba(2, 12, 43, .55); border: 1px solid rgba(137, 183, 222, .35); color: #DDEFFF; font-weight: 700; font-size: 13px;
}
.get-app:hover { border-color: var(--primary); }
.get-app img { width: 26px; height: 26px; border-radius: 7px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; }
.foot-links a { color: var(--text-muted); text-decoration: none; }
.foot-links a:hover { color: #fff; }

/* ------------------------------ شاشة الإيقاف/الصيانة ------------------------------ */
.blocker { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(180deg, var(--page-top), var(--page-bottom)); }
.blocker .card { text-align: center; }

@media (max-width: 420px) {
    .stage { padding-top: 14px; }
    .card { padding: 18px 16px 18px; border-radius: 24px; }
    .brand .app-icon { width: 96px; height: 96px; }
    .wordmark { font-size: 26px; }
    .seg button { font-size: 11.5px; gap: 4px; }
    .seg button .ic { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
