/* Built by `php artisan rabio:css` from resources/css/rabio/*.css (26 files). Edit the sources, not this file. */
/*
 * Rabio Admin — the panel's look, on top of Filament's pre-built stylesheet.
 *
 * Plain CSS, served as it is: no build step. Filament keeps its own rules in
 * cascade layers, so the unlayered rules here win without !important.
 * Colours come from Filament's palette variables (--primary-*, --gray-*),
 * which the panel provider sets to the app's violet; only the surfaces and
 * the brand gradient are defined here. Directions use logical properties so
 * the Arabic (RTL) interface needs no second set of rules.
 */

/* ─── Fonts: the app's own faces, self-hosted ───────────────────────────── */
@font-face { font-family: 'Poppins'; font-weight: 500; font-display: swap; src: url('../fonts/rabio/poppins-medium.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url('../fonts/rabio/poppins-semibold.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-weight: 700; font-display: swap; src: url('../fonts/rabio/poppins-bold.ttf') format('truetype'); }
@font-face { font-family: 'Tajawal'; font-weight: 400; font-display: swap; src: url('../fonts/rabio/tajawal-regular.ttf') format('truetype'); }
@font-face { font-family: 'Tajawal'; font-weight: 500 600; font-display: swap; src: url('../fonts/rabio/tajawal-medium.ttf') format('truetype'); }
@font-face { font-family: 'Tajawal'; font-weight: 700; font-display: swap; src: url('../fonts/rabio/tajawal-bold.ttf') format('truetype'); }

/* ─── Tokens ─────────────────────────────────────────────────────────────── */
:root {
    --rb-bg: #f6f7fd;
    --rb-surface: #ffffff;
    --rb-line: rgba(30, 27, 75, 0.08);
    --rb-shadow: 0 1px 2px rgba(30, 27, 75, 0.04), 0 10px 28px -18px rgba(76, 66, 230, 0.35);
    --rb-radius: 16px;
    /* Dark enough end to end for white text (WCAG AA from the first stop). */
    --rb-gradient: linear-gradient(135deg, #6f66ff 0%, #574ee8 52%, #4338ca 100%);
    --rb-gold: #f5a623;
    --rb-text: var(--font-family), 'Tajawal', ui-sans-serif, system-ui, sans-serif;
    --rb-display: 'Poppins', 'Tajawal', ui-sans-serif, system-ui, sans-serif;
}

.dark {
    --rb-bg: #0d0d15;
    --rb-surface: #161622;
    --rb-line: rgba(255, 255, 255, 0.08);
    --rb-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

[dir='rtl'] {
    --rb-text: 'Tajawal', var(--font-family), ui-sans-serif, system-ui, sans-serif;
    --rb-display: 'Tajawal', 'Poppins', ui-sans-serif, system-ui, sans-serif;
}

/* ─── Base ───────────────────────────────────────────────────────────────── */
.fi-body {
    background-color: var(--rb-bg);
    font-family: var(--rb-text);
}

[dir='rtl'] .fi-body {
    /* Tajawal sits small on the line next to Inter. */
    font-size: 1.04em;
}

.fi-header-heading,
.fi-section-header-heading,
.fi-modal-heading,
.fi-simple-header-heading,
.fi-ta-header-heading,
.fi-wi-stats-overview-stat-value,
.fi-wi-chart .fi-section-header-heading {
    font-family: var(--rb-display);
    letter-spacing: -0.01em;
}

* {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--gray-400) 45%, transparent) transparent;
}

::selection {
    background: color-mix(in srgb, var(--primary-400) 35%, transparent);
}

/* ─── Brand ──────────────────────────────────────────────────────────────── */
.rb-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    height: 100%;
    font-family: 'Poppins', 'Tajawal', sans-serif;
}

.rb-brand-mark {
    height: 100%;
    width: auto;
    aspect-ratio: 1;
    border-radius: 28%;
    box-shadow: 0 6px 14px -6px rgba(76, 66, 230, 0.6);
}

.rb-brand-name {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--gray-950);
    /* The name is a setting now (up to 60 chars): never let it push the tag out. */
    max-width: 12rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dark .rb-brand-name {
    color: #fff;
}

.rb-brand-tag {
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary-700);
    background: color-mix(in srgb, var(--primary-500) 13%, transparent);
}

.dark .rb-brand-tag {
    color: var(--primary-200);
}

[dir='rtl'] .rb-brand-tag {
    letter-spacing: 0;
    font-size: 0.72rem;
}

/* ─── Top bar ────────────────────────────────────────────────────────────── */
.fi-topbar {
    background-color: color-mix(in srgb, var(--rb-surface) 86%, transparent);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    backdrop-filter: saturate(1.6) blur(14px);
    box-shadow: 0 1px 0 var(--rb-line);
}

.fi-topbar .fi-global-search-field .fi-input-wrp {
    background-color: color-mix(in srgb, var(--gray-500) 7%, transparent);
    box-shadow: none;
    border-radius: 999px;
}

.fi-topbar .fi-global-search-field .fi-input-wrp:focus-within {
    background-color: var(--rb-surface);
    box-shadow: 0 0 0 2px var(--primary-500);
}

.fi-user-menu .fi-avatar,
.fi-user-menu-trigger .fi-avatar {
    box-shadow: 0 0 0 2px var(--rb-surface), 0 0 0 4px color-mix(in srgb, var(--primary-500) 45%, transparent);
}

/* ─── Sidebar ────────────────────────────────────────────────────────────── */
.fi-sidebar.fi-main-sidebar {
    background-color: var(--rb-surface);
    border-inline-end: 1px solid var(--rb-line);
}

.fi-sidebar-nav {
    row-gap: 1.35rem;
    padding: 1.25rem 0.85rem 2rem;
    scrollbar-gutter: auto;
}

.fi-sidebar-group-btn {
    padding-inline: 0.75rem;
}

.fi-sidebar-group-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--gray-400);
}

[dir='rtl'] .fi-sidebar-group-label {
    font-size: 0.8rem;
    letter-spacing: 0;
}

.fi-sidebar-group-collapse-btn {
    opacity: 0;
    transition: opacity 0.15s;
}

.fi-sidebar-group-btn:hover .fi-sidebar-group-collapse-btn,
.fi-sidebar-group.fi-collapsed .fi-sidebar-group-collapse-btn {
    opacity: 1;
}

.fi-sidebar-item-btn {
    padding: 0.55rem 0.75rem;
    border-radius: 11px;
}

.fi-sidebar-item-btn:hover,
.fi-sidebar-item-btn:focus-visible {
    background-color: color-mix(in srgb, var(--primary-500) 7%, transparent);
}

.fi-sidebar-item-label {
    font-weight: 500;
    color: var(--gray-600);
}

.dark .fi-sidebar-item-label {
    color: var(--gray-300);
}

.fi-sidebar-item-icon {
    color: var(--gray-400);
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn,
.dark .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background: var(--rb-gradient);
    box-shadow: 0 10px 20px -12px rgba(76, 66, 230, 0.9);
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-label,
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-icon {
    color: #fff;
    font-weight: 600;
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-badge {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.22);
    box-shadow: none;
}

/* ─── Page header ────────────────────────────────────────────────────────── */
/* The header's entrance animation makes it a stacking context, so its action
   dropdowns (Wallet, Account…) were painted under the cards that follow. Lift
   it above the page content; the sticky top bar stays above it. */
.fi-page .fi-header {
    position: relative;
    z-index: 10;
}

.fi-header-heading {
    font-size: 1.65rem;
    line-height: 2.1rem;
    font-weight: 600;
}

.fi-header-subheading {
    color: var(--gray-500);
}

.fi-breadcrumbs-item-label {
    font-size: 0.8rem;
}

/* The dashboard opens with the hero, not with an empty title bar. */
.fi-page.fi-dashboard-page > .fi-header,
.fi-dashboard-page .fi-header:has(.fi-header-heading:empty) {
    display: none;
}

/* ─── Surfaces: tables, sections, stat cards ─────────────────────────────── */
.fi-ta-ctn,
.fi-section:not(.fi-section-not-contained),
.fi-wi-stats-overview-stat,
.fi-fo-tabs.fi-contained,
.fi-sc-tabs.fi-contained {
    background-color: var(--rb-surface);
    border-radius: var(--rb-radius);
    box-shadow: 0 0 0 1px var(--rb-line), var(--rb-shadow);
}

.fi-ta-ctn {
    overflow: hidden;
}

.fi-section-header-heading {
    font-weight: 600;
}

/* ─── Tables ─────────────────────────────────────────────────────────────── */
.fi-ta-table thead {
    background-color: color-mix(in srgb, var(--gray-500) 5%, transparent);
}

.fi-ta-header-cell {
    padding-block: 0.7rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gray-500);
}

.dark .fi-ta-header-cell {
    color: var(--gray-400);
}

[dir='rtl'] .fi-ta-header-cell {
    font-size: 0.82rem;
    letter-spacing: 0;
}

.fi-ta-row {
    transition: background-color 0.12s;
}

.fi-ta-row:hover {
    background-color: color-mix(in srgb, var(--primary-500) 4.5%, transparent);
}

.fi-ta-text-item {
    font-variant-numeric: tabular-nums;
}

/* ─── Controls ───────────────────────────────────────────────────────────── */
.fi-btn {
    border-radius: 11px;
    font-weight: 600;
}

.fi-btn.fi-color-primary.fi-bg-color-600 {
    background: var(--rb-gradient);
    box-shadow: 0 10px 20px -12px rgba(76, 66, 230, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.fi-btn.fi-color-primary.fi-bg-color-600:hover {
    filter: brightness(1.07);
}

/* ─── Read-only details (infolists) ──────────────────────────────────────── */
.fi-in-entry-label {
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--gray-500);
}

.dark .fi-in-entry-label {
    color: var(--gray-400);
}

.fi-in-text-item {
    font-weight: 500;
}

/* ─── Status strip (health of an integration, above its list) ────────────── */
.rb-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 0.9rem;
}

.rb-status-tile {
    display: grid;
    align-content: start;
    gap: 0.3rem;
    padding: 1rem 1.15rem;
    border-radius: var(--rb-radius);
    background-color: var(--rb-surface);
    box-shadow: 0 0 0 1px var(--rb-line), var(--rb-shadow);
}

.rb-status-tile-alert {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--danger-500) 45%, transparent), var(--rb-shadow);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--danger-500) 6%, transparent), transparent 70%),
        var(--rb-surface);
}

.rb-status-label {
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--gray-500);
}

.rb-status-value {
    font-family: var(--rb-display);
    font-size: 1.35rem;
    line-height: 1.4;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.rb-status-value small {
    font-family: var(--rb-text);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--gray-500);
}

.rb-status-note {
    font-size: 0.76rem;
    line-height: 1.45;
    color: var(--gray-500);
    overflow-wrap: anywhere;
}

.rb-status-note a {
    color: var(--primary-600);
    font-weight: 600;
}

.dark .rb-status-note a {
    color: var(--primary-300);
}

.rb-status-tile-alert .rb-status-note {
    color: var(--danger-600);
}

.dark .rb-status-tile-alert .rb-status-note {
    color: var(--danger-400);
}

.rb-status-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.rb-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--gray-600);
    background: color-mix(in srgb, var(--gray-500) 10%, transparent);
}

.dark .rb-chip {
    color: var(--gray-300);
}

.rb-chip b {
    font-weight: 700;
    color: var(--gray-950);
}

.dark .rb-chip b {
    color: #fff;
}

.rb-chip-ok {
    color: var(--success-700);
    background: color-mix(in srgb, var(--success-500) 13%, transparent);
}

.rb-chip-danger {
    color: var(--danger-700);
    background: color-mix(in srgb, var(--danger-500) 13%, transparent);
}

.dark .rb-chip-ok {
    color: var(--success-300);
}

.dark .rb-chip-danger {
    color: var(--danger-300);
}

/* ─── Facts and rows inside a section (settings shown before they are edited) ─ */
.rb-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.rb-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 1rem 1.5rem;
    margin: 0;
}

.rb-facts dt {
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--gray-500);
}

.rb-facts dd {
    margin: 0.2rem 0 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.rb-muted {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.rb-rows {
    display: grid;
}

.rb-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1.25rem;
    padding-block: 0.9rem;
}

.rb-row + .rb-row {
    border-block-start: 1px solid var(--rb-line);
}

.rb-row-main {
    display: grid;
    flex: 1 1 18rem;
    gap: 0.15rem;
    min-width: 0;
}

.rb-row-title {
    font-weight: 600;
}

.rb-row-main .rb-mono {
    overflow-wrap: anywhere;
    color: var(--gray-500);
}

.rb-row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1rem;
}

.rb-row-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

/* A partner's setup card (settings + keys) stretches when it has no settings card beside it. */
.rb-cards-single {
    grid-template-columns: 1fr;
}

.rb-row-link {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--rb-accent, var(--primary-600));
    text-decoration: none;
}

.rb-row-link:hover {
    text-decoration: underline;
}

