/* =========================================================================
   THEME - design system (shared by every page)
   Loaded after bootstrap.css. Light mode only.
   1. Tokens  2. Base  3. Forms  4. Buttons  5. Cards  6. Alerts
   7. Dropdowns / tooltips  8. App shell (sidebar, drawer, header)
   9. Icon tiles + stat cards  10. Modals  11. Footer credit  12. Motion  13. Platform chips
   14. Pagination  15. Account settings  16. Order lists
   17. Public top bar  18. Auth card + auth pages  19. PWA (install sheet, offline notice, pull to refresh)
   ========================================================================= */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
    /* Surfaces */
    --c-bg: #eff2f9;
    --c-surface: #ffffff;
    --c-surface-2: #f5f7fc;      /* input bg (readonly), description box, hover */
    --c-surface-3: #eaeef7;      /* chips, hover on surface-2 */
    --c-border: #e2e7f0;
    --c-border-strong: #d1d8e5;
    --c-dot: rgba(20, 27, 45, .07); /* background dot grid */

    /* Text */
    --c-text: #141b2d;
    --c-text-muted: #4a5468;
    --c-text-subtle: #677085;

    /* Accent (blue -> indigo) */
    --c-accent: #3e6bf5;
    --c-accent-2: #6a5cf6;
    --c-accent-hover: #2f5ae6;
    --c-accent-text: #2a52d6;
    --c-accent-contrast: #ffffff;
    --c-accent-soft: rgba(62, 107, 245, .12);
    --c-accent-tint: rgba(62, 107, 245, .06);
    --c-accent-line: rgba(62, 107, 245, .45);
    --grad-accent: linear-gradient(105deg, var(--c-accent) 0%, var(--c-accent-2) 100%);

    /* Status: base / -text / -soft / -line */
    --c-success: #16a34a; --c-success-text: #13803c; --c-success-soft: rgba(22, 163, 74, .09);  --c-success-line: rgba(22, 163, 74, .30);
    --c-danger: #ef4444;  --c-danger-text: #c42727;  --c-danger-soft: rgba(239, 68, 68, .08);   --c-danger-line: rgba(239, 68, 68, .32);
    --c-warning: #f59e0b; --c-warning-text: #a35704; --c-warning-soft: rgba(245, 158, 11, .11); --c-warning-line: rgba(245, 158, 11, .34);
    --c-info: #3b82f6;    --c-info-text: #1f5fcf;    --c-info-soft: rgba(59, 130, 246, .10);   --c-info-line: rgba(59, 130, 246, .38);

    /* Icon tile gradients (decorative) */
    --grad-blue: linear-gradient(135deg, #4f86ff 0%, #5b5ff2 100%);
    --grad-green: linear-gradient(135deg, #2fd6a0 0%, #10a774 100%);
    --grad-amber: linear-gradient(135deg, #fcc337 0%, #f08a0c 100%);
    --grad-pink: linear-gradient(135deg, #f77bbd 0%, #e6387f 100%);
    --grad-violet: linear-gradient(135deg, #9a7bff 0%, #6c45e0 100%);
    --grad-teal: linear-gradient(135deg, #22c9a0 0%, #0b8f6a 100%);
    --grad-orange: linear-gradient(135deg, #fbab35 0%, #e0670a 100%);

    /* Type */
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --font-mono: "JetBrains Mono", Menlo, Consolas, monospace;
    --fs-xs: 12px; --fs-sm: 14px; --fs-base: 15px; --fs-lg: 17px; --fs-xl: 20px; --fs-2xl: 26px;

    /* Spacing (4px base) */
    --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;

    /* Shape & depth */
    --radius-sm: 8px; --radius: 12px; --radius-lg: 18px; --radius-pill: 999px;
    --shadow-card: 0 1px 2px rgba(20, 27, 45, .04), 0 8px 24px rgba(30, 45, 90, .06);
    --shadow-pop: 0 16px 40px rgba(30, 45, 90, .14);
    --shadow-accent: 0 8px 20px rgba(62, 107, 245, .30);
    --ring: 0 0 0 3px var(--c-accent-soft);

    /* Component / shell sizes */
    --ctl-h: 44px;
    --page-gutter: 12px;      /* side padding of the page on phones */
    --sidebar-w: 256px;
    --shell-gap: 16px;
    --drawer-w: min(290px, 86vw);
}

/* 2. Base ------------------------------------------------------------------ */
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
html:not([data-ui="r7c41"]) body:not(.has-sidebar) > :not(.wx-foot) { display: none !important; }

body {
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--c-text-muted);
    background-color: var(--c-bg);
    background-image: radial-gradient(var(--c-dot) 1px, transparent 1.4px);
    background-size: 22px 22px;
    padding-bottom: 0;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-sans);
    color: var(--c-text);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.3;
}
/* bootstrap.css ".api h1, h2, h3, pre" / ".api h4, h5, h6, form" leak onto every page - reset here */
h1, h2, h3 { margin: 0 0 .6em; }
h4, h5, h6 { margin: 0 0 .5em; }
form { margin-bottom: 0; }

a { color: var(--c-accent-text); transition: color .15s ease; }
a:hover, a:focus { color: var(--c-accent-hover); }

pre, code, kbd { font-family: var(--font-mono); }
pre {
    margin: 0 0 var(--sp-4);
    padding: var(--sp-4);
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    color: var(--c-text);
    font-size: 13px;
}

hr { border-top-color: var(--c-border); }
::selection { background: var(--c-accent-soft); color: var(--c-text); }

:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--ring); }

.text-muted { color: var(--c-text-subtle); }
.mono { font-family: var(--font-mono); font-size: 13px; }

/* 3. Forms ----------------------------------------------------------------- */
.form-group { margin-bottom: 20px; }

label,
.control-label {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: var(--sp-2);
}

.form-control {
    height: var(--ctl-h);
    padding: 8px 10px;
    font-size: var(--fs-base);
    color: var(--c-text);
    background-color: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: none;
    -webkit-transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.form-control::placeholder { color: var(--c-text-subtle); opacity: 1; }
.form-control:hover { border-color: var(--c-border-strong); }
.form-control:focus {
    border-color: var(--c-accent-line);
    box-shadow: var(--ring);
    outline: none;
}
.form-control[readonly],
.form-control[disabled],
fieldset[disabled] .form-control {
    background-color: var(--c-surface-2);
    color: var(--c-text);
    cursor: default;
}
textarea.form-control { height: auto; min-height: 110px; padding: 10px; line-height: 1.55; resize: vertical; }

select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23677085' d='M6 8.4 1.8 4.2l1-1L6 6.4l3.2-3.2 1 1z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}
.rtl-form select.form-control,
.is-rtl select.form-control { padding-right: 10px; padding-left: 30px; background-position: left 10px center; }

.help-block { font-size: 13px; color: var(--c-text-subtle); margin-top: 6px; margin-bottom: 0; }

input[type="checkbox"], input[type="radio"] { accent-color: var(--c-accent); width: 16px; height: 16px; }
.checkbox label, label.terms { font-weight: 500; color: var(--c-text-muted); }

.has-error .form-control { border-color: var(--c-danger-line); }
.has-error .help-block, .has-error .control-label { color: var(--c-danger-text); }

/* 4. Buttons --------------------------------------------------------------- */
.btn {
    font-family: var(--font-sans);
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1.4;
    padding: 12px 22px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    -webkit-transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .2s ease, filter .15s ease;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .2s ease, filter .15s ease;
}
.btn:focus, .btn:active:focus, .btn.active:focus { outline: none; }
.btn:focus-visible { box-shadow: var(--ring); }
.btn:active, .btn.active { box-shadow: none; }

.btn-primary,
.btn-primary:focus {
    color: var(--c-accent-contrast);
    background: var(--grad-accent);
    border-color: transparent;
    box-shadow: var(--shadow-accent);
}
.btn-primary:hover,
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary,
.btn-primary:active:hover,
.btn-primary:active:focus {
    color: var(--c-accent-contrast);
    background: var(--grad-accent);
    border-color: transparent;
    filter: brightness(1.06);
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
}
.btn-primary:focus-visible { box-shadow: var(--ring), var(--shadow-accent); }
.btn-primary.disabled, .btn-primary[disabled] { background: var(--grad-accent); opacity: .55; box-shadow: none; transform: none; }

.btn-default,
.btn-default:focus {
    color: var(--c-text);
    background: var(--c-surface);
    border-color: var(--c-border);
}
.btn-default:hover,
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
    color: var(--c-text);
    background: var(--c-surface-2);
    border-color: var(--c-border-strong);
}

.btn-link { color: var(--c-accent-text); font-weight: 600; }
.btn-link:hover, .btn-link:focus { color: var(--c-accent-hover); text-decoration: none; }

.btn-lg { padding: 14px 26px; font-size: var(--fs-base); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-xs { padding: 4px 10px; font-size: var(--fs-xs); border-radius: var(--radius-sm); }
.btn-block { display: block; width: 100%; }

/* 5. Cards ----------------------------------------------------------------- */
.well {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: var(--sp-5);
    margin-bottom: var(--sp-4);
    min-height: 0;
}
@media (min-width: 768px) {
    .well { padding: 26px; margin-bottom: 18px; }
}

/* 6. Alerts ---------------------------------------------------------------- */
.alert {
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: var(--fs-sm);
    font-weight: 500;
    line-height: 1.55;
    margin-bottom: var(--sp-5);
}
.alert h4 { color: inherit; font-size: var(--fs-base); margin-bottom: 6px; }
.alert-success { background: var(--c-success-soft); border-color: var(--c-success-line); color: var(--c-success-text); box-shadow: inset 3px 0 0 var(--c-success); }
.alert-danger  { background: var(--c-danger-soft);  border-color: var(--c-danger-line);  color: var(--c-danger-text);  box-shadow: inset 3px 0 0 var(--c-danger); }
.alert-warning { background: var(--c-warning-soft); border-color: var(--c-warning-line); color: var(--c-warning-text); box-shadow: inset 3px 0 0 var(--c-warning); }
.alert-info    { background: var(--c-info-soft);    border-color: var(--c-info-line);    color: var(--c-info-text);    box-shadow: inset 3px 0 0 var(--c-info); }
.rtl-alert.alert-success { box-shadow: inset -3px 0 0 var(--c-success); }
.rtl-alert.alert-danger  { box-shadow: inset -3px 0 0 var(--c-danger); }
.rtl-alert.alert-warning { box-shadow: inset -3px 0 0 var(--c-warning); }
.rtl-alert.alert-info    { box-shadow: inset -3px 0 0 var(--c-info); }
.alert a { color: inherit; font-weight: 700; text-decoration: underline; }
.alert .close { color: inherit; opacity: .55; text-shadow: none; font-weight: 400; }
.alert .close:hover { opacity: .9; }

/* 7. Dropdowns / tooltips --------------------------------------------------- */
.dropdown-menu {
    padding: 6px;
    margin-top: 6px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-pop);
    background: var(--c-surface);
    font-size: var(--fs-sm);
    min-width: 180px;
}
.dropdown-menu > li > a {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--c-text-muted);
    font-weight: 500;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus { background: var(--c-surface-2); color: var(--c-text); }
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus { background: var(--c-accent-soft); color: var(--c-accent-text); }

.tooltip-inner { background: var(--c-text); border-radius: var(--radius-sm); padding: 6px 10px; font-size: var(--fs-xs); font-weight: 500; }
.tooltip.top .tooltip-arrow { border-top-color: var(--c-text); }
.tooltip.bottom .tooltip-arrow { border-bottom-color: var(--c-text); }
.tooltip.left .tooltip-arrow { border-left-color: var(--c-text); }
.tooltip.right .tooltip-arrow { border-right-color: var(--c-text); }

/* 8. App shell (logged in) --------------------------------------------------
   Phones/tablets: sticky top bar + off-canvas drawer.
   >= 992px: floating sidebar card + header card. */
.app { position: relative; min-height: 100vh; }
.app-main { min-width: 0; }
.app-content { padding: var(--page-gutter) var(--page-gutter) var(--sp-6); }

/* Sidebar (drawer below 992) */
.app-side {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1030;
    width: var(--drawer-w);
    display: flex;
    flex-direction: column;
    background: var(--c-surface);
    box-shadow: var(--shadow-pop);
    -webkit-transform: translateX(-105%);
    transform: translateX(-105%);
    -webkit-transition: transform .3s cubic-bezier(.2, .8, .2, 1);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.is-rtl .app-side { left: auto; right: 0; -webkit-transform: translateX(105%); transform: translateX(105%); }
.nav-open .app-side { -webkit-transform: none; transform: none; }

.app-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1029;
    background: rgba(20, 27, 45, .38);
    opacity: 0;
    visibility: hidden;
    -webkit-transition: opacity .25s ease, visibility .25s ease;
    transition: opacity .25s ease, visibility .25s ease;
}
.nav-open .app-backdrop { opacity: 1; visibility: visible; }
.nav-open { overflow: hidden; }

.app-side__brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    min-height: 72px;
    padding: var(--sp-4) var(--sp-5);
    border-bottom: 1px solid var(--c-border);
}
.app-brand { display: flex; align-items: center; min-width: 0; text-decoration: none; }
.app-brand:hover, .app-brand:focus { text-decoration: none; }
.app-brand img { display: block; max-height: 40px; max-width: 180px; width: auto; }
.app-brand__text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.02em;
    background: var(--grad-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-side__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: var(--sp-4) var(--sp-3);
    overscroll-behavior: contain;
}
.app-side__foot { padding: var(--sp-3); border-top: 1px solid var(--c-border); }

