/* Shared interactive colours. The tenant palette is set by the current workspace or storefront. */
:root {
    --action: #4335a0;
    --action-dark: #302671;
    --action-tint: #eeebff;
    --action-edge: #8379ab;
    --text-strong: #17243a;
    --text-soft: #43516a;
    --key-line: #d3dae5;
    --focus-ring: #135ca0;
}
body.Jade {
    --action: #12634e;
    --action-dark: #0d473a;
    --action-tint: #e1f2e9;
    --action-edge: #5c8474;
}
body.Plum, body.op-platform {
    --action: #6b3685;
    --action-dark: #49275d;
    --action-tint: #f1e7f5;
    --action-edge: #916f9f;
}
body.op-shell {
    --action: var(--op-accent);
    --action-dark: var(--op-deep);
    --action-tint: var(--op-wash);
}
body { font-variant-numeric: lining-nums; }
body :is(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
    box-shadow: 0 0 0 3px #fff;
}
.work-arrow { display: inline-block; font-family: Arial, sans-serif; }
[dir="rtl"] .work-arrow { transform: scaleX(-1); }
body [hidden] { display: none !important; }

/* Native form controls, previously unstyled in a number of dashboards. Menu, tab and icon
   controls keep their own layout. Semantic variants below also cover anchors used as buttons. */
body:is(.tenant-workspace,.op-shell,.public-site,.cw-handoff) main :is(
    button:not([class]), input[type="submit"], input[type="button"],
    button.button, a.button, .studio-btn, .bulk-submit, .pay-actions button, .pay-method button,
    .auth-card button[type="submit"], .receipt-next
) {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 42px;
    max-width: 100%;
    padding: .55rem .95rem;
    border: 1px solid var(--action);
    border-radius: .65rem;
    color: white;
    background: var(--action);
    box-shadow: 0 1px 2px #17243a16;
    font: inherit;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
body:is(.tenant-workspace,.op-shell,.public-site,.cw-handoff) main :is(
    button:not([class]), input[type="submit"], input[type="button"],
    button.button, a.button, .studio-btn, .bulk-submit, .pay-actions button, .pay-method button,
    .auth-card button[type="submit"], .receipt-next
):is(:hover,:active):not(:disabled) {
    background: var(--action-dark);
    border-color: var(--action-dark);
    color: #fff;
}
body:is(.tenant-workspace,.op-shell,.public-site,.cw-handoff) main :is(.secondary, .button.secondary, .op-small-action, .receipt-heading .secondary),
body.cw-workspace main .auth-card .cw-signup a.button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 42px;
    max-width: 100%;
    border: 1px solid var(--action-edge);
    border-radius: .65rem;
    padding: .5rem .92rem;
    background: var(--action-tint);
    color: var(--action-dark);
    box-shadow: none;
    text-decoration: none;
    font: inherit;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
    cursor: pointer;
}
body:is(.tenant-workspace,.op-shell,.public-site,.cw-handoff) main :is(.secondary,.button.secondary,.op-small-action):is(:hover,:active):not(:disabled),
body.cw-workspace main .auth-card .cw-signup a.button:hover {
    color: var(--action-dark);
    background: white;
    border-color: var(--action-dark);
}
body:is(.tenant-workspace,.op-shell) main :is(.sd-danger, .danger, .button.danger, .danger-zone button) {
    background: #fff0f0;
    border: 1px solid #a74e51;
    color: #7b202c;
}
body:is(.tenant-workspace,.op-shell) main :is(.sd-danger,.danger,.button.danger,.danger-zone button):hover {
    background: #832c38;
    color: #fff;
}
body main :is(button, input[type="submit"],input[type="button"]):disabled {
    opacity: 1;
    color: #535e6b !important;
    background: #e9edf1 !important;
    border-color: #bac3cf !important;
    box-shadow: none;
    cursor: not-allowed;
}
body :is(.auth-card,.pay-form,.stack-form) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]), select, textarea) {
    border-color: var(--action-edge);
    background-color: #fff;
    color: #1e2a3b;
    border-radius: .55rem;
    min-height: 42px;
}
body .auth-card input:focus-visible { border-color: var(--focus-ring); }
body main .button svg, body main .secondary svg, .watch-icon svg, .ticket-icon svg, .auth-symbol svg { width: 1.2rem; height: 1.2rem; flex: none; }

