/* ============================================================
   GCC POWER 2026 — Registration wizard
   Futuristic energy theme · glassmorphism · fluid full width
   ============================================================ */

:root {
    /* Client brand gradient: #010600 (near-black) -> #30bf6d (green) */
    --brand: #30bf6d;
    --volt: #30bf6d;            /* brand green — primary accent */
    --volt-soft: rgba(48, 191, 109, .16);
    --cyan: #62e39b;            /* lighter companion green for gradients */
    --amber: #ffcf6b;
    --bg-0: #010600;
    --bg-1: #072713;
    --glass: rgba(255, 255, 255, .055);
    --glass-2: rgba(255, 255, 255, .09);
    --glass-bd: rgba(255, 255, 255, .14);
    --glass-bd-soft: rgba(255, 255, 255, .09);
    --text: #eafff2;
    --text-dim: #a4c9b2;
    --text-faint: #6f947f;
    --ok-fg: #34d399;
    --err-fg: #ff8b8b;
    --warn-fg: #ffcf6b;
    --r-lg: 22px;
    --r-md: 14px;
    --r-sm: 10px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    font-family: -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
    background: var(--bg-0);
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    min-height: 100dvh;
    padding: clamp(12px, 2.5vw, 32px);
    overflow-x: hidden;
}
body[dir="rtl"] { text-align: right; }

/* ---------------- Animated energy background ---------------- */
.bg-fx {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(60% 50% at 85% 10%, rgba(22, 112, 60, .38), transparent 65%),
        radial-gradient(50% 45% at 10% 85%, rgba(10, 92, 52, .30), transparent 65%),
        linear-gradient(160deg, var(--bg-0), var(--bg-1) 55%, #041b0c);
    overflow: hidden;
}
/* power-grid line overlay */
.bg-fx::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(48, 191, 109, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(48, 191, 109, .05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(75% 75% at 50% 35%, #000 30%, transparent 100%);
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .5;
    animation: drift 16s ease-in-out infinite alternate;
}
.orb.o1 { width: 44vw; height: 44vw; background: rgba(48, 191, 109, .17); top: -14vw; right: -10vw; }
.orb.o2 { width: 36vw; height: 36vw; background: rgba(98, 227, 155, .13); bottom: -12vw; left: -8vw; animation-delay: -8s; }
@keyframes drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(-4vw, 3vw, 0) scale(1.12); }
}

/* ---------------- Shell (fluid, full width) ---------------- */
.wrap { width: 100%; }

.banner { margin-bottom: 18px; }
.banner img {
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    display: block;
    border-radius: var(--r-lg);
    border: 1px solid var(--glass-bd-soft);
    box-shadow: var(--shadow);
}

/* Glass card */
.card {
    background: var(--glass);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    backdrop-filter: blur(22px) saturate(150%);
    border: 1px solid var(--glass-bd-soft);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .08);
    overflow: hidden;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: clamp(16px, 2.4vw, 26px) clamp(16px, 3vw, 34px);
    border-bottom: 1px solid var(--glass-bd-soft);
    background: linear-gradient(120deg, rgba(48, 191, 109, .09), transparent 55%);
    position: relative;
}
/* animated energy line under the header */
.card-head::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, var(--volt), var(--cyan), transparent);
    background-size: 220% 100%;
    animation: current 4.5s linear infinite;
    opacity: .8;
}
@keyframes current {
    from { background-position: 220% 0; }
    to   { background-position: -120% 0; }
}
.card-head h1 {
    margin: 0;
    font-size: clamp(17px, 2.3vw, 23px);
    font-weight: 800;
    letter-spacing: .02em;
    background: linear-gradient(90deg, #ffffff, var(--volt));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.card-head .sub { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; }

/* CIGRE GCC logo next to the event title */
.head-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.event-logo {
    height: clamp(40px, 5.5vw, 58px);
    width: auto;
    max-width: 150px;
    object-fit: contain;
    flex: 0 0 auto;
    background: #fff;
    border-radius: 10px;
    padding: 5px 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}

/* Segmented EN/AR switch with sliding glow thumb */
.lang-seg {
    position: relative;
    display: flex;
    background: rgba(0, 0, 0, .3);
    border: 1px solid var(--glass-bd);
    border-radius: 999px;
    padding: 4px;
    flex: 0 0 auto;
}
.lang-seg button {
    position: relative;
    z-index: 1;
    width: 64px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-size: 12.5px;
    font-weight: 800;
    padding: 8px 0;
    border-radius: 999px;
    cursor: pointer;
    transition: color .25s;
}
.lang-seg button.active { color: #021a0d; }
.seg-thumb {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: 64px;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--volt), var(--cyan));
    box-shadow: 0 2px 14px rgba(48, 191, 109, .45);
    transition: transform .32s cubic-bezier(.22, .8, .3, 1);
}
.lang-seg.ar .seg-thumb { transform: translateX(64px); }

/* ---------------- Step indicator ---------------- */
.steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 22px clamp(16px, 3vw, 34px) 0;
}
.step-dot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-faint); }
.step-dot .n {
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 12.5px;
    background: var(--glass-2);
    border: 1px solid var(--glass-bd);
    color: var(--text-dim);
    transition: all .3s;
}
.step-dot.active .n {
    background: var(--volt);
    border-color: var(--volt);
    color: #021a0d;
    box-shadow: 0 0 0 5px var(--volt-soft), 0 0 18px rgba(48, 191, 109, .45);
}
.step-dot.active { color: var(--volt); }
.step-dot.done .n { background: rgba(52, 211, 153, .2); border-color: var(--ok-fg); color: var(--ok-fg); }
.step-dot .lbl { display: none; font-weight: 600; }
@media (min-width: 560px) { .step-dot .lbl { display: inline; } }
.step-sep {
    flex: 0 1 46px;
    height: 1px;
    background: linear-gradient(90deg, var(--glass-bd), rgba(48, 191, 109, .35), var(--glass-bd));
}
@media (max-width: 559px) {
    .steps { gap: 4px; }
    .step-sep { flex: 0 1 20px; }
    .step-dot .n { width: 26px; height: 26px; font-size: 11.5px; }
}