/* ─── Postback URLs (Partners, wall page) ──────────────────────────────── */
.rb-url {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.rb-url code {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.5rem 0.65rem;
    border-radius: 0.6rem;
    background: var(--gray-50);
    border: 1px solid var(--rb-line);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.74rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    direction: ltr;
    text-align: left;
    user-select: all;
    color: var(--gray-700);
}

.dark .rb-url code {
    background: rgb(255 255 255 / 0.04);
    color: var(--gray-200);
}

.rb-url-copy {
    flex: 0 0 auto;
    padding: 0.45rem 0.75rem;
    border-radius: 0.6rem;
    border: 1px solid var(--rb-line);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--rb-brand, var(--gray-700));
    background: transparent;
    cursor: pointer;
}

.rb-url-copy:hover {
    background: var(--gray-50);
}

.dark .rb-url-copy:hover {
    background: rgb(255 255 255 / 0.06);
}

.rb-url-params {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.3rem;
}

.rb-url-params .rb-chip {
    font-size: 0.68rem;
    direction: ltr;
}

.rb-url-params .rb-chip b {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ─── Member profile header ──────────────────────────────────────────────── */
.rb-profile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 2rem;
    padding: 1.35rem 1.5rem;
    border-radius: var(--rb-radius);
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--primary-500) 9%, transparent), transparent 55%),
        var(--rb-surface);
    box-shadow: 0 0 0 1px var(--rb-line), var(--rb-shadow);
}

.rb-profile-id {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.rb-avatar {
    display: grid;
    flex: none;
    place-items: center;
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 32%;
    font-family: var(--rb-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    background: var(--rb-gradient);
    box-shadow: 0 12px 22px -14px rgba(76, 66, 230, 0.95);
}

.rb-profile-who {
    display: grid;
    gap: 0.5rem;
    min-width: 0;
}

.rb-profile-badges,
.rb-profile-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.rb-profile-meta {
    gap: 0.35rem 0.9rem;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.rb-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    color: var(--gray-700);
}

.dark .rb-mono {
    color: var(--gray-200);
}

.rb-profile-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(7.5rem, auto));
    gap: 0.6rem;
    margin: 0;
}

.rb-profile-tile {
    padding: 0.65rem 0.95rem;
    border-radius: 13px;
    background: color-mix(in srgb, var(--gray-500) 6%, transparent);
}

.rb-profile-tile dt {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--gray-500);
}

.rb-profile-tile dd {
    display: grid;
    margin: 0;
}

.rb-profile-coins {
    font-family: var(--rb-display);
    font-size: 1.2rem;
    line-height: 1.5;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.rb-profile-usd {
    font-size: 0.72rem;
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
}

/* Amounts read left to right in Arabic too ("≈ $0.05", never "$0.05 ≈"). */
.rb-profile-coins,
.rb-profile-usd {
    direction: ltr;
    unicode-bidi: isolate;
    justify-self: start;
}

.rb-profile-tile-main {
    color: #fff;
    background: var(--rb-gradient);
    box-shadow: 0 12px 22px -14px rgba(76, 66, 230, 0.95);
}

.rb-profile-tile-main dt,
.rb-profile-tile-main .rb-profile-usd {
    color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 64rem) {
    .rb-profile-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }
}

.fi-input-wrp {
    border-radius: 11px;
}

.fi-badge {
    border-radius: 999px;
    padding-inline: 0.6rem;
    font-weight: 600;
}

.fi-tabs {
    border-radius: 14px;
}

.fi-tabs-item {
    border-radius: 10px;
}

.fi-modal-window {
    border-radius: 20px;
}

.fi-dropdown-panel {
    border-radius: 14px;
}

/* ─── Stat cards ─────────────────────────────────────────────────────────── */
.fi-wi-stats-overview-stat {
    position: relative;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

a.fi-wi-stats-overview-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary-500) 35%, transparent), 0 18px 32px -20px rgba(76, 66, 230, 0.55);
}

.fi-wi-stats-overview-stat-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-500);
}

.fi-wi-stats-overview-stat-value {
    font-size: 1.85rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.fi-wi-stats-overview-stat-label-ctn .fi-icon {
    padding: 0.3rem;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 9px;
    color: var(--primary-600);
    background: color-mix(in srgb, var(--primary-500) 12%, transparent);
}

.dark .fi-wi-stats-overview-stat-label-ctn .fi-icon {
    color: var(--primary-300);
}

/* ─── Dashboard hero ─────────────────────────────────────────────────────── */
.rb-hero {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2.5rem;
    padding: 1.9rem 2.1rem;
    overflow: hidden;
    border-radius: 22px;
    color: #fff;
    background: var(--rb-gradient);
    box-shadow: 0 24px 48px -28px rgba(76, 66, 230, 0.9);
    isolation: isolate;
}

/* The orbit of the app's mark, drawn large behind the greeting. */
.rb-hero-orbit {
    position: absolute;
    z-index: -1;
    inset-inline-end: -9rem;
    inset-block-start: -14rem;
    width: 34rem;
    height: 34rem;
    border: 2.5rem solid rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    transform: rotate(-18deg) scaleY(0.62);
}

.rb-hero-date {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.78;
}

.rb-hero-title {
    margin-block: 0.2rem 0.55rem;
    font-family: var(--rb-display);
    font-size: 1.7rem;
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.rb-hero-role {
    display: inline-block;
    padding: 0.18rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.16);
}

.rb-hero-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.rb-hero-tile {
    display: grid;
    flex: 1 1 11.5rem;
    max-width: 18rem;
    gap: 0.1rem;
    min-width: 11.5rem;
    padding: 0.85rem 1.1rem;
    border-radius: 16px;
    color: inherit;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background-color 0.15s, transform 0.15s;
}

a.rb-hero-tile:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.rb-hero-tile-label {
    font-size: 0.74rem;
    font-weight: 500;
    opacity: 0.85;
}

.rb-hero-tile-value {
    font-family: var(--rb-display);
    font-size: 1.6rem;
    line-height: 1.2;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.rb-hero-tile-detail {
    font-size: 0.72rem;
    opacity: 0.75;
}

.rb-hero-tile-alert .rb-hero-tile-value {
    color: #ffd98a;
}

.rb-hero-tile-alert {
    box-shadow: inset 0 0 0 1px rgba(255, 217, 138, 0.55);
}

@media (max-width: 48rem) {
    .rb-hero {
        padding: 1.4rem;
    }

    .rb-hero-title {
        font-size: 1.4rem;
    }

    /* Two tiles a row; an odd last one takes the whole row. */
    .rb-hero-tiles {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
        width: 100%;
    }

    .rb-hero-tile {
        min-width: 0;
        max-width: none;
        padding: 0.7rem 0.85rem;
    }

    .rb-hero-tile:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .rb-hero-tile-value {
        font-size: 1.35rem;
    }
}

/* ─── Sign-in and the other single-card pages ────────────────────────────── */
.fi-simple-layout {
    position: relative;
    overflow: hidden;
    background: var(--rb-gradient);
    isolation: isolate;
}

.fi-simple-layout::before,
.fi-simple-layout::after {
    content: '';
    position: absolute;
    z-index: -1;
    border-radius: 50%;
}

.fi-simple-layout::before {
    inset-inline-end: -14rem;
    inset-block-start: -10rem;
    width: 56rem;
    height: 56rem;
    border: 4rem solid rgba(255, 255, 255, 0.06);
    transform: rotate(-18deg) scaleY(0.6);
}

.fi-simple-layout::after {
    inset-inline-start: 12%;
    inset-block-end: 16%;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--rb-gold);
    box-shadow: 0 0 0 0.6rem rgba(245, 166, 35, 0.2), 0 0 60px 20px rgba(245, 166, 35, 0.25);
}

.fi-simple-main {
    max-width: 27rem;
    padding-block: 2.5rem;
    border-radius: 24px;
    background-color: var(--rb-surface);
    box-shadow: 0 40px 80px -36px rgba(20, 16, 80, 0.75);
}

.fi-simple-header .fi-logo {
    height: 3.25rem !important;
    margin-block-end: 0.75rem;
}

.fi-simple-header .rb-brand-name {
    font-size: 1.6rem;
}

.fi-simple-header-heading {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--gray-500);
}

.rb-login-note {
    display: grid;
    gap: 0.15rem;
    margin-block-start: 1.5rem;
    padding-block-start: 1.25rem;
    border-block-start: 1px solid var(--rb-line);
    text-align: center;
    font-size: 0.78rem;
    color: var(--gray-500);
}

.rb-login-note strong {
    font-family: var(--rb-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
}

.dark .rb-login-note strong {
    color: var(--gray-200);
}

/* ─── Rich cells: flags, people, logo tiles, coins ───────────────────────── */
.rb-dim {
    color: var(--gray-400);
}

.rb-flag {
    display: inline-block;
    flex: none;
    width: 20px;
    height: 15px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(30, 27, 75, 0.12);
    vertical-align: -2px;
}

.rb-flag-none {
    background: repeating-linear-gradient(45deg, var(--gray-200) 0 3px, var(--gray-100) 3px 6px);
}

.rb-country {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.rb-flags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    min-width: 10.5rem;
    max-width: 17rem;
}

.rb-flag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.12rem 0.45rem 0.12rem 0.25rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--gray-600);
    background: color-mix(in srgb, var(--gray-500) 9%, transparent);
    transition: background-color 0.15s, transform 0.15s;
}

.rb-flag-chip:hover {
    background: color-mix(in srgb, var(--primary-500) 14%, transparent);
    transform: translateY(-1px);
}

.rb-flag-chip .rb-flag {
    width: 16px;
    height: 12px;
    border-radius: 2px;
}

.dark .rb-flag-chip {
    color: var(--gray-300);
}

.rb-id {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    text-align: start;
}

/* Wide enough to be read in a table that would otherwise squeeze it to "Zen…". */
.rb-id-text {
    display: grid;
    min-width: 8.5rem;
    max-width: 20rem;
    line-height: 1.3;
}

.rb-tile + .rb-id-text {
    min-width: 12rem;
}

.rb-id-text b {
    font-weight: 600;
    color: var(--gray-950);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark .rb-id-text b {
    color: #fff;
}

.rb-id-text small {
    font-size: 0.78rem;
    color: var(--gray-500);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rb-avatar-sm,
.rb-tile {
    position: relative;
    display: grid;
    flex: none;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    overflow: hidden;
    font-family: var(--rb-display);
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, hsl(var(--rb-h) 78% 64%), hsl(calc(var(--rb-h) + 24) 70% 50%));
    transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1.4), box-shadow 0.2s;
}

.rb-avatar-sm {
    border-radius: 50%;
}

.rb-tile {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    font-size: 1rem;
    box-shadow: 0 0 0 1px var(--rb-line);
}

.rb-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--rb-surface);
}

.rb-tile.rb-tile-lg {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 22px;
    font-size: 2rem;
    box-shadow: 0 0 0 1px var(--rb-line), 0 18px 30px -18px rgba(30, 27, 75, 0.55);
}

.fi-ta-row:hover .rb-avatar-sm,
.fi-ta-row:hover .rb-tile {
    transform: scale(1.08);
    box-shadow: 0 8px 16px -8px hsl(var(--rb-h) 70% 45% / 0.7);
}

.rb-hue-0 { --rb-h: 247; }
.rb-hue-1 { --rb-h: 199; }
.rb-hue-2 { --rb-h: 162; }
.rb-hue-3 { --rb-h: 35; }
.rb-hue-4 { --rb-h: 340; }
.rb-hue-5 { --rb-h: 275; }
.rb-hue-6 { --rb-h: 14; }
.rb-hue-7 { --rb-h: 215; }

.rb-coins {
    display: inline-grid;
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: end;
    column-gap: 0.4rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    direction: ltr;
}

.rb-coins small {
    grid-column: 1 / -1;
    justify-self: end;
    font-size: 0.76rem;
    font-weight: 400;
    color: var(--gray-500);
}

.rb-coin {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, #ffe9a8 0 18%, #f5a623 45%, #c77700 100%);
    box-shadow: inset 0 0 0 1px rgba(122, 72, 0, 0.35), 0 1px 2px rgba(122, 72, 0, 0.3);
}

.rb-plus {
    color: var(--success-600);
}

.rb-minus {
    color: var(--danger-600);
}

.dark .rb-plus {
    color: var(--success-400);
}

.dark .rb-minus {
    color: var(--danger-400);
}

/* ─── Catalogue header (an offer or a wall, with its picture) ────────────── */
.rb-showcase {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem 1.5rem;
    padding: 1.35rem 1.5rem;
    overflow: hidden;
    border-radius: var(--rb-radius);
    background: var(--rb-surface);
    box-shadow: 0 0 0 1px var(--rb-line), var(--rb-shadow);
    isolation: isolate;
}

/* The picture itself, blurred, as the backdrop of its own card. */
.rb-showcase-glow {
    position: absolute;
    z-index: -1;
    inset-block-start: -40%;
    inset-inline-end: -10%;
    width: 60%;
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    filter: blur(60px) saturate(1.6);
    opacity: 0.35;
}

.rb-showcase-text {
    display: grid;
    flex: 1 1 16rem;
    gap: 0.5rem;
    min-width: 0;
}

