@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/plex-400-ar.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/plex-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/plex-500-ar.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/plex-500-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/plex-600-ar.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/plex-600-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/plex-700-ar.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/plex-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   Tokens
   Layout and component values follow the "Sarmady SSO" Figma file
   (Login 2-3 / 9-850 desktop, 17-2030 / 17-2454 mobile). The default
   "sarmady" theme matches it exactly; dark and light reuse the same shapes.
   ========================================================================== */
:root {
    --tt-radius-sm: 8px;
    --tt-radius-md: 12px;
    --tt-radius-lg: 16px;
    --tt-shadow-sm: 0 1px 2px rgba(0, 0, 0, .24);
    --tt-shadow-md: 0 8px 24px rgba(0, 0, 0, .32);
    --tt-transition: 180ms ease;
    --tt-scrollbar-size: 6px;
    --tt-scrollbar-track: transparent;
    --signal: #ED2224;

    --sso-font: 'Cairo', 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    --sso-radius-card: 16px;
    --sso-radius-field: 8px;
    --sso-radius-pill: 36px;
    --sso-field-h: 56px;
    --sso-bar-h: 72px;

    /* Legacy names still used by some pages. */
    --radius-card: var(--sso-radius-card);
    --radius-btn: var(--sso-radius-field);
    --field-h: var(--sso-field-h);
}

/* Sarmady (default): navy + orange, exactly as in Figma. */
:root[data-bs-theme="dark"][data-tt-theme="sarmady"] {
    --sso-page-bg: #313848;
    --sso-card-bg: #272C38;
    --sso-card-border: rgba(255, 255, 255, .07);
    --sso-card-shadow: 0 0 60px rgba(255, 255, 255, .08);
    --sso-bar-bg: #272C38;
    --sso-text: #FFFFFF;
    --sso-text-soft: rgba(255, 255, 255, .7);
    --sso-text-muted: rgba(255, 255, 255, .4);
    --sso-placeholder: rgba(255, 255, 255, .3);
    --sso-field-fill: rgba(217, 217, 217, .04);
    --sso-field-border: rgba(255, 255, 255, .06);
    --sso-pill-fill: rgba(255, 255, 255, .04);
    --sso-pill-border: rgba(255, 255, 255, .17);
    --sso-accent: #F97F17;
    --sso-accent-hover: #FF9333;
    --sso-on-accent: #1D212B;
    --sso-link-strong: #DF751B;
    --sso-highlight: #FFC20E;
    --sso-footer-text: rgba(255, 255, 255, .51);
    --sso-logo-ink: #FFFFFF;
}

/* Midnight & Amber */
:root[data-bs-theme="dark"]:not([data-tt-theme="sarmady"]) {
    --sso-page-bg: #0b0a09;
    --sso-card-bg: #161412;
    --sso-card-border: rgba(255, 255, 255, .07);
    --sso-card-shadow: 0 0 60px rgba(255, 255, 255, .04);
    --sso-bar-bg: #161412;
    --sso-text: #f2eee9;
    --sso-text-soft: rgba(242, 238, 233, .7);
    --sso-text-muted: #9a928a;
    --sso-placeholder: rgba(242, 238, 233, .3);
    --sso-field-fill: rgba(217, 217, 217, .04);
    --sso-field-border: rgba(255, 255, 255, .08);
    --sso-pill-fill: rgba(255, 255, 255, .04);
    --sso-pill-border: rgba(255, 255, 255, .17);
    --sso-accent: #f58733;
    --sso-accent-hover: #ff9a4d;
    --sso-on-accent: #0b0a09;
    --sso-link-strong: #f58733;
    --sso-highlight: #ffb070;
    --sso-footer-text: rgba(242, 238, 233, .5);
    --sso-logo-ink: #f2eee9;
}

:root[data-bs-theme="light"] {
    --sso-page-bg: #f3efe9;
    --sso-card-bg: #ffffff;
    --sso-card-border: #ece7e1;
    --sso-card-shadow: 0 10px 40px rgba(28, 25, 23, .08);
    --sso-bar-bg: #ffffff;
    --sso-text: #1c1917;
    --sso-text-soft: rgba(28, 25, 23, .72);
    --sso-text-muted: #78716c;
    --sso-placeholder: rgba(28, 25, 23, .4);
    --sso-field-fill: #faf8f5;
    --sso-field-border: #d9d1c7;
    --sso-pill-fill: #ffffff;
    --sso-pill-border: #d9d1c7;
    --sso-accent: #e0711c;
    --sso-accent-hover: #f58733;
    --sso-on-accent: #1c1917;
    --sso-link-strong: #c25f12;
    --sso-highlight: #e0711c;
    --sso-footer-text: #78716c;
    --sso-logo-ink: #1c1917;
}

/* Dark or light browser UI (scrollbars, form controls). Set here, not in a style="" attribute, which the CSP blocks. */
:root[data-bs-theme="dark"] { color-scheme: dark; }
:root[data-bs-theme="light"] { color-scheme: light; }

/* Aliases for the older token names (billing, status and admin pieces use them). */
:root[data-bs-theme] {
    --tt-bg: var(--sso-page-bg);
    --tt-surface: var(--sso-card-bg);
    --tt-surface-raised: var(--sso-card-bg);
    --tt-border: var(--sso-field-border);
    --tt-hairline: var(--sso-field-border);
    --tt-text: var(--sso-text);
    --tt-muted: var(--sso-text-muted);
    --tt-primary: var(--sso-accent);
    --tt-primary-hover: var(--sso-accent-hover);
    --tt-btn-on-primary: var(--sso-on-accent);
    --brand: var(--sso-accent);
    --brand-deep: var(--sso-accent-hover);
    --ink: var(--sso-on-accent);
    --surface: var(--sso-card-bg);
    --surface-muted: var(--sso-field-fill);
    --text: var(--sso-text);
    --text-muted: var(--sso-text-muted);
    --border: var(--sso-field-border);
    --tt-scrollbar-thumb: color-mix(in srgb, var(--sso-accent) 65%, transparent);
    --tt-scrollbar-thumb-hover: var(--sso-accent-hover);
}