/* ---------------- Panels + transitions ---------------- */
.panel {
    display: none;
    padding: clamp(18px, 3vw, 34px);
}
.panel.active { display: block; animation: rise .38s cubic-bezier(.22, .8, .3, 1); }
@keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.panel h2 { margin: 0 0 4px; font-size: clamp(17px, 2vw, 20px); font-weight: 800; color: var(--text); }
.panel .hint { font-size: 13.5px; color: var(--text-dim); margin: 0 0 20px; }

/* ---------------- Step 1 · group tabs + role tiles ---------------- */
.role-group { margin-bottom: 26px; }
.role-group:last-child { margin-bottom: 0; }
.role-group-head {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 0 2px 12px;
}
.role-group-head::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--glass-bd-soft);
}
.role-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
    gap: 14px;
}
.tile {
    position: relative;
    background: var(--glass);
    border: 1px solid var(--glass-bd-soft);
    border-radius: var(--r-md);
    padding: 20px 18px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 150px;
    overflow: hidden;
    transition: transform .25s, border-color .25s, box-shadow .25s;
}
/* sweeping light on hover */
.tile::before {
    content: "";
    position: absolute;
    top: 0; left: -70%;
    width: 45%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .08), transparent);
    transform: skewX(-18deg);
    transition: left .55s ease;
    pointer-events: none;
}
.tile:hover {
    transform: translateY(-4px);
    border-color: rgba(48, 191, 109, .55);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .4), 0 0 22px rgba(48, 191, 109, .18);
}
.tile:hover::before { left: 130%; }
.tile.selected {
    border-color: var(--volt);
    box-shadow: 0 0 0 2px var(--volt), 0 0 30px rgba(48, 191, 109, .35);
    animation: pulseSel 1.1s ease-out;
}
@keyframes pulseSel {
    0%   { box-shadow: 0 0 0 0 rgba(48, 191, 109, .55); }
    100% { box-shadow: 0 0 0 2px var(--volt), 0 0 30px rgba(48, 191, 109, .35); }
}
.t-ic {
    width: 46px; height: 46px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    background: var(--volt-soft);
    border: 1px solid rgba(48, 191, 109, .3);
    color: var(--volt);
    flex: 0 0 auto;
}
.t-ic svg { width: 24px; height: 24px; }
.t-name { font-weight: 800; font-size: 15px; }
.t-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.t-price {
    font-size: 12.5px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--volt-soft);
    color: var(--volt);
    border: 1px solid rgba(48, 191, 109, .3);
}
.t-price.voucher { background: rgba(255, 207, 107, .12); color: var(--amber); border-color: rgba(255, 207, 107, .3); }
.t-price.free { background: rgba(52, 211, 153, .12); color: var(--ok-fg); border-color: rgba(52, 211, 153, .3); }