.rb-showcase-title {
    font-family: var(--rb-display);
    font-size: 1.25rem;
    line-height: 1.3;
    font-weight: 600;
}

.rb-showcase-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(6.5rem, auto));
    gap: 0.6rem;
    margin: 0;
}

/* ─── Labelled bars (top countries, shares) ───────────────────────────────── */
.rb-bars {
    display: grid;
    gap: 0.85rem;
}

.rb-bars-row {
    display: grid;
    grid-template-columns: minmax(8rem, 11rem) 1fr auto;
    align-items: center;
    gap: 0.9rem;
    font-size: 0.875rem;
}

.rb-bars-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.rb-bars-track {
    height: 0.6rem;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--gray-500) 12%, transparent);
}

.rb-bars-track .rb-bar {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--rb-gradient);
}

.rb-bars-value {
    min-width: 4.5rem;
    text-align: end;
    font-variant-numeric: tabular-nums;
}

.rb-bars-value small {
    color: var(--gray-500);
}

/* ─── Offer cards (what the app's slider shows) ───────────────────────────── */
.rb-offers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
    gap: 1rem;
    min-width: 0;
}

.rb-offer {
    position: relative;
    display: grid;
    /* One column that may shrink: a long package id or title must never widen the card. */
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    align-content: start;
    gap: 0.6rem;
    min-width: 0;
    overflow: hidden;
    padding: 1.4rem 1rem 1.1rem;
    border-radius: var(--rb-radius);
    text-align: center;
    background: color-mix(in srgb, var(--gray-500) 4%, var(--rb-surface));
    box-shadow: 0 0 0 1px var(--rb-line);
    transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.2s;
}

.rb-offer:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary-500) 35%, transparent), 0 20px 32px -22px rgba(76, 66, 230, 0.6);
}

.rb-offer-rank {
    position: absolute;
    inset-block-start: 0.6rem;
    inset-inline-start: 0.6rem;
    display: grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    font-family: var(--rb-display);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary-700);
    background: color-mix(in srgb, var(--primary-500) 14%, transparent);
}

.dark .rb-offer-rank {
    color: var(--primary-200);
}

.rb-offer > * {
    max-width: 100%;
    min-width: 0;
}

.rb-offer-name {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.6em;
    font-size: 0.875rem;
    line-height: 1.3;
    font-weight: 600;
    overflow-wrap: anywhere;
    /* Latin titles keep their own direction inside an Arabic page ("Giant Rush!" not "!Giant Rush"). */
    unicode-bidi: plaintext;
}

.rb-offer .rb-profile-badges {
    justify-content: center;
    row-gap: 0.3rem;
}

/* Name and package id are buttons that copy their text; the clipboard icon shows on hover. */
.rb-offer-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    max-width: 100%;
    min-width: 0;
    padding: 0.1rem 0.35rem;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.rb-offer-copy:hover,
.rb-offer-copy:focus-visible {
    background: color-mix(in srgb, var(--primary-500) 12%, transparent);
    color: var(--primary-700);
    outline: none;
}

.dark .rb-offer-copy:hover,
.dark .rb-offer-copy:focus-visible {
    color: var(--primary-200);
}

.rb-offer-copy .rb-copy-icon {
    flex: none;
    width: 0.8rem;
    height: 0.8rem;
    opacity: 0;
    transition: opacity 0.15s;
}

.rb-offer-copy:hover .rb-copy-icon,
.rb-offer-copy:focus-visible .rb-copy-icon {
    opacity: 0.7;
}

.rb-offer-copy-name .rb-offer-name {
    min-width: 0;
}

/* The package id: one line, cut with an ellipsis, always left-to-right (the full id is in the title). */
.rb-offer .rb-offer-id {
    flex-basis: 100%;
    font-size: 0.72rem;
}

.rb-offer .rb-offer-id .rb-mono {
    display: block;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    direction: ltr;
    unicode-bidi: isolate;
    font-size: inherit;
}

.rb-offer .rb-coins {
    justify-content: center;
}

.rb-offer .rb-coins small {
    justify-self: center;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
}

.rb-empty {
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--gray-500);
}

.rb-empty b {
    color: var(--gray-950);
}

.dark .rb-empty b {
    color: #fff;
}

.rb-empty-icon {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0.6rem;
    border-radius: 50%;
    color: var(--gray-400);
    background: color-mix(in srgb, var(--gray-500) 10%, transparent);
}

.rb-loading {
    opacity: 0.45;
    transition: opacity 0.15s;
}


/* ─── Copy chips and the postback URLs of a custom offer ─────────────────── */
.rb-copy-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--gray-500) 10%, transparent);
    cursor: pointer;
    transition: background-color 0.15s;
}

.rb-copy-chip:hover {
    background: color-mix(in srgb, var(--primary-500) 14%, transparent);
}

.rb-copy-chip .rb-copy-icon {
    width: 0.8rem;
    height: 0.8rem;
    opacity: 0.6;
}

.rb-copb {
    display: grid;
    gap: 0.75rem;
}

.rb-copb-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
}

.rb-copb-label {
    flex: 0 0 auto;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--gray-500);
}

.rb-copb-code {
    flex: 1 1 16rem;
    min-width: 0;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--gray-500) 8%, transparent);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.45;
    word-break: break-all;
    direction: ltr;
    text-align: left;
    user-select: all;
    color: var(--gray-700);
}

.dark .rb-copb-code {
    color: var(--gray-200);
}

.rb-copb-code-short {
    flex: 0 1 auto;
    padding-block: 0.2rem;
}

.rb-copb-event {
    display: grid;
    gap: 0.45rem;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    box-shadow: 0 0 0 1px var(--rb-line);
}

.rb-copb-event-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.7rem;
    font-size: 0.85rem;
}

.rb-copb-event-head b {
    font-weight: 600;
}

.rb-copb-event-head .rb-copb-coins {
    font-size: 0.78rem;
    color: var(--gray-500);
}

.rb-copb-note {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.5;
    color: var(--gray-500);
}

.rb-copb-note code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
/* ─── Risk centre: people who look alike, side by side ───────────────────── */
.rb-row-end {
    margin-inline-start: auto;
    font-size: 0.8rem;
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
}

.rb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rb-actions-top {
    margin-bottom: 1rem;
}

.rb-cluster {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 0.5rem 1rem;
    align-items: start;
    padding-block: 0.8rem;
}

.rb-cluster + .rb-cluster {
    border-block-start: 1px solid var(--rb-line);
}

.rb-cluster-key {
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.72rem;
    color: var(--gray-500);
    background-color: color-mix(in srgb, var(--gray-500) 10%, transparent);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rb-cluster-members {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.5rem;
}

/* ─── System health: the log, as it is ───────────────────────────────────── */
.rb-log {
    max-height: 32rem;
    margin: 0;
    padding: 1rem 1.1rem;
    overflow: auto;
    border-radius: var(--rb-radius);
    font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
    font-size: 0.72rem;
    line-height: 1.55;
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: #d6d3e5;
    background-color: #17162a;
}

.rb-log-line-error {
    color: #fca5a5;
}

.rb-log-line-warning {
    color: #fcd34d;
}

/* ─── Support ticket: the conversation beside what we know about it ───────── */
.rb-ticket {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 19rem;
    gap: 1rem;
    align-items: start;
}

@media (max-width: 64rem) {
    .rb-ticket {
        grid-template-columns: minmax(0, 1fr);
    }
}

.rb-thread {
    display: grid;
    gap: 0.75rem;
    padding: 1.25rem;
    border-radius: var(--rb-radius);
    background-color: var(--rb-surface);
    box-shadow: 0 0 0 1px var(--rb-line), var(--rb-shadow);
}

/* The member speaks from the start edge, we answer from the end edge. */
.rb-bubble {
    justify-self: start;
    max-width: min(38rem, 88%);
    padding: 0.7rem 0.95rem 0.8rem;
    border-radius: 16px;
    border-end-start-radius: 4px;
    background-color: color-mix(in srgb, var(--gray-500) 10%, transparent);
}

.rb-bubble-staff {
    justify-self: end;
    color: #fff;
    border-end-start-radius: 16px;
    border-end-end-radius: 4px;
    background: var(--rb-gradient);
}

.rb-bubble-who {
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
    margin-bottom: 0.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.85;
}

.rb-bubble-who time {
    font-weight: 400;
    opacity: 0.8;
}

.rb-bubble p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.rb-bubble-file {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: underline;
}

.rb-ticket-side {
    display: grid;
    gap: 0.9rem;
}

.rb-ticket-card {
    display: grid;
    gap: 0.7rem;
    padding: 1rem 1.1rem;
    border-radius: var(--rb-radius);
    background-color: var(--rb-surface);
    box-shadow: 0 0 0 1px var(--rb-line), var(--rb-shadow);
}

/* Facts in the narrow side column: label and value on one line. */
.rb-ticket-card .rb-facts {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.45rem 1rem;
    align-items: baseline;
    margin: 0;
}

.rb-ticket-card .rb-facts dt {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--gray-500);
}

.rb-ticket-card .rb-facts dd {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: end;
    overflow-wrap: anywhere;
}

.rb-ticket-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-600);
}

.dark .rb-ticket-link {
    color: var(--primary-400);
}

/* A scheduled task that failed: the last lines it printed, under its row, in the alert tint. */
.rb-task-error {
    margin: -0.25rem 0 0.5rem;
    padding: 0.5rem 0.75rem;
    border-inline-start: 3px solid rgb(var(--danger-500));
    border-radius: 0.5rem;
    background: rgb(var(--danger-50) / 0.6);
    color: rgb(var(--danger-700));
    font-size: 0.75rem;
    white-space: pre-wrap;
}
.dark .rb-task-error {
    background: rgb(var(--danger-500) / 0.12);
    color: rgb(var(--danger-300));
}

/* When, under a fact in the member card (last conversion, last withdrawal). */
.rb-ticket-when {
    display: block;
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--gray-500);
}
/* ─── Campaign banner, roughly as the app's home screen paints it ─────────── */
.rb-banner {
    position: relative;
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: min(22rem, 100%);
    min-height: 8.25rem;
    padding: 1rem 1.1rem;
    overflow: hidden;
    border-radius: 20px;
    color: var(--rb-banner-fg);
    background: var(--rb-banner-bg) center / cover no-repeat;
    box-shadow: 0 18px 30px -18px var(--rb-banner-bg), 0 0 0 1px var(--rb-line);
    transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1.2);
}

/* Text over a photo stays readable. */
.rb-banner-photo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.1));
}

[dir='rtl'] .rb-banner-photo::before {
    background: linear-gradient(270deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.1));
}

.rb-banner-text {
    position: relative;
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.rb-banner-text small {
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.85;
}

.rb-banner-text b {
    font-family: var(--rb-display);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.25;
}

.rb-banner-text span {
    font-size: 0.76rem;
    line-height: 1.35;
    opacity: 0.9;
}

.rb-banner-text i {
    justify-self: start;
    margin-top: 0.4rem;
    padding: 0.3rem 0.85rem;
    border-radius: 99px;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 600;
    color: var(--rb-banner-btn);
    background-color: #fff;
}

.rb-banner > img {
    position: relative;
    flex: none;
    width: 5rem;
    height: 5rem;
    border-radius: 16px;
    object-fit: cover;
}

.rb-showcase:hover .rb-banner {
    transform: translateY(-2px) rotate(-0.4deg);
}

/* ─── Approval preview: the wall call, as it will be made ────────────────── */
.rb-preview {
    display: grid;
    gap: 0.9rem;
}

.rb-preview-parts {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    background-color: color-mix(in srgb, var(--gray-500) 7%, transparent);
}

.rb-preview-label {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
}

.rb-preview-url {
    margin: 0;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
    font-size: 0.74rem;
    line-height: 1.5;
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: #d6d3e5;
    background-color: #17162a;
}

.rb-preview-missing {
    margin: 0;
    padding-inline-start: 1.1rem;
    font-size: 0.82rem;
    color: var(--danger-600);
}

.rb-preview-missing .rb-preview-optional {
    color: var(--gray-500);
}

/* ─── Proof (what a member sent for a task, shown in the review dialog) ───── */
.rb-proof {
    display: grid;
    gap: 0.85rem;
}

.rb-proof-who {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
}

.rb-proof-who time {
    margin-inline-start: auto;
    font-size: 0.78rem;
    color: var(--gray-500);
}

.rb-proof-text {
    margin: 0;
    padding: 0.9rem 1.1rem;
    border-inline-start: 3px solid var(--primary-500);
    border-radius: 12px;
    font-size: 0.92rem;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background-color: color-mix(in srgb, var(--primary-500) 7%, transparent);
}

.rb-proof-image {
    display: block;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 0 0 1px var(--rb-line);
}

.rb-proof-image img {
    display: block;
    width: 100%;
    max-height: 26rem;
    object-fit: contain;
    background-color: color-mix(in srgb, var(--gray-500) 8%, transparent);
}

.rb-proof-none,
.rb-proof-note {
    margin: 0;
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* ─── Emblems (a level, a tier, a badge: an emoji on its own colour) ─────── */
.rb-emblem {
    display: grid;
    flex: none;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    font-family: var(--rb-display);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
    color: color-mix(in srgb, var(--rb-c) 70%, #1e1b4b);
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.85), transparent 55%),
        color-mix(in srgb, var(--rb-c) 22%, var(--rb-surface));
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--rb-c) 55%, transparent), 0 6px 14px -8px var(--rb-c);
    transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1.4);
}