/* ==========================================================================
   Base
   ========================================================================== */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--tt-scrollbar-thumb) var(--tt-scrollbar-track);
}

html::-webkit-scrollbar { width: var(--tt-scrollbar-size); height: var(--tt-scrollbar-size); }
html::-webkit-scrollbar-track { background: var(--tt-scrollbar-track); }
html::-webkit-scrollbar-thumb {
    background: var(--tt-scrollbar-thumb);
    border-radius: 999px;
    border: 1px solid transparent;
    background-clip: padding-box;
}
html::-webkit-scrollbar-thumb:hover { background: var(--tt-scrollbar-thumb-hover); }
html::-webkit-scrollbar-corner { background: transparent; }
html::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

html.sso-theme-switching,
html.sso-theme-switching *,
html.sso-theme-switching *::before,
html.sso-theme-switching *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
}

*, *::before, *::after { box-sizing: border-box; }

.sso-icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

body.sso-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--sso-font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--sso-text);
    background: var(--sso-page-bg);
}

/* ==========================================================================
   Page shell
   ========================================================================== */
.sso-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.sso-shell--topbar {
    min-height: calc(100vh - var(--sso-bar-h));
    min-height: calc(100dvh - var(--sso-bar-h));
}

.sso-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    padding: 60px 16px 56px;
}

.sso-shell--topbar .sso-main { padding-top: 48px; }

.sso-card {
    width: 100%;
    max-width: 630px;
    background: var(--sso-card-bg);
    border: 1px solid var(--sso-card-border);
    border-radius: var(--sso-radius-card);
    box-shadow: var(--sso-card-shadow);
    padding: 40px 45px 45px;
}

.sso-card.sso-wide {
    max-width: 988px;
    padding: 40px 48px 48px;
}

@media (prefers-reduced-motion: no-preference) {
    .sso-card--animate { animation: sso-rise .4s ease-out; }
}

@keyframes sso-rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Theme toggle: pinned to the page corner (or sits in the top bar). */
.sso-theme-dock {
    position: fixed;
    top: 16px;
    inset-inline-end: 16px;
    z-index: 20;
}

.sso-theme-toggle {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--sso-pill-border);
    border-radius: 50%;
    background: var(--sso-pill-fill);
    color: var(--sso-text);
    cursor: pointer;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: border-color var(--tt-transition), color var(--tt-transition);
}

.sso-theme-toggle:hover {
    border-color: var(--sso-accent);
    color: var(--sso-accent);
}

.sso-theme-toggle:focus-visible {
    outline: 2px solid var(--sso-accent);
    outline-offset: 3px;
}

.sso-theme-toggle__icon { width: 20px; height: 20px; }
.sso-theme-toggle__icon--hidden { display: none; }

/* ==========================================================================
   Logos
   ========================================================================== */
.sso-card__brand {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

/* Profile pages without a top bar: back to the previous page, at the card's start corner. */
.sso-card__back {
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--sso-text);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: color .15s;
}
.sso-card__back[hidden] { display: none; }
/* The sprite arrow points right: "back" in RTL. Mirrored for LTR. */
.sso-card__back svg { width: 18px; height: 18px; flex: none; }
[dir="ltr"] .sso-card__back svg { transform: scaleX(-1); }
.sso-card__back:hover { color: var(--sso-accent); }

/* Profile pages: logout icon at the card's end corner (top left in RTL). */
.sso-card__logout {
    position: absolute;
    inset-inline-end: 0;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}
.sso-card__logout button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--sso-field-border);
    border-radius: 50%;
    background: transparent;
    color: var(--sso-text);
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.sso-card__logout svg { width: 20px; height: 20px; }
.sso-card__logout button:hover { color: var(--sso-accent); border-color: var(--sso-accent); }
.sso-card__logout button:focus-visible { outline: 2px solid var(--sso-accent); outline-offset: 2px; }
.sso-card__logout button:disabled { opacity: .6; cursor: default; }
.sso-card__back:focus-visible { outline: 2px solid var(--sso-accent); outline-offset: 3px; border-radius: 4px; }

.sso-card__brand-link {
    display: inline-flex;
    border-radius: 8px;
}

.sso-card__brand-link:focus-visible {
    outline: 2px solid var(--sso-accent);
    outline-offset: 4px;
}

.sso-project-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-inline: auto;
}

.sso-project-logo__img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.sso-project-logo--brand,
.sso-project-logo--brand .sso-project-logo__img {
    max-width: 200px;
    max-height: 64px;
}

.sso-project-logo--topbar {
    height: 40px;
    max-width: min(200px, 45vw);
    margin-inline: 0;
    flex: none;
}

.sso-project-logo--topbar .sso-project-logo__img {
    height: 40px;
    max-height: 40px;
    max-width: min(200px, 45vw);
}

.sso-project-logo__monogram {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    border-radius: 12px;
    background: var(--sso-accent);
    color: var(--sso-on-accent);
    font-size: 20px;
    font-weight: 800;
}

.sso-project-logo--brand .sso-project-logo__monogram {
    min-width: 64px;
    min-height: 64px;
    font-size: 30px;
    border-radius: 16px;
}

.sso-project-logo__monogram--hidden { display: none; }

