/* theme-v4.css — QA round 4 (docs/qa/UI_UX_AUDIT.md, docs/qa/DESIGN_PROPOSAL.md). Loaded AFTER theme-v3.css.
   One file, one concern per block; every block names the audit finding it closes. No business markup depends on it
   except the new components at the end (.stepper, .card-*), which are opt-in classes. */

/* ================= 0. tokens: gutters, header height, contrast-safe semantic text ================= */
:root {
  --otp-gutter: 10px;            /* <=479 */
  --otp-header-h: 54px;
  --otp-ease-out: cubic-bezier(.2, .8, .2, 1);
  --otp-dur-fast: 120ms;
  --otp-dur-base: 180ms;
  --otp-dur-slow: 280ms;
  /* text colours that pass 4.5:1 on their soft background (docs/qa/DESIGN_PROPOSAL.md §2.3) */
  --otp-success-text: #166534;
  --otp-warning-text: #92400e;
  --otp-danger-text: #b91c1c;
  --otp-info-text: #075985;
  --otp-neutral-text: #475569;
}
@media (min-width: 480px) { :root { --otp-gutter: 14px; } }
@media (min-width: 768px) { :root { --otp-gutter: 20px; } }
@media (min-width: 1200px) { :root { --otp-gutter: 24px; } }
[data-bs-theme="dark"] {
  --otp-success-text: #86efac;
  --otp-warning-text: #fcd34d;
  --otp-danger-text: #fca5a5;
  --otp-info-text: #7dd3fc;
  --otp-neutral-text: #b6c2d6;
}

/* ================= 1. U-001 dropdown opens under its trigger, animates in AND out ================= */
/* Popper positions with an inline `transform`; an animation on `transform` overrides it (and fill-mode both keeps the
   end value), which put every menu on top of its trigger. Animate the individual properties instead: they compose. */