/* Paid tiers: the price is a NUMBER, so it carries typographic weight rather
   than the chip treatment the status badges above use. That contrast is the
   point — a glance separates "costs money" from "needs a voucher". */
.t-amount {
    display: block;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.05;
    color: var(--volt);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
}
.t-amount small {
    display: inline;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    color: var(--text-faint);
    letter-spacing: .02em;
}
.tile:hover .t-amount { text-shadow: 0 0 18px rgba(48, 191, 109, .45); }

.t-go { color: var(--text-faint); transition: transform .25s, color .25s; }
.tile:hover .t-go { color: var(--volt); transform: translateX(4px); }
body[dir="rtl"] .t-go { transform: scaleX(-1); }
body[dir="rtl"] .tile:hover .t-go { transform: scaleX(-1) translateX(4px); }

/* ---------------- Step 1 · compact list rows (default layout) ----------------
   The card-grid (.tile) styles above are the switchable backup layout.

   Wide-screen composition: the whole step is CENTERED (no stranded empty
   half), and the groups balance into a 2-column grid — Delegates + Free on
   one side, the voucher roles on the other — so rows keep a readable width
   without stretching. Narrow screens: one centered column. */
#step1:has(#roleCards.rows-layout) {
    max-width: 880px;
    margin-inline: auto;
}
@media (min-width: 1100px) {
    #step1:has(#roleCards.rows-layout[data-groups="2"]),
    #step1:has(#roleCards.rows-layout[data-groups="3"]) {
        max-width: 1250px;
    }
    #roleCards.rows-layout[data-groups="2"],
    #roleCards.rows-layout[data-groups="3"] {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 40px;
        align-items: start;
    }
    /* 3 groups: 1st + 3rd stack in the first column, the 2nd (voucher
       roles, the tallest) fills the second — visually balanced 4 vs 4 */
    #roleCards.rows-layout[data-groups="3"] .role-group:nth-child(1) { grid-column: 1; }
    #roleCards.rows-layout[data-groups="3"] .role-group:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; }
    #roleCards.rows-layout[data-groups="3"] .role-group:nth-child(3) { grid-column: 1; grid-row: 2; }
}
.role-rows { display: flex; flex-direction: column; gap: 8px; }
.rrow {
    display: flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    font: inherit;
    text-align: start;
    color: var(--text);
    background: var(--glass);
    border: 1px solid var(--glass-bd-soft);
    border-radius: var(--r-md);
    padding: 12px 16px;
    min-height: 62px;
    cursor: pointer;
    transition: border-color .18s, background .18s, transform .18s;
}
.rrow:hover {
    border-color: rgba(48, 191, 109, .5);
    background: var(--glass-2);
    transform: translateX(3px);
}
body[dir="rtl"] .rrow:hover { transform: translateX(-3px); }
.rrow.selected {
    border-color: var(--volt);
    background: var(--volt-soft);
    box-shadow: 0 0 0 1px var(--volt), 0 6px 24px rgba(48, 191, 109, .18);
}
.rrow:focus-visible { outline: 2px solid var(--volt); outline-offset: 2px; }

.rr-ic {
    width: 36px; height: 36px;
    flex: 0 0 auto;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    background: var(--volt-soft);
    border: 1px solid rgba(48, 191, 109, .3);
    color: var(--volt);
}
.rr-ic svg { width: 18px; height: 18px; }