/* Sarmady logo shown when there is no client (100×20 artwork). */
.sso-project-logo__sarmady { width: 180px; max-width: 100%; margin: 0; }
.sso-project-logo--topbar .sso-project-logo__sarmady { width: 120px; }

/* Client logos are uploaded for dark backgrounds (OIDC guide). In light mode, give them a dark plate. */
:root[data-bs-theme="light"] .sso-project-logo:has(> .sso-project-logo__img:not([hidden])) {
    padding: 6px 14px;
    border-radius: var(--tt-radius-md);
    background: #272C38;
}

/* Sarmady logo (_SarmadyLogo, 100×20): the wordmark takes the theme's ink colour. */
.sso-sarmady-logo { display: block; height: auto; width: min(100%, 200px); margin-inline: auto; }
.sso-sarmady-logo .sarmady-logo__ink { fill: var(--sso-logo-ink); }
/* Footer: the whole logo (infinity mark included) in one colour, as in Figma. */
.sso-sarmady-logo.sso-footer__logo path { fill: var(--sso-logo-ink); }

/* ==========================================================================
   Top bar (profile pages): client logo + a way back to the client app
   ========================================================================== */
.sso-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: var(--sso-bar-h);
    padding: 0 64px;
    background: var(--sso-bar-bg);
}

.sso-topbar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--sso-text);
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
}

.sso-topbar__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Wordmark logos already include the project name. */
.sso-topbar__brand:has(.sso-project-logo__img:not([hidden])) .sso-topbar__name { display: none; }

.sso-topbar__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: none;
}

.sso-topbar__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--sso-text);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: color .15s;
}

.sso-topbar__back svg {
    width: 20px;
    height: 20px;
    flex: none;
    transform: scaleX(-1); /* the sprite arrow points right; "back" in RTL points left */
}

[dir="ltr"] .sso-topbar__back svg { transform: none; }

.sso-topbar__back:hover { color: var(--sso-accent); }

.sso-topbar a:focus-visible {
    outline: 2px solid var(--sso-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ==========================================================================
   Headings
   ========================================================================== */
.sso-page-header {
    margin-bottom: 28px;
    text-align: center;
}

.sso-page-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
}

/* "تسجيل الدخول إلى <brand>": light, muted lead; bold white brand. */
.sso-page-header h1:has(.sso-page-header__brand) {
    color: var(--sso-text-soft);
    font-weight: 400;
}

.sso-page-header__brand {
    color: var(--sso-text);
    font-weight: 700;
}

.sso-page-header p {
    margin: 4px 0 0;
    color: var(--sso-text-muted);
    font-size: 14px;
}

h2 { font-size: 18px; margin: 24px 0 12px; font-weight: 700; }

/* ==========================================================================
   Fields
   ========================================================================== */
.sso-field { margin-bottom: 20px; }

.sso-field__control { position: relative; }

.sso-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 400;
    color: var(--sso-text);
}

.sso-field label .sso-optional,
.sso-field label small {
    color: #ffffff70;
    font-size: inherit;
}

.sso-field__icon {
    position: absolute;
    inset-inline-end: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    color: rgba(255, 255, 255, .3);
    pointer-events: none;
    z-index: 1;
}

.sso-field input[type=text],
.sso-field input[type=email],
.sso-field input[type=password],
.sso-field input[type=tel],
.sso-field input[type=date],
.sso-field input[type=file],
.sso-field input:not([type]),
.sso-field select {
    width: 100%;
    height: var(--sso-field-h);
    padding: 0 16px;
    padding-inline-end: 52px;
    border: 1px solid var(--sso-field-border);
    border-radius: var(--sso-radius-field);
    background: var(--sso-field-fill);
    color: var(--sso-text);
    font-family: inherit;
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
}

.sso-field input::placeholder { color: var(--sso-placeholder); opacity: 1; }

/* Arabic placeholder on the right, typed e-mail addresses still read left-to-right. */
.sso-field input[type=email]:not(:placeholder-shown) { direction: ltr; text-align: right; }
/* direction:ltr flips the logical padding, so the icon side is set physically to keep text off the icon. */
[dir="rtl"] .sso-field input[type=email]:not(:placeholder-shown) { padding-left: 52px; padding-right: 16px; }
[dir="rtl"] .sso-field--no-icon input[type=email]:not(:placeholder-shown) { padding-left: 16px; }
/* Chrome paints saved/autofilled values with its own blue background. Delaying that background transition
   (practically forever) keeps the field's normal translucent fill; the text colour is forced explicitly. */