.dark .rb-emblem {
    color: color-mix(in srgb, var(--rb-c) 60%, #fff);
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.16), transparent 55%),
        color-mix(in srgb, var(--rb-c) 26%, var(--rb-surface));
}

.rb-emblem + .rb-id-text {
    min-width: 8rem;
}

.fi-ta-row:hover .rb-emblem {
    transform: scale(1.1) rotate(-4deg);
}

/* ─── Track (the level ladder, the days of the streak cycle) ─────────────── */
.rb-track {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.9rem;
    padding: 0.9rem;
    overflow-x: auto;
    border-radius: var(--rb-radius);
    background-color: var(--rb-surface);
    box-shadow: 0 0 0 1px var(--rb-line), var(--rb-shadow);
    scrollbar-width: thin;
}

/* A grid item grows to fit its content: the track must scroll inside it instead. */
.fi-wi-widget:has(> .rb-track) {
    min-width: 0;
}

.rb-step {
    --rb-c: #6c63ff;
    position: relative;
    display: grid;
    flex: none;
    justify-items: center;
    align-content: start;
    gap: 0.2rem;
    width: 8.5rem;
    padding: 0.75rem 0.5rem 0.65rem;
    text-align: center;
    border-radius: 14px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--rb-c) 9%, transparent), transparent 75%);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rb-c) 22%, var(--rb-line));
    transition: transform 0.2s, box-shadow 0.2s;
}

.rb-step b {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
    overflow: hidden;
    font-family: var(--rb-display);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    direction: ltr;
    unicode-bidi: isolate;
}

[dir='rtl'] .rb-step b {
    direction: rtl;
}

/* "× 1.15 · Gold" reads left to right in Arabic too. */
.rb-step small {
    min-height: 1rem;
    font-size: 0.7rem;
    color: var(--gray-500);
    white-space: nowrap;
    direction: ltr;
    unicode-bidi: isolate;
}

.rb-step-bar {
    width: 100%;
    height: 4px;
    margin-top: 0.3rem;
    overflow: hidden;
    border-radius: 99px;
    background-color: color-mix(in srgb, var(--rb-c) 14%, transparent);
}

.rb-step-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background-color: var(--rb-c);
    transform-origin: left;
}

[dir='rtl'] .rb-step-bar i {
    transform-origin: right;
}

.rb-step-count {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--gray-600);
}

.dark .rb-step-count {
    color: var(--gray-300);
}

.rb-step-quiet .rb-emblem {
    filter: saturate(0.55);
    opacity: 0.75;
}

.rb-step-quiet .rb-step-count {
    font-weight: 400;
    color: var(--gray-400);
}

/* Days of the streak: narrower, numbered, a day without a reward reads as a gap. */
.rb-track-days .rb-step {
    width: 6.5rem;
    padding-top: 0.6rem;
}

.rb-track-days .rb-step b,
[dir='rtl'] .rb-track-days .rb-step b {
    direction: ltr;
}

.rb-step-day {
    display: grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    margin-bottom: 0.15rem;
    border-radius: 50%;
    font-family: var(--rb-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: var(--rb-gradient);
}

.rb-step-bonus {
    --rb-c: #f59e0b;
}

.rb-step-bonus .rb-step-day {
    background: linear-gradient(135deg, #fbbf24, #ea580c);
    box-shadow: 0 0 0 3px color-mix(in srgb, #f59e0b 25%, transparent);
}

.rb-step-bonus small {
    font-weight: 600;
    color: #b45309;
}

.dark .rb-step-bonus small {
    color: #fbbf24;
}

.rb-step-empty {
    background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--gray-500) 8%, transparent) 6px 12px);
    box-shadow: inset 0 0 0 1px var(--rb-line);
}

.rb-step-empty .rb-step-day {
    color: var(--gray-500);
    background: color-mix(in srgb, var(--gray-500) 16%, transparent);
}

.rb-step-empty b,
.rb-step-empty small {
    color: var(--gray-400);
}

/* ─── Motion ─────────────────────────────────────────────────────────────── */
@keyframes rb-grow {
    from { transform: scaleX(0); }
    to { transform: none; }
}

@keyframes rb-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

@keyframes rb-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes rb-pop {
    0% { opacity: 0; transform: scale(0.7); }
    70% { transform: scale(1.06); }
    100% { opacity: 1; transform: none; }
}

@keyframes rb-grow {
    from { transform: scaleX(0); }
    to { transform: none; }
}

@keyframes rb-orbit {
    from { transform: rotate(-18deg) scaleY(0.62); }
    to { transform: rotate(342deg) scaleY(0.62); }
}

@keyframes rb-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes rb-pulse {
    0%, 100% { outline-color: color-mix(in srgb, var(--danger-500) 40%, transparent); outline-offset: 0; }
    50% { outline-color: transparent; outline-offset: 6px; }
}

@keyframes rb-sheen {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: no-preference) {
    /* A page arrives in order: header, then each block, a beat apart. */
    .fi-page .fi-header,
    .fi-page .rb-hero,
    .fi-page .rb-profile,
    .fi-page .rb-showcase,
    .fi-page .rb-status-tile,
    .fi-page .fi-wi-stats-overview-stat,
    .fi-page .fi-section:not(.fi-section-not-contained),
    .fi-page .fi-ta-ctn,
    .fi-simple-main {
        animation: rb-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }

    .fi-page .fi-header { animation-duration: 0.35s; }
    .fi-page .rb-status-tile:nth-child(2),
    .fi-page .fi-wi-stats-overview-stat:nth-child(2) { animation-delay: 0.06s; }
    .fi-page .rb-status-tile:nth-child(3),
    .fi-page .fi-wi-stats-overview-stat:nth-child(3) { animation-delay: 0.12s; }
    .fi-page .rb-status-tile:nth-child(4),
    .fi-page .fi-wi-stats-overview-stat:nth-child(4) { animation-delay: 0.18s; }
    .fi-page .fi-ta-ctn { animation-delay: 0.08s; }

    /* Rows follow their table in, the first ones one after another. */
    .fi-ta-row {
        animation: rb-fade 0.4s ease both;
    }
    .fi-ta-row:nth-child(1) { animation-delay: 0.10s; }
    .fi-ta-row:nth-child(2) { animation-delay: 0.13s; }
    .fi-ta-row:nth-child(3) { animation-delay: 0.16s; }
    .fi-ta-row:nth-child(4) { animation-delay: 0.19s; }
    .fi-ta-row:nth-child(5) { animation-delay: 0.22s; }
    .fi-ta-row:nth-child(6) { animation-delay: 0.25s; }
    .fi-ta-row:nth-child(7) { animation-delay: 0.28s; }
    .fi-ta-row:nth-child(n + 8) { animation-delay: 0.31s; }

    .rb-hero-tile,
    .rb-profile-tile,
    .rb-offer {
        animation: rb-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }
    .rb-offer:nth-child(2) { animation-delay: 0.05s; }
    .rb-offer:nth-child(3) { animation-delay: 0.10s; }
    .rb-offer:nth-child(4) { animation-delay: 0.15s; }
    .rb-offer:nth-child(5) { animation-delay: 0.20s; }
    .rb-offer:nth-child(n + 6) { animation-delay: 0.25s; }
    .rb-hero-tile:nth-child(1), .rb-profile-tile:nth-child(1) { animation-delay: 0.12s; }
    .rb-hero-tile:nth-child(2), .rb-profile-tile:nth-child(2) { animation-delay: 0.19s; }
    .rb-hero-tile:nth-child(3), .rb-profile-tile:nth-child(3) { animation-delay: 0.26s; }
    .rb-profile-tile:nth-child(4) { animation-delay: 0.33s; }

    .rb-chip,
    .rb-flag-chip,
    .rb-avatar,
    .rb-tile-lg {
        animation: rb-pop 0.4s cubic-bezier(0.2, 0.7, 0.2, 1.2) both;
        animation-delay: 0.15s;
    }

    /* Bars fill from their start edge. */
    .rb-bar {
        transform-origin: left center;
        animation: rb-grow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
        animation-delay: 0.2s;
    }
    [dir='rtl'] .rb-bar {
        transform-origin: right center;
    }

    .rb-hero-orbit {
        animation: rb-orbit 80s linear infinite;
    }

    .fi-simple-layout::after {
        animation: rb-float 6s ease-in-out infinite;
    }

    .rb-brand-mark {
        transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1.6);
    }
    .rb-brand:hover .rb-brand-mark {
        transform: rotate(-8deg) scale(1.08);
    }

    /* Something is waiting: the tile breathes. */
    .rb-status-tile-alert,
    .rb-hero-tile-alert {
        outline: 2px solid transparent;
        animation: rb-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both, rb-pulse 2.4s ease-in-out 0.8s infinite;
    }

    .fi-sidebar-item-btn .fi-sidebar-item-icon {
        transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1.6);
    }
    .fi-sidebar-item-btn:hover .fi-sidebar-item-icon {
        transform: translateX(2px) scale(1.08);
    }
    [dir='rtl'] .fi-sidebar-item-btn:hover .fi-sidebar-item-icon {
        transform: translateX(-2px) scale(1.08);
    }

    .fi-btn {
        transition: transform 0.12s, filter 0.15s, box-shadow 0.15s, background-color 0.15s;
    }
    .fi-btn:active {
        transform: scale(0.97);
    }

    .rb-status-tile,
    .rb-profile-tile {
        transition: box-shadow 0.2s, transform 0.2s;
    }
    .rb-status-tile:hover,
    .rb-profile-tile:hover {
        transform: translateY(-2px);
    }

    .fi-modal-window {
        animation: rb-pop 0.28s cubic-bezier(0.2, 0.7, 0.2, 1.1) both;
    }

    /* A conversation is read in order: each message follows the one before. */
    .rb-bubble {
        animation: rb-rise 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
        animation-delay: calc(0.08s + var(--rb-i, 0) * 0.05s);
    }

    /* The ladder and the cycle arrive step by step, then each bar fills. */
    .fi-page .rb-track {
        animation: rb-rise 0.5s 0.12s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }
    .rb-step {
        animation: rb-fade 0.45s ease both;
        animation-delay: calc(0.2s + var(--rb-i, 0) * 0.025s);
    }
    .rb-step:hover {
        transform: translateY(-3px);
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rb-c) 45%, transparent), 0 12px 20px -14px var(--rb-c);
    }
    .rb-step-bar i {
        animation: rb-grow 0.8s 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }
}

/* ── Growth: rules as chips (segments, automations, promo codes) ── */
.rb-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    max-width: 22rem;
}
.rb-chips .rb-flags {
    display: contents;
}

/* ── Member header: pinned admin note ── */
.rb-pinned-note {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin-top: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-radius: 0.6rem;
    font-size: 0.8rem;
    color: var(--gray-700);
    background: color-mix(in srgb, var(--warning-400) 14%, transparent);
    max-width: 40rem;
}
.dark .rb-pinned-note {
    color: var(--gray-200);
}
.rb-pinned-icon {
    width: 1rem;
    height: 1rem;
    flex: none;
    color: var(--warning-500);
}

/* ── Alerts: top-bar bell and unread rows ── */
.rb-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-inline: 0.25rem;
    border-radius: 999px;
    color: var(--gray-500);
    transition: background 0.15s ease, color 0.15s ease;
}
.rb-bell:hover {
    color: var(--primary-600);
    background: color-mix(in srgb, var(--primary-500) 10%, transparent);
}
.rb-bell-icon {
    width: 1.35rem;
    height: 1.35rem;
}
.rb-bell-count {
    position: absolute;
    top: 0.1rem;
    inset-inline-end: 0.05rem;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.1rem;
    text-align: center;
    color: #fff;
    background: var(--danger-600);
    box-shadow: 0 0 0 2px var(--color-white, #fff);
}
.rb-row-unread td:first-child {
    box-shadow: inset 3px 0 0 var(--primary-500);
}
[dir="rtl"] .rb-row-unread td:first-child {
    box-shadow: inset -3px 0 0 var(--primary-500);
}

/* ─── Postback URL builder ───────────────────────────────────────────────── */
[x-cloak] { display: none !important; }

.rb-pb {
    display: grid;
    grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 1023px) {
    .rb-pb { grid-template-columns: minmax(0, 1fr); }
}

.rb-pb-side,
.rb-pb-main {
    background: var(--rb-surface);
    border-radius: var(--rb-radius);
    box-shadow: var(--rb-shadow);
    border: 1px solid var(--rb-line);
}

.rb-pb-side {
    position: sticky;
    top: 5rem;
    display: grid;
    gap: 0.9rem;
    max-height: calc(100vh - 6.5rem);
    overflow: auto;
    padding: 0.9rem;
}

@media (max-width: 1023px) {
    .rb-pb-side { position: static; max-height: 22rem; }
}

.rb-pb-search {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.7rem;
    border-radius: 12px;
    background: var(--gray-50);
    border: 1px solid var(--rb-line);
}

.dark .rb-pb-search { background: rgb(255 255 255 / 0.04); }

.rb-pb-search-icon { width: 1rem; height: 1rem; color: var(--gray-400); flex: none; }

.rb-pb-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 0;
    background: transparent;
    font-size: 0.85rem;
    outline: none;
    box-shadow: none;
}