.rr-name { flex: 1; min-width: 0; font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.rr-name small { display: block; font-weight: 500; font-size: 11px; color: var(--text-faint); margin-top: 2px; }

.rr-meta { flex: 0 0 auto; text-align: end; line-height: 1.3; }
/* OMR + USD on one line joined by "/" (client decision, Aug 2026):
   emphasised OMR, quieter USD — e.g. "OMR 79 / USD 206". */
.rr-price {
    display: inline;
    font-weight: 800;
    font-size: 15.5px;
    color: var(--volt);
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
}
.rr-conv { display: inline; font-size: 10.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.rr-chip {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    border-radius: 999px;
    padding: 4px 12px;
    background: var(--glass-2);
    color: var(--text-dim);
    border: 1px solid var(--glass-bd);
}
.rr-chip.review { background: rgba(255, 207, 107, .12); color: var(--amber); border-color: rgba(255, 207, 107, .3); }
.rr-chip.free { background: rgba(52, 211, 153, .13); color: var(--ok-fg); border-color: rgba(52, 211, 153, .3); }

.rr-check {
    width: 20px; height: 20px;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 2px solid var(--glass-bd);
    display: flex; align-items: center; justify-content: center;
    color: transparent;
    transition: border-color .18s, background .18s, color .18s;
}
.rrow.selected .rr-check { border-color: var(--volt); background: var(--volt); color: #021a0d; }
.rr-check svg { width: 11px; height: 11px; }

@media (max-width: 480px) {
    .rrow { padding: 11px 12px; gap: 10px; }
    .rr-conv { max-width: 120px; }
}

/* ---------------- Forms ---------------- */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.field { display: flex; flex-direction: column; }
.field label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 6px;
}
.field label .req { color: var(--err-fg); }

input, select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--glass-bd);
    border-radius: var(--r-sm);
    font-size: 14.5px;
    background: rgba(0, 0, 0, .28);
    color: var(--text);
    min-height: 46px;
    transition: border-color .2s, box-shadow .2s;
}
select option { background: #072713; color: var(--text); }
input::placeholder { color: var(--text-faint); }
input:focus, select:focus {
    outline: none;
    border-color: var(--volt);
    box-shadow: 0 0 0 3px var(--volt-soft), 0 0 16px rgba(48, 191, 109, .18);
}
input[readonly] { background: rgba(255, 255, 255, .04); color: var(--text-dim); }
input:disabled, select:disabled { opacity: .55; }

/* Document upload (Student ID card etc.) */
input[type="file"] {
    padding: 10px 12px;
    cursor: pointer;
    border-style: dashed;
}
input[type="file"]::file-selector-button {
    background: var(--volt-soft);
    color: var(--volt);
    border: 1px solid rgba(48, 191, 109, .35);
    border-radius: 8px;
    padding: 7px 14px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    margin-inline-end: 12px;
    transition: background .2s;
}
input[type="file"]::file-selector-button:hover { background: rgba(48, 191, 109, .28); }
.file-note { font-size: 12px; color: var(--text-faint); margin-top: 5px; }

.field-err { font-size: 12px; color: var(--err-fg); margin-top: 5px; display: none; }
.field.invalid input, .field.invalid select { border-color: var(--err-fg); }
.field.invalid .field-err { display: block; }

.radio-row { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 10px; }
.radio-row label {
    display: flex; align-items: center; gap: 7px;
    font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: 0;
    color: var(--text); cursor: pointer;
}
.radio-row input { width: auto; min-height: 0; accent-color: var(--volt); }

/* ---------------- Buttons ---------------- */
.btn {
    position: relative;
    background: linear-gradient(120deg, var(--volt), var(--cyan));
    color: #021a0d;
    border: none;
    border-radius: var(--r-sm);
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .01em;
    cursor: pointer;
    min-height: 50px;
    width: 100%;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s, filter .2s;
}
.btn:hover { box-shadow: 0 8px 26px rgba(48, 191, 109, .35); filter: brightness(1.05); }
.btn:active { transform: scale(.985); }
.btn:disabled {
    background: var(--glass-2);
    color: var(--text-faint);
    cursor: not-allowed;
    box-shadow: none;
}
.btn.secondary {
    background: var(--glass-2);
    color: var(--text);
    border: 1px solid var(--glass-bd);
}
.btn.secondary:hover { border-color: var(--volt); box-shadow: 0 0 14px rgba(48, 191, 109, .18); }
.btn-row { display: flex; gap: 12px; margin-top: 24px; }
.btn-row .btn { flex: 1; }
.btn-row .btn.secondary { flex: 0 0 32%; }

.text-btn {
    background: none; border: none;
    color: var(--volt); font-size: 13px; font-weight: 700;
    cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
    padding: 8px;
}

/* ---------------- Messages ---------------- */
.msg {
    padding: 13px 16px;
    border-radius: var(--r-sm);
    font-size: 13.5px;
    margin: 14px 0;
    display: none;
    border: 1px solid;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.msg.show { display: block; animation: rise .3s ease; }
.msg.ok   { background: rgba(52, 211, 153, .1);  color: var(--ok-fg);   border-color: rgba(52, 211, 153, .35); }
.msg.err  { background: rgba(255, 139, 139, .1); color: var(--err-fg);  border-color: rgba(255, 139, 139, .35); }
.msg.warn { background: rgba(255, 207, 107, .1); color: var(--warn-fg); border-color: rgba(255, 207, 107, .35); }
.msg strong { display: block; margin-bottom: 3px; }

/* ---------------- Verify gate ---------------- */
.gate-box { display: flex; gap: 12px; align-items: flex-end; max-width: 620px; }
.gate-box .field { flex: 1; }
.gate-box .btn { width: auto; flex: 0 0 auto; }
.member-ok {
    background: rgba(52, 211, 153, .1);
    border: 1px solid rgba(52, 211, 153, .35);
    border-radius: var(--r-sm);
    padding: 13px 16px;
    font-size: 13.5px;
    color: var(--ok-fg);
    margin-top: 14px;
    display: none;
}
.member-ok.show { display: block; animation: rise .3s ease; }

/* ---------------- Spinner ---------------- */
.spinner {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid rgba(4, 36, 28, .3); border-top-color: #021a0d;
    border-radius: 50%; animation: spin .7s linear infinite;
    vertical-align: -3px; margin-inline-end: 8px;
}
.btn.secondary .spinner, .spinner.dark { border-color: rgba(48, 191, 109, .3); border-top-color: var(--volt); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Popup fallback ---------------- */
.popup-fallback {
    display: none;
    background: rgba(255, 207, 107, .08);
    border: 1px solid rgba(255, 207, 107, .35);
    border-radius: var(--r-md);
    padding: 18px;
    color: var(--warn-fg);
    margin-top: 16px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.popup-fallback.show { display: block; animation: rise .3s ease; }
.popup-fallback h3 { margin: 0 0 8px; font-size: 15px; color: var(--text); }
.popup-fallback ol { margin: 0 0 14px; padding-inline-start: 18px; font-size: 13px; }

/* ---------------- Promo code (paid roles) ---------------- */
.promo-box {
    margin-top: 16px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, .2);
    border: 1px dashed var(--glass-bd);
    border-radius: var(--r-md);
}
.promo-box label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 6px;
}
.promo-row { display: flex; gap: 10px; }
.promo-row input { flex: 1; text-transform: uppercase; }
.promo-row .btn { width: auto; flex: 0 0 auto; min-height: 46px; padding: 10px 22px; }
.promo-box .msg { margin: 10px 0 0; }
.promo-box.applied {
    border-style: solid;
    border-color: rgba(52, 211, 153, .4);
    background: rgba(52, 211, 153, .08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.promo-info { font-size: 13.5px; color: var(--ok-fg); }
.promo-info b { letter-spacing: .04em; }
.promo-save {
    display: inline-block;
    margin-inline-start: 10px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(52, 211, 153, .15);
    border: 1px solid rgba(52, 211, 153, .35);
    font-size: 12px;
    font-weight: 700;
}
.promo-free { display: block; margin-top: 4px; font-size: 12px; color: var(--text-dim); }
.promo-box.applied .text-btn { color: var(--err-fg); flex: 0 0 auto; }

/* ---------------- Profile (already registered) ---------------- */
.profile-table { width: 100%; max-width: 640px; border-collapse: collapse; font-size: 14px; margin: 16px 0 20px; }
.profile-table td { padding: 11px 6px; border-bottom: 1px solid var(--glass-bd-soft); }
.profile-table td:first-child { color: var(--text-dim); width: 40%; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.profile-table td:last-child { font-weight: 700; word-break: break-word; }
#profileView .btn { max-width: 380px; }

/* ---------------- Payment processing overlay ---------------- */
.pay-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(1, 6, 0, .74);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.pay-overlay.show { display: flex; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.pay-box {
    width: min(430px, 100%);
    background: linear-gradient(160deg, rgba(8, 46, 24, .94), rgba(2, 12, 5, .96));
    border: 1px solid var(--glass-bd);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow), 0 0 60px rgba(48, 191, 109, .08);
    padding: 34px 28px 24px;
    text-align: center;
    animation: rise .38s cubic-bezier(.22, .8, .3, 1);
}
.pay-anim { position: relative; width: 86px; height: 86px; margin: 0 auto 18px; }
.pay-anim .ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--volt);
    animation: spin 1.1s linear infinite;
}
.pay-anim .ring.r2 { inset: 8px; border-top-color: var(--cyan); animation-duration: 1.6s; animation-direction: reverse; }
.pay-anim .core {
    position: absolute;
    inset: 20px;
    border-radius: 50%;
    background: var(--volt-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--volt);
    animation: corePulse 1.8s ease-in-out infinite;
}
.pay-anim .core svg { width: 26px; height: 26px; }
@keyframes corePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(48, 191, 109, .35); }
    50%      { box-shadow: 0 0 0 12px rgba(48, 191, 109, 0); }
}
.pay-box h3 { margin: 0 0 8px; font-size: 19px; font-weight: 800; color: var(--text); }
.pay-box .pay-text { margin: 0 0 18px; font-size: 13.5px; line-height: 1.6; color: var(--text-dim); }
.pay-meta {
    border: 1px solid var(--glass-bd-soft);
    background: rgba(0, 0, 0, .25);
    border-radius: var(--r-sm);
    padding: 4px 14px;
    margin-bottom: 18px;
}
.pay-meta .row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; font-size: 13px; }
.pay-meta .row + .row { border-top: 1px solid var(--glass-bd-soft); }
.pay-meta .row span { color: var(--text-faint); }
.pay-meta .row b { color: var(--volt); font-weight: 700; word-break: break-all; text-align: end; }
.pay-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 18px; }
.pay-dots span {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--volt);
    opacity: .25;
    animation: dotPulse 1.2s ease-in-out infinite;
}
.pay-dots span:nth-child(2) { animation-delay: .2s; }
.pay-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dotPulse {
    0%, 100% { opacity: .25; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.25); }
}
.pay-box .text-btn { color: var(--text-dim); margin-top: 4px; }
.pay-box .text-btn:hover { color: var(--err-fg); }