.sso-field input:-webkit-autofill,
.sso-field input:-webkit-autofill:hover,
.sso-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--sso-text);
    caret-color: var(--sso-text);
    transition: background-color 600000s 0s, color 600000s 0s, border-color .15s, box-shadow .15s;
}
/* Inputs forced to dir="ltr" (phone, read-only e-mail) flip the logical padding too: keep text clear of the icon. */
[dir="rtl"] .sso-field:not(.sso-field--no-icon) input[dir="ltr"] { padding-left: 52px; padding-right: 16px; text-align: right; }
/* Date picker: orange calendar glyph from the design instead of Chrome's grey one. */
.sso-field input[type=date]::-webkit-calendar-picker-indicator {
    width: 24px; height: 24px; padding: 0; opacity: 1; cursor: pointer;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%23F68632'%3E%3Cpath d='M8 5.75a.75.75 0 0 1-.75-.75V2a.75.75 0 0 1 1.5 0v3A.75.75 0 0 1 8 5.75ZM16 5.75a.75.75 0 0 1-.75-.75V2a.75.75 0 0 1 1.5 0v3a.75.75 0 0 1-.75.75ZM20.5 9.84h-17a.75.75 0 0 1 0-1.5h17a.75.75 0 0 1 0 1.5ZM16 22.75H8c-3.65 0-5.75-2.1-5.75-5.75V8.5C2.25 4.85 4.35 2.75 8 2.75h8c3.65 0 5.75 2.1 5.75 5.75V17c0 3.65-2.1 5.75-5.75 5.75ZM8 4.25c-2.86 0-4.25 1.39-4.25 4.25V17c0 2.86 1.39 4.25 4.25 4.25h8c2.86 0 4.25-1.39 4.25-4.25V8.5c0-2.86-1.39-4.25-4.25-4.25H8Z'/%3E%3Ccircle cx='8.5' cy='13.5' r='1'/%3E%3Ccircle cx='12' cy='13.5' r='1'/%3E%3Ccircle cx='15.5' cy='13.5' r='1'/%3E%3Ccircle cx='8.5' cy='17' r='1'/%3E%3Ccircle cx='12' cy='17' r='1'/%3E%3Ccircle cx='15.5' cy='17' r='1'/%3E%3C/svg%3E") center / 24px 24px no-repeat;
}
/* Password fields: lock icon on the start side (right in RTL), show/hide eye on the end side: room on both sides.
   Physical and symmetric so password inputs forced to dir="ltr" don't flip it; [type] out-ranks the dir="ltr" rule above. */
.sso-field .sso-field__control:has(.sso-field__toggle) input[type] { padding-left: 52px; padding-right: 52px; }
.sso-field__control:has(.sso-field__toggle) .sso-field__icon { inset-inline-start: 16px; inset-inline-end: auto; }

.sso-field input[type=file] {
    height: auto;
    padding: 12px 16px;
}

.sso-field .sso-field--no-icon input,
.sso-field.sso-field--no-icon input { padding-inline-start: 16px; padding-inline-end: 16px; }
.sso-field.sso-field--no-icon input,
.sso-field--no-icon input,
.sso-field.sso-field--no-icon select,
.sso-field select {
    padding-inline-start: 16px;
}

/* Native select arrow replaced by the orange chevron from the design. */
.sso-field select {
    -webkit-appearance: none;
    appearance: none;
    padding-inline-end: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F97F17' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 20px 20px;
    background-position: left 16px center;
    cursor: pointer;
}

[dir="ltr"] .sso-field select { background-position: right 16px center; }

.sso-field select option { background: var(--sso-card-bg); color: var(--sso-text); }

.sso-field input[type=date]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: .8;
}

/* RTL date field: calendar icon on the left, date text on the right. The input is pinned to ltr so the
   shadow flex row has a known order, then the icon is moved first and the text pushed to the far side. */
[dir="rtl"] .sso-field input[type=date] { direction: ltr; padding-left: 16px; padding-right: 16px; }
[dir="rtl"] .sso-field input[type=date]::-webkit-calendar-picker-indicator { order: -1; margin: 0 12px 0 0; }
[dir="rtl"] .sso-field input[type=date]::-webkit-datetime-edit { flex: 1; text-align: right; }

.sso-field input:disabled,
.sso-field select:disabled {
    color: var(--sso-text-soft);
    cursor: not-allowed;
}

.sso-field input:hover:not(:focus):not(:disabled),
.sso-field select:hover:not(:focus):not(:disabled) {
    border-color: color-mix(in srgb, var(--sso-accent) 40%, var(--sso-field-border));
}

.sso-field input:focus,
.sso-field select:focus {
    outline: none;
    border-color: var(--sso-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--sso-accent) 18%, transparent);
}

.sso-field.sso-field--error input,
.sso-field.sso-field--error select {
    border-color: var(--signal);
}

.sso-field__toggle {
    position: absolute;
    inset-inline-end: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, .3);
    cursor: pointer;
}
.sso-field__toggle svg { width: 24px; height: 24px; }

.sso-field__toggle:hover { color: var(--sso-accent); }

.sso-field-error { display: block; color: var(--signal); font-size: 13px; margin-top: 6px; }

.sso-row { display: flex; gap: 16px; }
.sso-row > .sso-field { flex: 1; min-width: 0; }

/* Remember-me row: checkbox on one side, "forgot password" on the other. */
.sso-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.sso-form-options .sso-switch { margin: 0; }

.sso-form-options__link {
    color: var(--sso-accent);
    font-size: 16px;
    text-decoration: none;
}

.sso-form-options__link:hover { text-decoration: underline; }

/* Checkbox (kept the old .sso-switch markup so every page picks it up). */
.sso-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 4px;
    cursor: pointer;
    user-select: none;
}

.sso-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.sso-switch__track {
    position: relative;
    flex-shrink: 0;
    width: 25px;
    height: 25px;
    border: 1px solid var(--sso-field-border);
    border-radius: 4px;
    background: var(--sso-field-fill);
    transition: background .15s, border-color .15s;
}

.sso-switch__track::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 8px;
    width: 6px;
    height: 11px;
    border: solid var(--sso-on-accent);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity .15s;
}

.sso-switch:hover .sso-switch__track { border-color: var(--sso-accent); }

.sso-switch input:checked + .sso-switch__track {
    background: var(--sso-accent);
    border-color: var(--sso-accent);
}

.sso-switch input:checked + .sso-switch__track::after { opacity: 1; }

.sso-switch input:focus-visible + .sso-switch__track {
    outline: 2px solid var(--sso-accent);
    outline-offset: 2px;
}

.sso-switch__label { font-size: 16px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.sso-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: var(--sso-field-h);
    margin-top: 28px;
    padding: 0 24px;
    border: 1px solid var(--sso-accent);
    border-radius: var(--sso-radius-pill);
    background: var(--sso-accent);
    color: var(--sso-on-accent);
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        background var(--tt-transition),
        border-color var(--tt-transition),
        color var(--tt-transition),
        transform .1s;
}