.rb-pb-group h4 {
    margin: 0 0 0.3rem;
    padding-inline: 0.4rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-400);
}

.rb-pb-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.5rem 0.55rem;
    border-radius: 14px;
    text-align: start;
    transition: background 0.15s, transform 0.15s;
}

.rb-pb-item .rb-tile { width: 2.35rem; height: 2.35rem; border-radius: 11px; font-size: 0.9rem; }

.rb-pb-item:hover { background: var(--gray-50); }
.dark .rb-pb-item:hover { background: rgb(255 255 255 / 0.04); }

.rb-pb-item.is-active {
    background: color-mix(in srgb, var(--primary-500) 11%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary-500) 28%, transparent);
}

.rb-pb-item.is-dormant { opacity: 0.55; }

.rb-pb-item-text { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.rb-pb-item-text b { font-size: 0.86rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-pb-item-text small { font-size: 0.72rem; color: var(--gray-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rb-pb-dot {
    flex: none;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--gray-300);
}

.rb-pb-dot.is-ok { background: #10b981; box-shadow: 0 0 0 3px rgb(16 185 129 / 0.18); }
.rb-pb-dot.is-bad { background: #f43f5e; box-shadow: 0 0 0 3px rgb(244 63 94 / 0.18); }

.rb-pb-main { overflow: hidden; }

.rb-pb-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.1rem 1.4rem;
    padding: 1.4rem 1.5rem;
    background:
        radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--primary-400) 18%, transparent) 0%, transparent 55%),
        linear-gradient(135deg, color-mix(in srgb, var(--primary-500) 7%, transparent), transparent 70%);
    border-block-end: 1px solid var(--rb-line);
}

.rb-pb-head .rb-tile-lg { width: 4.25rem; height: 4.25rem; border-radius: 18px; font-size: 1.6rem; }

.rb-pb-head-text { display: grid; flex: 1 1 18rem; gap: 0.4rem; min-width: 0; }
.rb-pb-head-text h2 { margin: 0; font-family: var(--rb-display); font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; }

.rb-pb-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.rb-chip-warn {
    color: #92400e;
    background: rgb(245 158 11 / 0.16);
}

.dark .rb-chip-warn { color: #fcd34d; }

.rb-pb-stat {
    display: grid;
    place-items: center;
    min-width: 5.5rem;
    padding: 0.7rem 0.9rem;
    border-radius: 16px;
    color: #fff;
    background: var(--rb-gradient);
    box-shadow: 0 14px 26px -16px rgba(67, 56, 202, 0.8);
}

.rb-pb-stat b { font-family: var(--rb-display); font-size: 1.6rem; line-height: 1; }
.rb-pb-stat small { font-size: 0.7rem; opacity: 0.85; }

.rb-pb-step { display: grid; gap: 0.7rem; padding: 1.3rem 1.5rem; }
.rb-pb-step + .rb-pb-step { border-block-start: 1px dashed var(--rb-line); }

.rb-pb-step h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
}

.rb-pb-num {
    display: grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    font-size: 0.78rem;
    color: #fff;
    background: var(--rb-gradient);
}

.rb-pb-table, .rb-pb-extras { display: grid; gap: 0.35rem; }

.rb-pb-row {
    display: grid;
    grid-template-columns: 2.6rem minmax(8rem, 1fr) minmax(8rem, 1fr) minmax(10rem, 1.3fr);
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.5rem;
    border-radius: 12px;
    transition: background 0.15s, opacity 0.15s;
}

.rb-pb-row:not(.rb-pb-row-head):hover { background: var(--gray-50); }
.dark .rb-pb-row:not(.rb-pb-row-head):hover { background: rgb(255 255 255 / 0.03); }

.rb-pb-row-head span {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gray-400);
}

.rb-pb-row.is-off .rb-pb-input,
.rb-pb-row.is-off .rb-pb-note { opacity: 0.45; }

.rb-pb-row.is-extra { background: color-mix(in srgb, var(--rb-gold) 7%, transparent); }

@media (max-width: 767px) {
    .rb-pb-row { grid-template-columns: 2.6rem minmax(0, 1fr) minmax(0, 1fr); }
    .rb-pb-row .rb-pb-note { grid-column: 2 / -1; }
    .rb-pb-row-head span:last-child { display: none; }
}

.rb-pb-field { position: relative; display: block; }

.rb-pb-input {
    width: 100%;
    padding: 0.42rem 0.6rem;
    border-radius: 10px;
    border: 1px solid var(--rb-line);
    background: var(--rb-surface);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    direction: ltr;
    text-align: left;
    color: var(--gray-800);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.dark .rb-pb-input { color: var(--gray-100); background: rgb(255 255 255 / 0.03); }

.rb-pb-input:focus {
    outline: none;
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-500) 20%, transparent);
}

.rb-pb-input[readonly] { background: transparent; border-color: transparent; cursor: default; }
.rb-pb-input[readonly]:focus { box-shadow: none; }
.rb-pb-field .rb-pb-input[readonly] { font-weight: 600; }
.rb-pb-field .rb-pb-input { padding-right: 1.6rem; }

.rb-pb-input.is-macro { color: #b45309; }
.dark .rb-pb-input.is-macro { color: #fbbf24; }
.rb-pb-input.is-macro:not([readonly]) { background: color-mix(in srgb, var(--rb-gold) 6%, var(--rb-surface)); }

.rb-pb-lock {
    position: absolute;
    inset-block: 0;
    /* The name box is always left-to-right, so the lock sits on its physical right. */
    right: 0.45rem;
    display: grid;
    place-items: center;
    color: var(--primary-500);
}

.rb-pb-lock svg { width: 0.8rem; height: 0.8rem; }

.rb-pb-note { font-size: 0.74rem; color: var(--gray-500); line-height: 1.35; }
.rb-pb-note em { font-style: normal; margin-inline-start: 0.35rem; color: var(--primary-500); font-family: ui-monospace, monospace; }

.rb-switch {
    position: relative;
    width: 2.3rem;
    height: 1.3rem;
    border-radius: 999px;
    background: var(--gray-300);
    transition: background 0.2s;
}

.dark .rb-switch { background: var(--gray-700); }

.rb-switch i {
    position: absolute;
    top: 0.15rem;
    left: 0.15rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
    transition: transform 0.2s cubic-bezier(0.3, 0.7, 0.3, 1.3);
}

.rb-switch.is-on { background: var(--rb-gradient); }
.rb-switch.is-on i { transform: translateX(1rem); }
.rb-switch.is-locked { opacity: 0.6; cursor: not-allowed; }

.rb-pb-remove {
    display: grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    margin-inline: auto;
    border-radius: 50%;
    color: var(--gray-500);
}

.rb-pb-remove:hover { color: #e11d48; background: rgb(244 63 94 / 0.1); }
.rb-pb-remove svg { width: 1rem; height: 1rem; }

.rb-pb-add {
    display: grid;
    grid-template-columns: 2.6rem minmax(8rem, 1fr) minmax(8rem, 1fr) auto;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px dashed color-mix(in srgb, var(--primary-500) 35%, transparent);
}

.rb-pb-add-icon { width: 1.3rem; height: 1.3rem; margin-inline: auto; color: var(--primary-500); }
.rb-pb-error { grid-column: 2 / -1; color: #e11d48; font-size: 0.75rem; }

@media (max-width: 767px) {
    .rb-pb-add { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .rb-pb-add-icon { display: none; }
}

.rb-pb-styles { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 0.5rem; }

.rb-pb-styles button {
    display: grid;
    gap: 0.25rem;
    padding: 0.65rem 0.8rem;
    border-radius: 14px;
    border: 1px solid var(--rb-line);
    text-align: start;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.rb-pb-styles button:hover:not(:disabled) { transform: translateY(-1px); }
.rb-pb-styles b { font-size: 0.8rem; }
.rb-pb-styles code { font-size: 0.78rem; color: #b45309; direction: ltr; text-align: left; }
.dark .rb-pb-styles code { color: #fbbf24; }

.rb-pb-styles button.is-active {
    border-color: transparent;
    box-shadow: 0 0 0 2px var(--primary-500), 0 12px 22px -18px rgba(67, 56, 202, 0.9);
    background: color-mix(in srgb, var(--primary-500) 7%, transparent);
}

.rb-pb-url {
    position: relative;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    background: linear-gradient(160deg, #17153a 0%, #1e1b4b 100%);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06), 0 18px 34px -24px rgba(30, 27, 75, 0.9);
}

.rb-pb-url code {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.7;
    direction: ltr;
    text-align: left;
    overflow-wrap: anywhere;
    user-select: all;
    color: #e0e7ff;
}

.rb-pb-url .t-base { color: #a5b4fc; }
.rb-pb-url .t-p { color: #6b6f9a; }
.rb-pb-url .t-name { color: #e0e7ff; font-weight: 600; }
.rb-pb-url .t-macro { color: #fbbf24; }
.rb-pb-url .t-fixed { color: #5eead4; }
.rb-pb-url .t-extra { color: #fdba74; }
.rb-pb-url .t-sec {
    padding: 0.05rem 0.3rem;
    border-radius: 6px;
    color: #fbcfe8;
    background: rgb(236 72 153 / 0.22);
}

.rb-pb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.rb-pb-bar-gap { flex: 1; }

/* Partners page: the short way to the builder. */
.rb-pb-teaser {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
}

.rb-pb-teaser-tiles { display: flex; flex: 1 1 16rem; flex-wrap: wrap; gap: 0.4rem; }
.rb-pb-teaser-tiles .rb-tile { width: 2.2rem; height: 2.2rem; border-radius: 10px; font-size: 0.85rem; }

/* ─── Popular offers: a card opens its details ───────────────────────────── */
.rb-offer-clickable {
    cursor: pointer;
}

.rb-offer-clickable:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-500), 0 12px 24px -16px rgba(76, 66, 230, 0.7);
}

/* Clicked: the card answers at once while the details load. */
.rb-offer-clickable.is-loading {
    pointer-events: none;
}

.rb-offer-clickable.is-loading::after {
    content: '';
    position: absolute;
    inset-block-start: 0.7rem;
    inset-inline-end: 0.7rem;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--primary-500) 25%, transparent);
    border-top-color: var(--primary-500);
    animation: rb-spin 0.7s linear infinite;
}

.rb-offer-clickable.is-loading .rb-tile {
    opacity: 0.6;
}

@keyframes rb-spin { to { transform: rotate(360deg); } }

.rb-od { display: grid; gap: 1.1rem; }

.rb-od-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--rb-radius);
    background:
        radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--primary-400) 16%, transparent) 0%, transparent 60%),
        color-mix(in srgb, var(--primary-500) 4%, var(--rb-surface));
    box-shadow: 0 0 0 1px var(--rb-line);
}

.rb-od-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; flex: 1 1 10rem; }

.rb-od-text { margin: 0; line-height: 1.6; color: var(--gray-700); }
.dark .rb-od-text { color: var(--gray-300); }

.rb-od-facts {
    padding: 0.9rem 1rem;
    border-radius: var(--rb-radius);
    box-shadow: 0 0 0 1px var(--rb-line);
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
}

.rb-od-block h4 {
    margin: 0 0 0.45rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gray-500);
}

.rb-chips-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.rb-od-goals {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: goal;
}

.rb-od-goals li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--gray-500) 5%, transparent);
    counter-increment: goal;
}

.rb-od-goals li::before {
    content: counter(goal);
    display: grid;
    place-items: center;
    flex: none;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: var(--rb-gradient);
}

.rb-od-goals li > span { flex: 1; font-size: 0.85rem; }

.rb-od-open { justify-self: start; }

/* ─── New web wall: the postback rows ────────────────────────────────────── */
.rb-wall-pb-head,
.rb-wall-pb-row {
    row-gap: 0.25rem !important;
    align-items: center;
}

.rb-wall-pb-head .fi-fo-placeholder,
.rb-wall-pb-head {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gray-400);
}

.rb-wall-pb-row {
    padding: 0.2rem 0.4rem;
    border-radius: 12px;
    transition: background-color 0.15s;
}

.rb-wall-pb-row:hover {
    background: color-mix(in srgb, var(--primary-500) 4%, transparent);
}

.rb-wall-pb-row:has(.fi-toggle:not(.fi-toggle-on, [aria-checked="true"])) .fi-input {
    opacity: 0.5;
}

.rb-wall-pb-row .fi-input.rb-mono,
.rb-wall-pb-row input.rb-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
}