@keyframes otp-menu-in  { from { opacity: 0; translate: 0 -6px; scale: .97; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes otp-menu-out { from { opacity: 1; translate: 0 0; scale: 1; } to { opacity: 0; translate: 0 -4px; scale: .98; } }
.dropdown-menu.show { animation: otp-menu-in var(--otp-dur-base) var(--otp-ease-out) backwards; }
.dropdown-menu.show.is-closing { animation: otp-menu-out 110ms ease-in forwards; pointer-events: none; }
.dropdown-menu[data-popper-placement^="bottom-end"], .dropdown-menu[data-popper-placement^="bottom"].dropdown-menu-end { transform-origin: top right; }
.dropdown-menu[data-popper-placement^="bottom-start"] { transform-origin: top left; }
.dropdown-menu[data-popper-placement^="top-end"] { transform-origin: bottom right; }
.dropdown-menu[data-popper-placement^="top-start"] { transform-origin: bottom left; }
.select2-dropdown, .select2-container--open .select2-dropdown, .flatpickr-calendar.open { animation: otp-menu-in var(--otp-dur-base) var(--otp-ease-out) backwards; }
/* U-015 no layout shift on item hover */
.dropdown-item:hover { padding-left: var(--bs-dropdown-item-padding-x, 1rem); }
.dropdown-item { transition: background-color var(--otp-dur-fast) ease, color var(--otp-dur-fast) ease; }
.dropdown-item:hover > i, .dropdown-item:focus-visible > i { color: var(--otp-primary); }

/* ================= 2. U-002 the page-enter animation must not leave a transform behind ================= */
/* A finished `fill: both` transform keeps <main> as the containing block of every position:fixed child (modals). */
.page-enter { animation-fill-mode: backwards; }

/* ================= 3. U-003 long tile lists scroll inside their own region on phones ================= */
@media (max-width: 767.98px) {
  .app-content .card > .table-responsive,
  .app-content .table-card > .table-responsive,
  .scroll-region {
    max-height: calc(100dvh - var(--otp-header-h) - 120px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .scroll-region--tall { max-height: calc(100dvh - var(--otp-header-h) - 24px); }
}

/* ================= 4. U-004..U-007, U-019 text must wrap instead of being cut ================= */
.section-card li, .section-card code, .stat-card .stat-value, .stat-card .stat-sub, .table-stack td code, .table-stack td .text-muted {
  min-width: 0; overflow-wrap: anywhere;
}
@media (max-width: 575.98px) {
  code { white-space: normal; word-break: break-word; }
  .stat-card .stat-value { font-size: clamp(.82rem, 4.2vw, 1rem); }
}
.table-stack td code { white-space: normal; }

/* ================= 5. U-008/U-009 hit areas: keep the look, enlarge the target on touch ================= */
@media (pointer: coarse), (max-width: 767.98px) {
  .btn-sm, .form-select-sm, .form-control-sm { min-height: 36px; }
  .btn-icon.btn-sm { width: 36px; height: 36px; }
  .table-stack td.table-actions .btn { min-height: 38px; }
  .round-btn, .site-nav .round-btn, .app-topbar .round-btn { width: 38px; height: 38px; }
  .collapse-toggle, .balance-chip, .filter-panel-toggle, .nav-caption { min-height: 36px; }
  .site-brand { min-height: 36px; padding-block: 3px; }
  .nav-tabs .nav-link, .nav-pills .nav-link { min-height: 38px; display: inline-flex; align-items: center; }
  .select2-results__option { min-height: 36px; display: flex; align-items: center; }
  .modal-footer .btn, .modal-header .btn-close { min-height: 38px; min-width: 38px; }
}

/* ================= 6. U-014 reduced motion covers every transition and animation ================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .dropdown-menu.show.is-closing { animation: none !important; }
}

/* ================= 7. U-016 / contrast: badges, pills, primary button, placeholders ================= */
.badge-soft-success { color: var(--otp-success-text); }
.badge-soft-warning { color: var(--otp-warning-text); }
.badge-soft-danger  { color: var(--otp-danger-text); }
.badge-soft-info    { color: var(--otp-info-text); }
.badge-soft-secondary { color: var(--otp-neutral-text); }
/* loud gradient KPI cards: darker stops so white text reaches >= 4.5:1 (was 1.7 - 2.9 at the light end) */
.stat-card.is-g-green { background: linear-gradient(135deg, #047857, #15803d); }
.stat-card.is-g-amber { background: linear-gradient(135deg, #b45309, #92400e); }
.stat-card.is-g-cyan  { background: linear-gradient(135deg, #0e7490, #0f766e); }
.stat-card.is-g-rose  { background: linear-gradient(135deg, #be123c, #9f1239); }
.stat-card.is-g-blue  { background: linear-gradient(135deg, #1d4ed8, #0369a1); }
.stat-card.is-g-violet { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.stat-card.is-gradient .stat-label, .stat-card[class*="is-g-"] .stat-label, .stat-card[class*="is-g-"] .stat-sub { opacity: 1; }
.filter-bar .btn-light, .filter-bar a.btn-light { background: linear-gradient(135deg, #0e7490, #0369a1); }
[data-bs-theme="dark"] .nav-pills .nav-link.active,
[data-bs-theme="dark"] .page-item.active .page-link,
[data-bs-theme="dark"] .nav-tabs .nav-link.active { background: #4f46e5; border-color: #4f46e5; color: #fff; }
[data-bs-theme="dark"] .btn-primary { color: #fff; background-image: linear-gradient(135deg, #6d28d9, #4f46e5); }
[data-bs-theme="dark"] .select2-selection__placeholder, [data-bs-theme="dark"] ::placeholder { color: #8593b0 !important; }
[data-bs-theme="dark"] .sidebar-user-role { color: #9aa8c0; }
/* focus ring that is visible on every surface (>= 3:1) */
:focus-visible { outline: 2px solid var(--otp-primary); outline-offset: 2px; }
[data-bs-theme="dark"] :focus-visible { outline-color: #a5b4fc; }

/* ================= 8. U-017 needless stacking: keep short things on one row ================= */
.filter-bar > a, .filter-bar > .nav-link { width: auto; }
.filter-bar:has(> a:not(.btn)) { display: flex !important; flex-wrap: wrap; gap: .4rem; align-items: center; }
.dash-feed-main { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.dash-feed-main > :first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dash-feed-main > :last-child { flex: none; }
.table-stack td:has(> .badge-soft):has(> code) { display: flex; flex-wrap: wrap; gap: .25rem .5rem; align-items: center; }
p.text-muted.small code, .text-muted.small > code { display: inline; }
.perm-group > .card-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
@media (max-width: 575.98px) {
  .row.g-2 > .col-6-pair, .binance-pair > *, .crypto-pair > * { flex: 1 1 150px; }
}

/* ================= 9. layout: tight but never cramped edges ================= */
.app-content, .site-page { padding-inline: var(--otp-gutter) !important; }
@media (min-width: 1200px) { .app-content { max-width: 1480px; margin-inline: auto; } }

/* ================= 10. sidebar drawer: transition only transform (U-013) ================= */
.app-sidebar { transition: transform var(--otp-dur-slow) var(--otp-ease-out); }
html.sidebar-open, html.sidebar-open body { overflow: hidden; }

/* ================= 11. tokens used by the new components (names that did not exist before) ================= */
:root {
  --otp-on-primary: #fff; --otp-primary-fill: #4f46e5; --otp-primary-border: #c7cbfb; --otp-primary-text: #4338ca;
  --otp-border-control: #7c879d; --otp-on-success: #fff; --otp-on-danger: #fff;
  --otp-success-soft: #e8f6ec; --otp-success-border: #b7e0c4; --otp-warning-soft: #fdf3dc; --otp-warning-border: #f1d49a;
  --otp-danger-soft: #fdeceb; --otp-danger-border: #f5c2c0; --otp-info-soft: #e4f1fb; --otp-info-border: #b5d8f0;
  --otp-neutral-soft: #eef1f6; --otp-neutral-border: #d5dbe6; --otp-disabled-bg: #eef1f6; --otp-disabled-text: #7c879d;
  --otp-fs-2xs: .7857rem; --otp-fs-xs: .8571rem; --otp-fs-sm: .9286rem; --otp-fs-md: 1rem; --otp-fs-lg: 1.143rem; --otp-fs-xl: 1.43rem;
  --otp-gap: 10px; --otp-card-pad: 12px; --otp-card-pad-y: 12px;
  --otp-ease-in-out: cubic-bezier(.65, 0, .35, 1); --otp-ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --otp-shadow-xs: 0 1px 2px rgba(15, 23, 42, .06); --otp-shadow-sm: 0 2px 6px -1px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .05);
}
@media (min-width: 480px) { :root { --otp-gap: 12px; --otp-card-pad: 14px; --otp-card-pad-y: 14px; } }
@media (min-width: 1200px) { :root { --otp-gap: 16px; --otp-card-pad: 18px; --otp-card-pad-y: 16px; } }
[data-bs-theme="dark"] {
  --otp-on-primary: #0b1020; --otp-primary-fill: #818cf8; --otp-primary-border: #3b4585; --otp-primary-text: #c7d2fe;
  --otp-border-control: #6b7a99; --otp-on-success: #0b1020; --otp-on-danger: #0b1020;
  --otp-success-soft: #0f2e1e; --otp-success-border: #1f5a3a; --otp-warning-soft: #33260a; --otp-warning-border: #6b4f12;
  --otp-danger-soft: #3a1618; --otp-danger-border: #7a2b2e; --otp-info-soft: #0c2a40; --otp-info-border: #1c5578;
  --otp-neutral-soft: #1f2940; --otp-neutral-border: #34415f; --otp-disabled-bg: #1a2338; --otp-disabled-text: #6b7a99;
  --otp-shadow-xs: 0 1px 2px rgba(0, 0, 0, .4); --otp-shadow-sm: 0 2px 6px -1px rgba(0, 0, 0, .5);
}
/* category tones (opt in with data-tone="..."): --tone is the icon/text colour, --tone-fill the solid icon chip */
[data-tone="indigo"] { --tone: #4f46e5; --tone-fill: #4f46e5; } [data-tone="violet"] { --tone: #7c3aed; --tone-fill: #7c3aed; }
[data-tone="blue"] { --tone: #1d4ed8; --tone-fill: #1d4ed8; } [data-tone="teal"] { --tone: #0f766e; --tone-fill: #0f766e; }
[data-tone="green"] { --tone: #15803d; --tone-fill: #15803d; } [data-tone="amber"] { --tone: #b45309; --tone-fill: #b45309; }
[data-tone="rose"] { --tone: #be123c; --tone-fill: #be123c; } [data-tone="slate"] { --tone: #475569; --tone-fill: #475569; }
[data-bs-theme="dark"] [data-tone="indigo"] { --tone: #a5b4fc; } [data-bs-theme="dark"] [data-tone="violet"] { --tone: #c4b5fd; }
[data-bs-theme="dark"] [data-tone="blue"] { --tone: #93c5fd; } [data-bs-theme="dark"] [data-tone="teal"] { --tone: #5eead4; }
[data-bs-theme="dark"] [data-tone="green"] { --tone: #86efac; } [data-bs-theme="dark"] [data-tone="amber"] { --tone: #fcd34d; }
[data-bs-theme="dark"] [data-tone="rose"] { --tone: #fda4af; } [data-bs-theme="dark"] [data-tone="slate"] { --tone: #cbd5e1; }

/* ================= 12. Stepper (docs/qa/DESIGN_PROPOSAL.md §3.4) ================= */
.stepper { --dot: 32px; --line: 2px; counter-reset: step; list-style: none; margin: 0 0 var(--otp-gap); padding: 0;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.step { counter-increment: step; position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.step::before, .step::after { content: ""; position: absolute; top: calc(var(--dot) / 2 - var(--line) / 2); height: var(--line); border-radius: var(--line);
  left: calc(-50% + var(--dot) / 2 + 6px); right: calc(50% + var(--dot) / 2 + 6px); }
.step::before { background: var(--otp-border-strong, #c4ccdb); }
.step::after { background: var(--otp-success); transform: scaleX(0); transform-origin: left center; transition: transform var(--otp-dur-slow) var(--otp-ease-in-out); }
.step:first-child::before, .step:first-child::after { display: none; }
.step.is-done::after, .step.is-current::after { transform: scaleX(1); }
.step-dot { position: relative; z-index: 1; flex: none; width: var(--dot); height: var(--dot); border-radius: 50%; display: grid; place-items: center;
  font-size: var(--otp-fs-xs); font-weight: 700; color: var(--otp-text-muted); background: var(--otp-surface); border: 2px solid var(--otp-border-control);
  transition: background-color var(--otp-dur-base) linear, border-color var(--otp-dur-base) linear, color var(--otp-dur-base) linear, box-shadow var(--otp-dur-base) var(--otp-ease-out); }
.step-dot:empty::before { content: counter(step); }
.step.is-current .step-dot { color: var(--otp-on-primary); background: var(--otp-primary-fill); border-color: var(--otp-primary-fill); box-shadow: 0 0 0 4px var(--otp-primary-soft); }
.step.is-done .step-dot { color: var(--otp-on-success); background: var(--otp-success); border-color: var(--otp-success); }
.step.is-done .step-dot > * { display: none; }
.step.is-done .step-dot::before { content: "\f00c"; font: 900 .8rem "Font Awesome 6 Free"; animation: otp-check var(--otp-dur-base) var(--otp-ease-spring); }
.step.is-error .step-dot { color: var(--otp-on-danger); background: var(--otp-danger); border-color: var(--otp-danger); box-shadow: 0 0 0 4px var(--otp-danger-soft); }
.step.is-error .step-dot > * { display: none; }
.step.is-error .step-dot::before { content: "\f00d"; font: 900 .8rem "Font Awesome 6 Free"; }
@keyframes otp-check { from { scale: .4; opacity: 0; } }
.step-text { min-width: 0; max-width: 100%; display: flex; flex-direction: column; gap: 1px; }
.step-title { font-size: var(--otp-fs-sm); font-weight: 600; color: var(--otp-text-muted); }
.step.is-current .step-title, .step.is-done .step-title { color: var(--otp-heading); }
.step-hint { font-size: var(--otp-fs-xs); color: var(--otp-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-hint:empty { display: none; }
@media (max-width: 575.98px) {
  .stepper:not(.is-vertical) { --dot: 26px; display: flex; align-items: center; gap: 6px; }
  .stepper:not(.is-vertical) .step { flex: 0 0 auto; flex-direction: row; text-align: left; gap: 6px; }
  .stepper:not(.is-vertical) .step.is-current { flex: 1 1 auto; }
  .stepper:not(.is-vertical) .step::before { position: static; flex: 0 0 14px; }
  .stepper:not(.is-vertical) .step.is-done::before, .stepper:not(.is-vertical) .step.is-current::before { background: var(--otp-success); transition: background-color var(--otp-dur-slow) linear; }
  .stepper:not(.is-vertical) .step::after { display: none; }
  .stepper:not(.is-vertical) .step:not(.is-current) .step-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .stepper:not(.is-vertical) .step.is-current .step-text { flex: 1 1 auto; }
  .stepper:not(.is-vertical) .step.is-current .step-title, .stepper:not(.is-vertical) .step.is-current .step-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.stepper.is-vertical { --dot: 26px; display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.stepper.is-vertical .step { flex: 0 0 auto; flex-direction: row; align-items: flex-start; text-align: left; gap: 10px; padding-bottom: 14px; }
.stepper.is-vertical .step:last-child { padding-bottom: 0; }
.stepper.is-vertical .step::before, .stepper.is-vertical .step::after { display: block; position: absolute; flex: none; left: calc(var(--dot) / 2 - var(--line) / 2); right: auto; width: var(--line); height: auto; top: calc(var(--dot) + 3px); bottom: 3px; }
.stepper.is-vertical .step::after { transform: scaleY(0); transform-origin: center top; }
.stepper.is-vertical .step.is-done::after { transform: scaleY(1); }
.stepper.is-vertical .step:last-child::before, .stepper.is-vertical .step:last-child::after { display: none; }
.stepper.is-vertical .step-text { padding-top: 3px; }
.stepper.is-static .step-dot { color: var(--otp-primary-text); background: var(--otp-primary-soft); border-color: var(--otp-primary-border); }

/* ================= 13. Action card + status card (opt-in) ================= */
.card-action { --tone-fill: var(--otp-primary-fill); position: relative; display: flex; align-items: center; gap: 12px; height: 100%;
  padding: var(--otp-card-pad-y) var(--otp-card-pad); color: var(--otp-text); text-decoration: none; cursor: pointer;
  background: var(--otp-surface); border: 1px solid var(--otp-border-strong, #c4ccdb); border-radius: 14px; box-shadow: var(--otp-shadow-xs);
  transition: border-color var(--otp-dur-fast) linear, box-shadow var(--otp-dur-base) var(--otp-ease-out), translate var(--otp-dur-base) var(--otp-ease-out), background-color var(--otp-dur-fast) linear; }
.card-action:hover { border-color: var(--tone-fill); box-shadow: var(--otp-shadow-sm); translate: 0 -2px; color: var(--otp-text); text-decoration: none; }
.card-action:active { translate: 0 0; box-shadow: var(--otp-shadow-xs); }
.ca-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; color: #fff; background: var(--tone-fill); }
.ca-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ca-title { font-weight: 700; color: var(--otp-heading); font-size: var(--otp-fs-md); }
.ca-text { font-size: var(--otp-fs-xs); color: var(--otp-text-muted); }
.ca-go { flex: none; color: var(--otp-text-muted); font-size: .75rem; transition: translate var(--otp-dur-base) var(--otp-ease-out), color var(--otp-dur-fast) linear; }
.card-action:hover .ca-go { translate: 3px 0; color: var(--tone-fill); }
.card-action.is-selected, .card-action:has(input:checked) { border-color: var(--otp-primary-fill); box-shadow: inset 0 0 0 1px var(--otp-primary-fill); background: var(--otp-primary-soft); }
.card-action.is-stacked { flex-direction: column; align-items: flex-start; }

.card-status { --s: var(--otp-info); --s-soft: var(--otp-info-soft); --s-text: var(--otp-info-text); --s-border: var(--otp-info-border);
  display: flex; align-items: flex-start; gap: 12px; padding: var(--otp-card-pad-y) var(--otp-card-pad);
  background: var(--s-soft); border: 1px solid var(--s-border); border-radius: 14px; color: var(--otp-text);
  transition: background-color var(--otp-dur-slow) linear, border-color var(--otp-dur-slow) linear; }
.card-status[data-state="success"] { --s: var(--otp-success); --s-soft: var(--otp-success-soft); --s-text: var(--otp-success-text); --s-border: var(--otp-success-border); }
.card-status[data-state="waiting"] { --s: var(--otp-warning); --s-soft: var(--otp-warning-soft); --s-text: var(--otp-warning-text); --s-border: var(--otp-warning-border); }
.card-status[data-state="danger"] { --s: var(--otp-danger); --s-soft: var(--otp-danger-soft); --s-text: var(--otp-danger-text); --s-border: var(--otp-danger-border); }
.card-status[data-state="neutral"] { --s: #475569; --s-soft: var(--otp-neutral-soft); --s-text: var(--otp-neutral-text); --s-border: var(--otp-neutral-border); }
.cs-ico { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--s-text); background: var(--otp-surface); border: 1px solid var(--s-border); }
.cs-body { flex: 1 1 auto; min-width: 0; }
.cs-title { font-weight: 700; color: var(--s-text); }
.cs-text { font-size: var(--otp-fs-sm); color: var(--otp-text); }
.cs-side { flex: none; display: flex; align-items: center; gap: 8px; margin-left: auto; }
@keyframes otp-live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--s) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
.card-status.is-live .cs-ico { animation: otp-live 1.6s var(--otp-ease-out) infinite; }
@media (max-width: 479.98px) { .card-status { flex-wrap: wrap; } .cs-side { flex-basis: 100%; justify-content: flex-end; } }

/* ================= 14. U-020 KPI strips: never leave one orphan card on the last row ================= */
@media (min-width: 1100px) { .stat-strip:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .stat-strip:has(> :nth-child(6):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ================= 15. touch targets for the regular .btn and the close button (second pass, measured 30px / 27px) ================= */
@media (pointer: coarse), (max-width: 767.98px) {
  .btn:not(.btn-sm):not(.btn-lg) { min-height: 38px; }
  .btn-close { width: 36px; height: 36px; background-size: 12px; }
}

/* ================= 16. amber KPI: bright fill + dark text (white on amber cannot reach 4.5:1 without turning brown) ================= */
.stat-card.is-g-amber { background: linear-gradient(135deg, #fcd34d, #f59e0b); color: #1c1306; border-color: transparent; }
.stat-card.is-g-amber .stat-label, .stat-card.is-g-amber .stat-value, .stat-card.is-g-amber .stat-sub { color: #1c1306; }
.stat-card.is-g-amber .stat-icon { background: rgba(28, 19, 6, .14); color: #1c1306; }

/* 17. Long tables that load while scrolled (Ui::clientPager / Otp.tablePager) */
.scroll-lazy { max-height: min(72dvh, 780px); overflow-y: auto; overscroll-behavior: contain; }
.scroll-lazy > table > thead th { position: sticky; top: 0; z-index: 2; background: var(--otp-surface, #fff); box-shadow: 0 1px 0 var(--otp-border); }
@media (max-width: 767.98px) {
  .scroll-lazy { max-height: calc(100dvh - var(--otp-header-h) - 120px); }
}

/* ================= 18. found by the all-pages x 17-viewport sweep ================= */
@media (pointer: coarse), (max-width: 767.98px) {
  .btn-sm { min-width: 36px; }                      /* icon-only copy / action buttons were 27 px wide */
}
/* Three KPI cards in one row (col-4) are ~75 px wide on a phone: drop the icon chip and the sub line so the label fits. */
@media (max-width: 575.98px) {
  .row > .col-4 > .stat-card { padding: .5rem .6rem; gap: 6px; }
  .row > .col-4 > .stat-card .stat-icon { display: none; }
  .row > .col-4 > .stat-card .stat-sub { font-size: .66rem; line-height: 1.2; }
  .row > .col-4 > .stat-card .stat-label { font-size: .62rem; overflow-wrap: anywhere; }
}
/* Stacked action cards (icon on top) waste a full screen on a phone: icon left, text right, badge row under the text. */
@media (max-width: 575.98px) {
  .card-action.is-stacked { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; column-gap: 12px; row-gap: 6px; }
  .card-action.is-stacked > .ca-ico { grid-row: 1; grid-column: 1; }
  .card-action.is-stacked > .ca-body { grid-row: 1; grid-column: 2; }
  .card-action.is-stacked > :nth-child(n+3) { grid-column: 2; }
}

/* ================= 19. contrast pass measured with a script (every text node, 40 pages, light + dark) ================= */
/* brand gradient: the cyan end (#06b6d4 / #22d3ee) gave white text 2.4 / 1.7:1 on avatars and the pricing call-to-action */
:root, html[data-bs-theme="dark"] { --otp-gradient: linear-gradient(135deg, #4f46e5 0%, #0e7490 100%); }
/* sidebar captions, brand sub-line and user role were 3.5 - 4.0:1 on the navy rail */
.app-sidebar { --rail-muted: #9ba8d1; }
/* section headers and period cards: white text needs darker stops; h2 headings must not fall back to the dark heading colour */
.section-head .sh-title { color: inherit; }
.section-head.h-violet { background: linear-gradient(135deg, #6d28d9, #2563eb); }
.section-head.h-red    { background: linear-gradient(135deg, #be123c, #7e22ce); }
.section-head.h-amber  { background: linear-gradient(135deg, #b45309, #4d7c0f); }
.section-head.h-teal   { background: linear-gradient(135deg, #0f766e, #0e7490); }
.section-head.h-blue   { background: linear-gradient(135deg, #1d4ed8, #0e7490); }
.section-head.h-pink   { background: linear-gradient(135deg, #be185d, #c2410c); }
.period-card.c-blue   { background: linear-gradient(135deg, #1e40af, #1d4ed8); }
.period-card.c-violet { background: linear-gradient(135deg, #5b21b6, #6d28d9); }
.period-card.c-green  { background: linear-gradient(135deg, #065f46, #047857); }
.period-card.c-amber  { background: linear-gradient(135deg, #92400e, #b45309); }
.period-card .pc-box { background: rgba(0, 0, 0, .16); }   /* a white overlay lightened the gradient under the white figures (2.2:1) */
.period-card .pc-box small { opacity: 1; }
.section-head .sh-sub { opacity: 1; }
.stat-card.is-gradient .stat-label, .stat-card.is-gradient .stat-sub { color: #fff; }
.filter-bar .btn-primary { background: linear-gradient(135deg, #6d28d9, #4f46e5); }
/* coloured chips take their colour from --c (any hue): darken it so the white letter always reads (>= 4.5:1) */
html span.rent-ico, html .chip .svc-dot, html .docs-content h2 .h-num, html .qs-card .qs-n { background: color-mix(in srgb, var(--c, #6366f1) 62%, #000); }
.method-get { background: #0369a1; } .method-post { background: #047857; } .method-delete { background: #b91c1c; } .method-put { background: #b45309; }
/* text on tinted glass: the old #64748b was 4.1:1 on the lavender page background; dark theme code was 3.3:1 */
html:not([data-bs-theme="dark"]) { --otp-text-muted: #546178; }
[data-bs-theme="dark"] code { color: #a5b4fc; }
.btn-outline-danger { --bs-btn-color: var(--otp-danger-text, #b91c1c); --bs-btn-border-color: var(--otp-danger-text, #b91c1c); }
[data-bs-theme="dark"] .btn-outline-danger { --bs-btn-color: #fca5a5; --bs-btn-border-color: #f87171; }
html:not([data-bs-theme="dark"]) code { color: #4338ca; }
html:not([data-bs-theme="dark"]) .text-success { --bs-success-rgb: 21, 128, 61; }
[data-bs-theme="dark"] a.active { color: #a5b4fc; }
/* avatars take any tone pair inline (cyan end = 2.4:1 with the white initial): multiply with a mid grey keeps the hue, darkens the stops */
.avatar { background-color: #b0b0b0 !important; background-blend-mode: multiply; }
.stat-card[class*="is-g-"]:not(.is-g-amber) .stat-label, .stat-card[class*="is-g-"]:not(.is-g-amber) .stat-sub { color: #fff; }
.stat-card .opacity-75 { opacity: .92 !important; }
html:not([data-bs-theme="dark"]) pre code, html:not([data-bs-theme="dark"]) .code-block code { color: inherit; }
html:not([data-bs-theme="dark"]) .btn-success { --bs-btn-bg: #157347; --bs-btn-border-color: #146c43; --bs-btn-hover-bg: #116239; --bs-btn-hover-border-color: #0f5a34; --bs-btn-active-bg: #0f5a34; }
.btn-outline-success { --bs-btn-color: #146c43; --bs-btn-border-color: #146c43; }
[data-bs-theme="dark"] .btn-outline-success { --bs-btn-color: #86efac; --bs-btn-border-color: #4ade80; }
.docs-chip { color: color-mix(in srgb, var(--c) 62%, #000); }
[data-bs-theme="dark"] .docs-chip { color: color-mix(in srgb, var(--c) 70%, #fff); }
.section-head.h-green { background: linear-gradient(135deg, #047857, #15803d); }   /* was used by general settings with no rule: white title on the page background */
html .docs-chip { color: color-mix(in srgb, var(--c) 62%, #000); }
[data-bs-theme="dark"] html .docs-chip, html[data-bs-theme="dark"] .docs-chip { color: color-mix(in srgb, var(--c) 70%, #fff); }
html .pub-step .st-n { background-color: #b0b0b0 !important; background-blend-mode: multiply; }
.btn-outline-warning { --bs-btn-color: #92400e; --bs-btn-border-color: #b45309; }
[data-bs-theme="dark"] .btn-outline-warning { --bs-btn-color: #fcd34d; --bs-btn-border-color: #fbbf24; }
[data-bs-theme="dark"] { --bs-link-color: #a5b4fc; --bs-link-hover-color: #c7d2fe; }

/* ================= 20. customer header between 992 and 1199 px: links wrapped onto two lines (1024 x 768) ================= */
.site-nav .nav-link, .site-nav .btn, .site-nav .balance-chip, .site-brand { white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1199.98px) {
  .site-nav { gap: .5rem !important; }
  .site-nav .nav-link { padding-inline: .5rem; }
  .site-brand > span:last-child { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; }
}

/* ================= 21. non-text contrast (WCAG 1.4.11): field outlines were #cfd6e4 on white = 1.5:1 ================= */
.form-control, .form-select, .form-check-input:not(:checked), .input-group-text { border-color: var(--otp-border-control); }
.form-control:hover:not(:disabled):not(:focus), .form-select:hover:not(:disabled):not(:focus) { border-color: var(--otp-text-muted); }
.form-control:focus, .form-select:focus { border-color: var(--otp-primary-fill); }
/* disabled: visibly different from enabled (tokens existed but nothing used them) */
.form-control:disabled, .form-select:disabled { background-color: var(--otp-disabled-bg); color: var(--otp-disabled-text); cursor: not-allowed; }
.btn:disabled, .btn.disabled { cursor: not-allowed; opacity: .55; box-shadow: none; transform: none; }

/* ================= 22. transaction tiles take their accent from the STATUS, not from the row index ================= */
.table-stack tr[data-tone="success"] { --tone: #059669; }
.table-stack tr[data-tone="warning"] { --tone: #d97706; }
.table-stack tr[data-tone="danger"] { --tone: #dc2626; }
.table-stack tr[data-tone="info"] { --tone: #0284c7; }
.table-stack tr[data-tone="secondary"], .table-stack tr[data-tone="neutral"] { --tone: #64748b; }

/* ================= 23. owner-reported: password icon over the text, black tooltip text in dark mode ================= */
/* initPasswords() wraps the input in .has-password-toggle, so `.input-icon > .form-control` no longer matched */
.input-icon .has-password-toggle > .form-control { padding-left: 2.35rem !important; }
/* Bootstrap takes the tooltip text colour from --bs-body-bg: dark-on-dark in dark mode */
.tooltip { --bs-tooltip-color: #f8fafc; --bs-tooltip-opacity: 1; }
[data-bs-theme="dark"] .tooltip { --bs-tooltip-bg: #2a3654; --bs-tooltip-color: #f8fafc; }
[data-bs-theme="dark"] .tooltip .tooltip-inner { border: 1px solid #44527a; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
[data-bs-theme="dark"] .popover { --bs-popover-color: var(--otp-text); --bs-popover-header-color: var(--otp-heading); }

/* ================= 24. real brand logos (public/assets/img/brands) + the home logo wall ================= */
.svc-logo-img, .rent-logo, .svc-dot-img, .brand-logo-img { width: 68%; height: 68%; object-fit: contain; display: block; }
html span.rent-ico.has-logo, html .svc-av.has-logo, html .home-dot.has-logo, html .chip .svc-dot.has-logo { background: #fff; border: 1px solid var(--otp-border); box-shadow: none; display: inline-grid; place-items: center; }
html .svc-av.has-logo { display: grid; }
.chip-more { color: var(--otp-primary-text, var(--otp-primary)); font-weight: 600; text-decoration: none; }
.logo-wall { display: grid; gap: .7rem; overflow: hidden; margin-inline: auto; max-width: 1100px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.logo-row { overflow: hidden; }
.logo-track { display: flex; width: max-content; animation: otp-marquee 90s linear infinite; }
.logo-row.is-reverse .logo-track { animation-direction: reverse; animation-duration: 105s; }
.logo-wall:hover .logo-track { animation-play-state: paused; }
.logo-tile { flex: none; width: 58px; height: 58px; margin-right: .7rem; border-radius: 16px; display: grid; place-items: center; background: #fff; border: 1px solid var(--otp-border); box-shadow: var(--otp-shadow-xs); }
.logo-tile img { width: 30px; height: 30px; object-fit: contain; }
@keyframes otp-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .logo-track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; row-gap: .7rem; }
  .logo-tile.is-dup { display: none; }
  .logo-wall { -webkit-mask-image: none; mask-image: none; }
}
@media (max-width: 575.98px) { .logo-tile { width: 50px; height: 50px; border-radius: 14px; } .logo-tile img { width: 26px; height: 26px; } }

/* ================= 25. provider readiness checklist ================= */
.ready-list { display: grid; gap: .1rem; }
.ready-row { display: flex; align-items: baseline; gap: .55rem; padding: .4rem .1rem; border-bottom: 1px dashed var(--otp-border); }
.ready-row:last-of-type { border-bottom: 0; }
.ready-row > i { flex: none; font-size: 1rem; transform: translateY(1px); }
.ready-name { font-weight: 600; color: var(--otp-heading); }
.ready-why { margin-left: auto; font-size: var(--otp-fs-xs); color: var(--otp-text-muted); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.ready-row.is-block .ready-why { color: var(--otp-danger-text); }
.ready-sum { margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--otp-border); font-weight: 700; }

/* ================= 26. rent page: service over country on the left, order card always beside them (5TOTP-style) ================= */
/* The customer picks a service, then a country, and presses "Get number" - none of those may need a scroll. */
.buy-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); grid-template-areas: "svc ord" "cty ord"; gap: .9rem; align-items: start; }
.buy-grid > .panel:nth-child(1) { grid-area: svc; }
.buy-grid > .panel:nth-child(2) { grid-area: cty; }
.buy-grid > .panel:nth-child(3) { grid-area: ord; position: sticky; top: calc(var(--otp-header-h, 58px) + 12px); }
/* both lists fill the screen the header block no longer uses (5TOTP-style: lots of rows, little scrolling): the height follows
   the viewport. 400 px = top bar + tabs + both panel headers + gaps. 700 px tall -> ~175 / ~125 px, 1000 px -> ~350 / ~250 px. */
.buy-grid > .panel:nth-child(1) .pick-list { max-height: clamp(150px, calc((100vh - 400px) * .58), 520px); }
.buy-grid > .panel:nth-child(2) .pick-list { max-height: clamp(120px, calc((100vh - 400px) * .42), 380px); }
@media (max-width: 767.98px) {
  .buy-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "svc" "cty" "ord"; }
  /* phones: the order card flows with the page. It used to be pinned to the bottom as a "compact bar", but it now holds the whole price-tier list
     (6+ rows, ~530 px), so pinned it covered the entire screen and nothing could be scrolled. */
  .buy-grid > .panel:nth-child(3) { position: static; }
  .buy-grid > .panel:nth-child(3) .panel-title, .buy-grid > .panel:nth-child(3) .rent-points, .buy-grid > .panel:nth-child(3) .rent-sum-row:nth-child(4) { display: none; }
  .buy-grid > .panel:nth-child(3) .rent-sum-price { grid-column: 1 / -1; flex-direction: row; align-items: baseline; justify-content: space-between; }
  .buy-grid > .panel:nth-child(3) .rent-sum-price > strong { text-align: right; }
  .buy-grid > .panel:nth-child(3) .rent-sum { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem; margin: 0 0 .5rem; }
  .buy-grid > .panel:nth-child(3) .rent-sum-row { flex-direction: column; align-items: flex-start; gap: 0; border: 0; padding: 0; }
  .buy-grid > .panel:nth-child(3) .rent-sum-row > strong { text-align: left; }
  .buy-grid > .panel:nth-child(3) .cta-buy { width: 100%; }
  .buy-grid > .panel .pick-list { max-height: clamp(130px, 22vh, 220px); }
}

/* ================= 27. rent page: three columns (service + country | order with price | your numbers), prices in the country list ================= */
.rent-side { margin-top: 1rem; }
@media (min-width: 1200px) {
  .rent-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: 1rem; align-items: start; }
  .rent-layout .buy-grid { grid-template-columns: minmax(0, 1fr) minmax(270px, 330px); }
  .rent-side { margin-top: 0; position: sticky; top: calc(var(--otp-header-h, 58px) + 12px); max-height: calc(100vh - var(--otp-header-h, 58px) - 28px); overflow-y: auto; overscroll-behavior: contain; }
  .rent-side #rent-cards > * { flex: 0 0 100%; max-width: 100%; width: 100%; }
}
.pick-item[data-off] { display: none; }
.pick-item .meta.price { display: grid; justify-items: end; gap: 1px; line-height: 1.15; font-family: inherit; color: var(--otp-text); }
.pick-item .meta.price b { font-size: .84rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pick-item .meta.price small { font-size: .68rem; color: var(--otp-text-muted); font-weight: 400; }
.pick-item .cheap-tag { margin-left: 6px; font-size: .64rem; padding: .08rem .4rem; white-space: nowrap; flex: 0 0 auto; }
.rent-sum-price { font-size: .95rem; }
.rent-sum-price > strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; color: var(--otp-text); }
.rent-sum-price > strong.text-muted { font-size: 1rem; color: var(--otp-text-muted); }
.rent-low { display: flex; align-items: flex-start; gap: .45rem; margin: 0 0 .7rem; padding: .5rem .65rem; border-radius: 10px; background: var(--otp-warning-soft, rgba(245, 158, 11, .14)); color: var(--otp-warning-text, #92400e); font-size: .8rem; }
.rent-low[hidden] { display: none; }
.rent-low a { font-weight: 600; text-decoration: underline; white-space: nowrap; }
.rent-low > i { margin-top: .15rem; }
@media (max-width: 767.98px) {
  .rent-side { margin-top: 1.25rem; }
  .buy-grid > .panel:nth-child(3) .rent-low { margin: 0 0 .5rem; padding: .35rem .5rem; }
}

/* ================= 28. bank top-up: the QR sits beside the transfer details ================= */
.bank-qr-frame { display: inline-block; padding: 12px; background: #fff; border: 1px solid var(--otp-border); border-radius: 16px; box-shadow: var(--otp-shadow-sm, 0 2px 8px rgba(15, 23, 42, .08)); line-height: 0; }
.bank-qr-frame img { display: block; width: 100%; max-width: 220px; height: auto; image-rendering: pixelated; }
.bank-qr [data-qr-chip] { min-width: 4.2rem; font-variant-numeric: tabular-nums; }
@media (max-width: 767.98px) { .bank-qr-frame img { max-width: 200px; } }

/* ================= 29. crypto top-up: the invoice window ================= */
body.inv-lock { overflow: hidden; }
.inv-overlay { position: fixed; inset: 0; z-index: 1080; display: flex; align-items: flex-start; justify-content: center; padding: 1rem; overflow-y: auto; background: rgba(15, 23, 42, .6); backdrop-filter: blur(3px); }
.inv-overlay[hidden] { display: none; }
.inv-dialog { width: min(940px, 100%); margin: auto; overflow: hidden; border-radius: 20px; background: var(--otp-surface, #fff); box-shadow: 0 24px 60px rgba(15, 23, 42, .35); }
.inv-head, .inv-foot { background: linear-gradient(135deg, #6366f1, #7c3aed); color: #fff; }
.inv-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.25rem; }
.inv-title { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.05rem; }
.inv-pill { padding: .15rem .75rem; border-radius: 999px; background: rgba(255, 255, 255, .22); font-size: .78rem; font-weight: 600; }
.inv-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #fff; color: #dc2626; display: grid; place-items: center; cursor: pointer; }
.inv-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; padding: 1.25rem; }
.inv-col { display: grid; gap: .9rem; align-content: start; min-width: 0; }
.inv-box { padding: .8rem 1rem; border: 1px solid var(--otp-border); border-radius: 14px; background: color-mix(in srgb, var(--otp-primary, #6366f1) 4%, transparent); }
.inv-label { margin-bottom: .3rem; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--otp-text-muted); }
.inv-deadline { padding: .8rem; text-align: center; border: 1px solid rgba(16, 185, 129, .45); border-radius: 14px; background: rgba(16, 185, 129, .1); }
.inv-deadline[hidden] { display: none; }
.inv-count { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; color: #059669; }
.inv-count.is-low { color: var(--otp-danger-text, #dc2626); }
.inv-qr { text-align: center; }
.inv-qr-frame { display: block; width: fit-content; margin: 0 auto .45rem; padding: 12px; background: #fff; border: 1px solid var(--otp-border); border-radius: 16px; line-height: 0; box-shadow: 0 6px 18px rgba(15, 23, 42, .1); }
.inv-qr-frame img { display: block; width: auto; height: auto; max-width: 100%; }
.inv-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .75rem; padding: .25rem 0; font-size: .88rem; }
.inv-row > span { color: var(--otp-text-muted); }
.inv-warn { display: flex; gap: .6rem; padding: .8rem 1rem; border-radius: 14px; background: rgba(245, 158, 11, .14); color: var(--otp-warning-text, #92400e); border: 1px solid rgba(245, 158, 11, .4); }
.inv-warn > i { margin-top: .2rem; }
.inv-status { display: flex; align-items: flex-start; gap: .7rem; padding: .8rem 1rem; border: 1px solid; border-radius: 14px; }
.inv-status > i { margin-top: .2rem; font-size: 1.1rem; }
.inv-status.is-warning { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .45); color: var(--otp-warning-text, #92400e); }
.inv-status.is-info { background: rgba(6, 182, 212, .12); border-color: rgba(6, 182, 212, .45); color: var(--otp-info-text, #0e7490); }
.inv-status.is-success { background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .5); color: #047857; }
.inv-status.is-secondary { background: rgba(100, 116, 139, .12); border-color: rgba(100, 116, 139, .4); color: var(--otp-text-muted); }
.inv-status.is-danger { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .45); color: var(--otp-danger-text, #b91c1c); }
.inv-copy { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.inv-value { min-width: 0; font-family: var(--otp-mono, monospace); font-weight: 600; overflow-wrap: anywhere; }
.inv-value.is-big { font-family: inherit; font-size: 1.75rem; color: #059669; font-variant-numeric: tabular-nums; }
.inv-unit { font-size: 1rem; }
.inv-steps ol { display: grid; gap: .3rem; padding-left: 1.15rem; font-size: .85rem; }
.inv-foot { padding: .7rem 1rem; text-align: center; font-size: .82rem; }
@media (max-width: 767.98px) { .inv-body { grid-template-columns: minmax(0, 1fr); padding: 1rem; } .inv-overlay { padding: .5rem; } }

/* ================= 30. toasts: SweetAlert2 toast mode, themed ================= */
.swal2-container.swal2-top-end { top: calc(var(--otp-header-h, 58px) + 8px) !important; padding-right: 14px; z-index: 3000; }
.swal2-popup.swal2-toast.otp-toast { width: auto; min-width: 280px; max-width: min(420px, calc(100vw - 28px)); padding: .75rem 2.2rem .75rem .85rem; align-items: center; background: var(--otp-surface, #fff); color: var(--otp-text, #0f172a); border: 1px solid var(--otp-border, #e2e8f0); border-radius: 14px; box-shadow: 0 12px 32px rgba(15, 23, 42, .18); font-family: inherit; }
.swal2-popup.swal2-toast.otp-toast .swal2-title { margin: 0 0 0 .6rem; font-size: .9rem; font-weight: 600; line-height: 1.35; color: inherit; text-align: left; }
.swal2-popup.swal2-toast.otp-toast .swal2-html-container { margin: .15rem 0 0 .6rem; padding: 0; font-size: .82rem; color: var(--otp-text-muted, #64748b); text-align: left; }
.swal2-popup.swal2-toast.otp-toast .swal2-icon { width: 1.9rem; height: 1.9rem; min-width: 1.9rem; margin: 0; border-width: .18rem; }
.swal2-popup.swal2-toast.otp-toast .swal2-icon .swal2-icon-content { font-size: 1.1rem; }
.swal2-popup.swal2-toast.otp-toast .swal2-close { top: .45rem; right: .4rem; width: 1.5rem; height: 1.5rem; font-size: 1.3rem; color: var(--otp-text-muted, #64748b); border-radius: 8px; }
.swal2-popup.swal2-toast.otp-toast .swal2-close:hover { background: var(--otp-primary-soft, rgba(99, 102, 241, .1)); color: var(--otp-text, #0f172a); }
.swal2-popup.swal2-toast.otp-toast .swal2-timer-progress-bar { height: 3px; background: var(--otp-primary, #6366f1); }
.swal2-popup.swal2-toast.otp-toast.swal2-icon-success .swal2-timer-progress-bar { background: var(--otp-success, #10b981); }
.swal2-popup.swal2-toast.otp-toast.swal2-icon-error .swal2-timer-progress-bar { background: var(--otp-danger, #ef4444); }
.swal2-popup.swal2-toast.otp-toast.swal2-icon-warning .swal2-timer-progress-bar { background: var(--otp-warning, #f59e0b); }
@media (max-width: 575.98px) { .swal2-container.swal2-top-end { padding: 0 8px; } .swal2-popup.swal2-toast.otp-toast { width: calc(100vw - 16px); max-width: none; } }
.swal2-container.swal2-top-end, .swal2-container.swal2-top-end.swal2-backdrop-show { background: transparent !important; backdrop-filter: none !important; pointer-events: none; }
.swal2-container.swal2-top-end .swal2-popup { pointer-events: auto; }

/* ================= 31. invoice window: accent box, success and expired screens ================= */
.inv-box.is-accent { border: 2px solid #f0b90b; background: rgba(240, 185, 11, .1); }
.inv-box.is-accent .inv-value { color: var(--otp-text); font-size: 1.15rem; }
.inv-body[hidden], .inv-foot[hidden] { display: none; }
.inv-result { display: grid; justify-items: center; gap: .6rem; padding: 2.2rem 1.5rem 1.8rem; text-align: center; }
.inv-burst { position: relative; width: 130px; height: 130px; display: grid; place-items: center; margin-bottom: .4rem; }
.inv-check { position: relative; z-index: 2; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; font-size: 2.1rem; color: #fff; background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 10px 28px rgba(34, 197, 94, .45); animation: inv-pop .55s cubic-bezier(.68, -.55, .27, 1.55) both; }
.inv-result.is-expired .inv-check { background: linear-gradient(135deg, #f87171, #dc2626); box-shadow: 0 10px 28px rgba(220, 38, 38, .4); }
.inv-ring { position: absolute; inset: 14px; border: 3px solid rgba(34, 197, 94, .55); border-radius: 50%; animation: inv-ring 1.8s ease-out infinite; }
.inv-ring.is-late { animation-delay: .9s; }
.inv-bit { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #22c55e; opacity: 0; animation: inv-bit .9s ease-out var(--d, 0s) both; }
.inv-bit:nth-of-type(odd) { background: #f59e0b; border-radius: 2px; }
.inv-bit:nth-of-type(3n) { background: #6366f1; }
.inv-result-title { margin: 0; font-size: 1.5rem; font-weight: 700; color: #16a34a; }
.inv-result.is-expired .inv-result-title { color: #dc2626; }
.inv-result-text { margin: 0 0 .4rem; color: var(--otp-text-muted); max-width: 34rem; }
.inv-details { width: min(420px, 100%); text-align: left; }
.inv-result .btn { margin-top: .6rem; min-width: 11rem; }
@keyframes inv-pop { 0% { transform: scale(.2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes inv-ring { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes inv-bit { 0% { transform: rotate(var(--r)) translateY(0) scale(.4); opacity: 1; } 100% { transform: rotate(var(--r)) translateY(-62px) scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .inv-check, .inv-ring, .inv-bit { animation: none; } .inv-bit { display: none; } }

/* ================= 32. home page: channel pills, automation API band, Mail OTP section ================= */
.home-channels { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 1rem 0 0; padding: 0; }
.home-channels a { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .85rem; border-radius: 999px; font-weight: 600; font-size: .86rem; text-decoration: none; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); transition: transform .15s, background .15s; }
.home-channels a:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--c) 20%, transparent); }
.tool-section { padding-top: 1.2rem; }
.tool-band { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2rem; align-items: center; padding: 2.2rem; border-radius: 24px; color: #e2e8f0; background: radial-gradient(circle at 12% 0%, rgba(99, 102, 241, .45), transparent 55%), radial-gradient(circle at 100% 100%, rgba(244, 63, 94, .32), transparent 50%), linear-gradient(135deg, #0f172a, #1e1b4b); box-shadow: 0 24px 60px rgba(30, 27, 75, .35); }
.tool-new { display: inline-flex; align-items: center; gap: .45rem; padding: .25rem .75rem; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fde68a; background: rgba(250, 204, 21, .14); border: 1px solid rgba(250, 204, 21, .4); }
.tool-copy h2 { margin: .8rem 0 .5rem; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; color: #fff; letter-spacing: -.01em; }
.tool-lead { margin: 0 0 1rem; font-size: 1.02rem; color: #cbd5e1; }
.tool-points { list-style: none; display: grid; gap: .55rem; margin: 0 0 1.4rem; padding: 0; }
.tool-points li { display: flex; gap: .6rem; align-items: flex-start; font-size: .94rem; color: #e2e8f0; }
.tool-points i { margin-top: .22rem; color: #4ade80; }
.tool-custom { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 1.1rem 0 0; font-size: .88rem; color: #cbd5e1; }
.tool-custom i { color: #fbbf24; }
.tool-custom a { font-weight: 700; color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.tool-code { min-width: 0; border-radius: 18px; background: rgba(2, 6, 23, .72); border: 1px solid rgba(148, 163, 184, .25); overflow: hidden; }
.tool-tabs { display: flex; gap: .25rem; padding: .55rem .6rem 0; border-bottom: 1px solid rgba(148, 163, 184, .2); }
.tool-tabs button { padding: .4rem .9rem; border: 0; border-radius: 10px 10px 0 0; font-size: .82rem; font-weight: 600; color: #94a3b8; background: transparent; cursor: pointer; }
.tool-tabs button.is-on { color: #fff; background: rgba(99, 102, 241, .35); }
.tool-pane { padding: 1rem 1.1rem; overflow-x: auto; }
.tool-pane[hidden] { display: none; }
.tool-pane pre { margin: 0; font-family: var(--otp-mono, ui-monospace, monospace); font-size: .8rem; line-height: 1.65; color: #e2e8f0; white-space: pre; }
.tool-pane .c { color: #86efac; }
.tool-note { margin: 0; padding: .6rem 1.1rem .9rem; font-size: .8rem; color: #94a3b8; }
.tool-note a { color: #c7d2fe; }
.mail-tag { display: inline-flex; align-items: center; gap: .45rem; padding: .25rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 700; color: #0891b2; background: rgba(6, 182, 212, .14); border: 1px solid rgba(6, 182, 212, .35); }
.mail-points { list-style: none; display: grid; gap: .55rem; margin: 0 0 1.3rem; padding: 0; }
.mail-points li { display: flex; gap: .6rem; align-items: flex-start; font-size: .94rem; color: var(--otp-text-muted); }
.mail-points i { margin-top: .22rem; color: #06b6d4; }
.mail-mock { max-width: 440px; margin: 0 auto; border-radius: 18px; background: var(--otp-surface, #fff); border: 1px solid var(--otp-border); box-shadow: 0 18px 44px rgba(15, 23, 42, .14); overflow: hidden; }
.mail-bar { display: flex; align-items: center; gap: .35rem; padding: .65rem .9rem; background: color-mix(in srgb, var(--otp-primary, #6366f1) 8%, transparent); border-bottom: 1px solid var(--otp-border); }
.mail-bar span { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.mail-bar span:nth-child(1) { background: #f87171; } .mail-bar span:nth-child(2) { background: #fbbf24; } .mail-bar span:nth-child(3) { background: #4ade80; }
.mail-bar b { margin-left: .6rem; font-size: .82rem; color: var(--otp-text-muted); }
.mail-item { padding: .85rem 1rem; border-bottom: 1px solid var(--otp-border); }
.mail-item:last-child { border-bottom: 0; }
.mail-item.is-new { background: color-mix(in srgb, #06b6d4 9%, transparent); animation: mail-in .7s ease-out both; }
.mail-from { display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--otp-text-muted); }
.mail-from small { margin-left: auto; font-size: .72rem; }
.mail-subject { margin: .2rem 0; font-weight: 600; font-size: .92rem; }
.mail-code { font-size: .9rem; color: var(--otp-text-muted); }
.mail-code b { font-family: var(--otp-mono, monospace); font-size: 1.15rem; letter-spacing: .12em; color: #0891b2; }
@keyframes mail-in { 0% { transform: translateY(-14px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
@media (max-width: 991.98px) { .tool-band { grid-template-columns: minmax(0, 1fr); padding: 1.5rem 1.2rem; gap: 1.4rem; } }
@media (prefers-reduced-motion: reduce) { .mail-item.is-new { animation: none; } }
.tool-pane pre, .tool-pane pre code { background: transparent !important; color: #e2e8f0; padding: 0; border: 0; box-shadow: none; display: block; font: inherit; }
.tool-pane pre .c { color: #86efac; }

/* ================= 33. buttons: the label is always centred, whatever the button's height ================= */
/* Bootstrap's .btn is inline-block, so a taller button (touch rule, btn-sm min-height, full-width bars) left the text glued to the top. */
.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.btn.text-start { justify-content: flex-start; text-align: left; }
.btn.text-end { justify-content: flex-end; text-align: right; }
.btn > i, .btn > .fa-solid, .btn > .fa-regular, .btn > .fa-brands { flex: 0 0 auto; }

/* ================= 34. responsive fixes found by the client-UI sweep ================= */
.history-tabs { flex-wrap: wrap; gap: .35rem; }
@media (max-width: 575.98px) { .history-tabs .nav-link { padding: .4rem .7rem; font-size: .84rem; } .history-tabs .nav-link i { margin-right: .35rem !important; } }
.home-steps > li .step-body { min-width: 0; }
@media (max-width: 767.98px) {
  .home-steps > li .step-body { flex: 1 1 auto; }
  /* the price list: service on top, then country | price | Get on ONE row instead of a lonely full-width action row */
  .home-price-card .table-stack tr { grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; }
  .home-price-card .table-stack td.table-actions { grid-column: auto; align-self: end; padding: .4rem .65rem .55rem !important; }
  .home-price-card .table-stack td.table-actions .btn { min-width: 64px; min-height: 36px; }
  .home-price-card .table-stack td.table-num { align-items: flex-end !important; text-align: right !important; }
}
.account-tabs { display: flex; flex-wrap: wrap; gap: .35rem; overflow: visible; margin-bottom: 1rem; }
.account-tabs .nav-link { padding: .42rem .8rem; white-space: nowrap; }
@media (max-width: 575.98px) { .account-tabs .nav-link { padding: .38rem .65rem; font-size: .85rem; } }

/* ================= 35. country flags (local SVG/PNG files in /assets/img/flags) ================= */
.flag-img { width: 24px; height: 18px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(15, 23, 42, .12); vertical-align: -3px; background: #fff; }
.home-country { display: inline-flex; align-items: center; gap: .35rem; }
.pub-cty .flag-img { margin-right: .4rem; }
.rent-ico.has-flag { background: transparent; box-shadow: none; width: 30px; height: 22px; border-radius: 4px; overflow: hidden; }
.rent-ico.has-flag .rent-flag { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px rgba(15, 23, 42, .15); display: block; }

/* ================= 36. text contrast on the public pages (found by the computed-contrast sweep, light + dark) ================= */
html .home-dot, html .blog-av, html .svc-av { background: color-mix(in srgb, var(--c, #6366f1) 62%, #000); }
html .blog-read, html .svc-go { color: color-mix(in srgb, var(--c, var(--otp-primary)) 60%, #000); }
[data-bs-theme="dark"] .blog-read, [data-bs-theme="dark"] .svc-go { color: color-mix(in srgb, var(--c, var(--otp-primary)) 55%, #fff); }
html .pub-price, html .svc-box.is-price b { color: #166534; }
[data-bs-theme="dark"] .pub-price, [data-bs-theme="dark"] .svc-box.is-price b { color: #4ade80; }
html .svc-box.is-countries b { color: #075985; }
[data-bs-theme="dark"] .svc-box.is-countries b { color: #7dd3fc; }
html .home-cc { color: #075985; }
[data-bs-theme="dark"] .home-cc { color: #7dd3fc; }
html .mail-tag { color: #155e75; }
html .mail-code b { color: #0e7490; }
[data-bs-theme="dark"] .mail-tag, [data-bs-theme="dark"] .mail-code b { color: #67e8f9; }
[data-bs-theme="dark"] .badge-soft-primary { color: #a5b4fc; }

/* G25-4 support threads: keep line breaks, never let a long token widen the page. */
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; margin: 0; }
.msg-item { border: 1px solid rgba(128,128,128,.25); border-radius: 14px; padding: .85rem 1rem; margin-bottom: .75rem; }
.msg-item.is-support { background: rgba(128,128,128,.07); }
.msg-item.is-note { border-style: dashed; background: rgba(255,193,7,.08); }
.msg-meta { font-size: .8rem; opacity: .8; margin-bottom: .35rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* G25-3 — notification bell, banner strip, modal */
.noti-bell[hidden] { display: none !important; }
.noti-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #dc3545; color: #fff; font-size: .7rem; line-height: 18px; text-align: center; font-weight: 600; }
.noti-count[hidden] { display: none; }
.noti-menu { width: min(360px, 92vw); padding: 0; }
#noti-list { max-height: 60vh; overflow-y: auto; }
#noti-list li { padding: .7rem 1rem; border-bottom: 1px solid rgba(128,128,128,.18); cursor: pointer; }
#noti-list li.is-unread { background: rgba(13,110,253,.07); }
#noti-list li .noti-title { font-weight: 600; font-size: .9rem; }
#noti-list li .noti-body { font-size: .82rem; opacity: .85; white-space: pre-wrap; overflow-wrap: anywhere; }
.noti-banners:empty { display: none; }
.noti-banner { display: flex; gap: .75rem; align-items: flex-start; justify-content: center; padding: .55rem 1rem; background: var(--otp-primary-soft, #e7f1ff); border-bottom: 1px solid rgba(128,128,128,.2); font-size: .9rem; }
.noti-banner .noti-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.noti-banner .noti-x { border: 0; background: transparent; font-size: 1.1rem; line-height: 1; opacity: .7; }
#noti-modal .modal-content { background: var(--otp-surface, #fff); -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ================= 27. horizontal tab rows stay scrollable with a MOUSE ================= */
/* theme-v2 hides the scrollbar of every .nav-pills/.nav-tabs (swipe is fine on a phone) but a desktop user then has no way to reach the
   tabs that overflow (settings: "Câu hỏi thường gặp"… were cut off with nothing to drag). Show a thin bar on devices with a pointer;
   app.js also maps the mouse wheel to sideways scrolling and brings the active tab into view. */
@media (hover: hover) and (pointer: fine) {
  .nav-scroll, .nav-pills, .nav-tabs { scrollbar-width: thin; -ms-overflow-style: auto; }
  .nav-scroll::-webkit-scrollbar, .nav-pills::-webkit-scrollbar, .nav-tabs::-webkit-scrollbar { display: block; height: 6px; }
  .nav-scroll::-webkit-scrollbar-thumb, .nav-pills::-webkit-scrollbar-thumb, .nav-tabs::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, .45); border-radius: 6px; }
}

/* ================= 28. rent page: ONE screen, 5TOTP-style (lots of rows, no page scroll) ================= */
/* On a desktop the three columns (service + country | order with price tiers | your numbers) fill the height of the window:
   the lists take whatever the screen has instead of a few fixed rows, "Your numbers" runs the full height, and the footer
   is pushed below the fold instead of sitting under a half-empty page. */
@media (min-width: 1200px) {
  .rent-main > .tab-content > .tab-pane > .buy-grid { height: max(520px, calc(100vh - 190px)); grid-template-rows: minmax(0, 1.25fr) minmax(0, 1fr); }
  /* .buy-grid is align-items:start, which sized each panel to its CONTENT (a 37,000 px list); stretch them to their row instead */
  .buy-grid > .panel:nth-child(1), .buy-grid > .panel:nth-child(2) { display: flex; flex-direction: column; min-height: 0; align-self: stretch; overflow: hidden; }
  .buy-grid > .panel:nth-child(1) .pick-list, .buy-grid > .panel:nth-child(2) .pick-list { flex: 1 1 auto; min-height: 0; max-height: none; }
  .buy-grid > .panel:nth-child(3) { align-self: start; max-height: 100%; overflow-y: auto; }
  .rent-side { height: max(580px, calc(100vh - 128px)); max-height: none; }
  .rent-side > .panel { height: 100%; display: flex; flex-direction: column; min-height: 0; }
  .rent-side #rent-cards { flex: 1 1 auto; min-height: 0; overflow-y: auto; align-content: start; }
  /* No numbers yet: the list collapses and the empty state takes the free height, centred in the panel. */
  .rent-side #rent-cards:empty { flex: 0 0 0; }
  .rent-side #cards-empty:not([hidden]), .rent-side #cards-empty-filter:not([hidden]) { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; }
}
/* the footer is a quiet strip, not half a screen */
.site-footer { margin-top: 1.25rem; padding: 1rem 0 .75rem; }
.site-footer .row { --bs-gutter-y: .5rem; }
.site-footer .col-lg-5 p { display: none; }
.site-footer .brand-logo, .site-footer .site-brand img { height: 26px; }
.site-footer h6 { margin-bottom: .35rem; }
.site-footer .copy { margin-top: .6rem; padding-top: .6rem; }
/* ================= 29. customer site: wide screens use the width; on the rent page "Your numbers" is the BIG column ================= */
/* The picking lists are short-lived (you choose, you press Get number); the numbers you rented hold the code, the countdown and the
   actions, so that is the block that deserves room. On a 1440-1920 px screen the whole page was capped at 1180 px. */
@media (min-width: 1200px) {
  /* EVERY customer page (not only this one): header, page body and footer share one wide column, so nothing is capped at 1180 px on a big
     screen and the header always lines up with the content. Text pages keep their own narrow reading column (.policy-wrap, blog prose). */
  .site-header .site-container, .site-footer .site-container, .site-page, .site-container { max-width: min(1760px, calc(100vw - 32px)); }
  .rent-layout { grid-template-columns: minmax(0, 1fr) minmax(440px, 1fr); }
}
@media (min-width: 1700px) {
  .rent-layout { grid-template-columns: minmax(0, 1fr) minmax(560px, 1.1fr); }
}

/* ================= 30. top-up pages (crypto / Binance Pay): form on the left, details + note on the right ================= */
.dep-details { padding: 1rem 1.1rem 1.1rem; background: linear-gradient(135deg, color-mix(in srgb, var(--otp-primary) 9%, var(--otp-glass)), var(--otp-glass)); }
.dep-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .9rem; }
.dep-ico { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 1.15rem; color: #fff; background: linear-gradient(135deg, #f59e0b, #ea580c); box-shadow: 0 6px 16px rgba(234, 88, 12, .28); }
.dep-ico.is-binance { background: linear-gradient(135deg, #facc15, #f59e0b); }
.dep-title { margin: 0; font-size: 1.05rem; font-weight: 750; }
.dep-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .65rem; }
.dep-tile { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .85rem; border-radius: 14px; background: var(--otp-glass-strong); border: 1px solid var(--otp-border); min-width: 0; }
.dep-tile.is-net { border-color: color-mix(in srgb, var(--otp-primary) 35%, var(--otp-border)); }
.dep-tile.is-rate { border-color: color-mix(in srgb, var(--otp-success) 40%, var(--otp-border)); }
.dep-k { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--otp-text-muted); }
.dep-v { font-size: 1.12rem; font-weight: 750; color: var(--otp-heading); overflow-wrap: anywhere; }
.dep-s { font-size: .76rem; color: var(--otp-text-muted); }
.dep-payid { margin-bottom: .75rem; padding: .75rem .9rem; border-radius: 14px; background: var(--otp-glass-strong); border: 1px dashed color-mix(in srgb, var(--otp-primary) 45%, var(--otp-border)); }
.dep-payid-v { font-size: 1.35rem; font-weight: 800; letter-spacing: .04em; font-family: var(--otp-mono); }
.dep-promos { margin-top: .9rem; }
.dep-promo-title { margin: 0 0 .45rem; font-size: .82rem; font-weight: 700; color: var(--otp-text-muted); text-transform: uppercase; letter-spacing: .05em; }
.dep-promo-title i { color: #ec4899; margin-right: .25rem; }
.dep-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.dep-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border-radius: 999px; font-size: .84rem; background: color-mix(in srgb, #ec4899 10%, var(--otp-glass-strong)); border: 1px solid color-mix(in srgb, #ec4899 28%, var(--otp-border)); }
.dep-chip i { font-size: .68rem; opacity: .6; }
.dep-note .card-body { font-size: .9rem; line-height: 1.55; }
/* ================= 31. invoice modal: exchange-fee notice ================= */
.inv-notice { display: flex; gap: .7rem; padding: .85rem 1rem; border-radius: 14px; border: 2px solid #ef4444; background: rgba(239, 68, 68, .1); color: var(--otp-text); }
.inv-notice > i { flex: 0 0 auto; margin-top: .15rem; font-size: 1.25rem; color: #dc2626; }
.inv-notice-title { display: block; margin-bottom: .25rem; font-size: .95rem; color: #b91c1c; }
.inv-notice-line { font-size: .86rem; line-height: 1.45; }
.inv-notice-example { margin-top: .4rem; padding: .35rem .6rem; border-radius: 10px; background: var(--otp-glass-strong, rgba(255, 255, 255, .7)); border: 1px dashed rgba(239, 68, 68, .55); font-size: .86rem; font-weight: 700; }
[data-bs-theme="dark"] .inv-notice-title { color: #fca5a5; }
[data-bs-theme="dark"] .inv-notice > i { color: #f87171; }

/* An uploaded logo IS the brand: it is the header's centrepiece (no text name beside it), and it is larger in the footer and on the sign-in screens. */
.site-header .site-nav { height: 64px; min-height: 64px; }
.site-header .site-brand { height: 100%; padding-block: 0; min-height: 0; }
.site-header .site-brand img.brand-logo { height: 46px; width: auto; max-width: 260px; object-fit: contain; }
.site-footer .brand-logo, .site-footer .site-brand img { height: 60px; max-width: 280px; }
.site-footer .site-brand { margin-bottom: .6rem !important; }
.auth-brand .brand-logo { height: 56px; max-width: 260px; }
@media (max-width: 575.98px) {
  .site-header .site-nav { height: 56px; min-height: 56px !important; }
  .site-header .site-brand img.brand-logo { height: 38px; max-width: 160px; }
  .site-footer .brand-logo, .site-footer .site-brand img { height: 48px; }
}