.sso-btn:hover:not(:disabled) {
    background: var(--sso-accent-hover);
    border-color: var(--sso-accent-hover);
}

.sso-btn:focus-visible {
    outline: 2px solid var(--sso-accent);
    outline-offset: 3px;
}

.sso-btn:active { transform: scale(.98); }
.sso-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* Outlined pill: logout, secondary actions, social sign-in. */
.sso-btn-secondary,
.sso-btn-ghost,
.sso-btn-google,
.sso-btn-facebook,
.sso-btn-apple {
    background: var(--sso-pill-fill);
    border: 1px solid var(--sso-pill-border);
    color: var(--sso-text);
    font-weight: 700;
}

.sso-btn-ghost { margin-top: 16px; }

.sso-btn-secondary:hover:not(:disabled),
.sso-btn-ghost:hover:not(:disabled),
.sso-btn-google:hover:not(:disabled),
.sso-btn-facebook:hover:not(:disabled),
.sso-btn-apple:hover:not(:disabled) {
    background: color-mix(in srgb, var(--sso-accent) 8%, var(--sso-pill-fill));
    border-color: var(--sso-accent);
    color: var(--sso-text);
}

.sso-btn-danger {
    background: var(--signal);
    border-color: var(--signal);
    color: #fff;
}

.sso-btn-danger:hover:not(:disabled) {
    background: color-mix(in srgb, var(--signal) 88%, #000);
    border-color: color-mix(in srgb, var(--signal) 88%, #000);
}

@media (prefers-reduced-motion: reduce) {
    .sso-btn:active { transform: none; }
    .sso-card--animate { animation: none; }
}

.sso-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid color-mix(in srgb, currentColor 25%, transparent);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: sso-spin .7s linear infinite;
}

@keyframes sso-spin { to { transform: rotate(360deg); } }

.sso-btn__icon { width: 20px; height: 20px; flex-shrink: 0; }
/* Social sign-in: one row of equal pills (Google · Facebook · Apple). */
.sso-social {
    display: flex;
    gap: 12px;
}

.sso-social .sso-btn {
    flex: 1 1 0;
    min-width: 0;
    margin-top: 0;
    padding: 0 12px;
    font-weight: 600;
}

.sso-social .sso-btn__inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 0;
}

.sso-social .sso-btn__icon { width: 24px; height: 24px; }
.sso-social .sso-btn-apple .sso-btn__icon path { fill: var(--sso-text); }

.sso-social .sso-btn__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================================
   Divider, links, alerts
   ========================================================================== */
.sso-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0 24px;
    color: var(--sso-text);
    font-size: 16px;
}

.sso-divider::before,
.sso-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--sso-field-border);
}

.sso-links {
    margin: 28px 0 0;
    text-align: center;
    font-size: 16px;
    color: var(--sso-text);
}

.sso-links a {
    color: var(--sso-link-strong);
    font-weight: 700;
    text-decoration: none;
    margin-inline-start: 4px;
}

.sso-links a:hover { text-decoration: underline; }

.sso-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: var(--sso-radius-field);
    font-size: 14px;
}

.sso-alert__icon { width: 22px; height: 22px; flex-shrink: 0; }

.sso-alert--success,
.sso-success {
    background: rgba(46, 160, 67, .1);
    border: 1px solid rgba(46, 160, 67, .3);
    color: #4ade80;
}