.rb-wall-pb-note {
    font-size: 0.76rem;
    color: var(--gray-500);
}

@media (max-width: 767px) {
    .rb-wall-pb-note { display: none; }
}

/* ─── Polish pass (owner, 2026-10-01): headers, empty states, loading, phone ─ */

/* Page title: a brand accent before it, and a description that reads as one, not as a second title. */
.fi-header-heading {
    position: relative;
    padding-inline-start: 0.85rem;
}

.fi-header-heading::before {
    content: '';
    position: absolute;
    inset-block: 0.3rem;
    inset-inline-start: 0;
    width: 4px;
    border-radius: 4px;
    background: var(--rb-gradient);
}

.fi-header-subheading {
    max-width: 68ch;
    margin-top: 0.3rem;
    font-size: 0.92rem;
    line-height: 1.55;
}

/* A section's icon sits on a soft brand tile, like the stat cards. */
.fi-section-header > .fi-icon {
    box-sizing: content-box;
    padding: 0.35rem;
    border-radius: 10px;
    color: var(--primary-600);
    background: color-mix(in srgb, var(--primary-500) 11%, transparent);
}

.dark .fi-section-header > .fi-icon {
    color: var(--primary-300);
}

.fi-section-header-description {
    line-height: 1.5;
}

/* Loading: a soft shimmer instead of a blank white card. */
.fi-loading-section {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(var(--rb-line), var(--rb-line)) 1.25rem 1.4rem / 34% 0.75rem no-repeat,
        linear-gradient(var(--rb-line), var(--rb-line)) 1.25rem 2.7rem / 58% 0.6rem no-repeat,
        linear-gradient(var(--rb-line), var(--rb-line)) 1.25rem calc(100% - 1.4rem) / calc(100% - 2.5rem) 35% no-repeat,
        var(--rb-surface);
}

.fi-loading-section::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary-400) 10%, transparent), transparent);
    animation: rb-shimmer 1.4s ease-in-out infinite;
}

[dir='rtl'] .fi-loading-section::after {
    animation-name: rb-shimmer-rtl;
}

@keyframes rb-shimmer { to { transform: translateX(100%); } }
@keyframes rb-shimmer-rtl { from { transform: translateX(100%); } to { transform: translateX(-100%); } }

@media (prefers-reduced-motion: reduce) {
    .fi-loading-section::after { animation: none; }
}

/* Empty lists: a friendly mark on a brand halo, not a grey circle. */
.fi-ta-empty-state,
.fi-empty-state {
    padding-block: 2.75rem;
}

.fi-ta-empty-state-icon-bg,
.fi-empty-state .fi-empty-state-icon-bg {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 18px;
    color: var(--primary-600);
    background:
        radial-gradient(circle at 30% 25%, rgb(255 255 255 / 0.65), transparent 55%),
        color-mix(in srgb, var(--primary-500) 14%, transparent);
    box-shadow:
        0 0 0 8px color-mix(in srgb, var(--primary-500) 5%, transparent),
        0 0 0 16px color-mix(in srgb, var(--primary-500) 2.5%, transparent);
}

.dark .fi-ta-empty-state-icon-bg,
.dark .fi-empty-state .fi-empty-state-icon-bg {
    color: var(--primary-300);
    background: color-mix(in srgb, var(--primary-500) 20%, transparent);
}

.fi-ta-empty-state-icon-bg .fi-icon,
.fi-empty-state .fi-empty-state-icon-bg .fi-icon {
    width: 1.6rem;
    height: 1.6rem;
    color: inherit;
}

.fi-ta-empty-state-heading,
.fi-empty-state-heading {
    margin-top: 0.5rem;
    font-family: var(--rb-display);
    font-size: 1.02rem;
    font-weight: 600;
}

.fi-ta-empty-state-description,
.fi-empty-state-description {
    max-width: 44ch;
    margin-inline: auto;
    line-height: 1.55;
}

/* A table's toolbar: no blank line where an empty or hidden action group would sit
   (bulk actions stay hidden until a row is ticked; then the group shows again). */
.fi-ta-header-toolbar > .fi-ta-actions:not(:has(> :not([style*="display: none"]))) {
    display: none;
}

/* A name with its description keeps a readable width instead of a tall thin column. */
.fi-ta-text.fi-wrapped.fi-ta-text-has-descriptions {
    min-width: 13rem;
}

.fi-ta-text.fi-wrapped {
    min-width: 9rem;
}

/* Group rows (FAQ categories, alerts by day): a light band with a brand edge on the row, clear of the text. */
.fi-ta-group-header-row > td,
.fi-ta-group-header-row > th {
    background: color-mix(in srgb, var(--primary-500) 5%, transparent);
}

.fi-ta-group-header-row > :first-child {
    position: relative;
}

.fi-ta-group-header-row > :first-child::before {
    content: '';
    position: absolute;
    inset-block: 0.55rem;
    inset-inline-start: 0;
    width: 3px;
    border-radius: 3px;
    background: var(--rb-gradient);
}

.fi-ta-group-header h4,
.fi-ta-group-header .fi-ta-group-heading {
    font-weight: 600;
}

/* Stat cards: the description sits a little lower and quieter. */
.fi-wi-stats-overview-stat-description {
    font-size: 0.8rem;
}

/* A scheduler task: its artisan command, set as code, not as a headline. */
.rb-task-name {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.84rem;
    font-weight: 600;
    direction: ltr;
    text-align: start;
    overflow-wrap: anywhere;
}

/* Numbered runbook steps (System › Cron jobs): the list reads as instructions, not as a paragraph. */
.rb-steps {
    margin: 0;
    padding-inline-start: 1.5rem;
    display: grid;
    gap: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.55;
}

.rb-steps li::marker {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
/* ─── Phone ─────────────────────────────────────────────────────────────── */
@media (max-width: 639px) {
    .fi-header-heading {
        font-size: 1.4rem;
        line-height: 1.8rem;
    }

    .fi-header-subheading {
        font-size: 0.86rem;
    }

    /* Two stat cards a row: smaller numbers, the chart a thin strip. */
    .fi-wi-stats-overview-stat {
        padding: 0.85rem 0.9rem;
    }

    .fi-wi-stats-overview-stat-value {
        font-size: 1.4rem;
        line-height: 1.9rem;
    }

    .fi-wi-stats-overview-stat-label {
        font-size: 0.74rem;
    }

    .fi-wi-stats-overview-stat-label-ctn .fi-icon {
        width: 1.55rem;
        height: 1.55rem;
        padding: 0.25rem;
    }

    .fi-wi-stats-overview-stat-description {
        font-size: 0.72rem;
        line-height: 1.35;
    }

    /* Tables: denser rows, the search across the whole toolbar. */
    .fi-ta-cell .fi-ta-text,
    .fi-ta-cell .fi-ta-icon,
    .fi-ta-cell .fi-ta-col > div {
        padding-block: 0.6rem;
    }

    .fi-ta-header-toolbar {
        padding: 0.6rem 0.75rem;
    }

    .fi-ta-header-toolbar > div:last-child {
        flex: 1 1 auto;
    }

    .fi-ta-search-field {
        flex: 1 1 auto;
    }

    .fi-ta-text.fi-wrapped.fi-ta-text-has-descriptions {
        min-width: 11rem;
    }

    .fi-ta-empty-state,
    .fi-empty-state {
        padding-block: 2rem;
    }

    /* Status tiles (System health, Risk, Besitos…): two a row, quieter detail. */
    .rb-status {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
    }

    .rb-status-tile {
        padding: 0.8rem 0.85rem;
    }

    .rb-status-value {
        font-size: 1.25rem;
    }

    .rb-status-tile :is(p, small, .rb-status-detail) {
        font-size: 0.74rem;
        line-height: 1.4;
    }

    /* Settings shown as facts: two a row instead of one long column. */
    .rb-facts {
        grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
        gap: 0.85rem 1rem;
    }

    /* The record number is noise on a phone; the name, status and money matter. */
    .fi-ta-header-cell-id,
    .fi-ta-cell-id {
        display: none;
    }

    /* Header actions: a row of compact buttons instead of one per line. */
    .fi-header .fi-ac {
        gap: 0.5rem;
    }
}

/* ─── Favorites (2026-10-13): the star beside a page title, the pinned group on top ─ */
.fi-header-heading:has(+ .rb-fav-form) {
    display: inline-block;
    vertical-align: middle;
}

.rb-fav-form {
    display: inline-block;
    vertical-align: middle;
    margin-inline-start: 0.35rem;
}

.rb-fav-star {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    color: rgb(148 163 184);
    transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.rb-fav-star svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linejoin: round;
}

.rb-fav-star:hover,
.rb-fav-star:focus-visible {
    color: var(--rb-gold);
    background: color-mix(in srgb, var(--rb-gold) 12%, transparent);
    outline: none;
}

.rb-fav-star:active {
    transform: scale(0.9);
}

.rb-fav-star-on {
    color: var(--rb-gold);
}

.rb-fav-star-on svg {
    fill: currentColor;
}

/* ─── Work queues on the phone (2026-10-13): Filament's stacked rows as compact cards ─
   One line per field — label at the start, value at the end — and each row a card. */
@media (max-width: 639px) {
    .fi-ta-table-stacked-on-mobile > tbody {
        display: block;
        padding: 0.5rem;
    }

    .fi-ta-table-stacked-on-mobile > tbody > tr {
        margin-block-end: 0.6rem;
        padding-block: 0.35rem;
        border: 1px solid var(--rb-line);
        border-radius: 14px;
        background: var(--rb-surface);
        box-shadow: var(--rb-shadow);
    }

    .fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:not(.fi-ta-selection-cell):has(> .fi-ta-cell-label) {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding-inline: 0.9rem;
        min-height: 2.1rem;
    }

    .fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:not(.fi-ta-selection-cell) > .fi-ta-cell-label {
        flex: none;
        padding: 0;
        font-size: 0.75rem;
        line-height: 1rem;
        font-weight: 500;
        color: rgb(100 116 139);
    }

    .fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell > .fi-ta-cell-content {
        display: flex;
        justify-content: flex-end;
        min-width: 0;
        text-align: end;
    }

    .fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell > .fi-ta-cell-content .fi-ta-col > *,
    .fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell > .fi-ta-cell-content > .fi-ta-col {
        padding-block: 0.15rem;
        padding-inline: 0;
    }

    /* Row actions (approve / reject) as a full-width bar at the bottom of the card. */
    .fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:last-child:not(:has(> .fi-ta-cell-label)) {
        display: block;
        padding-inline: 0.9rem;
        padding-block: 0.4rem 0.2rem;
        border-top: 1px dashed var(--rb-line);
        margin-top: 0.3rem;
    }

    .fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-selection-cell {
        position: static;
        display: block;
        padding: 0.35rem 0.9rem 0;
    }

    .fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-selection-cell .fi-ta-checkbox {
        padding: 0;
    }
}

/* ─── Financial page (2026-10-13): one quiet line under each bar ─ */
.rb-fin-sub {
    margin-top: -0.55rem;
    padding-inline-start: 0.1rem;
    font-size: 0.75rem;
}

.rb-fin-failed {
    color: var(--danger-600);
    font-weight: 600;
}

/* Financial filters (2026-10-21): quick ranges, two dates, country, partner */
.rb-fin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: end;
}

.rb-fin-filters .rb-actions {
    align-self: end;
    padding-bottom: 0.1rem;
}

.rb-fin-field {
    display: grid;
    gap: 0.25rem;
    min-width: 9rem;
}