/* ---------------- Result: success / failed hero ---------------- */
.result-hero { text-align: center; padding: 4px 0 22px; }
.result-hero .r-ic {
    width: 74px; height: 74px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popIn .45s cubic-bezier(.22, .8, .3, 1);
}
.result-hero .r-ic svg { width: 34px; height: 34px; }
.result-hero.ok .r-ic {
    background: rgba(52, 211, 153, .12);
    border: 1px solid rgba(52, 211, 153, .4);
    color: var(--ok-fg);
    box-shadow: 0 0 34px rgba(52, 211, 153, .25);
}
.result-hero.fail .r-ic {
    background: rgba(255, 139, 139, .12);
    border: 1px solid rgba(255, 139, 139, .4);
    color: var(--err-fg);
    box-shadow: 0 0 34px rgba(255, 139, 139, .2);
}
.result-hero.review .r-ic {
    background: rgba(255, 207, 107, .12);
    border: 1px solid rgba(255, 207, 107, .4);
    color: var(--warn-fg);
    box-shadow: 0 0 34px rgba(255, 207, 107, .2);
}
.result-hero.review h2 { color: var(--warn-fg); }
@keyframes popIn { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.result-hero h2 { margin: 0 0 6px; font-size: clamp(19px, 2.4vw, 24px); font-weight: 800; }
.result-hero.ok h2 { color: var(--ok-fg); }
.result-hero.fail h2 { color: var(--err-fg); }
.result-hero p { margin: 0 auto; max-width: 560px; font-size: 13.5px; color: var(--text-dim); }

.result-meta { max-width: 430px; margin: 0 auto 16px; }
.result-note { text-align: center; font-size: 12.5px; color: var(--text-faint); max-width: 520px; margin: 0 auto; }
.result-actions { display: flex; justify-content: center; margin-top: 20px; }
.result-actions .btn {
    max-width: 340px;
    text-decoration: none;
    text-align: center;
    line-height: 22px;
    display: block;
}
.step-dot.failstep .n { background: rgba(255, 139, 139, .18); border-color: var(--err-fg); color: var(--err-fg); box-shadow: 0 0 0 5px rgba(255, 139, 139, .12); }
.step-dot.failstep { color: var(--err-fg); }

/* ---------------- Result document (email HTML from _response table) --------
   The stored response is email markup that assumes a white/light page.
   It renders inside a white rounded "document" card so it stays readable
   on the dark theme, with overrides for its fixed email dimensions. */
.result-doc {
    direction: ltr;
    background: #fff;
    color: #1f2937;
    border-radius: var(--r-md);
    padding: clamp(6px, 1.5vw, 16px);
    box-shadow: 0 10px 34px rgba(0, 0, 0, .35);
    overflow-x: auto;
    max-width: 780px;
    margin: 0 auto;
}
/* the email root div + outer table carry a grey page background — drop it */
.result-doc > div > div,
.result-doc > div > div > table { background: transparent !important; }
.result-doc table { max-width: 100%; }
/* the 600px email card: fluid and centered inside the panel */
.result-doc table.full-width { width: 100% !important; max-width: 640px; margin: 0 auto; }
.result-doc img { max-width: 100%; height: auto; }
/* QR placeholder box: fixed 100px dims are smaller than the 150px QR image */
.result-doc div[style*="height:100px"] {
    width: auto !important;
    height: auto !important;
    line-height: normal !important;
    background: transparent !important;
}
.result-doc td { word-break: break-word; }
@media (max-width: 640px) {
    .result-doc .mobile-padding { padding: 24px 16px !important; }
}

/* ---------------- Footer ---------------- */
.foot { text-align: center; font-size: 12.5px; color: var(--text-faint); padding: 20px 0 8px; }
.foot a { color: var(--volt); font-weight: 800; text-decoration: none; }

/* ---------------- Skeleton ---------------- */
.skeleton {
    background: linear-gradient(90deg, var(--glass) 25%, var(--glass-2) 50%, var(--glass) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
    border-radius: var(--r-sm);
    height: 46px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------- Mobile refinements (≤640px) ---------------- */
@media (max-width: 640px) {
    /* Header: logo + title take the full width; the language switch drops
       to its own right-aligned row — no more one-word-per-line title. */
    .card-head { flex-wrap: wrap; row-gap: 10px; }
    .head-brand { width: 100%; }
    .event-logo { height: 40px; max-width: 110px; padding: 4px 6px; }
    .card-head h1 { font-size: 16.5px; }
    .card-head .sub { font-size: 11.5px; }
    .lang-seg { margin-inline-start: auto; padding: 3px; }
    .lang-seg button { width: 56px; padding: 7px 0; font-size: 12px; }
    .seg-thumb { top: 3px; bottom: 3px; left: 3px; width: 56px; }
    .lang-seg.ar .seg-thumb { transform: translateX(56px); }

    /* Step-1 cards: compact icon|text rows instead of tall tiles, so
       several options fit on one phone screen. */
    .tile {
        display: grid;
        grid-template-columns: 42px 1fr;
        column-gap: 12px;
        row-gap: 8px;
        min-height: 0;
        padding: 13px 14px;
    }
    .t-ic { grid-row: 1 / span 2; width: 42px; height: 42px; border-radius: 11px; align-self: center; }
    .t-ic svg { width: 20px; height: 20px; }
    .t-name { font-size: 14.5px; align-self: center; }
    .t-foot { margin-top: 0; align-items: center; }
    .t-price { font-size: 10.5px; padding: 3px 8px; letter-spacing: 0; }
    /* Compact rows have no vertical room: the price drops to a single
       baseline with USD trailing it instead of stacked underneath. */
    .t-amount { font-size: 16.5px; display: flex; align-items: baseline; gap: 6px; }
    .t-amount small { display: inline; margin-top: 0; font-size: 10.5px; }
    .role-group { margin-bottom: 20px; }
    .role-tiles { gap: 10px; }
}

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