:root[data-bs-theme="light"] .sso-alert--success,
:root[data-bs-theme="light"] .sso-success { color: #1f7a35; }

.sso-alert--error {
    background: rgba(237, 34, 36, .08);
    border: 1px solid rgba(237, 34, 36, .3);
    color: var(--signal);
}

.sso-alert--info {
    background: color-mix(in srgb, var(--sso-accent) 6%, transparent);
    border: 1px solid color-mix(in srgb, var(--sso-accent) 17%, transparent);
    color: var(--sso-text);
}

.sso-alert--info a { color: var(--sso-accent); }

.sso-success {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: var(--sso-radius-field);
    font-size: 14px;
}

.sso-errors { color: var(--signal); font-size: 14px; }
.sso-errors ul { margin: 0 0 12px; padding-inline-start: 18px; }
.sso-errors:empty { display: none; }

.sso-hint { font-size: 14px; color: var(--sso-text-muted); margin-bottom: 12px; }

/* ==========================================================================
   Sarmady network notice ("حساب واحد.. لأكثر من منصة")
   ========================================================================== */
.sso-sarmady-network {
    margin-top: 28px;
    padding: 20px 24px;
    border-radius: var(--sso-radius-card);
    background: color-mix(in srgb, var(--sso-accent) 6%, transparent);
    border: 1px solid color-mix(in srgb, var(--sso-accent) 17%, transparent);
}

.sso-sarmady-network__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.sso-sarmady-network__logo {
    display: inline-flex;
    flex: none;
    line-height: 0;
    border-radius: 4px;
    transition: opacity .15s;
}

.sso-sarmady-network__logo:hover { opacity: .85; }
.sso-sarmady-network__logo:focus-visible { outline: 2px solid var(--sso-accent); outline-offset: 3px; }

.sso-sarmady-logo.sso-sarmady-logo--network {
    width: 80px;
    margin: 0;
}

.sso-sarmady-network__title {
    margin: 0;
    padding-inline-start: 12px;
    border-inline-start: 1px solid var(--sso-pill-border);
    color: var(--sso-accent);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.sso-sarmady-network__text {
    margin: 0;
    color: rgb(229 229 229);
    font-size: 14px;
    line-height: 1.85;
}

.sso-sarmady-network__text strong {
    color: #fff;
    font-weight: 800;
}

/* "حسابك يعمل على" + the network's site logos (wwwroot/images/network). */
.sso-network-sites {
    margin-top: 20px;
    text-align: center;
}

.sso-network-sites__title {
    margin: 0 0 10px;
    color: var(--sso-text-soft);
    font-size: 14px;
}

.sso-network-sites__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sso-network-sites__list img {
    display: block;
    width: auto;
    height: 20px;
}

.sso-network-sites__list img[src*="fantasy"] { height: 28px; }

/* ==========================================================================
   Profile
   ========================================================================== */
.sso-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.sso-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    height: 48px;
    padding: 0 20px;
    border: 1px solid var(--sso-pill-border);
    border-radius: var(--sso-radius-pill);
    background: var(--sso-pill-fill);
    color: var(--sso-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .15s, background .15s, color .15s;
}

.sso-tabs a svg { width: 18px; height: 18px; flex: none; }

.sso-tabs a:hover:not(.active) { border-color: var(--sso-accent); }

.sso-tabs a.active {
    background: var(--sso-accent);
    border-color: var(--sso-accent);
    color: var(--sso-on-accent);
    font-weight: 800;
}

.sso-tabs a:focus-visible { outline: 2px solid var(--sso-accent); outline-offset: 2px; }

.sso-avatar-upload {
    position: relative;
    width: 129px;
    height: 129px;
    margin: 0 auto 28px;
}

.sso-avatar-upload img,
.sso-avatar-upload .sso-avatar-placeholder {
    display: block;
    width: 129px;
    height: 129px;
    border: 1.5px solid var(--sso-accent);
    border-radius: 50%;
    object-fit: cover;
    background: var(--sso-field-fill);
}

.sso-avatar-upload label {
    position: absolute;
    inset-inline-end: 2px;
    inset-block-end: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 2px solid var(--sso-card-bg);
    border-radius: 50%;
    background: var(--sso-accent);
    color: var(--sso-on-accent);
    cursor: pointer;
}

.sso-avatar-upload label svg { width: 18px; height: 18px; }

.sso-avatar-upload input[type=file] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.sso-danger-zone {
    margin-top: 8px;
    padding: 20px;
    border: 1px solid rgba(237, 34, 36, .35);
    border-radius: var(--sso-radius-card);
    background: rgba(237, 34, 36, .06);
}

.sso-danger-zone h2 { color: var(--signal); margin-top: 0; }

/* Status pages */
.sso-status { text-align: center; padding: 8px 0; }

.sso-status__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: var(--sso-accent);
}

.sso-status__icon--error { color: var(--signal); }
.sso-status__icon--success { color: #2ea043; }

/* Payment result: staged entrance, glowing check, a ticket-style code box and receipt, and real buttons. */
.sso-pay > :not(.sso-spinner) { animation: sso-pay-rise .55s cubic-bezier(.22, 1, .36, 1) both; }
.sso-pay > :nth-child(2) { animation-delay: .08s; }
.sso-pay > :nth-child(3) { animation-delay: .16s; }
.sso-pay > :nth-child(4) { animation-delay: .24s; }
.sso-pay > :nth-child(5) { animation-delay: .32s; }
.sso-pay > :nth-child(6) { animation-delay: .40s; }
.sso-pay > :nth-child(7) { animation-delay: .48s; }
.sso-pay > :nth-child(8) { animation-delay: .56s; }
@keyframes sso-pay-rise { from { opacity: 0; transform: translateY(14px); } }

.sso-pay .sso-status__icon--success {
    width: 72px; height: 72px; margin-bottom: 20px; color: #2fbf71;
    filter: drop-shadow(0 0 16px rgba(47, 191, 113, .55));
    animation: sso-pay-pop .7s cubic-bezier(.34, 1.56, .64, 1) both, sso-pay-glow 2.8s ease-in-out .7s infinite;
}
@keyframes sso-pay-pop { from { transform: scale(.3) rotate(-25deg); opacity: 0; } }
@keyframes sso-pay-glow {
    50% { filter: drop-shadow(0 0 26px rgba(47, 191, 113, .8)); }
}

.sso-pay .sso-alert--success { border-radius: 14px; backdrop-filter: blur(6px); }

/* The code: tinted ticket with a glowing dashed edge and a light sweep across it. */
.sso-pay .sso-code {
    position: relative; overflow: hidden; margin: 8px 0 20px; padding: 18px 22px;
    border: 1.5px dashed var(--sso-accent); border-radius: 18px;
    background: linear-gradient(135deg, rgba(249, 127, 23, .14), rgba(249, 127, 23, .03) 60%);
    box-shadow: 0 10px 30px rgba(249, 127, 23, .12), inset 0 0 0 1px rgba(255, 255, 255, .03);
}
.sso-pay .sso-code::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .09) 50%, transparent 65%);
    transform: translateX(-120%); animation: sso-pay-sheen 3.6s ease-in-out 1s infinite;
}
@keyframes sso-pay-sheen { 55%, 100% { transform: translateX(120%); } }
.sso-pay .sso-code__value { font-size: 28px; letter-spacing: 4px; text-shadow: 0 0 18px rgba(249, 127, 23, .35); }