/* Dashboard navigation, including functional section landing pages. */
.work-trail {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem .65rem;
    width: 100%;
    margin: 0 auto .85rem;
    color: var(--text-soft);
    font-size: .88rem;
    line-height: 1.55;
}
body .work-trail a, body .work-trail a:visited { color: var(--action-dark); text-decoration: underline; text-underline-offset: .2em; font-weight: 700; }
.work-trail [aria-hidden] { color: #76819a; }
.work-trail [aria-current] { color: var(--text-strong); overflow-wrap: anywhere; }
body.tenant-workspace main:has(> .payment-order) > .work-trail { max-width: 58rem; }
body .cw-pop .group-index, body .op-group-links .group-index { color: var(--action-dark); font-weight: 700; border-block-end: 1px solid var(--key-line); }
.work-directory { width: min(100%, 76rem); margin-inline: auto; }
.work-directory h1 { margin: .15rem 0 1rem; }
.work-tools { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit,minmax(min(100%,17rem),1fr)); margin: 0; padding: 0; list-style: none; }
body .work-tools a {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    min-height: 4.2rem; padding: 1rem; color: var(--text-strong); background: white;
    border: 1px solid var(--key-line); border-inline-start: 3px solid var(--action); border-radius: .7rem; font-weight: 700; text-decoration: none;
}
body .work-tools a:hover { border-color: var(--action); background: var(--action-tint); }
.work-tools .work-arrow { color: var(--action); }
body .console-hero, body .op-home .op-hero { padding: clamp(1.2rem, 2.9vw, 2.3rem); border-radius: 1.1rem; }
body .client-home-tools, body .op-task-grid { gap: .75rem; }
body .client-home-tool, body .op-task, body .op-metrics > * { border-color: var(--key-line); }
body .client-home-tool:hover { border-color: var(--action-edge); }
body .op-home .op-hero-action, body.cw-workspace .customer-console .console-hero a.studio-btn { color: #17243a; background: #e2f5ae; border-color: #c4df85; }
body .op-home .op-hero-action:hover, body.cw-workspace .customer-console .console-hero a.studio-btn:hover { color: #17243a; background: #effbcf; }
body.cw-workspace .customer-console .console-hero a.cw-sender-action { color: #fff; background: #272d4b; border-color: #aeb7cb; }
body.cw-workspace .customer-console .console-hero a.cw-sender-action:hover { color: #fff; background: #384367; }
body .op-home .op-task a:focus-visible, body .client-home-tools a:focus-visible { outline-offset: 1px; }
body .auth-symbol {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.6rem; height: 2.6rem; color: var(--action-dark); background: var(--action-tint); border-radius: .8rem; margin-block-end: .75rem;
}
body .auth-shell .auth-card, body .op-access .auth-card { border-radius: 1rem; box-shadow: 0 4px 20px #18293e09; }
body .auth-shell .auth-card h1 { max-width: 25ch; font-size: clamp(1.65rem,3.1vw,2.45rem); line-height: 1.28; }
body:lang(ar) .auth-card h1 { line-height: 1.5; }
body .cw-workspace .auth-compact, body.cw-workspace .auth-compact { max-width: 32rem; }
body .auth-card .stack-form { gap: .9rem; }
body .cw-login .cw-guide-art img { max-height: 16rem; width: 100%; object-fit: contain; }

/* Public service discovery uses the tenant's existing catalogue, imagery, fonts and accents. */
.experience .shell.block, .launch .wrap.band { padding-block: clamp(1.8rem, 3.9vw, 3.5rem); }
.experience .cover-inner { padding: clamp(1.5rem, 4.6vw, 4.5rem); }
.launch .hero.wrap { padding-block: clamp(1.6rem, 4vw, 3.5rem); }
body.experience .service-directory, body.launch .service-directory { gap: .8rem; align-items: stretch; }
body.experience .service-directory .service-card, body.launch .service-directory .svc {
    display: flex; flex-direction: column; height: 100%; min-height: 0; padding: clamp(1rem,2vw,1.45rem);
    border: 1px solid #cad3df; border-radius: 1rem; box-shadow: 0 2px 7px #19213908;
}
body.experience .service-directory .service-card:hover, body.launch .service-directory .svc:hover { border-color: var(--action-edge); box-shadow: 0 4px 12px #19213910; }
.service-directory .service-example { display: grid; gap: .12rem; align-content: start; padding: .65rem .75rem; margin-block-start: .8rem; border-inline-start: 2px solid var(--action-edge); background: #f5f6fa; color: #3d4a60; font-size: .9rem; line-height: 1.48; }
.service-directory .service-example strong { color: var(--action-dark); font-size: .82rem; }
.service-directory .service-example > span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
body.experience .button, body.launch .btn { border-radius: .65rem; box-shadow: none; min-height: 44px; }
body.experience .button.light, body.launch .btn.soft, body.experience .choice-row .pill:not([aria-pressed="true"]), body.launch .pills a:not([aria-current="true"]) {
    color: var(--action-dark); background: var(--action-tint); border: 1px solid var(--action-edge);
}
body.experience .button.light:is(:hover, :active), body.launch .btn.soft:is(:hover, :active) {
    color: var(--action-dark);
    background: #fff;
    border-color: var(--action-dark);
}
body.experience .button.glass { color: white; background: #292e47; border-color: #aeb7cb !important; }
body.experience .choice-row .pill[aria-pressed="true"], body.launch .pills a[aria-current="true"] { color: white; background: var(--action); border: 1px solid var(--action); }
body.experience .guide-how, body.launch .guide .band { padding-block: clamp(1.25rem,3vw,2.6rem); }

/* Buyer receipt. A persistent text label and an icon accompany every state colour. */
body.tenant-workspace main.dashboard-content > .pay42.payment-order {
    width: 100%; max-width: 58rem; margin-inline: auto; gap: .95rem;
    --pay-ink: var(--text-strong); --pay-teal: var(--action); --pay-line: var(--key-line);
}
.receipt-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; }
.payment-order .receipt-order { color: var(--text-soft); font-weight: 700; font-size: .94rem; margin-block-end: .1rem; }
.receipt-order bdi { display: inline-block; color: var(--action-dark); font-variant-numeric: tabular-nums; }
.payment-order .receipt-heading h1 { font-size: clamp(1.75rem,3.4vw,2.6rem); line-height: 1.26; color: var(--text-strong); }
body:lang(ar) .payment-order .receipt-heading h1 { line-height: 1.5; }
.receipt-panel { border: 1px solid #c9d3df; border-radius: 1rem; overflow: hidden; background: #fff; box-shadow: 0 5px 18px #15253a0c; }
.receipt-top {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .85rem 1.2rem;
    padding: clamp(1.15rem,3vw,2rem); color: #fff; background-color: #202b49;
    background-image: radial-gradient(ellipse at 95% 120%, #43416c 0, transparent 56%);
}
.tone-paid .receipt-top { background-color: #123b3a; background-image: radial-gradient(ellipse at 95% 120%, #205854 0, transparent 62%); }
.tone-pending .receipt-top { background-color: #25344d; background-image: radial-gradient(ellipse at 95% 120%, #444963 0, transparent 60%); }
.receipt-money span, .receipt-money strong { display: block; }
.receipt-money span { color: #edf3f6; font-weight: 700; font-size: .96rem; }
.receipt-money strong { width: fit-content; margin-block-start: .15rem; font-size: clamp(2rem,4.5vw,3.15rem); line-height: 1.24; font-variant-numeric: tabular-nums; letter-spacing: -.035em; color: #fff; }
.receipt-state { display: inline-flex; align-items: center; gap: .5rem; max-width: 100%; padding: .45rem .78rem; border-radius: 2rem; background: #f1ebff; color: #352957; }
.receipt-state svg { width: 1.2rem; height: 1.2rem; flex: none; }
.tone-paid .receipt-state { background: #c9f3da; color: #0d5137; }
.tone-pending .receipt-state { background: #fff0c7; color: #62420b; }
.tone-ended .receipt-state { background: #ffe9e2; color: #773c2c; }
.receipt-detail { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem clamp(1.15rem,3vw,2rem); }
.receipt-detail:has(.receipt-facts:empty):not(:has(.receipt-next)) { display: none; }
.receipt-facts { display: flex; flex-wrap: wrap; gap: .7rem 1.7rem; }
.receipt-facts > div { min-width: 0; }
.receipt-facts dt { color: var(--text-soft); font-size: .88rem; }
.receipt-facts dd { font-weight: 700; font-size: .98rem; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.receipt-next { margin-inline-start: auto; }
body .payment-order .pay-card, body .payment-order .pay-method { border-radius: .85rem; }
body .payment-watch { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: .95rem; padding: clamp(1rem,2vw,1.45rem); border: 1px solid var(--action-edge); border-radius: .85rem; background: white; }
.watch-icon, .ticket-icon { display: grid; place-items: center; flex: none; width: 2.65rem; height: 2.65rem; border-radius: .75rem; color: var(--action-dark); background: var(--action-tint); }
.payment-watch p, .outlet-panel p { color: var(--text-soft); }
.payment-watch progress { display: block; width: 100%; height: .55rem; margin: .85rem 0 .5rem; border: 0; border-radius: 1rem; overflow: hidden; background: #e2e6ef; color: var(--action); accent-color: var(--action); }
.payment-watch progress::-webkit-progress-bar { background: #e2e6ef; }
.payment-watch progress::-webkit-progress-value { background: var(--action); }
.payment-watch progress::-moz-progress-bar { background: var(--action); }
[data-watch-label], [data-copy-feedback] { font-weight: 700; font-size: .92rem; }
.reference-ticket { display: flex; align-items: flex-start; gap: .85rem; padding-block-end: .85rem; border-block-end: 1px dashed var(--action-edge); }
.ticket-body { min-width: 0; flex: 1; }
.ticket-code { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem 1rem; margin: .5rem 0; }
body .payment-order .ticket-code strong { font-size: clamp(1.65rem,4.4vw,2.7rem); line-height: 1.2; letter-spacing: .065em; color: var(--action-dark); font-variant-numeric: tabular-nums; }
body .payment-order .outlet-panel { background: linear-gradient(105deg,white 64%,var(--action-tint)); border-color: var(--action-edge); }
body .pay42:not(.payment-order) .pay-summary { background: #edf4f2; border-color: #b0c8c0; border-inline-start: 4px solid #32765c; }
body .pay42 .pay-row { gap: .65rem 1rem; }
@media (max-width: 42rem) {
    .work-trail { font-size: .84rem; margin-block-end: .65rem; }
    .receipt-detail { display: grid; }
    .receipt-facts { gap: .65rem 1.1rem; }
    .receipt-next { margin-inline-start: 0; width: fit-content; }
    .receipt-heading { align-items: end; }
    .payment-order .receipt-heading .secondary { padding-inline: .65rem; }
    .payment-watch { grid-template-columns: auto minmax(0,1fr); }
    body .cw-login .cw-login-guide { min-height: auto; }
    .cw-login .cw-login-guide .cw-guide-art { display: none; }
    body .work-tools { grid-template-columns: minmax(0,1fr); }
}
@media (forced-colors: active) {
    .receipt-state,.receipt-panel,.auth-symbol,.watch-icon,.ticket-icon { border: 1px solid CanvasText; }
}
@media (prefers-reduced-motion: reduce) {
    .experience .button, .service-directory a, .work-tools a, .receipt-next { transition: none; transform: none; }
}

.gateway-handoff .gateway-page {
    max-width: 38rem;
    margin: clamp(1rem, 6vh, 4rem) auto;
    padding-inline: 1rem;
}
.gateway-handoff .gateway-page .card {
    border-block-start: .3rem solid var(--action);
    padding: clamp(1.2rem, 4vw, 2rem);
}
.gateway-handoff #checkout-status, .gateway-handoff #status { margin-block: 1rem; }
.gateway-handoff .gateway-page .secondary { margin-inline-start: .35rem; }

.payment-order .receipt-followup {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: .75rem 1.25rem; padding: .9rem clamp(1.15rem,3vw,2rem);
    background: #f2f6f5; border-block-start: 1px solid var(--key-line);
}
.receipt-followup p { color: var(--text-soft); margin: 0; flex: 1 1 13rem; }