.rb-fin-field > span {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.rb-fin-range {
    margin: 0.75rem 0 1rem;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

/* ─── Member timeline (2026-10-13): one stream instead of twelve tabs ─ */
.rb-timeline {
    display: grid;
    gap: 1rem;
}

.rb-timeline-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.rb-timeline-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--rb-line);
    border-radius: 999px;
    background: var(--rb-surface);
    font-size: 0.8rem;
    color: rgb(100 116 139);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.rb-timeline-chip.is-on {
    color: var(--gray-950, #0f172a);
    border-color: color-mix(in srgb, var(--rb-kind, #6c63ff) 45%, transparent);
    background: color-mix(in srgb, var(--rb-kind, #6c63ff) 10%, var(--rb-surface));
}

.dark .rb-timeline-chip.is-on {
    color: #fff;
}

.rb-timeline-dot,
.rb-timeline-mark {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: var(--rb-kind, #6c63ff);
    flex: none;
}

.rb-timeline-ledger { --rb-kind: #f5a623; }
.rb-timeline-withdrawal { --rb-kind: #6c63ff; }
.rb-timeline-postback { --rb-kind: #10b981; }
.rb-timeline-adjoe { --rb-kind: #14b8a6; }
.rb-timeline-ticket { --rb-kind: #0ea5e9; }
.rb-timeline-task { --rb-kind: #8b5cf6; }
.rb-timeline-survey { --rb-kind: #a855f7; }
.rb-timeline-fraud { --rb-kind: #f43f5e; }
.rb-timeline-note { --rb-kind: #64748b; }
.rb-timeline-referral { --rb-kind: #22c55e; }
.rb-timeline-event { --rb-kind: #94a3b8; }
.rb-timeline-chip-ledger { --rb-kind: #f5a623; }
.rb-timeline-chip-withdrawal { --rb-kind: #6c63ff; }
.rb-timeline-chip-postback { --rb-kind: #10b981; }
.rb-timeline-chip-adjoe { --rb-kind: #14b8a6; }
.rb-timeline-chip-ticket { --rb-kind: #0ea5e9; }
.rb-timeline-chip-task { --rb-kind: #8b5cf6; }
.rb-timeline-chip-survey { --rb-kind: #a855f7; }
.rb-timeline-chip-fraud { --rb-kind: #f43f5e; }
.rb-timeline-chip-note { --rb-kind: #64748b; }
.rb-timeline-chip-referral { --rb-kind: #22c55e; }
.rb-timeline-chip-event { --rb-kind: #94a3b8; }

.rb-timeline-list {
    position: relative;
    display: grid;
    gap: 0.15rem;
    padding: 0.75rem 0.25rem;
    border: 1px solid var(--rb-line);
    border-radius: var(--rb-radius);
    background: var(--rb-surface);
    box-shadow: var(--rb-shadow);
}

.rb-timeline-day {
    padding: 0.6rem 0.75rem 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(100 116 139);
}

.rb-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 3rem 0.55rem minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
}

.rb-timeline-item:hover {
    background: color-mix(in srgb, var(--rb-kind) 6%, transparent);
}

/* The thread between the dots. */
.rb-timeline-item::before {
    content: '';
    position: absolute;
    inset-block: 0;
    inset-inline-start: calc(0.75rem + 3rem + 0.75rem + 0.275rem - 1px);
    width: 2px;
    background: var(--rb-line);
}

.rb-timeline-mark {
    position: relative;
    margin-top: 0.35rem;
    box-shadow: 0 0 0 3px var(--rb-surface);
}

.rb-timeline-time {
    padding-top: 0.1rem;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    color: rgb(100 116 139);
}

.rb-timeline-body {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.rb-timeline-kind {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--rb-kind);
}

.rb-timeline-title {
    font-size: 0.875rem;
    font-weight: 500;
    overflow-wrap: anywhere;
}

a.rb-timeline-title:hover {
    text-decoration: underline;
}

.rb-timeline-detail {
    font-size: 0.78rem;
    color: rgb(100 116 139);
    overflow-wrap: anywhere;
}

.rb-timeline-amount {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.rb-tone-success .rb-timeline-amount { color: #059669; }
.rb-tone-danger .rb-timeline-amount { color: #e11d48; }
.rb-tone-warning .rb-timeline-amount { color: #d97706; }
.rb-tone-gray .rb-timeline-amount { color: rgb(100 116 139); }

.rb-timeline-more {
    display: flex;
    justify-content: center;
}

@media (max-width: 639px) {
    .rb-timeline-item {
        grid-template-columns: 2.6rem 0.55rem minmax(0, 1fr);
    }

    .rb-timeline-amount {
        grid-column: 3;
    }

    .rb-timeline-item::before {
        inset-inline-start: calc(0.75rem + 2.6rem + 0.75rem + 0.275rem - 1px);
    }
}

.rb-timeline-list {
    max-width: 60rem;
}
/* ── Acquisition funnel page: five tiles + the day-by-day grid ── */

.rb-acq-tiles .rb-status-value { font-variant-numeric: tabular-nums; }
.rb-acq-sep { opacity: 0.35; font-weight: 400; margin: 0 0.15em; }

.rb-acq-table { display: grid; gap: 0.2rem; font-variant-numeric: tabular-nums; }

.rb-acq-row {
    display: grid;
    grid-template-columns: minmax(7rem, 1.4fr) repeat(6, minmax(4.5rem, 1fr));
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    font-size: 0.85rem;
}

.rb-acq-row > span { text-align: end; }
.rb-acq-row > span:first-child { text-align: start; }
.rb-acq-row:not(.rb-acq-row-head):hover { background: var(--gray-50); }
.rb-acq-row-head { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gray-500); }
.rb-acq-day { font-weight: 600; }

.dark .rb-acq-row:not(.rb-acq-row-head):hover { background: rgba(255, 255, 255, 0.04); }

@media (max-width: 700px) {
    .rb-acq-row { grid-template-columns: minmax(5rem, 1.2fr) repeat(6, minmax(3rem, 1fr)); font-size: 0.75rem; gap: 0.35rem; }
}

/* ── Economy: effective member share per provider (read-only block inside the form) ── */
.rb-share { display: grid; gap: 0.6rem; padding: 0.9rem 1rem; border-radius: 14px; background: var(--gray-50); }
.dark .rb-share { background: rgba(255, 255, 255, 0.03); }
.rb-share-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.9rem; }
.rb-share-title { font-weight: 700; font-size: 0.9rem; }
.rb-share .rb-bars-value { display: inline-flex; align-items: center; gap: 0.4rem; font-variant-numeric: tabular-nums; }
.rb-bar-danger { background: var(--danger-500, #ef4444); }
/* ─── Dashboard: the period bar, the world map, activity types, top earners, recent activity ─── */

/* The period bar above the widgets: presets as one row of pills, then from / to / zone. */
.rb-period .fi-fo-toggle-buttons.fi-inline {
    gap: 0.4rem;
}

.rb-period .fi-fo-toggle-buttons-btn-ctn .fi-btn {
    padding: 0.42rem 0.95rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--rb-surface);
    box-shadow: 0 0 0 1px var(--rb-line);
    transition: color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.dark .rb-period .fi-fo-toggle-buttons-btn-ctn .fi-btn {
    color: var(--gray-300);
}

.rb-period .fi-fo-toggle-buttons-btn-ctn .fi-btn:hover {
    color: var(--primary-600);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary-500) 45%, transparent);
}

.rb-period .fi-fo-toggle-buttons-input:checked + .fi-btn,
.dark .rb-period .fi-fo-toggle-buttons-input:checked + .fi-btn {
    font-weight: 600;
    color: #fff;
    background: var(--rb-gradient);
    box-shadow: 0 8px 18px -10px rgba(76, 66, 230, 0.8);
}

.rb-period .fi-fo-toggle-buttons-input:focus-visible + .fi-btn {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* ─── World map ──────────────────────────────────────────────────────────── */
.rb-map {
    --rb-map-land: color-mix(in srgb, var(--gray-500) 15%, var(--rb-surface));
    display: grid;
    grid-template-columns: minmax(0, 1fr) 19.5rem;
    align-items: start;
    gap: 1.25rem 1.75rem;
}

.dark .rb-map {
    --rb-map-land: color-mix(in srgb, var(--gray-400) 16%, var(--rb-surface));
}

.rb-map-stage {
    position: relative;
}

.rb-map-svg {
    display: block;
    width: 100%;
    height: auto;
}

.rb-map-svg [data-cc] {
    fill: var(--rb-map-land);
    stroke: var(--rb-surface);
    stroke-width: 0.45;
    transition: fill 0.25s;
}

.rb-map-svg .rb-map-dot {
    stroke-width: 0.8;
}

.rb-map-svg [data-cc].is-on {
    fill: color-mix(in srgb, var(--primary-500) var(--rb-t, 40%), var(--rb-map-land));
}

.rb-map-svg [data-cc]:hover {
    stroke: var(--primary-600);
    stroke-width: 0.9;
}

.dark .rb-map-svg [data-cc]:hover {
    stroke: var(--primary-300);
}

.rb-map-linked .rb-map-svg [data-cc].is-on {
    cursor: pointer;
}

.rb-map-tip {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.7rem;
    border-radius: 10px;
    font-size: 0.8rem;
    white-space: nowrap;
    pointer-events: none;
    background: var(--rb-surface);
    box-shadow: 0 0 0 1px var(--rb-line), 0 12px 28px -14px rgba(30, 27, 75, 0.45);
    transform: translate(-50%, calc(-100% - 12px));
}

[dir='rtl'] .rb-map-tip {
    transform: translate(50%, calc(-100% - 12px));
}

.rb-map-tip b {
    font-variant-numeric: tabular-nums;
    color: var(--primary-600);
}

.dark .rb-map-tip b {
    color: var(--primary-300);
}

.rb-map-side {
    display: grid;
    gap: 1rem;
}

.rb-map-modes {
    display: flex;
    gap: 3px;
    padding: 3px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--gray-500) 10%, transparent);
}

.rb-map-modes button {
    display: inline-flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 0.4rem;
    border-radius: 9px;
    font-size: 0.74rem;
    white-space: nowrap;
    font-weight: 600;
    color: var(--gray-500);
    transition: background-color 0.15s, color 0.15s;
}

.rb-map-modes button.is-on {
    color: var(--primary-600);
    background: var(--rb-surface);
    box-shadow: var(--rb-shadow);
}

.dark .rb-map-modes button.is-on {
    color: var(--primary-300);
}

/* A still green dot: the layer is live, nothing blinks. */
.rb-live {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.rb-map-total {
    display: grid;
    gap: 0.15rem;
}

.rb-map-total b {
    font-family: var(--rb-display);
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.rb-map-total small {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.rb-map-list {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rb-map-list li + li {
    border-block-start: 1px solid var(--rb-line);
}

.rb-map-list-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding-block: 0.5rem;
    font-size: 0.85rem;
    color: inherit;
    text-decoration: none;
}

.rb-map-list-row span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rb-map-list-row b {
    font-variant-numeric: tabular-nums;
}

a.rb-map-list-row:not(.is-static):hover span {
    color: var(--primary-600);
}

.rb-map-list-row.is-static {
    pointer-events: none;
}

.rb-map-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
}

.rb-map-legend i {
    flex: 1;
    height: 0.45rem;
    border-radius: 999px;
    background: linear-gradient(to right, color-mix(in srgb, var(--primary-500) 22%, var(--rb-map-land)), var(--primary-500));
}

[dir='rtl'] .rb-map-legend i {
    background: linear-gradient(to left, color-mix(in srgb, var(--primary-500) 22%, var(--rb-map-land)), var(--primary-500));
}

@media (max-width: 64rem) {
    .rb-map {
        grid-template-columns: 1fr;
    }
}

/* ─── Activity types: coloured bars, a name with its line count ─────────── */
.rb-bars-types .rb-bars-row {
    grid-template-columns: minmax(9rem, 13rem) 1fr auto;
}

a.rb-bars-label {
    color: inherit;
    text-decoration: none;
}

a.rb-bars-label:hover .rb-bars-name {
    color: var(--primary-600);
}

.rb-bars-name {
    display: grid;
    min-width: 0;
    line-height: 1.25;
}

.rb-bars-name small {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--gray-500);
}

.rb-swatch {
    flex: none;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 3px;
    background: hsl(var(--rb-h, 247) 72% 62%);
}

.rb-bars-track .rb-bar.rb-bar-hue {
    background: hsl(var(--rb-h, 247) 72% 62%);
}

.rb-bars-types .rb-bars-value {
    display: grid;
    justify-items: end;
    gap: 0.15rem;
}

@media (max-width: 40rem) {
    .rb-bars-types .rb-bars-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .rb-bars-types .rb-bars-track {
        display: none;
    }
}

/* ─── Top earners: a ranked list ─────────────────────────────────────────── */
.rb-rank {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rb-rank li + li {
    border-block-start: 1px solid var(--rb-line);
}

.rb-rank-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-block: 0.6rem;
    color: inherit;
    text-decoration: none;
}

.rb-rank-row .rb-id {
    flex: 1;
    min-width: 0;
}

.rb-rank-row:hover .rb-id-text b {
    color: var(--primary-600);
}

.rb-rank-place {
    display: grid;
    flex: none;
    place-items: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--gray-500);
    background: color-mix(in srgb, var(--gray-500) 10%, transparent);
}

.rb-rank-place.rb-rank-podium {
    color: #9a6200;
    background: color-mix(in srgb, var(--rb-gold) 22%, transparent);
}

.dark .rb-rank-place.rb-rank-podium {
    color: #ffd98a;
}

/* ─── Recent activity ────────────────────────────────────────────────────── */
.rb-feed .rb-row {
    padding-block: 0.6rem;
}

.rb-feed a.rb-row-main {
    color: inherit;
    text-decoration: none;
}

.rb-feed a.rb-row-main:hover .rb-id-text b {
    color: var(--primary-600);
}
/* ─── Install sources page: tiles, the two charts, the source table, countries / codes / raw referrers ─── */

/* Six tiles: one row on a wide screen, two rows of three, three rows of two on a phone — never one left alone. */
.rb-src-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 48rem) {
    .rb-src-tiles {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 88rem) {
    .rb-src-tiles {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.rb-src-up {
    color: var(--success-600);
}

.rb-src-down {
    color: var(--danger-600);
}

.rb-src-kind {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    margin-inline-end: 0.2rem;
    border-radius: 50%;
}

.rb-src-kind-campaign { background: #6c63ff; }
.rb-src-kind-organic { background: #10b981; }
.rb-src-kind-invite { background: #f5a623; }

.rb-src-charts {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1.5rem;
}

@media (max-width: 80rem) {
    .rb-src-charts {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* The source table: numbers aligned to the end, the first column sticks while the rest scrolls on a phone. */
.rb-src-scroll {
    overflow-x: auto;
    margin-inline: -0.25rem;
}

.rb-src-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
    font-variant-numeric: tabular-nums;
}

.rb-src-table th {
    padding: 0.6rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-align: end;
    white-space: nowrap;
    color: var(--gray-500);
    background: color-mix(in srgb, var(--gray-500) 7%, transparent);
}

.rb-src-table td {
    padding: 0.7rem 0.75rem;
    text-align: end;
    white-space: nowrap;
    border-block-start: 1px solid var(--rb-line);
}

.rb-src-table th:first-child,
.rb-src-table td:first-child {
    position: sticky;
    inset-inline-start: 0;
    z-index: 1;
    text-align: start;
    background: var(--rb-surface);
}

.rb-src-table th:first-child {
    background: color-mix(in srgb, var(--gray-500) 7%, var(--rb-surface));
}

.rb-src-table tbody tr:hover td {
    background: color-mix(in srgb, var(--primary-500) 4%, var(--rb-surface));
}

.rb-src-table .rb-coins {
    justify-content: flex-end;
}

.rb-src-name {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.rb-src-dot {
    flex: none;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
}

.rb-src-chip-campaign {
    color: #4c42e6;
    background: color-mix(in srgb, #6c63ff 12%, transparent);
}

.rb-src-chip-organic {
    color: #047857;
    background: color-mix(in srgb, #10b981 14%, transparent);
}

.rb-src-chip-invite {
    color: #9a6200;
    background: color-mix(in srgb, #f5a623 18%, transparent);
}

.dark .rb-src-chip-campaign { color: #b4afff; }
.dark .rb-src-chip-organic { color: #6ee7b7; }
.dark .rb-src-chip-invite { color: #ffd98a; }

.rb-src-rate {
    display: inline-block;
    min-width: 3.4rem;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.rb-src-rate-good { color: #047857; background: color-mix(in srgb, #10b981 15%, transparent); }
.rb-src-rate-mid { color: #9a6200; background: color-mix(in srgb, #f5a623 18%, transparent); }
.rb-src-rate-low { color: #b91c1c; background: color-mix(in srgb, #ef4444 14%, transparent); }

.dark .rb-src-rate-good { color: #6ee7b7; }
.dark .rb-src-rate-mid { color: #ffd98a; }
.dark .rb-src-rate-low { color: #fca5a5; }

.rb-src-share {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.rb-src-share .rb-bars-track {
    width: 5rem;
    height: 0.4rem;
}

.rb-src-share small {
    min-width: 2.8rem;
    color: var(--gray-500);
}

/* Countries beside codes + raw strings. */
.rb-src-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 1.5rem;
}

.rb-src-stack {
    display: grid;
    gap: 1.5rem;
}

@media (max-width: 64rem) {
    .rb-src-pair {
        grid-template-columns: minmax(0, 1fr);
    }
}

.rb-src-line {
    flex-wrap: nowrap;
    justify-content: space-between;
    padding-block: 0.6rem;
}

.rb-src-line-main {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    min-width: 0;
}

.rb-src-line-end {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.rb-src-num {
    min-width: 2.5rem;
    text-align: end;
    font-variant-numeric: tabular-nums;
}

.rb-src-raw {
    max-height: 26rem;
    overflow-y: auto;
}

.rb-src-raw code {
    min-width: 0;
    font-size: 0.78rem;
    overflow-wrap: anywhere;
    color: var(--gray-600);
}

.dark .rb-src-raw code {
    color: var(--gray-300);
}
/* ── User journey page: install → withdrawal steps, onboarding pages, problems ── */

.rb-journey { display: grid; gap: 0.25rem; font-variant-numeric: tabular-nums; }

.rb-journey-row {
    display: grid;
    grid-template-columns: minmax(10rem, 1.3fr) minmax(6rem, 2fr) minmax(6rem, 0.8fr) minmax(4.5rem, 0.6fr) minmax(4.5rem, 0.6fr);
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.6rem;
    border-radius: 10px;
    font-size: 0.875rem;
}

.rb-journey-row > span:nth-child(n + 3) { text-align: end; }
.rb-journey-row small { color: var(--gray-500); }
.rb-journey-head { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gray-500); }
.rb-journey-name { display: grid; gap: 0.1rem; font-weight: 600; }
.rb-journey-name small { font-weight: 400; font-size: 0.75rem; }
.rb-journey-lost { color: var(--danger-600, #dc2626); font-weight: 600; }
.rb-journey-worst { background: color-mix(in srgb, var(--danger-500, #ef4444) 8%, transparent); }
.rb-journey-callout { margin-top: 0.9rem; padding: 0.65rem 0.9rem; border-radius: 12px; font-size: 0.875rem; background: color-mix(in srgb, var(--danger-500, #ef4444) 10%, transparent); }
.rb-journey-row:not(.rb-journey-head):not(.rb-journey-worst):hover { background: var(--gray-50); }

.rb-journey-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1.5rem; }
.rb-journey-problems { display: grid; gap: 0.15rem; }
.rb-journey-problem { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.4rem 0.2rem; border-bottom: 1px solid color-mix(in srgb, var(--gray-500) 15%, transparent); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.rb-journey-problem .rb-chip { margin-inline-start: 0.35rem; }
.rb-journey-country { min-width: 11rem; }

.dark .rb-journey-row:not(.rb-journey-head):not(.rb-journey-worst):hover { background: rgba(255, 255, 255, 0.04); }

@media (max-width: 700px) {
    .rb-journey-row { grid-template-columns: minmax(7rem, 1.4fr) minmax(3rem, 1fr) minmax(4rem, 0.9fr) minmax(3rem, 0.6fr) minmax(3rem, 0.6fr); gap: 0.35rem; font-size: 0.75rem; }
    .rb-journey-name small { display: none; }
}
/* ── Firebase Analytics page: GA4 tiles, daily columns, Firebase vs our journey ── */

.rb-fb-tiles .rb-status-value { font-variant-numeric: tabular-nums; }

.rb-fb-checklist { display: grid; gap: 0.55rem; margin: 0; padding-inline-start: 1.25rem; font-size: 0.9rem; list-style: decimal; }
.rb-fb-checklist li::marker { color: var(--gray-500); font-weight: 600; }
.rb-fb-done { color: var(--gray-500); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--gray-500) 50%, transparent); }
.rb-fb-code { padding: 0.1rem 0.4rem; border-radius: 6px; font-size: 0.8rem; background: color-mix(in srgb, var(--gray-500) 12%, transparent); word-break: break-all; }

.rb-fb-days { display: flex; align-items: flex-end; gap: 0.3rem; height: 9rem; padding-top: 0.5rem; }
.rb-fb-day { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 0.25rem; }
.rb-fb-day small { font-size: 0.65rem; color: var(--gray-500); font-variant-numeric: tabular-nums; }
.rb-fb-day-bar { position: relative; width: 100%; max-width: 2.2rem; display: flex; align-items: flex-end; border-radius: 6px 6px 3px 3px; overflow: hidden; background: var(--rb-gradient); }
.rb-fb-day-new { width: 100%; background: rgba(255, 255, 255, 0.45); }
.rb-fb-legend { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.6rem; font-size: 0.8rem; }
.rb-fb-swatch { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 3px; background: var(--rb-gradient); }
.rb-fb-swatch-new { margin-inline-start: 0.75rem; background: linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.45)), var(--rb-gradient); }

.rb-fb-now { display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(14rem, 1.3fr) minmax(14rem, 1.3fr); gap: 1.5rem; align-items: start; }
.rb-fb-now-total { display: grid; gap: 0.2rem; align-content: start; }
.rb-fb-now-total strong { font-size: 2.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.rb-fb-now-ours { font-size: 0.8rem; margin-top: 0.4rem; }
.rb-fb-pulse { width: 0.6rem; height: 0.6rem; border-radius: 999px; background: var(--success-500, #22c55e); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success-500, #22c55e) 20%, transparent); }
.rb-fb-link { color: var(--primary-600); font-weight: 600; text-decoration: none; }
.rb-fb-link:hover { text-decoration: underline; }

@media (max-width: 900px) {
    .rb-fb-now { grid-template-columns: 1fr; }
}

.rb-journey-row.rb-fb-compare { grid-template-columns: minmax(9rem, 1.3fr) minmax(8rem, 1.2fr) minmax(5rem, 0.7fr) minmax(5rem, 0.7fr); }

@media (max-width: 700px) {
    .rb-journey-row.rb-fb-compare { grid-template-columns: minmax(6rem, 1.2fr) minmax(6rem, 1.2fr) minmax(3.5rem, 0.6fr) minmax(3.5rem, 0.6fr); }
    .rb-fb-days { gap: 0.15rem; }
}

/* From a Firebase number to the members behind it: rows and tiles that open Who did what. */
a.rb-journey-problem { color: inherit; text-decoration: none; }
.rb-fb-row-link { margin-inline: -0.4rem; padding-inline: 0.6rem; border-radius: 8px; cursor: pointer; transition: background-color 0.15s; }
.rb-fb-row-link:hover { background: color-mix(in srgb, var(--primary-500) 8%, transparent); }
.rb-fb-row-icon { display: inline-block; width: 0.9rem; height: 0.9rem; vertical-align: -0.12rem; margin-inline-start: 0.3rem; color: var(--primary-500); opacity: 0.65; }
.rb-fb-row-link:hover .rb-fb-row-icon { opacity: 1; }
a.rb-status-tile { color: inherit; text-decoration: none; }
.rb-fb-tile-link { transition: box-shadow 0.15s, transform 0.15s; }
.rb-fb-tile-link:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary-500) 45%, transparent), var(--rb-shadow); transform: translateY(-1px); }
.rb-fb-see { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--primary-600); font-weight: 600; }
.rb-fb-see .rb-fb-row-icon { margin: 0; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .rb-fb-tile-link, .rb-fb-row-link { transition: none; } .rb-fb-tile-link:hover { transform: none; } }
/* ── Who did what (Members › Member activity): action chips above the window bar ── */

.rb-activity-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
/* ── Adjust logs: the details card of one callback / one send ── */

.rb-logcard { display: grid; gap: 1.25rem; }

.rb-logcard-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.75rem 1.25rem;
    margin: 0;
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
    background: var(--gray-50);
}
.dark .rb-logcard-facts { background: rgb(255 255 255 / 0.04); }
.rb-logcard-facts dt { font-size: 0.72rem; font-weight: 500; color: var(--gray-500); }
.rb-logcard-facts dd { margin: 0.2rem 0 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.rb-logcard-group-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.rb-logcard-group-head h3 { margin: 0; font-size: 0.85rem; font-weight: 600; }
.rb-logcard-group-head .fi-btn { margin-inline-start: auto; }
.rb-logcard-count {
    padding: 0 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    color: var(--gray-500);
    background: var(--gray-100);
}
.dark .rb-logcard-count { background: rgb(255 255 255 / 0.08); color: var(--gray-400); }

/* Two columns of rows when there is room; a row never shares its line with another value. */
.rb-logcard-rows {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
    margin: 0;
    border: 1px solid var(--gray-200);
    border-radius: 0.9rem;
    overflow: hidden;
}
.dark .rb-logcard-rows { border-color: rgb(255 255 255 / 0.1); }

.rb-logcard-row {
    min-width: 0;
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid var(--gray-100);
}
.dark .rb-logcard-row { border-bottom-color: rgb(255 255 255 / 0.06); }
.rb-logcard-row dt {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.7rem;
    color: var(--gray-500);
    text-align: start;
}
.rb-logcard-row dd {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin: 0.15rem 0 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    font-weight: 600;
}
/* Long ids (ADID, advertising id) break anywhere instead of running into the next column. */
.rb-logcard-value { flex: 1; min-width: 0; overflow-wrap: anywhere; user-select: all; }
.rb-logcard-muted { color: var(--gray-400); font-weight: 500; }

.rb-logcard-copy {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.4rem;
    color: var(--gray-400);
    opacity: 0.55;
    transition: opacity 0.15s, color 0.15s, background-color 0.15s;
}
.rb-logcard-row:hover .rb-logcard-copy, .rb-logcard-copy:focus-visible { opacity: 1; }
.rb-logcard-copy:hover { color: var(--primary-600); background: var(--primary-50); }
.dark .rb-logcard-copy:hover { color: var(--primary-400); background: rgb(255 255 255 / 0.06); }
.rb-logcard-copy-icon { width: 0.95rem; height: 0.95rem; }

.rb-logcard-empty { margin: 0; color: var(--gray-400); }

@media (prefers-reduced-motion: reduce) { .rb-logcard-copy { transition: none; } }

/* Parameters Adjust left empty: one quiet line under the group, not a row each. */
.rb-logcard-blank { margin: 0.45rem 0.25rem 0; font-size: 0.72rem; color: var(--gray-400); }
.rb-logcard-blank span { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