/* Receipt: label and value per row, dashed dividers; each value is its own LTR run (so "200 EGP" stays intact). */
.sso-receipt {
    margin: 20px auto 0; max-width: 400px; padding: 6px 18px;
    border: 1px solid var(--sso-field-border); border-radius: 16px; background: var(--sso-field-fill);
    text-align: start;
}
.sso-receipt__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.sso-receipt__row + .sso-receipt__row { border-top: 1px dashed var(--sso-field-border); }
.sso-receipt dt { margin: 0; font-size: 14px; color: var(--sso-text-muted); }
.sso-receipt dd { margin: 0; font-size: 15px; font-weight: 700; color: var(--sso-text); font-variant-numeric: tabular-nums; }
.sso-receipt__amount { color: #2fbf71; font-size: 17px; }

/* Actions: stacked full-width buttons (filled main one, outlined second) with an arrow that nudges on hover. */
.sso-pay__actions { display: flex; flex-direction: column; gap: 12px; max-width: 400px; margin: 28px auto 0; }
.sso-pay__actions .sso-btn { margin-top: 0; text-decoration: none; }
.sso-pay__go { gap: 12px; box-shadow: 0 8px 22px color-mix(in srgb, var(--sso-accent) 35%, transparent); transition: transform .2s, box-shadow .2s; }
.sso-pay__go:hover { transform: translateY(-2px); box-shadow: 0 12px 28px color-mix(in srgb, var(--sso-accent) 45%, transparent); }
.sso-pay__arrow { width: 20px; height: 20px; flex: none; transform: scaleX(-1); transition: transform .2s; }
.sso-pay__go:hover .sso-pay__arrow { transform: scaleX(-1) translateX(5px); }

@media (prefers-reduced-motion: reduce) {
    .sso-pay > :not(.sso-spinner), .sso-pay .sso-status__icon--success, .sso-pay .sso-code::after { animation: none; }
    .sso-pay__go, .sso-pay__arrow { transition: none; }
}

/* ==========================================================================
   Footer: full-width bar
   ========================================================================== */
.sso-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 63px;
    padding: 12px 16px;
    background: var(--sso-bar-bg);
    color: var(--sso-footer-text);
    font-family: 'Almarai', var(--sso-font);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.sso-footer__copy { margin: 0; }

.sso-footer__link {
    display: inline-block;
    vertical-align: middle;
    line-height: 0;
    transition: opacity .15s;
}

.sso-footer__link:hover { opacity: .8; }
.sso-footer__link:focus-visible { outline: 2px solid var(--sso-accent); outline-offset: 2px; border-radius: 3px; }

.sso-sarmady-logo.sso-footer__logo {
    display: inline-block;
    width: 70px;
    margin: 0 4px;
    vertical-align: middle;
}

/* Legacy class compat */
.sso-check { display: flex; align-items: center; gap: 8px; margin: 12px 0; }
.sso-nav { display: none; }
.sso-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }

/* ==========================================================================
   Billing
   ========================================================================== */
