:root {
    --font-sans: "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
    --blue-950: #082f5f;
    --blue-900: #0b427a;
    --blue-800: #075fa8;
    --blue-700: #0877c9;
    --blue-100: #e8f5ff;
    --blue-50: #f4faff;
    --orange-600: #f26722;
    --orange-500: #ff7a1a;
    --green-600: #4aaa2b;
    --ink: #102d51;
    --muted: #61758d;
    --line: #dce8f3;
    --surface: #ffffff;
    --danger: #c43d3d;
    --danger-bg: #fff0f0;
    --success: #197a45;
    --success-bg: #eaf9f0;
    --shadow: 0 24px 70px rgba(16, 70, 118, .12);
    font-family: var(--font-sans);
    color-scheme: light;
}
* { box-sizing: border-box; }
html { background: #eef7fd; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 8% 2%, rgba(8,119,201,.13), transparent 24rem), linear-gradient(180deg, #f8fcff 0, #edf7fd 55%, #f8fbfd 100%); min-height: 100vh; overflow-x: hidden; font-family: var(--font-sans); font-feature-settings: "liga" 1, "calt" 1; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
.registration-header { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1240px; margin: 0 auto; padding: 14px 28px; }
.registration-brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.registration-brand img { object-fit: contain; }
.registration-brand span { display: grid; gap: 3px; }
.registration-brand strong { font-size: 1rem; color: var(--blue-900); overflow-wrap: anywhere; }
.registration-brand small { color: var(--orange-600); }
.registration-help { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; color: var(--muted); font-size: .9rem; }
.registration-help > a { color: var(--blue-800); font-size: 1.12rem; font-weight: 800; text-decoration: none; overflow-wrap: anywhere; }
.registration-help .language-switcher { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.registration-help .language-switcher a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-inline-size: 84px;
    block-size: 44px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--blue-900);
    border: 1px solid #d6e3ef;
    background: linear-gradient(180deg, #fff 0%, #f9fcff 100%);
    box-shadow: 0 6px 18px rgba(16,70,118,.08);
    font-size: .78rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .02em;
    text-decoration: none;
    transition: color .18s ease, transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.registration-help .language-switch-icon { display: inline-flex; width: 15px; height: 15px; flex: 0 0 auto; }
.registration-help .language-switch-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.registration-help .language-switcher a:hover,
.registration-help .language-switcher a:focus-visible { color: #fff; transform: none; background: var(--blue-700); border-color: var(--blue-700); box-shadow: 0 8px 18px rgba(8,119,189,.2); }
.registration-help .language-switcher a:focus-visible { outline: 3px solid rgba(13, 142, 209, .27); outline-offset: 3px; }
.registration-shell { width: min(1180px, calc(100% - 36px)); margin: 20px auto 70px; }
.registration-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin: 18px 10px 22px; }
.registration-kicker, .state-kicker { display: inline-flex; color: var(--orange-600); font-size: .82rem; font-weight: 800; letter-spacing: .02em; background: #fff3e9; border: 1px solid #ffd7b9; border-radius: 999px; padding: 7px 13px; }
.registration-intro h1 { margin: 10px 0 7px; font-size: clamp(1.7rem, 3vw, 2.55rem); color: var(--blue-950); overflow-wrap: anywhere; hyphens: auto; }
.registration-intro p { margin: 0; color: var(--muted); line-height: 1.8; }
.attempt-reference { min-width: 235px; display: grid; gap: 5px; background: rgba(255,255,255,.82); border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px; box-shadow: 0 9px 30px rgba(16,70,118,.07); }
.attempt-reference span, .attempt-reference small { color: var(--muted); font-size: .78rem; }
.attempt-reference strong { color: var(--blue-800); font-size: 1.05rem; letter-spacing: .04em; }
.wizard-card { background: var(--surface); border: 1px solid rgba(203,222,238,.88); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.wizard-progress { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 19px 30px; background: linear-gradient(100deg, var(--blue-950), var(--blue-700)); color: #fff; }
.wizard-progress > div:first-child { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.wizard-progress span { font-size: .8rem; opacity: .84; }
.wizard-progress strong { font-size: 1.22rem; }
.progress-track { height: 8px; border-radius: 999px; background: rgba(255,255,255,.2); overflow: hidden; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffb163, #fff); transition: width .3s ease; opacity: 1; }
.progress-value.progress-0 { width: 0; }
.progress-value.progress-20 { width: 20%; }
.progress-value.progress-40 { width: 40%; }
.progress-value.progress-60 { width: 60%; }
.progress-value.progress-80 { width: 80%; }
.progress-value.progress-100 { width: 100%; }
.autosave-status { min-width: 80px; text-align: start; }
.autosave-status.saving { color: #ffe5c8; }
.autosave-status.error { color: #ffd1d1; opacity: 1; }
.wizard-steps { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); background: #fbfdff; }
.wizard-steps > * { min-height: 89px; padding: 13px 7px; display: grid; place-content: center; justify-items: center; gap: 7px; text-decoration: none; border-left: 1px solid #edf3f8; color: #75879b; position: relative; }
.wizard-steps > *:last-child { border-left: 0; }
.wizard-steps > * > span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #eaf1f7; color: #65798f; font-size: .82rem; font-weight: 800; }
.wizard-steps small { font-size: .75rem; text-align: center; }
.wizard-steps a:hover { background: var(--blue-50); }
.wizard-steps .active { color: var(--blue-800); background: #eef8ff; font-weight: 800; }
.wizard-steps .active::after { content: ""; position: absolute; inset: auto 20% 0; height: 3px; border-radius: 5px 5px 0 0; background: var(--orange-500); }
.wizard-steps .active > span { background: var(--blue-700); color: #fff; box-shadow: 0 6px 14px rgba(8,119,201,.25); }
.wizard-steps .done > span { background: var(--green-600); color: #fff; }
.wizard-steps .locked { opacity: .62; }
.wizard-heading { padding: 34px 42px 10px; }
.wizard-heading > span { color: var(--orange-600); font-weight: 800; font-size: .78rem; }
.wizard-heading h2 { margin: 7px 0; font-size: clamp(1.45rem, 2vw, 2rem); color: var(--blue-950); overflow-wrap: anywhere; hyphens: auto; }
.wizard-heading p { margin: 0; color: var(--muted); line-height: 1.8; max-width: 760px; }
.registration-form { padding: 20px 42px 38px; }
.form-grid { display: grid; gap: 20px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 8px; color: var(--ink); font-size: .9rem; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; border: 1px solid #cbdbe8; border-radius: 13px; padding: 12px 14px; background: #fff; color: var(--ink); outline: none; transition: border-color .18s, box-shadow .18s, background .18s; }
.field textarea { resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue-700); box-shadow: 0 0 0 4px rgba(8,119,201,.11); background: #fbfeff; }
.field input::placeholder { color: #9aacbc; }
.field.full { grid-column: 1 / -1; }
.field small, .consent em { color: var(--danger); font-size: .78rem; font-style: normal; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #d75f5f; background: #fffafa; }
.privacy-callout { margin: 8px 42px 0; display: flex; align-items: center; gap: 13px; border: 1px solid #cde5f5; background: var(--blue-50); border-radius: 15px; padding: 13px 16px; }
.privacy-callout strong { color: var(--blue-800); white-space: nowrap; }
.privacy-callout p { margin: 0; color: var(--muted); line-height: 1.6; font-size: .85rem; }
.form-alert { margin: 24px 42px 0; padding: 14px 17px; border-radius: 14px; display: flex; flex-wrap: wrap; gap: 8px 16px; line-height: 1.6; }
.form-alert.error { border: 1px solid #efb6b6; background: var(--danger-bg); color: #8f2929; }
.form-alert.success { border: 1px solid #bce4cb; background: var(--success-bg); color: var(--success); }
.consent-list { display: grid; gap: 12px; margin-top: 24px; }
.consent { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--line); border-radius: 15px; padding: 15px 17px; background: #fbfdff; cursor: pointer; }
.consent:hover { border-color: #a9cbe4; }
.consent input { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--blue-700); flex: 0 0 auto; }
.consent span { display: grid; gap: 4px; }
.consent strong { font-size: .9rem; }
.consent small { color: var(--muted); line-height: 1.55; }
.consent.has-error { border-color: #df8a8a; background: var(--danger-bg); }
.consent.final { margin: 0 42px 12px; }
.wizard-actions { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.secure-note { color: var(--muted); font-size: .82rem; line-height: 1.6; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 13px; padding: 11px 23px; border: 0; font-weight: 800; text-decoration: none; transition: transform .16s, box-shadow .16s, background .16s; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: linear-gradient(135deg, var(--orange-500), var(--orange-600)); box-shadow: 0 10px 24px rgba(242,103,34,.23); }
.button.primary:hover { box-shadow: 0 13px 28px rgba(242,103,34,.3); }
.button.secondary { color: var(--blue-800); background: var(--blue-50); border: 1px solid #beddf2; }
.button.large { min-width: 220px; min-height: 54px; font-size: 1rem; }
.document-section { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 24px; }

html.js-enabled [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1), transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}
html.js-enabled [data-reveal].is-revealed {
    opacity: 1;
    transform: translateY(0);
}
.upload-box, .document-list { border: 1px solid var(--line); border-radius: 18px; padding: 20px; background: #fbfdff; }
.upload-box h3, .document-list h3 { margin: 0 0 7px; color: var(--blue-900); }
.upload-box > p, .empty-documents { color: var(--muted); font-size: .83rem; line-height: 1.6; }
.upload-controls { display: grid; gap: 15px; margin-top: 18px; }
.file-picker { display: grid; place-items: center; min-height: 88px; border: 1.5px dashed #85b8db; border-radius: 14px; background: #f1f9ff; cursor: pointer; color: var(--blue-800); font-weight: 800; }
.file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.document-list article { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.document-list article:last-child { border-bottom: 0; }
.document-list article > div { display: grid; gap: 4px; min-width: 0; }
.document-list article strong { font-size: .87rem; }
.document-list article span { color: var(--muted); font-size: .77rem; overflow-wrap: anywhere; }
.text-danger { border: 0; background: transparent; color: var(--danger); font-weight: 800; padding: 8px; }
#document-upload-form { padding: 0 42px 36px; display: flex; justify-content: flex-end; }
.upload-submit { border: 1px solid #b8d7ec; }
.review-grid { padding: 18px 42px 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.review-grid article { border: 1px solid var(--line); border-radius: 17px; padding: 18px; background: #fbfdff; }
.review-grid article > div:first-child { display: flex; justify-content: space-between; gap: 15px; align-items: center; }
.review-grid h3 { margin: 0; color: var(--blue-900); font-size: 1rem; }
.review-grid a { color: var(--blue-700); font-size: .8rem; font-weight: 800; }
.review-grid dl { margin: 14px 0 0; display: grid; gap: 8px; }
.review-grid dl div { display: flex; justify-content: space-between; gap: 15px; padding-top: 8px; border-top: 1px dashed #dbe7f0; }
.review-grid dt { color: var(--muted); font-size: .76rem; }
.review-grid dd { margin: 0; font-size: .82rem; font-weight: 700; text-align: start; overflow-wrap: anywhere; }
.final-submit-form { padding-top: 0; }
.registration-footer { max-width: 1180px; margin: -35px auto 30px; padding: 20px 26px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: .77rem; }
.registration-footer p { margin: 0; }
.registration-footer a { color: var(--blue-700); }
.registration-state-shell { min-height: calc(100vh - 190px); display: grid; place-items: center; padding: 35px 20px 80px; }
.registration-state-card { width: min(580px, 100%); text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); padding: 44px 38px; }
.state-icon { width: 70px; height: 70px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 50%; background: #fff0ea; color: var(--orange-600); font-size: 2rem; font-weight: 900; }
.state-icon.warning { background: #fff7dd; color: #a87300; }
.state-icon.success { background: var(--success-bg); color: var(--success); }
.registration-state-card h1 { margin: 13px 0 10px; color: var(--blue-950); font-size: 2rem; }
.registration-state-card > p { margin: 0 auto; color: var(--muted); line-height: 1.85; max-width: 470px; }
.state-actions { margin-top: 26px; display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.application-reference { display: grid; gap: 6px; margin: 24px auto 0; width: min(320px, 100%); padding: 14px; border-radius: 14px; background: var(--blue-50); border: 1px solid #c8e3f5; }
.application-reference span { color: var(--muted); font-size: .78rem; }
.application-reference strong { color: var(--blue-800); font-size: 1.2rem; letter-spacing: .04em; unicode-bidi: isolate; }
.wizard-steps small,
.wizard-heading p,
.registration-intro p,
.registration-state-card > p,
.state-actions a,
.registration-footer,
.registration-help {
    overflow-wrap: anywhere;
}
@media (max-width: 850px) {
    .registration-header { padding-inline: 18px; }
    .registration-help > span:first-child { display: none; }
    .registration-intro { align-items: stretch; }
    .registration-intro > div,
    .wizard-progress,
    .wizard-heading,
    .registration-form,
    .document-section,
    .review-grid {
        min-width: 0;
    }
    .wizard-steps { overflow-x: auto; grid-template-columns: repeat(4, minmax(112px, 1fr)); scrollbar-width: thin; }
    .wizard-steps > * { min-height: 78px; }
    .document-section { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
    .registration-header { min-height: 76px; }
    .registration-brand img { width: 50px; height: 59px; }
    .registration-brand strong { font-size: .83rem; }
    .registration-brand small { font-size: .7rem; }
    .registration-help > a { font-size: .87rem; }
    .registration-help .language-switcher a { min-inline-size: 76px; block-size: 44px; font-size: .72rem; padding-inline: 12px; gap: 6px; }
    .registration-help .language-switch-icon { width: 14px; height: 14px; }
    .registration-shell { width: min(100% - 20px, 1180px); margin-top: 6px; }
    .registration-intro { display: grid; margin-inline: 4px; }
    .attempt-reference { min-width: 0; }
    .wizard-card { border-radius: 20px; }
    .wizard-progress { grid-template-columns: 1fr auto; padding: 15px 18px; }
    .wizard-progress .progress-track { grid-column: 1 / -1; grid-row: 2; }
    .wizard-steps { overflow-x: hidden; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wizard-steps > * { min-height: 86px; padding: 11px 5px; }
    .wizard-steps small { font-size: .69rem; line-height: 1.35; }
    .wizard-heading { padding: 27px 20px 7px; }
    .wizard-heading h2 { font-size: clamp(1.35rem, 5.8vw, 1.85rem); }
    .registration-form { padding: 18px 20px 28px; }
    .form-grid.two { grid-template-columns: 1fr; gap: 16px; }
    .field.full { grid-column: auto; }
    .privacy-callout, .form-alert { margin-inline: 20px; align-items: flex-start; flex-direction: column; }
    .wizard-actions { align-items: stretch; flex-direction: column-reverse; }
    .wizard-actions .button { width: 100%; }
    .review-grid { grid-template-columns: 1fr; padding-inline: 20px; }
    .consent.final { margin-inline: 20px; }
    #document-upload-form { padding-inline: 20px; }
    #document-upload-form .button { width: 100%; }
    .registration-footer { margin-top: -45px; text-align: center; }
    .registration-state-card { padding: 35px 22px; }
    .registration-state-card h1 { font-size: clamp(1.45rem, 5.2vw, 1.6rem); overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
    html.js-enabled [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

.floating-field {
    --floating-accent: var(--blue-700);
    --floating-bg: #fff;
    position: relative;
    display: block;
}
.floating-field > .floating-label-text {
    position: absolute;
    z-index: 3;
    inset-inline-start: 14px;
    top: 50%;
    max-width: calc(100% - 28px);
    margin: 0 !important;
    padding: 0;
    color: #667f96;
    font-size: .86rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    transform: translateY(-50%);
    transform-origin: right center;
    transition: top .16s ease, transform .16s ease, color .16s ease, background-color .16s ease, padding .16s ease;
}
html[dir="ltr"] .floating-field > .floating-label-text { transform-origin: left center; }
.floating-field > .floating-control {
    min-height: 54px;
    padding-block: 21px 8px !important;
    padding-inline: 14px !important;
}
.floating-field > textarea.floating-control {
    min-height: 108px;
    padding-top: 26px !important;
}
.floating-field > select.floating-control {
    padding-inline-end: 36px !important;
}
.floating-field > .floating-control::placeholder { color: transparent !important; }
.floating-field.is-focused > .floating-control::placeholder { color: #9aacbc !important; }
.floating-field.is-focused > .floating-control {
    border-color: var(--floating-accent) !important;
    box-shadow: 0 0 0 4px rgba(8,119,201,.11) !important;
}
.floating-field.is-focused > .floating-label-text,
.floating-field.has-value > .floating-label-text,
.floating-field.always-float > .floating-label-text {
    top: 0;
    padding-inline: 7px;
    color: var(--floating-accent);
    background: var(--floating-bg);
    transform: translateY(-50%) scale(.84);
}
.floating-field.is-textarea > .floating-label-text {
    top: 26px;
    transform: translateY(0);
}
.floating-field.is-textarea.is-focused > .floating-label-text,
.floating-field.is-textarea.has-value > .floating-label-text,
.floating-field.is-textarea.always-float > .floating-label-text {
    top: 0;
    transform: translateY(-50%) scale(.84);
}
.floating-field.has-error > .floating-label-text { color: var(--danger); }
