@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;600;700;800;900&display=swap');

:root {
    --cx-ink: #111827;
    --cx-ink-soft: #344054;
    --cx-muted: #667085;
    --cx-line: #e7eaf0;
    --cx-bg: #f6f7fb;
    --cx-panel: #ffffff;
    --cx-brand: var(--market-primary, #ef3f4f);
    --cx-brand-dark: color-mix(in srgb, var(--cx-brand) 80%, #111827);
    --cx-brand-soft: color-mix(in srgb, var(--cx-brand) 9%, #ffffff);
    --cx-mint: #0f9f7f;
    --cx-mint-soft: #eafaf5;
    --cx-warning: #d97706;
    --cx-warning-soft: #fff8e6;
    --cx-danger: #c24155;
    --cx-danger-soft: #fff0f2;
    --cx-radius-sm: 13px;
    --cx-radius: 20px;
    --cx-radius-lg: 30px;
    --cx-shadow-sm: 0 8px 25px rgba(16, 24, 40, .055);
    --cx-shadow: 0 24px 70px rgba(16, 24, 40, .11);
}

.auth-experience,
.commerce-surface,
.ops-dashboard,
.commerce-console {
    color: var(--cx-ink);
    font-family: "Tajawal", Tahoma, "Segoe UI", Arial, sans-serif;
}

.auth-experience *,
.commerce-surface *,
.ops-dashboard *,
.commerce-console * { box-sizing: border-box; }

/* Authentication */
.auth-experience {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: min(780px, calc(100vh - 100px));
    padding: clamp(28px, 6vw, 76px) 0;
    background:
        radial-gradient(circle at 8% 14%, color-mix(in srgb, var(--cx-brand) 16%, transparent) 0, transparent 28%),
        radial-gradient(circle at 94% 82%, rgba(15, 159, 127, .13) 0, transparent 27%),
        linear-gradient(145deg, #fbfcff 0%, #f4f6fb 100%);
}

.auth-experience::before,
.auth-experience::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .75);
    background: rgba(255, 255, 255, .36);
    backdrop-filter: blur(8px);
}

.auth-experience::before { width: 210px; height: 210px; top: 10%; inset-inline-start: -90px; }
.auth-experience::after { width: 340px; height: 340px; bottom: -180px; inset-inline-end: -90px; }
body:has(.auth-experience) .smart-assistant,
body:has(.auth-experience) #quick-btn,
body:has(.auth-experience) .rtl-buttons,
body:has(.auth-experience) .ltr-buttons { display: none !important; }

.auth-frame {
    display: grid;
    grid-template-columns: minmax(300px, .86fr) minmax(390px, 1.14fr);
    overflow: hidden;
    width: min(1060px, 100%);
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: 34px;
    background: rgba(255, 255, 255, .86);
    box-shadow: var(--cx-shadow);
    backdrop-filter: blur(24px) saturate(145%);
}

.auth-frame--compact { width: min(940px, 100%); }

.auth-story {
    position: relative;
    display: flex;
    min-height: 590px;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(30px, 5vw, 54px);
    color: #fff;
    background:
        linear-gradient(155deg, rgba(17, 24, 39, .96), rgba(29, 41, 57, .91)),
        var(--cx-ink);
}

.auth-story::before {
    content: "";
    position: absolute;
    width: 330px;
    height: 330px;
    inset-inline-end: -170px;
    top: -110px;
    border: 62px solid color-mix(in srgb, var(--cx-brand) 72%, transparent);
    border-radius: 50%;
    opacity: .7;
}

.auth-story::after {
    content: "";
    position: absolute;
    width: 230px;
    height: 230px;
    bottom: -105px;
    inset-inline-start: -90px;
    border-radius: 50%;
    background: rgba(15, 159, 127, .22);
    filter: blur(2px);
}

.auth-story > * { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.auth-brand img { max-width: 122px; max-height: 50px; object-fit: contain; filter: brightness(0) invert(1); }
.auth-brand > strong { color: #fff; font-size: 1.05rem; font-weight: 900; letter-spacing: -.02em; }
.auth-brand__mark { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 15px; background: rgba(255, 255, 255, .12); }
.auth-story__eyebrow { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 8px 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; background: rgba(255,255,255,.08); font-size: .78rem; font-weight: 800; }
.auth-story h2 { max-width: 430px; margin: 22px 0 14px; color: #fff; font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 900; line-height: 1.2; letter-spacing: -.045em; }
.auth-story p { max-width: 430px; margin: 0; color: rgba(255,255,255,.72); font-size: 1rem; line-height: 1.9; }
.auth-benefits { display: grid; gap: 12px; margin-top: 30px; }
.auth-benefit { display: flex; align-items: center; gap: 11px; color: rgba(255,255,255,.9); font-size: .89rem; font-weight: 700; }
.auth-benefit i { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 10px; color: #8ff0d5; background: rgba(15,159,127,.17); }

.auth-panel { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: clamp(30px, 5vw, 60px); background: rgba(255,255,255,.91); }
.auth-panel__icon { display: grid; width: 58px; height: 58px; place-items: center; margin-bottom: 20px; border-radius: 19px; color: var(--cx-brand); background: var(--cx-brand-soft); font-size: 1.45rem; }
.auth-panel__icon--whatsapp { color: #087d60; background: var(--cx-mint-soft); }
.auth-panel h1 { margin: 0 0 8px; font-size: clamp(1.65rem, 3vw, 2.15rem); font-weight: 900; letter-spacing: -.035em; }
.auth-panel__lead { margin: 0 0 26px; color: var(--cx-muted); line-height: 1.8; }
.auth-panel__footer { margin: 24px 0 0; color: var(--cx-muted); text-align: center; }
.auth-panel__footer a { color: var(--cx-brand-dark); font-weight: 800; text-decoration: none; }

.cx-alert { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; padding: 14px 16px; border: 1px solid transparent; border-radius: var(--cx-radius-sm); font-size: .9rem; line-height: 1.7; }
.cx-alert i { margin-top: 4px; }
.cx-alert ul { margin: 0; padding-inline-start: 18px; }
.cx-alert--danger { border-color: #fecdd3; color: #9f1239; background: var(--cx-danger-soft); }
.cx-alert--success { border-color: #a7f3d0; color: #07684f; background: var(--cx-mint-soft); }
.cx-alert--info { border-color: #cbd5e1; color: #344054; background: #f8fafc; }
.cx-alert--warning { border-color: #fde68a; color: #92400e; background: var(--cx-warning-soft); }

.cx-field { position: relative; margin-bottom: 18px; }
.cx-field label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: var(--cx-ink-soft); font-size: .84rem; font-weight: 800; }
.cx-field label small { color: var(--cx-muted); font-weight: 500; }
.cx-input-wrap { position: relative; }
.cx-input-wrap > i { position: absolute; z-index: 2; top: 50%; inset-inline-start: 16px; transform: translateY(-50%); color: #98a2b3; pointer-events: none; }
.cx-input-wrap .form-control,
.cx-input-wrap .form-select { padding-inline-start: 46px; }
.cx-phone {
    display: flex;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d9dee8;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16,24,40,.025);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.cx-phone:focus-within { border-color: var(--cx-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cx-brand) 12%, transparent); }
.cx-phone__prefix { display: grid; min-width: 76px; place-items: center; padding: 0 14px; border-inline-end: 1px solid #e2e6ed; color: var(--cx-ink); background: #f5f7fa; font: 800 .9rem/1 "Tajawal", sans-serif; }
.cx-phone .form-control { min-width: 0; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; direction: ltr; font-weight: 700; letter-spacing: .04em; }
.cx-field .form-control,
.cx-field .form-select,
.commerce-surface .form-control,
.commerce-surface .form-select,
.commerce-console .form-control,
.commerce-console .form-select,
.ops-dashboard .form-control,
.ops-dashboard .form-select {
    min-height: 50px;
    border: 1px solid #d9dee8;
    border-radius: 14px;
    color: var(--cx-ink);
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(16,24,40,.025);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.cx-field textarea.form-control,
.commerce-surface textarea.form-control,
.ops-dashboard textarea.form-control { min-height: auto; }
.cx-field .form-control:focus,
.cx-field .form-select:focus,
.commerce-surface .form-control:focus,
.commerce-surface .form-select:focus,
.commerce-console .form-control:focus,
.commerce-console .form-select:focus,
.ops-dashboard .form-control:focus,
.ops-dashboard .form-select:focus { border-color: var(--cx-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cx-brand) 12%, transparent); }

.cx-action,
.commerce-surface .btn-primary,
.commerce-console .btn-primary,
.ops-dashboard .btn-primary {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-color: var(--cx-brand);
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--cx-brand), var(--cx-brand-dark));
    box-shadow: 0 12px 26px color-mix(in srgb, var(--cx-brand) 24%, transparent);
    font-weight: 800;
    transition: transform .18s ease, box-shadow .18s ease;
}
.cx-action:hover,
.commerce-surface .btn-primary:hover,
.commerce-console .btn-primary:hover,
.ops-dashboard .btn-primary:hover { border-color: var(--cx-brand-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 16px 32px color-mix(in srgb, var(--cx-brand) 30%, transparent); }
.cx-action:focus-visible { outline: 3px solid color-mix(in srgb, var(--cx-brand) 24%, transparent); outline-offset: 3px; }
.cx-submit-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 12px; color: var(--cx-muted); font-size: .76rem; }

.cx-check { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; border: 1px solid var(--cx-line); border-radius: 13px; background: #fbfcfe; }
.cx-check .form-check-input { flex: 0 0 auto; margin: 3px 0 0; }
.cx-check a { color: var(--cx-brand-dark); font-weight: 800; }

.otp-inputs { display: flex; direction: ltr; justify-content: center; gap: clamp(10px, 2vw, 16px); margin: 25px 0 12px; }
.otp-input {
    width: clamp(58px, 14vw, 72px);
    height: clamp(66px, 16vw, 78px);
    border: 1.5px solid #d6dce7;
    border-radius: 19px;
    color: var(--cx-ink);
    background: #fff;
    box-shadow: 0 8px 24px rgba(16,24,40,.06);
    font: 800 clamp(1.55rem, 5vw, 2rem)/1 "Tajawal", sans-serif;
    text-align: center;
    caret-color: var(--cx-brand);
    transition: .18s ease;
}
.otp-input:hover { border-color: #b7c0ce; transform: translateY(-1px); }
.otp-input:focus { border-color: var(--cx-brand); outline: 0; box-shadow: 0 0 0 5px color-mix(in srgb, var(--cx-brand) 12%, transparent), 0 12px 30px rgba(16,24,40,.08); transform: translateY(-2px); }
.otp-input.is-filled { border-color: color-mix(in srgb, var(--cx-brand) 65%, #d6dce7); background: var(--cx-brand-soft); }
.otp-phone { display: inline-flex; direction: ltr; align-items: center; gap: 7px; margin-top: 6px; padding: 7px 12px; border-radius: 999px; color: var(--cx-ink-soft); background: #f2f4f7; font-weight: 800; }
.otp-resend { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; color: var(--cx-brand-dark); font-size: .88rem; font-weight: 800; text-decoration: none; }

/* Customer commerce */
.commerce-surface { min-height: 65vh; padding: clamp(28px, 5vw, 64px) 0 72px; background: linear-gradient(180deg, #f8f9fc 0, #f4f6fa 100%); }
.commerce-container { width: min(1240px, calc(100% - 28px)); margin: 0 auto; }
.account-navigation.user-sidebar {
    overflow: hidden;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--cx-line);
    border-radius: 17px;
    background: #fff;
    box-shadow: var(--cx-shadow-sm);
}
.account-nav-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); gap: 6px; margin: 0; padding: 0; }
.account-nav-list li { min-width: 0; list-style: none; }
.account-nav-list a { display: flex; min-height: 46px; align-items: center; justify-content: center; gap: 8px; padding: 9px 12px; border-radius: 12px; color: var(--cx-muted); font-size: .78rem; font-weight: 800; text-align: center; text-decoration: none; transition: .18s ease; }
.account-navigation .account-nav-list a { background: transparent; }
.account-nav-list a i { flex: 0 0 auto; font-size: .9rem; }
.account-nav-list a:hover { color: var(--cx-ink); background: #f4f6f8; }
.account-nav-list a.active { color: #fff; background: var(--cx-ink); box-shadow: 0 7px 17px rgba(16,24,40,.16); }
.account-nav-count { display: grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; border-radius: 999px; color: var(--cx-ink); background: var(--cx-brand-soft); font-size: .65rem; }
.account-nav-logout a { color: #b42318; }
.commerce-hero { position: relative; overflow: hidden; margin-bottom: 24px; padding: clamp(24px, 4vw, 42px); border-radius: var(--cx-radius-lg); color: #fff; background: linear-gradient(135deg, #131c2e 0%, #26334d 72%, color-mix(in srgb, var(--cx-brand) 74%, #26334d) 130%); box-shadow: var(--cx-shadow); }
.commerce-hero::after { content: ""; position: absolute; width: 260px; height: 260px; top: -150px; inset-inline-end: -60px; border: 48px solid rgba(255,255,255,.09); border-radius: 50%; }
.commerce-hero > * { position: relative; z-index: 1; }
.commerce-hero__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.commerce-hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 11px; color: #bfeede; font-size: .78rem; font-weight: 800; letter-spacing: .02em; }
.commerce-hero h1 { margin: 0 0 10px; color: #fff; font-size: clamp(1.75rem, 4vw, 2.65rem); font-weight: 900; letter-spacing: -.035em; }
.commerce-hero p { max-width: 710px; margin: 0; color: rgba(255,255,255,.72); line-height: 1.8; }
.commerce-hero__balance { flex: 0 0 auto; min-width: 190px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.13); border-radius: 20px; background: rgba(255,255,255,.1); backdrop-filter: blur(12px); }
.commerce-hero__balance small { display: block; color: rgba(255,255,255,.66); }
.commerce-hero__balance strong { display: block; margin-top: 5px; color: #fff; font-size: 1.55rem; }

.commerce-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px; }
.commerce-col-4 { grid-column: span 4; }
.commerce-col-5 { grid-column: span 5; }
.commerce-col-6 { grid-column: span 6; }
.commerce-col-7 { grid-column: span 7; }
.commerce-col-8 { grid-column: span 8; }
.commerce-col-12 { grid-column: span 12; }
.commerce-card { min-width: 0; overflow: hidden; border: 1px solid var(--cx-line); border-radius: var(--cx-radius); background: var(--cx-panel); box-shadow: var(--cx-shadow-sm); }
.commerce-card__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 22px; border-bottom: 1px solid #edf0f4; }
.commerce-card__title { display: flex; align-items: center; gap: 11px; margin: 0; font-size: 1.04rem; font-weight: 900; }
.commerce-card__title i { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: var(--cx-brand); background: var(--cx-brand-soft); }
.commerce-card__body { padding: 22px; }

.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px; margin: 22px 0; }
.metric-tile { position: relative; overflow: hidden; min-height: 122px; padding: 19px; border: 1px solid var(--cx-line); border-radius: 18px; background: #fff; box-shadow: var(--cx-shadow-sm); }
.metric-tile::after { content: ""; position: absolute; width: 62px; height: 62px; inset-inline-end: -24px; bottom: -27px; border-radius: 50%; background: var(--cx-brand-soft); }
.metric-tile__icon { display: grid; width: 36px; height: 36px; place-items: center; margin-bottom: 13px; border-radius: 11px; color: var(--cx-brand); background: var(--cx-brand-soft); }
.metric-tile small { display: block; color: var(--cx-muted); font-size: .75rem; font-weight: 700; }
.metric-tile strong { display: block; margin-top: 5px; font-size: clamp(1.1rem, 2vw, 1.45rem); font-weight: 900; }

.referral-link { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; direction: ltr; }
.referral-link .form-control { min-width: 0; }
.referral-rate { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 7px 11px; border-radius: 999px; color: #08775d; background: var(--cx-mint-soft); font-size: .78rem; font-weight: 800; }
.account-option { padding: 15px; border: 1px solid var(--cx-line); border-radius: 15px; background: #fafbfc; }
.account-option + .account-option { margin-top: 10px; }
.account-option strong { display: block; }
.account-option code { direction: ltr; color: var(--cx-ink); font: 700 .92rem/1.6 "Tajawal", sans-serif; }

.commerce-table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; }
.commerce-table th { padding: 12px 14px; border-bottom: 1px solid var(--cx-line); color: var(--cx-muted); background: #fafbfc; font-size: .73rem; font-weight: 800; white-space: nowrap; }
.commerce-table td { padding: 15px 14px; border-bottom: 1px solid #f0f2f5; color: var(--cx-ink-soft); vertical-align: middle; }
.commerce-table tbody tr:last-child td { border-bottom: 0; }
.commerce-table tbody tr:hover td { background: #fcfcfd; }
.cx-status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; color: #475467; background: #f2f4f7; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.cx-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #98a2b3; }
.cx-status--success { color: #067054; background: #ecfdf3; }
.cx-status--success::before { background: #12b76a; }
.cx-status--warning { color: #934c0c; background: #fffaeb; }
.cx-status--warning::before { background: #f79009; }
.cx-status--danger { color: #b42318; background: #fef3f2; }
.cx-status--danger::before { background: #f04438; }
.cx-empty { padding: 34px 20px; color: var(--cx-muted); text-align: center; }
.cx-empty i { display: grid; width: 50px; height: 50px; place-items: center; margin: 0 auto 12px; border-radius: 16px; color: var(--cx-brand); background: var(--cx-brand-soft); font-size: 1.15rem; }
.movement-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid #f0f2f5; }
.movement-row:last-child { border-bottom: 0; }
.movement-row__meta { display: flex; min-width: 0; align-items: center; gap: 11px; }
.movement-row__icon { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: #08775d; background: var(--cx-mint-soft); }
.movement-row__icon.is-debit { color: #b42318; background: #fef3f2; }
.movement-row small { display: block; color: var(--cx-muted); font-size: .72rem; }

.assisted-source-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.assisted-source { display: flex; min-height: 82px; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--cx-line); border-radius: 16px; background: #fff; }
.assisted-source__icon { display: grid; width: 43px; height: 43px; flex: 0 0 auto; place-items: center; border-radius: 14px; color: var(--cx-brand); background: var(--cx-brand-soft); }
.assisted-order-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 0; border-bottom: 1px solid #edf0f4; }
.assisted-order-row:last-child { border-bottom: 0; }
.assisted-order-row a { color: var(--cx-ink); font-weight: 900; text-decoration: none; }
.assisted-order-row small { display: block; margin-top: 3px; color: var(--cx-muted); }
.commerce-timeline { position: relative; display: grid; gap: 18px; }
.commerce-timeline::before { content: ""; position: absolute; top: 8px; bottom: 8px; inset-inline-start: 10px; width: 2px; background: #e5e9ef; }
.timeline-event { position: relative; padding-inline-start: 36px; }
.timeline-event::before { content: ""; position: absolute; z-index: 1; top: 5px; inset-inline-start: 3px; width: 16px; height: 16px; border: 4px solid #fff; border-radius: 50%; background: var(--cx-brand); box-shadow: 0 0 0 2px var(--cx-brand-soft); }
.timeline-event strong { display: block; font-weight: 900; }
.timeline-event small { color: var(--cx-muted); }
.timeline-event p { margin: 5px 0 0; color: var(--cx-ink-soft); }

.address-map-frame { position: relative; overflow: hidden; border: 1px solid var(--cx-line); border-radius: 20px; box-shadow: var(--cx-shadow-sm); }
.address-map-frame #address-map { height: 390px !important; border-radius: 0 !important; }
.address-tip { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 13px; padding: 13px 14px; border-radius: 14px; color: #344054; background: #f2f4f7; font-size: .85rem; line-height: 1.7; }
.address-tip i { color: var(--cx-brand); margin-top: 4px; }

.account-hero { padding-block: clamp(22px, 3vw, 32px); }
.account-verified { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; padding: 11px 15px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: #d9fff2; background: rgba(255,255,255,.1); font-size: .8rem; font-weight: 800; }
.account-profile-grid { display: grid; grid-template-columns: 145px minmax(0, 1fr); align-items: start; gap: 28px; }
.account-avatar-cell { padding: 5px 0; }
.account-fields { min-width: 0; }
.account-notification-row { display: flex; min-height: 86px; align-items: center; justify-content: space-between; gap: 18px; }
.mobile-account-page-title { margin: 0 0 22px; color: var(--cx-ink); font-size: clamp(1.75rem, 8vw, 2.35rem); font-weight: 900; }
.profile-mobile-nav { margin-bottom: 24px; }
.profile-mobile-nav__toggle { display: flex; width: 100%; min-height: 64px; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 20px; border: 0; border-radius: 15px; color: #fff; background: var(--cx-brand); box-shadow: 0 12px 28px color-mix(in srgb, var(--cx-brand) 24%, transparent); font: 800 1rem/1.4 "Tajawal", sans-serif; }
.profile-mobile-nav__toggle span { display: inline-flex; align-items: center; gap: 10px; }
.profile-mobile-nav__toggle[aria-expanded="true"] { border-radius: 15px 15px 0 0; box-shadow: none; }
.profile-mobile-nav__chevron { transition: transform .2s ease; }
.profile-mobile-nav__toggle[aria-expanded="true"] .profile-mobile-nav__chevron { transform: rotate(180deg); }
.profile-mobile-nav__panel { display: grid; gap: 2px; padding: 8px 12px 14px; border-radius: 0 0 15px 15px; background: var(--cx-brand); box-shadow: 0 14px 30px color-mix(in srgb, var(--cx-brand) 20%, transparent); }
.profile-mobile-nav__panel a { display: flex; min-height: 48px; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: rgba(255,255,255,.92); font-size: .92rem; font-weight: 800; text-decoration: none; }
.profile-mobile-nav__panel a i { width: 22px; text-align: center; }
.profile-mobile-nav__panel a:hover,
.profile-mobile-nav__panel a.active { color: #fff; background: rgba(17,24,39,.18); }
.mobile-account-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; padding: 14px 0; }
.mobile-account-shortcuts a { display: grid; min-height: 78px; place-items: center; align-content: center; gap: 7px; padding: 10px 6px; border: 1px solid var(--cx-line); border-radius: 14px; color: var(--cx-ink); background: #f8fafc; font-size: .72rem; font-weight: 800; text-align: center; text-decoration: none; }
.mobile-account-shortcuts i { color: var(--cx-brand); font-size: 1.05rem; }
#footersiderbar .offcanvas-body { padding-inline: 20px; }
#footersiderbar .list-add .list-group-item { border-color: #eef1f5; background: transparent; }
#footersiderbar .list-add a { min-height: 28px; }

/* Admin operations and seller settings */
.ops-dashboard,
.commerce-console { padding-bottom: 40px; }
.ops-dashboard__hero,
.commerce-console__hero { position: relative; overflow: hidden; margin-bottom: 20px; padding: 25px 28px; border-radius: 22px; color: #fff; background: linear-gradient(135deg, #101828, #29364f); box-shadow: 0 18px 45px rgba(16,24,40,.13); }
.ops-dashboard__hero::after,
.commerce-console__hero::after { content: ""; position: absolute; width: 170px; height: 170px; top: -105px; inset-inline-end: 16%; border: 34px solid color-mix(in srgb, var(--cx-brand) 55%, transparent); border-radius: 50%; }
.ops-dashboard__hero > *,
.commerce-console__hero > * { position: relative; z-index: 1; }
.ops-dashboard__hero h2,
.commerce-console__hero h2 { margin: 0 0 7px; color: #fff; font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 900; }
.ops-dashboard__hero p,
.commerce-console__hero p { margin: 0; color: rgba(255,255,255,.7); }
.ops-dashboard .nav-pills { display: flex; flex-wrap: nowrap; overflow-x: auto; padding: 7px; border: 1px solid var(--cx-line); border-radius: 17px; background: #fff; box-shadow: var(--cx-shadow-sm); scrollbar-width: none; }
.ops-dashboard .nav-pills::-webkit-scrollbar { display: none; }
.ops-dashboard .nav-pills .nav-link { min-height: 43px; padding: 9px 16px; border-radius: 12px; color: #667085; font-size: .82rem; font-weight: 800; white-space: nowrap; }
.ops-dashboard .nav-pills .nav-link.active { color: #fff; background: var(--cx-ink); box-shadow: 0 7px 18px rgba(16,24,40,.17); }
.ops-dashboard .card,
.commerce-console .seller-card { overflow: hidden; border: 1px solid var(--cx-line) !important; border-radius: 20px !important; box-shadow: var(--cx-shadow-sm) !important; }
.ops-dashboard .card-body { padding: 22px; }
.ops-dashboard .table { margin-bottom: 0; }
.ops-dashboard .table thead th { padding: 12px 13px; border-bottom: 1px solid var(--cx-line); color: var(--cx-muted); background: #fafbfc; font-size: .73rem; font-weight: 800; white-space: nowrap; }
.ops-dashboard .table tbody td { padding: 14px 13px; border-bottom-color: #eef0f3; vertical-align: middle; }
.ops-dashboard .form-check.border { min-height: 72px; align-items: center; gap: 9px; border-color: var(--cx-line) !important; border-radius: 15px !important; background: #fafbfc; transition: .18s ease; }
.ops-dashboard .form-check.border:hover { border-color: color-mix(in srgb, var(--cx-brand) 35%, var(--cx-line)) !important; background: var(--cx-brand-soft); }
.ops-dashboard .badge { padding: 7px 10px; border-radius: 999px; font-weight: 800; }
.ops-guide { overflow: hidden; border: 1px solid var(--cx-line); border-radius: 18px; background: #fff; box-shadow: var(--cx-shadow-sm); }
.ops-guide summary { display: flex; cursor: pointer; list-style: none; align-items: center; gap: 10px; padding: 17px 20px; font-weight: 900; }
.ops-guide summary::-webkit-details-marker { display: none; }
.ops-guide summary > i { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: var(--cx-brand); background: var(--cx-brand-soft); }
.ops-guide summary small { margin-inline-start: auto; color: var(--cx-muted); font-weight: 600; }
.ops-guide__grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; padding: 0 20px 20px; }
.ops-guide__grid > div { display: grid; gap: 6px; padding: 15px; border: 1px solid var(--cx-line); border-radius: 14px; background: #fafbfc; }
.ops-guide__grid > div i { color: var(--cx-brand); }
.ops-guide__grid > div span { color: var(--cx-muted); font-size: .76rem; line-height: 1.7; }
.ops-fixed-policy { display: flex; min-height: 50px; align-items: center; gap: 12px; padding: 9px 13px; border: 1px solid var(--cx-line); border-radius: 14px; background: #f8fafc; }
.ops-fixed-policy > i { color: #07956f; font-size: 1.25rem; }
.ops-fixed-policy strong, .ops-fixed-policy span { display: block; }
.ops-fixed-policy span { color: var(--cx-muted); font-size: .72rem; }
.source-control { padding: 13px 0; border-bottom: 1px solid #eef0f3; }
.source-control:last-child { border-bottom: 0; }
.source-control__order { max-width: 74px; }

/* Dark mode follows the store switch without changing the visual hierarchy. */
html.dark {
    --cx-ink: #f8fafc;
    --cx-ink-soft: #d0d5dd;
    --cx-muted: #98a2b3;
    --cx-line: #303849;
    --cx-bg: #0d1320;
    --cx-panel: #151d2c;
}
html.dark .auth-experience,
html.dark .commerce-surface { background: linear-gradient(160deg, #0b111d, #121a29); }
html.dark .auth-frame { border-color: rgba(255,255,255,.08); background: rgba(21,29,44,.94); }
html.dark .auth-panel { background: rgba(21,29,44,.96); }
html.dark .auth-panel h1,
html.dark .commerce-card,
html.dark .metric-tile,
html.dark .commerce-surface .user-sidebar,
html.dark .ops-dashboard .nav-pills { color: var(--cx-ink); background: var(--cx-panel); }
html.dark .cx-field .form-control,
html.dark .cx-field .form-select,
html.dark .commerce-surface .form-control,
html.dark .commerce-surface .form-select,
html.dark .commerce-console .form-control,
html.dark .commerce-console .form-select,
html.dark .ops-dashboard .form-control,
html.dark .ops-dashboard .form-select { border-color: var(--cx-line); color: #f8fafc; background-color: #111827; }
html.dark .cx-check,
html.dark .account-option,
html.dark .assisted-source,
html.dark .commerce-table th,
html.dark .ops-dashboard .table thead th,
html.dark .ops-dashboard .form-check.border { border-color: var(--cx-line) !important; color: var(--cx-ink-soft); background: #101827; }
html.dark .commerce-table td,
html.dark .ops-dashboard .table td { color: var(--cx-ink-soft); }
html.dark .commerce-table tbody tr:hover td { background: #182132; }
html.dark .otp-input { border-color: var(--cx-line); color: #fff; background: #111827; }
html.dark .otp-phone,
html.dark .address-tip { color: var(--cx-ink-soft); background: #202a3a; }
html.dark .cx-phone { border-color: var(--cx-line); background: #111827; }
html.dark .cx-phone__prefix { border-color: var(--cx-line); color: #fff; background: #202a3a; }
html.dark .account-navigation.user-sidebar { color: var(--cx-ink); background: var(--cx-panel); }

@media (max-width: 991.98px) {
    .auth-frame { grid-template-columns: 1fr; width: min(680px, 100%); }
    .auth-story { min-height: auto; padding: 30px; }
    .auth-story__body { margin-top: 42px; }
    .auth-story__bottom { display: none; }
    .auth-story h2 { font-size: 2rem; }
    .marketplace-nav-tools { display: flex !important; width: auto; flex: 0 0 auto; gap: 4px !important; margin-inline-start: auto; }
    .marketplace-nav-tools .icon_box { width: 34px; height: 34px; border-radius: 10px; }
    .marketplace-nav-tools .lag-btn .dropdown-menu { position: absolute; }
    .account-navigation.user-sidebar { display: none !important; }
    .commerce-col-4,
    .commerce-col-5,
    .commerce-col-6,
    .commerce-col-7,
    .commerce-col-8 { grid-column: span 12; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .assisted-source-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 767.98px) {
    .auth-experience { min-height: 0; padding: 18px 0 35px; }
    .auth-frame { width: calc(100% - 24px); border-radius: 24px; }
    .auth-story { padding: 24px; }
    .auth-story__body { margin-top: 32px; }
    .auth-story__eyebrow { font-size: .7rem; }
    .auth-story h2 { margin-top: 16px; font-size: 1.7rem; }
    .auth-story p { font-size: .9rem; }
    .auth-panel { padding: 28px 22px; }
    .account-surface { padding-top: 28px; }
    .account-surface .account-hero { display: none; }
    .commerce-container { width: min(100% - 20px, 1240px); }
    .commerce-hero { border-radius: 22px; }
    .commerce-hero__row { align-items: stretch; flex-direction: column; }
    .commerce-hero__balance { min-width: 0; }
    .account-nav-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .account-nav-list a { justify-content: flex-start; min-height: 52px; padding: 10px 12px; text-align: start; white-space: normal; }
    .account-profile-grid { grid-template-columns: 1fr; gap: 20px; }
    .account-avatar-cell { justify-self: center; }
    .account-content-grid { gap: 14px; }
    .metric-grid { gap: 10px; }
    .metric-tile { min-height: 112px; padding: 15px; }
    .commerce-card__head,
    .commerce-card__body { padding: 17px; }
    .assisted-source-list { grid-template-columns: 1fr; }
    .assisted-order-row { align-items: flex-start; flex-direction: column; }
    .referral-link { grid-template-columns: 1fr; }
    .ops-dashboard__hero,
    .commerce-console__hero { padding: 22px; border-radius: 18px; }
    .ops-guide__grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 992px) {
    .account-navigation.user-sidebar { display: block !important; }
}

@media (max-width: 430px) {
    .otp-inputs { gap: 8px; }
    .otp-input { width: 55px; height: 64px; border-radius: 16px; }
    .metric-grid { grid-template-columns: 1fr 1fr; }
    .metric-tile:last-child { grid-column: 1 / -1; }
    .auth-benefits { display: none; }
    .account-nav-list { gap: 5px; }
    .account-nav-list a { font-size: .74rem; }
    .cx-phone__prefix { min-width: 70px; padding-inline: 11px; }
    .ops-guide__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-experience *,
    .commerce-surface *,
    .ops-dashboard *,
    .commerce-console * { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