.sso-plan {
    border: 1px solid var(--sso-pill-border);
    border-radius: var(--sso-radius-card);
    background: var(--sso-pill-fill);
    padding: 20px;
    margin-bottom: 16px;
}
.sso-plan--inactive { opacity: .65; }
.sso-plan__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sso-plan__head h2 { font-size: 18px; margin: 0 0 4px; }
.sso-plan__price { display: flex; gap: 8px; align-items: baseline; }
.sso-plan__price strong { font-size: 20px; color: var(--sso-accent); }
.sso-plan__price s { color: var(--sso-text-muted); font-size: 14px; }
.sso-plan__features { margin: 0 0 12px; padding-inline-start: 20px; font-size: 14px; }
.sso-plan .sso-btn { width: auto; }
.sso-badge { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--sso-pill-fill); border: 1px solid var(--sso-pill-border); color: var(--sso-text-soft); }
.sso-badge--success { background: rgba(46, 160, 67, .14); border-color: transparent; color: #4ade80; }
:root[data-bs-theme="light"] .sso-badge--success { color: #1f7a35; }
.sso-gateways { border: 0; padding: 0; margin: 0 0 12px; }
.sso-gateways legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.sso-gateway {
    display: flex; align-items: center; gap: 10px;
    border: 1px solid var(--sso-field-border); border-radius: var(--sso-radius-field);
    background: var(--sso-field-fill);
    padding: 14px 16px; margin-bottom: 8px; cursor: pointer;
}
.sso-gateway:has(input:checked) { border-color: var(--sso-accent); }
.sso-section-title { font-size: 16px; margin: 24px 0 8px; }
.sso-card-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--sso-field-border); }
.sso-card-row .sso-btn { width: auto; }
.sso-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sso-table th, .sso-table td { text-align: start; padding: 10px 6px; border-bottom: 1px solid var(--sso-field-border); }
.sso-table th { color: var(--sso-text-muted); font-weight: 600; }
/* Profile pages of a client that sells a plan the user hasn't bought: the way back to its checkout. */
.sso-buy-prompt { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
/* A button, not a link: keeps its own text colour over .sso-alert--info a, and no top margin inside the alert. */
.sso-buy-prompt .sso-btn { width: auto; margin-top: 0; color: var(--sso-on-accent); }
/* A delivered code (plans that deliver codes) and its copy button. */
.sso-code {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    border: 2px dashed var(--sso-accent); border-radius: var(--sso-radius-field);
    padding: 12px 16px; margin: 0 0 12px;
}
.sso-code__value {
    font-family: Consolas, "Courier New", monospace; font-size: 24px; font-weight: 700; letter-spacing: 3px;
    color: var(--sso-text); user-select: all; word-break: break-all;
}
/* margin-top: 0 cancels .sso-btn's 28px, which pushed the button lower than the code. */
.sso-code .sso-btn { width: auto; margin-top: 0; }
/* Copied: soft green tint, green border and text, and a green check that pops in, for the 3 seconds the button is disabled (sso.js). */
.sso-code__copy:disabled {
    opacity: 1; cursor: default; color: #2fbf71; border-color: #2fbf71;
    background: rgba(47, 191, 113, .14);
    box-shadow: 0 0 0 3px rgba(47, 191, 113, .15);
    animation: sso-copied-in .25s ease-out;
}
.sso-code__copy:disabled .sso-btn__icon { width: 22px; height: 22px; color: #2fbf71; stroke-width: 3; animation: sso-copied-check .35s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes sso-copied-in { from { transform: scale(.96); } }
@keyframes sso-copied-check { from { transform: scale(0) rotate(-20deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sso-code__copy:disabled, .sso-code__copy:disabled .sso-btn__icon { animation: none; } }
/* The payment reference (Payment.Reference): readable enough to give to support. */
.sso-payment-ref { margin: 0 0 12px; font-size: 15px; color: var(--sso-text-soft); }
.sso-payment-ref strong,
.sso-table__ref { font-family: Consolas, "Courier New", monospace; letter-spacing: 1px; color: var(--sso-text); }
/* A plan's terms at checkout: read to the end in the box before the agree checkbox unlocks (sso.js). */
.sso-terms { margin: 0 0 12px; }
.sso-terms__title { font-size: 16px; margin: 0 0 8px; }
.sso-terms__body {
    max-height: 320px; overflow-y: auto; overscroll-behavior: contain;
    border: 1px solid var(--sso-field-border); border-radius: var(--sso-radius-field);
    background: var(--sso-field-fill);
    padding: 12px 16px; font-size: 14px; line-height: 1.8; color: var(--sso-text-soft);
}
.sso-terms__body:focus-visible { outline: 2px solid var(--sso-accent); outline-offset: 2px; }
.sso-terms__body h3, .sso-terms__body h4, .sso-terms__body h5, .sso-terms__body h6 { font-size: 15px; margin: 16px 0 4px; color: var(--sso-text); }
.sso-terms__body > :first-child { margin-top: 0; }
.sso-terms__body > :last-child { margin-bottom: 0; }
.sso-terms__body p { margin: 0 0 8px; }
.sso-terms__body ul, .sso-terms__body ol { margin: 0 0 8px; padding-inline-start: 20px; }
.sso-terms__body table { width: 100%; border-collapse: collapse; margin: 0 0 8px; }
.sso-terms__body th, .sso-terms__body td { text-align: start; padding: 6px 8px; border-bottom: 1px solid var(--sso-field-border); }
.sso-terms__body th { color: var(--sso-text); font-weight: 600; }
/* Links in the terms, e.g. a phone number opening WhatsApp (PlanTerms). */
.sso-terms__body a { color: var(--sso-link-strong); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.sso-terms__body a:hover { text-decoration-thickness: 2px; }
.sso-terms__hint { margin: 8px 0 0; }
.sso-terms .sso-check { align-items: flex-start; }
.sso-terms .sso-check input { margin-top: 5px; }
.sso-terms .sso-check:has(input:disabled) { color: var(--sso-text-muted); }

/* ==========================================================================
   Mobile (Figma 393px frames): the card fills the screen
   ========================================================================== */
@media (max-width: 599.98px) {
    body.sso-body { background: var(--sso-card-bg); }

    .sso-main,
    .sso-shell--topbar .sso-main { padding: 0; }

    .sso-card,
    .sso-card.sso-wide {
        max-width: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 32px 16px 40px;
    }

    .sso-shell--topbar .sso-card { padding-top: 24px; }

    .sso-footer { background: var(--sso-page-bg); min-height: 56px; }

    .sso-topbar {
        height: 56px;
        padding: 0 16px;
        border-bottom: 1px solid var(--sso-field-border);
    }

    .sso-shell--topbar {
        min-height: calc(100vh - 56px);
        min-height: calc(100dvh - 56px);
    }

    .sso-topbar__actions { gap: 10px; }
    .sso-topbar__back { font-size: 14px; }

    .sso-project-logo--topbar,
    .sso-project-logo--topbar .sso-project-logo__img {
        height: 32px;
        max-height: 32px;
        max-width: min(140px, 38vw);
    }

    .sso-theme-dock { top: 12px; inset-inline-end: 12px; }
    .sso-theme-toggle { width: 36px; height: 36px; }

    .sso-project-logo--brand,
    .sso-project-logo--brand .sso-project-logo__img { max-height: 52px; max-width: 170px; }

    .sso-page-header { margin-bottom: 24px; }
    .sso-page-header h1 { font-size: 20px; }
    .sso-page-header h1:has(.sso-page-header__brand) { font-size: 16px; }

    .sso-row { flex-direction: column; gap: 0; }

    .sso-social { gap: 8px; }
    .sso-social .sso-btn { min-height: 48px; padding: 0 8px; font-size: 13px; }
    .sso-social .sso-btn__inner { gap: 8px; }
    .sso-social .sso-btn__icon { width: 20px; height: 20px; }

    .sso-sarmady-network { padding: 16px; text-align: center; }
    .sso-sarmady-network__head { justify-content: center; }

    /* Tabs scroll sideways, edge to edge. */
    .sso-tabs {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        margin-inline: -16px;
        padding: 0 16px 4px;
        margin-bottom: 24px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .sso-tabs::-webkit-scrollbar { display: none; }
    .sso-tabs a { height: 40px; padding: 0 14px; font-size: 12px; }
    .sso-tabs a svg { width: 16px; height: 16px; }

    .sso-avatar-upload,
    .sso-avatar-upload img,
    .sso-avatar-upload .sso-avatar-placeholder { width: 96px; height: 96px; }
    .sso-avatar-upload label { width: 26px; height: 26px; inset-block-end: 2px; }
}