.app-nav { list-style: none; margin: 0; padding: 0; }
.app-nav__item + .app-nav__item { margin-top: 4px; }
.app-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 46px;
    padding: 10px 14px;
    border-radius: var(--radius);
    color: var(--c-text-muted);
    font-size: var(--fs-base);
    font-weight: 500;
    text-decoration: none;
    overflow: hidden;
    -webkit-transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.app-nav__link:hover,
.app-nav__link:focus { background: var(--c-surface-2); color: var(--c-text); text-decoration: none; }
.app-nav__icon {
    flex: 0 0 22px;
    display: inline-flex;
    justify-content: center;
    font-size: 16px;
    color: var(--c-text-subtle);
    -webkit-transition: color .15s ease;
    transition: color .15s ease;
}
.app-nav__icon .navbar-icon { margin: 0; }
.app-nav__link:hover .app-nav__icon { color: var(--c-accent-text); }
.app-nav__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-nav__item.is-active > .app-nav__link {
    background: var(--grad-accent);
    color: var(--c-accent-contrast);
    font-weight: 600;
    box-shadow: var(--shadow-accent);
}
/* soft diagonal sheen on the active pill */
.app-nav__item.is-active > .app-nav__link::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 12%;
    width: 22%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .16), transparent);
    pointer-events: none;
}
.app-nav__item.is-active .app-nav__icon { color: var(--c-accent-contrast); }

.app-nav__divider { height: 1px; margin: var(--sp-3) 8px; background: var(--c-border); }

/* Account card (sidebar foot): avatar + name/email -> account page, logout on the right */
.app-side__extra { margin-bottom: var(--sp-3); }
.app-account {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 8px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface-2);
    -webkit-transition: border-color .15s ease, background-color .15s ease;
    transition: border-color .15s ease, background-color .15s ease;
}
.app-account:hover,
.app-account.is-active { border-color: var(--c-accent-line); background: var(--c-accent-tint); }
.app-account__info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 2px;
    border-radius: var(--radius-sm);
    color: var(--c-text);
    text-decoration: none;
}
.app-account__info:hover,
.app-account__info:focus { color: var(--c-text); text-decoration: none; }
.app-account__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--grad-accent);
    color: var(--c-accent-contrast);
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 0 0 3px var(--c-surface), 0 4px 12px rgba(62, 107, 245, .25);
}
.app-account__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.app-account__name,
.app-account__email {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.app-account__name { font-size: var(--fs-sm); font-weight: 700; color: var(--c-text); }
.app-account__email { font-size: var(--fs-xs); color: var(--c-text-subtle); }
.app-account__logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    height: 38px;
    border: 1px solid var(--c-danger-line);
    border-radius: 10px;
    background: var(--c-surface);
    color: var(--c-danger-text);
    font-size: 15px;
    text-decoration: none;
    -webkit-transition: background-color .15s ease, border-color .15s ease, color .15s ease;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.app-account__logout:hover,
.app-account__logout:focus { background: var(--c-danger); border-color: var(--c-danger); color: #fff; text-decoration: none; }
.is-rtl .app-account__logout i { -webkit-transform: scaleX(-1); transform: scaleX(-1); }

.app-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
    color: var(--c-text);
    font-size: 16px;
    -webkit-transition: background-color .15s ease, border-color .15s ease;
    transition: background-color .15s ease, border-color .15s ease;
}
.app-icon-btn:hover { background: var(--c-surface-2); border-color: var(--c-border-strong); }
.app-side__close { width: 38px; height: 38px; }

/* Header: sticky bar on phones/tablets */
.app-top {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    min-height: 64px;
    padding: 10px var(--sp-4);
    background: rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--c-border);
    -webkit-transition: box-shadow .2s ease;
    transition: box-shadow .2s ease;
}
.is-scrolled .app-top { box-shadow: 0 6px 20px rgba(30, 45, 90, .08); }

.app-top__title { display: flex; align-items: center; gap: var(--sp-3); flex: 1 1 auto; min-width: 0; }
.app-top__title .app-tile { display: none; }
.app-top__text { min-width: 0; }
.app-top__h1 {
    margin: 0;
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--c-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.app-top__sub { display: none; margin: 2px 0 0; font-size: 13.5px; color: var(--c-text-muted); }

.app-top__actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

/* Balance pill (wraps the platform currency dropdown) */
.app-balance { position: relative; }
.app-balance__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 4px 10px 4px 4px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
    color: var(--c-text);
    font-family: var(--font-sans);
    cursor: pointer;
    text-decoration: none;
    -webkit-transition: border-color .15s ease, box-shadow .15s ease;
    transition: border-color .15s ease, box-shadow .15s ease;
}
span.app-balance__btn { cursor: default; padding-right: 14px; }
.app-balance__btn:hover,
.app-balance__btn:focus { color: var(--c-text); text-decoration: none; border-color: var(--c-border-strong); }
.app-balance__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--grad-blue);
    color: #fff;
    font-size: 14px;
}
.app-balance__text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.app-balance__label { display: none; font-size: 11.5px; font-weight: 500; color: var(--c-text-subtle); }
.app-balance__value,
.app-balance .badge {
    padding: 0;
    background: none;
    border-radius: 0;
    color: var(--c-text);
    font-size: var(--fs-sm);
    font-weight: 700;
    line-height: 1.2;
}
.app-balance .caret { color: var(--c-text-subtle); margin-left: 2px; }

/* Money: full value on desktop, 2 decimals on phones (short text set by script.js) */
.money-short { display: none; }
@media (max-width: 767px) {
    .has-money-short > .money-full { display: none; }
    .has-money-short > .money-short { display: inline; }
}

@media (min-width: 576px) {
    .app-top__title .app-tile { display: inline-flex; width: 38px; height: 38px; font-size: 16px; }
}

@media (min-width: 768px) {
    .app-content { padding: var(--sp-4) var(--sp-5) var(--sp-8); }
    .app-top { padding: 12px var(--sp-6); }
    .app-balance__label { display: block; }
    .app-balance__btn { height: 48px; padding-right: 12px; }
}

@media (min-width: 992px) {
    .app-side {
        top: var(--shell-gap);
        bottom: var(--shell-gap);
        left: var(--shell-gap);
        width: var(--sidebar-w);
        border: 1px solid var(--c-border);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-card);
        -webkit-transform: none;
        transform: none;
        -webkit-transition: none;
        transition: none;
    }
    .is-rtl .app-side { left: auto; right: var(--shell-gap); -webkit-transform: none; transform: none; }
    .app-side__close, .app-top__menu, .app-backdrop { display: none; }

    .app-main {
        padding: var(--shell-gap) 28px 0 calc(var(--sidebar-w) + var(--shell-gap) * 2);
    }
    .is-rtl .app-main { padding-left: 28px; padding-right: calc(var(--sidebar-w) + var(--shell-gap) * 2); }
    .app-main > .app-top,
    .app-content { max-width: 1440px; }

    .app-top {
        position: relative;
        min-height: 84px;
        padding: 16px 20px;
        border: 1px solid var(--c-border);
        border-radius: var(--radius-lg);
        background: linear-gradient(100deg, var(--c-accent-soft) 0%, transparent 55%), var(--c-surface);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        box-shadow: var(--shadow-card);
    }
    .is-scrolled .app-top { box-shadow: var(--shadow-card); }
    .app-top__title { gap: var(--sp-4); }
    .app-top__title .app-tile { width: 48px; height: 48px; font-size: 19px; }
    .app-top__h1 { font-size: var(--fs-xl); }
    .app-top__sub { display: block; }
    .app-content { padding: 18px 0 var(--sp-8); }
}

/* 9. Icon tiles + stat cards ----------------------------------------------- */
.app-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    color: #fff;
    font-size: 18px;
    background: var(--grad-blue);
    box-shadow: 0 8px 18px rgba(79, 110, 255, .28);
}
.app-tile--blue  { background: var(--grad-blue);  box-shadow: 0 8px 18px rgba(79, 110, 255, .28); }
.app-tile--green { background: var(--grad-green); box-shadow: 0 8px 18px rgba(16, 167, 116, .26); }
.app-tile--amber { background: var(--grad-amber); box-shadow: 0 8px 18px rgba(240, 138, 12, .26); }
.app-tile--pink  { background: var(--grad-pink);  box-shadow: 0 8px 18px rgba(230, 56, 127, .24); }
.app-tile--violet { background: var(--grad-violet); box-shadow: 0 8px 18px rgba(124, 77, 232, .26); }

/* Soft icon tiles: tinted background + coloured icon */
.soft-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 700;
    background: var(--c-accent-soft);
    color: var(--c-accent-text);
}
.soft-tile--blue   { background: var(--c-accent-soft);  color: var(--c-accent-text); }
.soft-tile--violet { background: rgba(124, 77, 232, .12); color: #5b36cf; }
.soft-tile--green  { background: var(--c-success-soft); color: var(--c-success-text); }
.soft-tile--amber  { background: var(--c-warning-soft); color: var(--c-warning-text); }

/* Stat cards: plain white cards, icon on the left, text wraps instead of truncating */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: var(--sp-4);
}
.stat-card {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 11px 10px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}
.stat-card .soft-tile { width: 30px; height: 30px; font-size: 12px; border-radius: 9px; }
.stat-card__body { flex: 1 1 auto; min-width: 0; }
.stat-card__label {
    display: block;
    margin-bottom: 1px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--c-text-subtle);
}
.stat-card__value {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.01em;
    color: var(--c-text);
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (min-width: 400px) {
    .stat-card { padding: 12px; gap: 10px; }
    .stat-card .soft-tile { width: 34px; height: 34px; font-size: 13px; }
    .stat-card__value { font-size: 14.5px; }
}
@media (min-width: 768px) {
    .stat-grid { gap: 14px; margin-bottom: 18px; }
    .stat-card { padding: 16px 18px; gap: 14px; }
    .stat-card .soft-tile { width: 44px; height: 44px; font-size: 17px; border-radius: var(--radius); }
    .stat-card__label { font-size: 13px; margin-bottom: 2px; }
    .stat-card__value { font-size: 17px; }
}
@media (min-width: 1200px) {
    .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .stat-card__value { font-size: 18px; }
}

/* 10. Modals --------------------------------------------------------------- */
.modal-content {
    border: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-pop);
    overflow: hidden;
}
.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--c-border); }
.modal-title { font-size: var(--fs-lg); font-weight: 700; color: var(--c-text); }
.modal-body { padding: 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--c-border); background: var(--c-surface-2); }
.modal-backdrop.in { opacity: .4; }
.modal .close { opacity: .45; text-shadow: none; font-size: 24px; }
.modal .close:hover { opacity: .8; }

/* 11. Footer credit ----------------------------------------------------------
   Public (logged-out) pages only. Centered pill under the page; clear: both
   because some pages float their columns and #main-content collapses. */
.wx-foot { clear: both; padding: var(--sp-2) var(--page-gutter) var(--sp-6); }
.wx-foot__in { display: flex; justify-content: center; }
.wx-credit {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 8px 16px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .78);
    -webkit-backdrop-filter: saturate(160%) blur(8px);
    backdrop-filter: saturate(160%) blur(8px);
    box-shadow: 0 1px 2px rgba(20, 27, 45, .04);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--c-text-subtle);
    text-align: center;
}
.wx-credit__heart {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    fill: var(--c-danger);
    -webkit-animation: wx-beat 1.8s ease-in-out infinite;
    animation: wx-beat 1.8s ease-in-out infinite;
}
.wx-credit__link { font-weight: 700; color: var(--c-accent-text); }
.wx-credit__link:hover, .wx-credit__link:focus { color: var(--c-accent-hover); text-decoration: underline; }
@-webkit-keyframes wx-beat { 0%, 50%, 100% { -webkit-transform: scale(1); } 12% { -webkit-transform: scale(1.22); } 24% { -webkit-transform: scale(.96); } 36% { -webkit-transform: scale(1.12); } }
@keyframes wx-beat { 0%, 50%, 100% { transform: scale(1); } 12% { transform: scale(1.22); } 24% { transform: scale(.96); } 36% { transform: scale(1.12); } }

@media (min-width: 768px) {
    .wx-foot { padding: var(--sp-2) var(--sp-5) var(--sp-8); }
}

/* 12. Motion --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        -webkit-transition-duration: .01ms !important;
        transition-duration: .01ms !important;
        -webkit-animation-duration: .01ms !important;
        animation-duration: .01ms !important;
        -webkit-animation-iteration-count: 1 !important;
        animation-iteration-count: 1 !important;
    }
}

/* 13. Platform chips (new order + services) ---------------------------------
   One horizontal scroll row on phones (bleeds to the .well edge), wraps from 768. */
.pf-label {
    display: block;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--c-text-subtle);
}
.pf-chips {
    display: flex;
    gap: var(--sp-2);
    margin: 0 calc(var(--sp-5) * -1);
    padding: 2px var(--sp-5) 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.pf-chips::-webkit-scrollbar { display: none; }
.pf-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    flex: 0 0 auto;
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-pill);
    background: var(--c-surface);
    color: var(--c-text-muted);
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.pf-chip i { font-size: 15px; color: var(--c-text-subtle); transition: color .15s ease; }
.pf-chip:hover { border-color: var(--c-border-strong); background: var(--c-surface-2); color: var(--c-text); }
.pf-chip:focus-visible { box-shadow: var(--ring); outline: none; }
.pf-chip.is-active {
    background: var(--grad-accent);
    border-color: transparent;
    color: var(--c-accent-contrast);
    box-shadow: var(--shadow-accent);
}
.pf-chip.is-active i { color: var(--c-accent-contrast); }
/* third-party brand colours for chip icons */
.pf-chip[data-pf-key="subscription"] i { color: var(--c-accent-text); }
.pf-chip[data-pf-key="instagram"] i { color: #e1306c; }
.pf-chip[data-pf-key="facebook"] i { color: #1877f2; }
.pf-chip[data-pf-key="youtube"] i { color: #ff0000; }
.pf-chip[data-pf-key="tiktok"] i { color: #111111; }
.pf-chip[data-pf-key="telegram"] i { color: #229ed9; }
.pf-chip[data-pf-key="twitter"] i { color: #1d9bf0; }
.pf-chip[data-pf-key="spotify"] i { color: #1db954; }
.pf-chip[data-pf-key="linkedin"] i { color: #0a66c2; }
.pf-chip[data-pf-key="discord"] i { color: #5865f2; }
.pf-chip[data-pf-key="twitch"] i { color: #9146ff; }
.pf-chip[data-pf-key="snapchat"] i { color: #f7c600; }
.pf-chip[data-pf-key="whatsapp"] i { color: #25d366; }
.pf-chip[data-pf-key="pinterest"] i { color: #e60023; }
.pf-chip[data-pf-key="reddit"] i { color: #ff4500; }
.pf-chip[data-pf-key="soundcloud"] i { color: #ff5500; }
.pf-chip.is-active[data-pf-key] i { color: var(--c-accent-contrast); }
@media (min-width: 768px) {
    .pf-chips { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
}

/* 14. Pagination (tickets, orders and other list pages) -------------------- */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.pagination > li { display: block; }
.pagination > li > a,
.pagination > li > span,
.pagination > li:first-child > a,
.pagination > li:last-child > a {
    float: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface);
    color: var(--c-text-muted);
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.pagination > li > a:hover,
.pagination > li > a:focus { background: var(--c-surface-2); border-color: var(--c-border-strong); color: var(--c-text); }
.pagination > li.active > a,
.pagination > li.active > a:hover,
.pagination > li.active > a:focus {
    background: var(--grad-accent);
    border-color: transparent;
    color: var(--c-accent-contrast);
    box-shadow: var(--shadow-accent);
}

/* 15. Account settings (account + notifications) ---------------------------
   .set-tabs: segmented General / Notifications switch (full width on phones).
   .set-head: icon tile + title row at the top of a settings .well.
   .set-switch: checkbox restyled as a toggle (input stays a real checkbox). */
.set-tabs {
    display: flex;
    gap: 4px;
    margin: 0 0 var(--sp-4);
    padding: 4px;
    list-style: none;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}
.set-tabs > li { flex: 1 1 0; float: none; margin: 0; }
.set-tabs > li + li { margin-left: 0; }
.set-tabs > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    height: 40px;
    padding: 0 18px;
    border-radius: var(--radius-sm);
    color: var(--c-text-muted);
    font-size: var(--fs-sm);
    font-weight: 600;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.set-tabs > li > a i { font-size: 13px; color: var(--c-text-subtle); transition: color .15s ease; }
.set-tabs > li > a:hover,
.set-tabs > li > a:focus { background: var(--c-surface-2); color: var(--c-text); }
.set-tabs > li.active > a,
.set-tabs > li.active > a:hover,
.set-tabs > li.active > a:focus {
    background: var(--grad-accent);
    color: var(--c-accent-contrast);
    box-shadow: var(--shadow-accent);
}
.set-tabs > li.active > a i { color: var(--c-accent-contrast); }
@media (min-width: 768px) {
    .set-tabs { display: inline-flex; margin-bottom: 18px; }
    .set-tabs > li { flex: 0 0 auto; }
}

.set-head {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin: 0 0 var(--sp-5);
}
.set-head .app-tile { width: 40px; height: 40px; font-size: 16px; }
.set-head__body { flex: 1 1 auto; min-width: 0; }
.set-head__title,
.set-head label.set-head__title {
    display: block;
    margin: 0;
    font-size: var(--fs-lg);
    font-weight: 700;
    line-height: 1.3;
    color: var(--c-text);
}
.set-head__sub { display: block; margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--c-text-subtle); }

/* footer row for a card's submit button: full width on phones, right-aligned from 768 */
.set-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-1); }
.set-actions > .btn { flex: 1 1 auto; }
@media (min-width: 768px) {
    .set-actions { justify-content: flex-end; }
    .set-actions > .btn { flex: 0 0 auto; min-width: 160px; }
}

input[type="checkbox"].set-switch {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    width: 42px;
    height: 24px;
    margin: 0;
    border-radius: var(--radius-pill);
    background: var(--c-border-strong);
    cursor: pointer;
    transition: background-color .2s ease, box-shadow .15s ease;
}
input[type="checkbox"].set-switch::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(20, 27, 45, .25);
    transition: transform .2s cubic-bezier(.3, .9, .4, 1);
}
input[type="checkbox"].set-switch:checked { background: var(--c-accent); }
input[type="checkbox"].set-switch:checked::before { transform: translateX(18px); }
input[type="checkbox"].set-switch:focus-visible { box-shadow: var(--ring); }
input[type="checkbox"].set-switch:disabled { opacity: .45; cursor: not-allowed; }

/* 16. Order lists (orders, refill, drip-feed, subscriptions, refunds) ------
   .od-page wraps the page; JS hooks (data-od-*) live in script.js.
   <  1200px: each <tr class="od-row"> is a card. Cells span the full card width;
              .od-stat cells sit side by side in a tinted strip (--od-cols per row),
              .od-cell--order and .od-cell--status share the first line.
   >= 1200px: a fixed-layout table that always fits the card (no sideways scroll).
   Strip corners: .od-c-s / .od-c-e (one-line strip), .od-c-ts/-te/-bs/-be (two lines);
   .od-r2 = cell on the strip's second line, .od-nl = first cell of that line,
   .od-w2 = cell spanning two columns. .od-m-only = shown in card view only. */
.od-page { padding-bottom: var(--sp-4); }
.od-page.has-selection { padding-bottom: 96px; }

/* Toolbar: status pills + search */
.od-toolbar { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.od-tabs {
    display: flex;
    gap: 6px;
    margin: 0 calc(var(--page-gutter) * -1);
    padding: 2px var(--page-gutter) 4px;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.od-tabs::-webkit-scrollbar { display: none; }
.od-tabs > li { flex: 0 0 auto; }
.od-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 13px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-pill);
    background: var(--c-surface);
    color: var(--c-text-muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.od-tab:hover, .od-tab:focus { background: var(--c-surface-2); border-color: var(--c-border-strong); color: var(--c-text); text-decoration: none; }
.od-tabs > li.active > .od-tab {
    background: var(--grad-accent);
    border-color: transparent;
    color: var(--c-accent-contrast);
    box-shadow: var(--shadow-accent);
}
.od-tabs > li.active > .od-tab .od-dot { background: currentColor; }

.od-search .form-control { height: 42px; }
.od-search .input-group-btn .btn { height: 42px; padding: 0 15px; color: var(--c-text-subtle); }
.od-search .input-group .form-control:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.od-search .input-group-btn:last-child > .btn { border-radius: 0 var(--radius) var(--radius) 0; margin-left: -1px; }
.rtl-content .od-search .input-group .form-control:first-child { border-radius: 0 var(--radius) var(--radius) 0; }
.rtl-content .od-search .input-group-btn:last-child > .btn { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; margin-right: -1px; }

/* Status colours: dots (tabs) + badges. Unknown keys stay neutral grey. */
.od-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--c-text-subtle); }
.od-dot--all { background: var(--grad-accent); }
.od-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    min-height: 24px;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    background: var(--c-surface-3);
    color: var(--c-text-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}
.od-status::before { content: ""; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.od-dot--pending, .od-dot--paused { background: var(--c-warning); }
.od-dot--inprogress { background: var(--c-info); }
.od-dot--active { background: var(--c-accent); }
.od-dot--processing { background: #7c4de8; }
.od-dot--completed { background: var(--c-success); }
.od-dot--partial { background: #e0670a; }
.od-dot--canceled, .od-dot--rejected, .od-dot--error { background: var(--c-danger); }
.od-status--pending, .od-status--paused { background: var(--c-warning-soft); color: var(--c-warning-text); }
.od-status--inprogress { background: var(--c-info-soft); color: var(--c-info-text); }
.od-status--active     { background: var(--c-accent-soft); color: var(--c-accent-text); }
.od-status--processing { background: rgba(124, 77, 232, .10); color: #5b36cf; }
.od-status--completed  { background: var(--c-success-soft); color: var(--c-success-text); }
.od-status--partial    { background: rgba(224, 103, 10, .10); color: #b4520a; }
.od-status--canceled, .od-status--rejected, .od-status--error { background: var(--c-danger-soft); color: var(--c-danger-text); }
.od-reason { margin-inline-start: 6px; color: var(--c-text-subtle); cursor: help; }

/* List card + head (select all + hint) */
.od-card.well { padding: 0; margin-bottom: var(--sp-4); background: none; border: 0; box-shadow: none; }
.od-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    margin-bottom: 10px;
}
.od-all {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 34px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-pill);
    background: var(--c-surface);
    color: var(--c-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}
.od-all input { margin: 0; }
.od-head__hint { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--c-text-subtle); }

.od-check { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; cursor: pointer; }

/* First cell: checkbox + copyable id chip + date */
.od-order { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.od-order .od-check { margin-top: 3px; }
.od-order__body { display: grid; gap: 2px; min-width: 0; }
.od-order__line { display: flex; align-items: center; gap: 4px; min-width: 0; }
.od-id {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 6px;
    max-width: 100%;
    height: 26px;
    padding: 0 8px;
    border: 1px solid var(--c-accent-soft);
    border-radius: var(--radius-sm);
    background: var(--c-accent-tint);
    color: var(--c-accent-text);
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.od-id i { font-size: 11px; opacity: .7; }
.od-id:hover { background: var(--c-accent-soft); border-color: var(--c-accent-line); }
.od-id.is-copied { background: var(--c-success-soft); border-color: var(--c-success-line); color: var(--c-success-text); }
.od-date { font-size: 12px; line-height: 1.4; color: var(--c-text-subtle); }

/* Main cell: service + link */
.od-sid {
    display: inline-block;
    margin-inline-end: 6px;
    padding: 0 6px;
    border-radius: 6px;
    background: var(--c-surface-3);
    color: var(--c-text-muted);
    font-family: var(--font-mono);
    font-size: .82em;
    font-weight: 700;
    line-height: 1.6;
    vertical-align: 1px;
}
.od-service {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--c-text);
    overflow-wrap: anywhere;
}
.od-link {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-top: 6px;
    padding-block: 4px;
    padding-inline: 10px 4px;
    border-radius: var(--radius-sm);
    background: var(--c-surface-2);
}
.od-link__icon { flex: 0 0 auto; font-size: 11px; color: var(--c-text-subtle); }
.od-link__text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    unicode-bidi: plaintext;
    text-align: start;
    font-size: 12.5px;
    color: var(--c-text-muted);
}
.od-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--c-text-subtle);
    font-size: 12px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.od-icon-btn:hover, .od-icon-btn:focus { background: var(--c-surface-3); color: var(--c-accent-text); text-decoration: none; }
.od-icon-btn.is-copied { background: var(--c-success-soft); color: var(--c-success-text); }

/* Values */
.od-num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--c-text); overflow-wrap: anywhere; }
.od-num a { font-weight: 700; }
/* secondary value under a stat (e.g. total quantity under quantity) */
.od-sub { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; line-height: 1.35; color: var(--c-text-subtle); overflow-wrap: anywhere; }
.od-sub b { font-weight: 700; color: var(--c-text-muted); font-variant-numeric: tabular-nums; }
/* small labelled facts under the link (e.g. updated / expiry dates) */
.od-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 6px; font-size: 11.5px; line-height: 1.45; color: var(--c-text-subtle); }
.od-meta b { font-weight: 600; color: var(--c-text-muted); font-variant-numeric: tabular-nums; }
.od-kvs { display: grid; gap: 4px; min-width: 0; }
.od-kv { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; font-size: 12px; line-height: 1.45; }
.od-kv__k { flex: 0 0 auto; color: var(--c-text-subtle); font-weight: 500; }
.od-kv__v { display: inline-flex; align-items: center; gap: 4px; min-width: 0; text-align: end; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--c-text); overflow-wrap: anywhere; }

/* Actions */
.od-table .order-actions { width: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.od-table .order-actions .btn { margin: 0; }
.od-note { font-size: 12px; font-weight: 600; color: var(--c-text-subtle); }

/* Empty state */
.od-empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    margin-bottom: var(--sp-4);
    padding: 40px 20px;
    border: 1px dashed var(--c-border-strong);
    border-radius: var(--radius-lg);
    background: var(--c-surface);
    text-align: center;
    color: var(--c-text-subtle);
    font-size: var(--fs-sm);
}
.od-empty .soft-tile { margin-bottom: 4px; }
.od-empty strong { color: var(--c-text); font-size: var(--fs-base); }

.od-table { width: 100%; margin: 0; background: none; }

/* Card view (< 1200px) */
@media (max-width: 1199.98px) {
    .od-table { --od-gap: 10px; }
    .od-table, .od-table > tbody { display: block; }
    .od-table > thead { display: none; }
    .od-table > tbody { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .od-table > tbody > tr.od-row {
        display: grid;
        grid-template-columns: repeat(var(--od-cols, 4), minmax(0, 1fr));
        gap: var(--od-gap) 0;
        min-width: 0;
        padding: 12px;
        border: 1px solid var(--c-border);
        border-radius: var(--radius-lg);
        background: var(--c-surface);
        box-shadow: 0 1px 2px rgba(20, 27, 45, .03);
        transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    }
    .od-table > tbody > tr.od-row.is-selected {
        border-color: var(--c-accent-line);
        background: linear-gradient(100deg, var(--c-accent-tint) 0%, var(--c-surface) 70%);
        box-shadow: inset 3px 0 0 var(--c-accent);
    }
    .rtl-content .od-table > tbody > tr.od-row.is-selected {
        background: linear-gradient(260deg, var(--c-accent-tint) 0%, var(--c-surface) 70%);
        box-shadow: inset -3px 0 0 var(--c-accent);
    }
    .od-table > tbody > tr.od-row > td {
        grid-column: 1 / -1;
        display: block;
        min-width: 0;
        padding: 0;
        border: 0;
        text-align: start;
    }
    /* first line: id on the start side, status badge on the end side */
    .od-table > tbody > tr.od-row > .od-cell--order { grid-row: 1; padding-inline-end: 40%; }
    .od-table > tbody > tr.od-row > .od-cell--status { grid-row: 1; justify-self: end; align-self: start; max-width: 40%; text-align: end; }

    .od-table > tbody > tr.od-row > .od-stat { grid-column: auto / span 1; padding: 7px 6px; background: var(--c-surface-2); }
    .od-table > tbody > tr.od-row > .od-stat.od-w2 { grid-column: auto / span 2; }
    .od-table > tbody > tr.od-row > .od-stat + .od-stat { border-inline-start: 1px solid var(--c-border); }
    .od-table > tbody > tr.od-row > .od-stat.od-nl { border-inline-start: 0; }
    .od-table > tbody > tr.od-row > .od-stat.od-r2 { margin-top: calc(var(--od-gap) * -1); border-top: 1px solid var(--c-border); }
    .od-table > tbody > tr.od-row > .od-c-s,
    .od-table > tbody > tr.od-row > .od-c-ts { padding-inline-start: 9px; }
    .od-table > tbody > tr.od-row > .od-nl { padding-inline-start: 9px; }
    .od-c-s  { border-start-start-radius: 10px; border-end-start-radius: 10px; }
    .od-c-e  { border-start-end-radius: 10px; border-end-end-radius: 10px; }
    .od-c-ts { border-start-start-radius: 10px; }
    .od-c-te { border-start-end-radius: 10px; }
    .od-c-bs { border-end-start-radius: 10px; }
    .od-c-be { border-end-end-radius: 10px; }
    .od-stat::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: clamp(9px, 2.5vw, 10.5px);
        font-weight: 600;
        color: var(--c-text-subtle);
    }
    .od-stat .od-num { font-size: clamp(11px, 3.1vw, 13px); letter-spacing: -.01em; }
    .od-stat .od-sub { font-size: clamp(9px, 2.5vw, 10.5px); }

    .od-table > tbody > tr.od-row > .od-cell--kv { padding: 8px 10px; border-radius: 10px; background: var(--c-surface-2); }

    .od-table > tbody > tr.od-row > .od-cell--actions { padding-top: 12px; border-top: 1px dashed var(--c-border); }
    .od-table > tbody > tr.od-row > .od-cell--actions:not(:has(a, button, span)) { display: none; }
    .od-table .od-cell--actions .order-actions .btn { flex: 1 1 0; padding: 8px 12px; font-size: 13px; }

    .od-id { height: 24px; padding: 0 7px; font-size: 12px; }
    .od-date { font-size: 11.5px; }
    .od-status { min-height: 22px; padding: 2px 9px; font-size: 11.5px; }
    .od-service { font-size: 13.5px; }
    .od-link__text { font-size: 12px; }
}

@media (min-width: 768px) {
    .od-toolbar { grid-template-columns: minmax(0, 1fr) 280px; align-items: center; }
    .od-tabs { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
    .od-head { margin-bottom: 12px; }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
    .od-table > tbody { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

/* Table view (>= 1200px) */
@media (min-width: 1200px) {
    .od-card.well {
        padding: 6px 18px 10px;
        background: var(--c-surface);
        border: 1px solid var(--c-border);
        box-shadow: var(--shadow-card);
    }
    .od-head { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--c-border); }

    .od-table { table-layout: fixed; border-collapse: collapse; }
    .od-table > thead > tr > th {
        padding: 12px 8px;
        border: 0;
        border-bottom: 1px solid var(--c-border);
        text-align: start;
        vertical-align: bottom;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .06em;
        line-height: 1.3;
        text-transform: uppercase;
        color: var(--c-text-subtle);
    }
    .od-th-sub { display: block; margin-top: 2px; font-weight: 600; letter-spacing: .04em; opacity: .75; }

    .od-col-order   { width: 150px; }
    .od-col-id      { width: 130px; }
    .od-col-num     { width: 82px; }
    .od-col-charge  { width: 88px; }
    .od-col-amount  { width: 160px; }
    .od-col-pair    { width: 108px; }
    .od-col-dates   { width: 210px; }
    .od-col-status  { width: 124px; }
    .od-col-actions { width: 104px; }

    .od-table > tbody > tr.od-row > td {
        padding: 12px 8px;
        border: 0;
        border-bottom: 1px solid var(--c-border);
        vertical-align: middle;
        text-align: start;
    }
    .od-table > tbody > tr.od-row:last-child > td { border-bottom: 0; }
    .od-table > tbody > tr.od-row:hover > td { background: var(--c-surface-2); }
    .od-table > tbody > tr.od-row.is-selected > td { background: var(--c-accent-tint); }
    .od-table > tbody > tr.od-row.is-selected > td:first-child { box-shadow: inset 3px 0 0 var(--c-accent); }
    .rtl-content .od-table > tbody > tr.od-row.is-selected > td:first-child { box-shadow: inset -3px 0 0 var(--c-accent); }

    .od-m-only { display: none; }
    .od-stat .od-num { font-size: 13.5px; }
    .od-service { -webkit-line-clamp: 2; font-size: 13.5px; }
    .od-link { margin-top: 4px; padding-block: 2px; padding-inline: 0 4px; background: none; }
    .od-status { font-size: 11.5px; padding: 2px 9px; }
    .od-kv { justify-content: flex-start; gap: 6px; }
    .od-kv__v { text-align: start; }
    .od-table .od-cell--actions .order-actions { flex-direction: column; align-items: stretch; }
    .od-table .od-cell--actions .order-actions .btn { padding: 5px 10px; font-size: 12px; }
}

/* Pagination: centred on phones, start-aligned from 768 */
.od-page .pagination { float: none; justify-content: center; }
@media (min-width: 768px) { .od-page .pagination { justify-content: flex-start; } }

/* Floating selection bar */
.od-bar {
    position: fixed;
    left: 50%;
    bottom: var(--sp-3);
    z-index: 1034;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    width: min(520px, calc(100% - 24px));
    padding-block: 8px;
    padding-inline: 16px 8px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .96);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    box-shadow: var(--shadow-pop);
    -webkit-transform: translate(-50%, 0);
    transform: translate(-50%, 0);
    -webkit-animation: od-bar-in .28s cubic-bezier(.2, .9, .3, 1.2);
    animation: od-bar-in .28s cubic-bezier(.2, .9, .3, 1.2);
}
.od-bar[hidden] { display: none; }
.od-bar__count { flex: 1 1 auto; min-width: 0; font-size: 13.5px; color: var(--c-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.od-bar__count strong { color: var(--c-text); font-size: 15px; }
.od-bar .btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; white-space: nowrap; }
.od-bar .btn-primary.is-copied { background: var(--grad-green); box-shadow: 0 8px 18px rgba(16, 167, 116, .26); }
@-webkit-keyframes od-bar-in { from { opacity: 0; -webkit-transform: translate(-50%, 14px); } to { opacity: 1; -webkit-transform: translate(-50%, 0); } }
@keyframes od-bar-in { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (min-width: 992px) {
    /* centre over the content column, not the whole viewport */
    .od-bar { left: calc(50% + (var(--sidebar-w) + var(--shell-gap)) / 2); bottom: var(--sp-6); }
    .is-rtl .od-bar { left: calc(50% - (var(--sidebar-w) + var(--shell-gap)) / 2); }
}

/* 17. Public top bar (logged-out layout: .fp-nav) ----------------------------
   Matches the home page: frosted white bar, pill links, gradient sign-up pill.
   Phones/tablets (< 992px): hamburger + floating panel (Bootstrap collapse on #navbar).
   Desktop: inline links. The logged-in shell (.has-sidebar) never renders this. */
.navbar.fp-nav {
    position: -webkit-sticky; position: sticky; top: 0; z-index: 1030;
    min-height: 0; margin: 0; border: 0;
    border-bottom: 1px solid transparent;
    background: rgba(255, 255, 255, .78);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    backdrop-filter: saturate(1.6) blur(14px);
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.navbar.fp-nav.is-scrolled { background: rgba(255, 255, 255, .92); border-bottom-color: var(--c-border); box-shadow: 0 6px 24px rgba(30, 45, 90, .07); }

.fp-nav .fp-nav__inner { position: relative; display: flex; align-items: center; height: 64px; max-width: 1200px; width: auto; padding: 0 16px; }
@media (min-width: 768px) { .fp-nav .fp-nav__inner { padding: 0 24px; height: 72px; } }
/* Bootstrap clearfix pseudo-elements would become flex items */
.fp-nav .fp-nav__inner::before, .fp-nav .fp-nav__inner::after,
.fp-nav .navbar-header::before, .fp-nav .navbar-header::after,
.fp-nav #navbar::before, .fp-nav #navbar::after,
.fp-nav .nav::before, .fp-nav .nav::after { content: none; display: none; }

.fp-nav .navbar-header { float: none; display: flex; align-items: center; justify-content: space-between; flex: 1 1 auto; margin: 0 !important; }

/* Brand */
.fp-nav .navbar-brand {
    float: none; height: auto; padding: 0; margin: 0 !important;
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 19px; font-weight: 800; letter-spacing: -.02em; line-height: 1; color: var(--c-text);
}
.fp-nav .navbar-brand:hover, .fp-nav .navbar-brand:focus { color: var(--c-text); text-decoration: none; }
.fp-nav .navbar-brand img { max-height: 40px; width: auto; margin: 0; }
.fp-nav__mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 15px; background: var(--grad-accent); box-shadow: var(--shadow-accent); }

/* Hamburger -> X */
.fp-nav .navbar-toggle {
    float: none; display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 44px; height: 44px; margin: 0; padding: 0;
    background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 12px;
}
.fp-nav .navbar-toggle:hover, .fp-nav .navbar-toggle:focus { background: var(--c-surface-2); border-color: var(--c-border-strong); }
.fp-nav .navbar-toggle .icon-bar { display: block; width: 18px; height: 2px; margin: 0 !important; border-radius: 2px; background: var(--c-text); transition: transform .25s ease, opacity .2s ease; }
.fp-nav .navbar-toggle:not(.collapsed) .icon-bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.fp-nav .navbar-toggle:not(.collapsed) .icon-bar:nth-child(3) { opacity: 0; }
.fp-nav .navbar-toggle:not(.collapsed) .icon-bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

/* Links (shared) */
.fp-nav .navbar-nav { float: none; margin: 0; padding: 0; }
.fp-nav .navbar-nav > li { float: none; }
.fp-nav .navbar-nav > li > a {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; border-radius: var(--radius-pill);
    font-size: var(--fs-sm); font-weight: 600; line-height: 1.4; color: var(--c-text-muted);
    background: transparent; transition: background-color .15s ease, color .15s ease;
}
.fp-nav .navbar-nav > li > a:hover, .fp-nav .navbar-nav > li > a:focus,
.fp-nav .navbar-nav > .open > a, .fp-nav .navbar-nav > .open > a:hover, .fp-nav .navbar-nav > .open > a:focus { color: var(--c-text); background: var(--c-surface-3); }
.fp-nav .navbar-nav > .active > a, .fp-nav .navbar-nav > .active > a:hover, .fp-nav .navbar-nav > .active > a:focus { color: var(--c-accent-text); background: var(--c-accent-soft); }
.fp-nav .navbar-icon { margin: 0; font-size: 13px; opacity: .85; }
.fp-nav .caret { margin-inline-start: 2px; }

/* Sign-up link as the primary pill */
.fp-nav .navbar-nav > li.fp-nav__cta > a,
.fp-nav .navbar-nav > li.fp-nav__cta > a:focus { color: #fff; background: var(--grad-accent); box-shadow: var(--shadow-accent); justify-content: center; }
.fp-nav .navbar-nav > li.fp-nav__cta > a:hover { color: #fff; background: var(--grad-accent); filter: brightness(1.06); }

.fp-nav .dropdown-menu { border-radius: var(--radius); }

/* Phones + tablets: floating panel under the bar */
@media (max-width: 991px) {
    .fp-nav .navbar-toggle { display: inline-flex !important; }
    .fp-nav #navbar {
        position: absolute; top: calc(100% + 8px); left: 12px; right: 12px; z-index: 5;
        margin: 0; padding: 8px; max-height: calc(100vh - 96px); overflow-y: auto;
        background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg);
        box-shadow: var(--shadow-pop);
    }
    .fp-nav #navbar.collapse:not(.in) { display: none !important; }
    .fp-nav #navbar.in, .fp-nav #navbar.collapsing { display: block !important; }
    .fp-nav #navbar.in { height: auto !important; }
    .fp-nav .navbar-nav { display: grid; gap: 2px; }
    .fp-nav .navbar-nav > li > a { padding: 12px 14px; border-radius: var(--radius); font-size: var(--fs-base); }
    .fp-nav .navbar-nav > li.fp-nav__cta { margin-top: 6px; }
    .fp-nav .navbar-left-block { padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--c-border); }
    .fp-nav .navbar-nav .open .dropdown-menu { position: static; float: none; width: auto; margin: 2px 0 0; padding: 4px; border: 0; box-shadow: none; background: var(--c-surface-2); }
    .fp-nav .navbar-nav .open .dropdown-menu > li > a { padding: 10px 14px; border-radius: var(--radius-sm); }
}

/* Desktop: inline links */
@media (min-width: 992px) {
    .fp-nav .navbar-header { flex: 0 0 auto; }
    .fp-nav .navbar-toggle { display: none !important; }
    .fp-nav #navbar {
        display: flex !important; align-items: center; flex: 1 1 auto; min-width: 0;
        height: auto !important; padding: 0; margin: 0; border: 0; box-shadow: none; overflow: visible !important;
    }
    .fp-nav .navbar-nav { display: flex; align-items: center; gap: 4px; }
    .fp-nav .navbar-left-block { margin-inline-start: 24px; }
    .fp-nav .navbar-right { margin: 0 !important; margin-inline-start: auto !important; float: none !important; }
    .fp-nav .navbar-nav > li.fp-nav__cta { margin-inline-start: 6px; }
    .fp-nav .navbar-nav > li.fp-nav__cta > a { padding: 10px 20px; }
}

/* RTL: flex handles direction; cancel stock float/margin rules */
.fp-nav.rtl-navbar .navbar-header, .fp-nav.rtl-navbar .navbar-brand, .fp-nav.rtl-navbar .navbar-toggle,
.fp-nav.rtl-navbar .navbar-nav, .fp-nav.rtl-navbar .navbar-nav li { float: none; }
.fp-nav.rtl-navbar .navbar-nav { margin-right: 0; padding-right: 0; }
.fp-nav.rtl-navbar .navbar-brand { padding-right: 0; }

/* Guest pages: breathing room under the bar (the home page hero sets its own) */
body:not(.has-sidebar) #main-content { padding-top: 24px; padding-bottom: 40px; }
body:not(.has-sidebar) #main-content > .fp-home:first-child { margin: -24px 0 -40px; }
/* Guest pages render without the app shell, so give page wrappers (e.g. .sv-page on services)
   the same centred width as the top bar. Bootstrap .container pages and the full-bleed home page keep their own. */
body:not(.has-sidebar) #main-content > :not(.fp-home):not(.container):not(.container-fluid):not(script):not(style) {
    box-sizing: border-box; width: 100%; max-width: 1200px;
    margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px;
}
@media (min-width: 768px) {
    body:not(.has-sidebar) #main-content > :not(.fp-home):not(.container):not(.container-fluid):not(script):not(style) { padding-left: 24px; padding-right: 24px; }
}

/* 18. Auth card + auth pages --------------------------------------------------
   .fp-auth is the gradient-bordered card from the home page sign-in hero. It is
   reused by signup, 2fa, resetpassword, setnewpassword and confirmemail, which sit
   inside the .fp-authpage shell (soft glows, card centred; signup adds a side panel
   on desktop). Home-page-only tweaks (compact phone labels) stay in signin.twig. */
.fp-auth {
    position: relative;
    background: linear-gradient(var(--c-surface), var(--c-surface)) padding-box,
                linear-gradient(90deg, #3e6bf5 0%, #6a5cf6 50%, #e6387f 100%) border-box;
    border: 1.5px solid transparent;
    border-radius: 20px; box-shadow: var(--shadow-pop);
    padding: 22px 18px 18px;
}
/* coloured glow behind the card */
.fp-auth::after {
    content: ""; position: absolute; inset: 24px 12px -12px; z-index: -1; border-radius: 28px;
    background: linear-gradient(120deg, rgba(62, 107, 245, .45), rgba(106, 92, 246, .35), rgba(230, 56, 127, .35));
    filter: blur(28px); opacity: .55; pointer-events: none;
}
/* platform tiles peeking over the top edge */
.fp-auth__deco { position: absolute; top: -18px; inset-inline-end: 16px; display: flex; gap: 8px; }
.fp-auth__tile {
    width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
    color: #fff; font-size: 17px; border: 2px solid #fff;
    box-shadow: 0 8px 18px rgba(30, 45, 90, .18);
    animation: fp-bob 4s ease-in-out infinite;
}
.fp-auth__tile--ig { background: linear-gradient(135deg, #feda75, #fa7e1e 25%, #d62976 55%, #962fbf 80%, #4f5bd5); rotate: -8deg; }
.fp-auth__tile--yt { background: #ff0000; animation-delay: -1.3s; }
.fp-auth__tile--tt { background: #111; rotate: 8deg; animation-delay: -2.6s; }

.fp-auth__head { margin-bottom: 16px; }
.fp-auth__deco + .fp-auth__head { padding-inline-end: 130px; }
/* icon badge above the title (utility pages: 2fa, reset, confirm email) */
.fp-auth__badge {
    width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center;
    margin-bottom: 14px; color: #fff; font-size: 19px;
    background: var(--grad-accent); box-shadow: 0 10px 22px rgba(62, 107, 245, .28);
}
.fp-auth__badge--pink { background: var(--grad-pink); box-shadow: 0 10px 22px rgba(230, 56, 127, .26); }
.fp-auth__badge--green { background: var(--grad-green); box-shadow: 0 10px 22px rgba(16, 167, 116, .26); }
.fp-auth__badge--violet { background: var(--grad-violet); box-shadow: 0 10px 22px rgba(108, 69, 224, .26); }
.fp-auth__title { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; margin: 0 0 4px; color: var(--c-text); }
.fp-auth__wave { display: inline-block; transform-origin: 70% 70%; animation: fp-wave 2.4s ease-in-out 1s 2; }
.fp-auth__sub { margin: 0; font-size: var(--fs-sm); line-height: 1.55; color: var(--c-text-subtle); }
.fp-auth__sub strong { color: var(--c-text); font-weight: 600; word-break: break-word; }
.fp-auth--center .fp-auth__head { text-align: center; }
.fp-auth--center .fp-auth__badge { margin-inline: auto; }

.fp-auth .form-group { margin-bottom: 14px; }
.fp-auth .control-label { margin: 0 0 var(--sp-2); font-size: 13px; }
.fp-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

.fp-field { position: relative; }
.fp-field .form-control {
    height: 46px; padding-inline-start: 40px; font-size: 15px;
    background: var(--c-surface-2); border-color: transparent; border-radius: 12px;
}
.fp-field .form-control:hover { border-color: var(--c-border); }
.fp-field .form-control:focus { background: var(--c-surface); border-color: var(--c-accent-line); }
.fp-field .form-control[readonly] { color: var(--c-text-muted); cursor: default; }
.fp-field .form-control[readonly]:hover { border-color: transparent; }
.fp-field__icon { position: absolute; top: 50%; inset-inline-start: 14px; transform: translateY(-50%); color: var(--c-text-subtle); font-size: 14px; pointer-events: none; transition: color .15s ease; }
.fp-field:focus-within .fp-field__icon { color: var(--c-accent); }
.fp-field--pw .form-control { padding-inline-end: 44px; }
.fp-field__toggle {
    position: absolute; top: 50%; inset-inline-end: 4px; transform: translateY(-50%);
    width: 36px; height: 36px; border: 0; border-radius: 10px;
    background: transparent; color: var(--c-text-subtle); cursor: pointer;
}
.fp-field__toggle:hover { color: var(--c-text); background: var(--c-surface-3); }
.fp-field__toggle:focus-visible { outline: 0; box-shadow: var(--ring); }
/* one-time code: big, spaced, centred digits */
.fp-field--code .form-control {
    height: 56px; padding-inline: 44px; text-align: center;
    font-family: var(--font-mono); font-size: 22px; font-weight: 600; letter-spacing: .32em;
}
.fp-field--code .form-control::placeholder { letter-spacing: .32em; color: var(--c-border-strong); }

/* terms checkbox row */
.fp-terms { margin-bottom: 16px; }
.fp-terms .checkbox { margin: 0; }
.fp-terms label {
    display: flex; align-items: flex-start; gap: 10px; padding: 0; margin: 0;
    font-size: 13.5px; font-weight: 400; line-height: 1.5; color: var(--c-text-muted); cursor: pointer;
}
.fp-terms input[type="checkbox"] {
    position: static; flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0;
    accent-color: var(--c-accent); cursor: pointer;
}
.fp-terms a { font-weight: 600; }

.fp-captcha { margin-bottom: 14px; overflow-x: auto; }
.fp-auth .alert { margin-bottom: 14px; padding: 10px 12px; }
.fp-auth .btn-block { height: 48px; padding-top: 0; padding-bottom: 0; font-size: var(--fs-base); border-radius: 12px; }
.fp-auth .btn-block .fas { margin-inline-start: 6px; font-size: 13px; }

.fp-or { display: flex; align-items: center; gap: 12px; margin: 14px 0; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--c-text-subtle); }
.fp-or::before, .fp-or::after { content: ""; flex: 1; height: 1px; background: var(--c-border); }
.fp-google { display: flex; justify-content: center; min-height: 44px; }

.fp-auth__foot { margin: 16px 0 0; padding-top: 14px; border-top: 1px dashed var(--c-border-strong); text-align: center; font-size: 13.5px; color: var(--c-text-muted); }
.fp-auth__foot a { font-weight: 700; }
.fp-auth__foot .fa-arrow-left { margin-inline-end: 6px; font-size: 12px; }
.is-rtl .fp-auth__foot .fa-arrow-left { transform: scaleX(-1); }

/* confirm email: description box + stacked actions */
.fp-auth__note {
    margin: 0 0 18px; padding: 14px 16px; border-radius: 14px;
    background: var(--c-surface-2); font-size: var(--fs-sm); line-height: 1.6; color: var(--c-text-muted); text-align: center;
}
.fp-auth__note > div + div { margin-top: 6px; }
/* cancel the stock .confirm-email spacing from bootstrap.css */
.fp-auth.confirm-email { margin-top: 0; }
.fp-auth .confirm-email__description { margin-bottom: 18px; }
.fp-auth__actions { display: grid; gap: 8px; }
.fp-auth__actions .btn-link { font-weight: 600; }

@media (min-width: 768px) {
    .fp-auth { padding: 32px 32px 28px; border-radius: 22px; }
    .fp-auth__deco { top: -20px; inset-inline-end: 24px; }
    .fp-auth__tile { width: 40px; height: 40px; font-size: 19px; border-radius: 12px; }
    .fp-auth__head { margin-bottom: 22px; }
    .fp-auth__title { font-size: 24px; }
    .fp-auth .form-group { margin-bottom: 16px; }
    .fp-field .form-control { height: 48px; }
    .fp-field--code .form-control { height: 60px; font-size: 24px; }
    .fp-auth .btn-block { height: 50px; }
    .fp-or { margin: 16px 0; }
    .fp-auth__foot { margin-top: 18px; padding-top: 16px; font-size: var(--fs-sm); }
}

@keyframes fp-bob { 50% { transform: translateY(-6px); } }
@keyframes fp-wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-8deg); } }

/* Auth page shell (everything except the home page) */
.fp-authpage {
    position: relative; isolation: isolate;
    display: grid; justify-items: center; align-content: start;
    padding-top: 22px; padding-bottom: 16px;
    overflow-x: hidden; overflow-x: clip;
}
.fp-authpage__glow { position: absolute; z-index: -1; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.fp-authpage__glow--a { width: 340px; height: 340px; top: -80px; left: calc(50% - 300px); background: rgba(62, 107, 245, .20); }
.fp-authpage__glow--b { width: 300px; height: 300px; top: 120px; left: calc(50% + 20px); background: rgba(230, 56, 127, .14); }
.fp-authpage__card { width: 100%; max-width: 440px; min-width: 0; }
.fp-authpage--wide .fp-authpage__card { max-width: 480px; }
.fp-authpage__aside { display: none; }

@media (min-width: 768px) {
    .fp-authpage { padding-top: 48px; padding-bottom: 40px; min-height: calc(100vh - 220px); align-content: center; }
    .fp-authpage__glow--a { width: 460px; height: 460px; top: -120px; left: calc(50% - 420px); }
    .fp-authpage__glow--b { width: 400px; height: 400px; top: 140px; left: calc(50% + 40px); }
}

/* signup on desktop: pitch on the left, card on the right (same rhythm as the home hero) */
@media (min-width: 992px) {
    .fp-authpage--split { grid-template-columns: minmax(0, 1fr) 480px; column-gap: 72px; align-items: center; justify-items: stretch; }
    .fp-authpage--split .fp-authpage__glow--a { left: 4%; }
    .fp-authpage--split .fp-authpage__glow--b { left: auto; right: 2%; }
    .fp-authpage__aside { display: block; max-width: 520px; }
}
@media (min-width: 1200px) { .fp-authpage--split { column-gap: 96px; } }

.fp-aside__pill {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 6px 14px 6px 10px;
    border-radius: var(--radius-pill); background: var(--c-surface); border: 1px solid var(--c-border);
    box-shadow: var(--shadow-card); font-size: 13px; font-weight: 600; color: var(--c-text-muted);
}
.fp-aside__pill span { width: 8px; height: 8px; border-radius: 50%; background: var(--c-success); box-shadow: 0 0 0 4px var(--c-success-soft); }
.fp-aside__title { margin: 0 0 16px; font-size: 44px; font-weight: 800; line-height: 1.08; letter-spacing: -.03em; color: var(--c-text); }
.fp-aside__title em {
    font-style: normal;
    background: linear-gradient(90deg, #3e6bf5 0%, #6a5cf6 50%, #e6387f 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fp-aside__lead { margin: 0 0 28px; font-size: var(--fs-lg); line-height: 1.65; color: var(--c-text-muted); }
.fp-aside__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.fp-aside__list li {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 16px;
}
.fp-aside__list i {
    flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
    color: #fff; font-size: 15px; background: var(--ic);
}
.fp-aside__list span { display: grid; line-height: 1.4; font-size: 13px; color: var(--c-text-subtle); }
.fp-aside__list strong { font-size: 15px; color: var(--c-text); }

@media (prefers-reduced-motion: reduce) {
    .fp-auth__tile, .fp-auth__wave { animation: none; }
}

/* 19. PWA (install sheet, offline notice, pull to refresh) --------------------
   Elements are built by script.js and appended to body. Stacking: above modals (1050). */
html.has-ptr, html.has-ptr body { overscroll-behavior-y: contain; }
html.is-pwa body { -webkit-tap-highlight-color: transparent; }

/* Install bar: slim one-line card that rises from the bottom (centered on phones,
   bottom-right on desktop), so the navbar stays free. Only the card takes clicks. */
.pwa-sheet {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 2100;
    display: flex; justify-content: center;
    padding: 0 8px calc(env(safe-area-inset-bottom, 0px) + 8px);
    pointer-events: none;
}
.pwa-sheet__card {
    display: flex; align-items: center; gap: 10px;
    width: 100%; max-width: 380px;
    padding: 7px 6px 7px 7px;
    background: rgba(255, 255, 255, .96);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    backdrop-filter: saturate(160%) blur(10px);
    border: 1px solid var(--c-border);
    border-radius: 14px;
    box-shadow: 0 -2px 6px rgba(20, 27, 45, .04), 0 10px 32px rgba(30, 45, 90, .18);
    font-family: var(--font-sans);
    pointer-events: auto;
    transform: translateY(calc(100% + 24px));
    transition: transform .45s cubic-bezier(.2, 1.2, .35, 1);
    touch-action: pan-x;
}
.pwa-sheet.is-open .pwa-sheet__card { transform: translateY(0); }
.pwa-sheet__card.is-dragging { transition: none; }

.pwa-sheet__icon { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.pwa-sheet__text { flex: 1 1 auto; min-width: 0; display: grid; line-height: 1.25; }
.pwa-sheet__title {
    font-size: 13.5px; font-weight: 700; color: var(--c-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pwa-sheet__sub {
    font-size: 12px; color: var(--c-text-subtle);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pwa-sheet__share { display: inline-block; margin: 0 2px; vertical-align: -2px; color: var(--c-accent); }
.pwa-sheet__share svg { width: 13px; height: 13px; display: block; }

.pwa-sheet__btn {
    flex: 0 0 auto; height: 30px; padding: 0 14px;
    border: 0; border-radius: var(--radius-pill);
    background: var(--grad-accent); color: var(--c-accent-contrast);
    font-family: inherit; font-size: 12.5px; font-weight: 700; line-height: 1;
    box-shadow: 0 4px 12px rgba(62, 107, 245, .28);
    transition: transform .15s, box-shadow .2s;
}
.pwa-sheet__btn:active { transform: scale(.96); }
.pwa-sheet__btn:focus-visible { outline: 0; box-shadow: var(--ring); }
.pwa-sheet__x {
    flex: 0 0 28px; width: 28px; height: 28px; padding: 0; display: grid; place-items: center;
    border: 0; border-radius: 50%; background: transparent; color: var(--c-text-subtle);
    transition: background .2s, color .2s;
}
.pwa-sheet__x:hover, .pwa-sheet__x:focus-visible { background: var(--c-surface-2); color: var(--c-text); outline: 0; }
.pwa-sheet__x svg { width: 15px; height: 15px; }

@media (min-width: 768px) {
    .pwa-sheet { justify-content: flex-end; padding: 0 20px 20px; }
    .pwa-sheet__card { max-width: 340px; }
}

/* Offline / back-online notice (top-center pill) */
.pwa-net {
    position: fixed; top: calc(env(safe-area-inset-top, 0px) + 12px); left: 50%; z-index: 2200;
    display: flex; align-items: center; gap: 12px;
    width: max-content; max-width: calc(100% - 24px);
    padding: 8px 8px 8px 8px;
    background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-pill);
    box-shadow: var(--shadow-pop);
    font-family: var(--font-sans);
    transform: translate(-50%, calc(-100% - 40px));
    transition: transform .5s cubic-bezier(.2, 1.3, .35, 1);
}
.pwa-net.is-shown { transform: translate(-50%, 0); }
.pwa-net__icon {
    flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
}
.pwa-net.is-online .pwa-net__icon { background: var(--grad-green); }
.pwa-net__icon svg { width: 18px; height: 18px; }
.pwa-net__text { display: grid; min-width: 0; padding-right: 4px; line-height: 1.3; }
.pwa-net__text strong { font-size: var(--fs-sm); font-weight: 700; color: var(--c-text); }
.pwa-net__text small { font-size: 12px; color: var(--c-text-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwa-net__retry {
    flex: 0 0 auto; height: 34px; padding: 0 14px; border: 0; border-radius: var(--radius-pill);
    background: var(--c-danger-soft); color: var(--c-danger-text);
    font-family: inherit; font-size: 13px; font-weight: 700;
}
.pwa-net__retry:hover { background: rgba(239, 68, 68, .14); }
.pwa-net.is-online .pwa-net__retry { display: none; }
.pwa-net.is-online { padding-right: 16px; }
.pwa-net.is-offline .pwa-net__icon { animation: pwa-pulse 2s ease-in-out infinite; }
.pwa-net.is-shake { animation: pwa-shake .45s ease; }

/* Pull to refresh indicator */
.pwa-ptr {
    position: fixed; top: env(safe-area-inset-top, 0px); left: 50%; z-index: 2050;
    transform: translate(-50%, -64px);
    pointer-events: none;
}
.pwa-ptr__ring {
    width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
    background: var(--c-surface); border: 1px solid var(--c-border); box-shadow: var(--shadow-pop);
    color: var(--c-text-subtle);
    opacity: var(--p, 0);
    transform: scale(calc(.6 + var(--p, 0) * .4));
    transition: color .2s, background .2s;
}
.pwa-ptr.is-armed .pwa-ptr__ring { color: var(--c-accent-contrast); background: var(--c-accent); border-color: var(--c-accent); }
.pwa-ptr.is-loading .pwa-ptr__ring { color: var(--c-accent); background: var(--c-surface); border-color: var(--c-border); }
.pwa-ptr__arrow { width: 20px; height: 20px; transform: rotate(var(--r, 0deg)); }
.pwa-ptr__spin {
    display: none; width: 20px; height: 20px; border-radius: 50%;
    border: 2.5px solid var(--c-accent-soft); border-top-color: var(--c-accent);
    animation: pwa-spin .7s linear infinite;
}
.pwa-ptr.is-loading .pwa-ptr__arrow { display: none; }
.pwa-ptr.is-loading .pwa-ptr__spin { display: block; }
.pwa-ptr.is-settling { transition: transform .3s cubic-bezier(.3, 1.2, .4, 1); }
.pwa-ptr.is-settling .pwa-ptr__ring { transition: opacity .3s, transform .3s, color .2s, background .2s; }

@keyframes pwa-spin { to { transform: rotate(360deg); } }
@keyframes pwa-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .35); } 50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); } }
@keyframes pwa-shake {
    0%, 100% { transform: translate(-50%, 0); }
    20% { transform: translate(calc(-50% - 8px), 0); } 40% { transform: translate(calc(-50% + 7px), 0); }
    60% { transform: translate(calc(-50% - 5px), 0); } 80% { transform: translate(calc(-50% + 3px), 0); }
}
