/*
 * MarketFlow client portal theme for RedFamosa.
 * Extends Aurora + sidebar layout. The panel's configured --brand remains the
 * primary colour; this stylesheet only supplies surfaces, spacing and chrome.
 */

html[data-theme="marketflow"] {
    --mf-ink: #0c1627;
    --mf-navy: #101827;
    --mf-soft: #f5f7fb;
    --mf-soft-2: #eef2f8;
    --mf-border: rgba(15, 23, 42, .085);
    --mf-border-strong: rgba(15, 23, 42, .14);
    --mf-shadow: 0 18px 55px -38px rgba(15, 23, 42, .34);
    --mf-shadow-hover: 0 24px 66px -38px rgba(15, 23, 42, .42);
    --mf-accent: #12b8a6;

    --color-bg: #f5f7fb;
    --color-surface: #ffffff;
    --color-surface-2: #f8fafc;
    --color-surface-3: #eef2f7;
    --color-border: rgba(15, 23, 42, .085);
    --color-border-strong: rgba(15, 23, 42, .14);
    --color-text: #0c1627;
    --color-text-muted: #516074;
    --color-text-subtle: #8793a3;
    --color-primary-soft: color-mix(in srgb, var(--brand) 10%, #ffffff);

    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;

    --shadow-1: 0 10px 34px -28px rgba(15, 23, 42, .32);
    --shadow-2: 0 18px 50px -34px rgba(15, 23, 42, .38);
    --shadow-3: 0 24px 70px -42px rgba(15, 23, 42, .48);
    --shadow-4: 0 32px 90px -48px rgba(15, 23, 42, .56);

    --rf-sidebar-w: 232px;
    --rf-sidebar-bg: #ffffff;
    --rf-sidebar-fg: #172033;
    --rf-sidebar-fg-muted: #617086;
    --rf-sidebar-active-bg: color-mix(in srgb, var(--brand) 10%, #ffffff);
    --rf-sidebar-active-fg: color-mix(in srgb, var(--brand) 82%, #111827);
    --rf-sidebar-active-bar: var(--brand);
    --rf-sidebar-hover-bg: #f5f7fb;
    --rf-topbar-bg: color-mix(in srgb, #ffffff 92%, transparent);
    --rf-search-bg: #f5f7fb;
    --rf-shell-bg: #f5f7fb;
}

html.dark[data-theme="marketflow"] {
    --mf-ink: #eef4ff;
    --mf-navy: #070b13;
    --mf-soft: #0b111c;
    --mf-soft-2: #111925;
    --mf-border: rgba(255, 255, 255, .075);
    --mf-border-strong: rgba(255, 255, 255, .13);
    --mf-shadow: 0 20px 58px -34px rgba(0, 0, 0, .72);
    --mf-shadow-hover: 0 30px 76px -38px rgba(0, 0, 0, .82);

    --color-bg: #0b111c;
    --color-surface: #111925;
    --color-surface-2: #151f2d;
    --color-surface-3: #1b2635;
    --color-border: rgba(255, 255, 255, .075);
    --color-border-strong: rgba(255, 255, 255, .13);
    --color-text: #eef4ff;
    --color-text-muted: #a7b4c7;
    --color-text-subtle: #748297;
    --color-primary-soft: color-mix(in srgb, var(--brand) 20%, #111925);

    --rf-sidebar-bg: #0d1420;
    --rf-sidebar-fg: #eff5ff;
    --rf-sidebar-fg-muted: #9eabc0;
    --rf-sidebar-active-bg: color-mix(in srgb, var(--brand) 20%, #111925);
    --rf-sidebar-active-fg: #ffffff;
    --rf-sidebar-hover-bg: rgba(255, 255, 255, .055);
    --rf-topbar-bg: color-mix(in srgb, #111925 90%, transparent);
    --rf-search-bg: #151f2d;
    --rf-shell-bg: #0b111c;
}

html[data-theme="marketflow"] body {
    letter-spacing: -.006em;
}

/* Shell ------------------------------------------------------------------ */
html[data-theme="marketflow"] .rf-cside {
    position: relative;
    border-inline-end: 1px solid var(--mf-border);
    box-shadow: 14px 0 44px -40px rgba(15, 23, 42, .45);
    overflow: hidden;
}

html[data-theme="marketflow"] .rf-cside::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 42%, #14b8a6));
    pointer-events: none;
}

html[data-theme="marketflow"] .rf-cside-brand {
    height: 74px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--mf-border);
    background:
        radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 58%),
        var(--rf-sidebar-bg);
}

html[data-theme="marketflow"] .rf-cside-brand img {
    max-height: 40px !important;
    max-width: 174px !important;
}

html[data-theme="marketflow"] #rf-client-sidenav {
    padding: 14px 8px 18px;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border-strong) transparent;
}

html[data-theme="marketflow"] .rf-cside-section {
    padding: 15px 12px 6px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .12em;
}

html[data-theme="marketflow"] .rf-cside-item {
    position: relative;
    min-height: 42px;
    margin: 3px 4px;
    padding: 10px 12px;
    border-radius: 12px;
    border-inline-start: 0;
    font-size: 13.5px;
    font-weight: 650;
    gap: 10px;
}

html[data-theme="marketflow"] .rf-cside-item svg {
    color: var(--rf-sidebar-fg-muted);
    transition: color .16s ease, transform .16s ease;
}

html[data-theme="marketflow"] .rf-cside-item:hover svg,
html[data-theme="marketflow"] .rf-cside-item-active svg {
    color: var(--brand);
}

html[data-theme="marketflow"] .rf-cside-item:hover svg {
    transform: translateX(1px);
}

html[data-theme="marketflow"] .rf-cside-item-active {
    background: var(--rf-sidebar-active-bg);
    color: var(--rf-sidebar-active-fg);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 13%, transparent);
}

html[data-theme="marketflow"] .rf-cside-item-active::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 6px 6px 0;
    background: var(--brand);
}

html[dir="rtl"][data-theme="marketflow"] .rf-cside-item-active::before {
    border-radius: 6px 0 0 6px;
}

html[data-theme="marketflow"] .rf-cside-subitem {
    padding-inline-start: 30px;
    font-size: 13px;
}

html[data-theme="marketflow"] .rf-ctopbar {
    height: 64px;
    padding: 0 20px;
    gap: 10px;
    background: var(--rf-topbar-bg);
    border-bottom-color: var(--mf-border);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

html[data-theme="marketflow"] .rf-csearch {
    max-width: 470px;
    height: 40px;
    padding: 0 13px;
    border: 1px solid var(--mf-border);
    border-radius: 12px;
    background: var(--rf-search-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}

html.dark[data-theme="marketflow"] .rf-csearch {
    box-shadow: none;
}

html[data-theme="marketflow"] .rf-csearch:focus-within {
    border-color: color-mix(in srgb, var(--brand) 40%, var(--color-border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 9%, transparent);
}

html[data-theme="marketflow"] .rf-icon-btn {
    border-radius: 10px;
}

html[data-theme="marketflow"] .rf-cbalance {
    height: 40px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--brand) 14%, var(--color-border));
    background: color-mix(in srgb, var(--brand) 7%, var(--color-surface));
    padding-inline-start: 12px;
}

html[data-theme="marketflow"] .rf-cbalance .rf-btn {
    border-radius: 9px !important;
}

html[data-theme="marketflow"] .rf-cbalance-amount {
    color: var(--color-text);
    font-weight: 800;
}

html[data-theme="marketflow"] .rf-cside + div > main {
    padding: 24px 28px 34px;
    scroll-behavior: smooth;
}

html[data-theme="marketflow"] .rf-cside + div > main > * {
    max-width: 1580px;
    margin-inline: auto;
}

html[data-theme="marketflow"] .rf-cside + div > main > .mf-dashboard-hero {
    max-width: 1580px;
}

/* Dashboard commercial hero ---------------------------------------------- */
.mf-dashboard-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(330px, .8fr);
    gap: 20px;
    margin-bottom: 18px !important;
    padding: 28px;
    border-radius: 24px;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(circle at 86% 16%, rgba(255, 255, 255, .15), transparent 28%),
        radial-gradient(circle at 10% 110%, color-mix(in srgb, var(--brand) 54%, #14b8a6), transparent 42%),
        linear-gradient(135deg, color-mix(in srgb, var(--brand) 72%, #111827), #101827 72%);
    box-shadow: 0 28px 78px -46px color-mix(in srgb, var(--brand) 52%, #0f172a);
}

.mf-dashboard-hero::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 50%;
    right: -115px;
    bottom: -145px;
    box-shadow: 0 0 0 38px rgba(255, 255, 255, .028), 0 0 0 76px rgba(255, 255, 255, .018);
    pointer-events: none;
}

.mf-dashboard-copy,
.mf-dashboard-actions {
    position: relative;
    z-index: 2;
}

.mf-dashboard-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.mf-eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    gap: 8px;
    margin-bottom: 10px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .82);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.mf-eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2dd4bf;
    box-shadow: 0 0 0 4px rgba(45, 212, 191, .12);
}

.mf-dashboard-copy h2 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(1.65rem, 2.5vw, 2.5rem);
    line-height: 1.03;
    letter-spacing: -.045em;
    font-weight: 850;
    color: #ffffff;
}

.mf-dashboard-copy p {
    max-width: 710px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
    line-height: 1.65;
}

.mf-hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.mf-hero-primary,
.mf-hero-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 15px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: transform .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.mf-hero-primary svg,
.mf-hero-secondary svg {
    width: 16px;
    height: 16px;
}

.mf-hero-primary {
    background: #ffffff;
    color: #101827;
    box-shadow: 0 12px 28px -18px rgba(0, 0, 0, .6);
}

.mf-hero-primary:hover {
    transform: translateY(-1px);
    color: #101827;
    box-shadow: 0 18px 32px -18px rgba(0, 0, 0, .68);
}

.mf-hero-secondary {
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .07);
    color: #ffffff;
}

.mf-hero-secondary:hover {
    background: rgba(255, 255, 255, .12);
    color: #ffffff;
    transform: translateY(-1px);
}

.mf-social-proof {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 13px;
    margin-top: 18px;
    color: rgba(255, 255, 255, .68);
    font-size: 11px;
    font-weight: 650;
}

.mf-social-proof > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mf-social-proof i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mf-net);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .12);
}

.mf-social-proof .mf-more-networks {
    padding: 3px 7px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
}

.mf-dashboard-actions {
    align-self: stretch;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    background: rgba(255, 255, 255, .075);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.mf-action-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 2px;
    color: rgba(255, 255, 255, .75);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.mf-action-head svg {
    width: 15px;
    height: 15px;
}

.mf-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mf-action-card {
    display: grid;
    grid-template-columns: 35px minmax(0, 1fr) 14px;
    align-items: center;
    gap: 9px;
    min-height: 67px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 13px;
    background: rgba(9, 15, 27, .22);
    color: #ffffff;
    text-decoration: none;
    transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}

.mf-action-card:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, .10);
    border-color: rgba(255, 255, 255, .18);
    color: #ffffff;
}

.mf-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .10);
}

.mf-action-icon svg {
    width: 17px;
    height: 17px;
}

.mf-action-card strong,
.mf-action-card small {
    display: block;
    min-width: 0;
}

.mf-action-card strong {
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mf-action-card small {
    margin-top: 2px;
    color: rgba(255, 255, 255, .56);
    font-size: 9.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mf-action-arrow {
    width: 13px;
    height: 13px;
    color: rgba(255, 255, 255, .45);
}

/* Network discovery ------------------------------------------------------- */
html[data-theme="marketflow"] .rf-panel-heading {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--color-text-muted);
}

html[data-theme="marketflow"] .rf-net-row {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 9px;
}

html[data-theme="marketflow"] .rf-net-tile {
    min-height: 78px;
    border-radius: 15px;
    border: 1px solid var(--mf-border);
    box-shadow: none;
    transform: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

html[data-theme="marketflow"] .rf-net-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--mf-shadow);
    border-color: color-mix(in srgb, var(--net-solid, var(--brand)) 30%, var(--color-border));
}

html[data-theme="marketflow"] .rf-net-tile svg,
html[data-theme="marketflow"] .rf-net-tile i {
    width: 23px;
    height: 23px;
}

html[data-theme="marketflow"] .rf-net-tile-label {
    font-size: 11.5px;
    font-weight: 750;
}

/* Core surfaces ----------------------------------------------------------- */
html[data-theme="marketflow"] .rf-card,
html[data-theme="marketflow"] .rf-dash-kpi,
html[data-theme="marketflow"] .rf-dash-chart,
html[data-theme="marketflow"] .rf-dash-status,
html[data-theme="marketflow"] .rf-dash-panel {
    border-color: var(--mf-border);
    box-shadow: var(--mf-shadow);
}

html[data-theme="marketflow"] .rf-card {
    border-radius: 18px;
    overflow: visible;
}

html[data-theme="marketflow"] .rf-card-body {
    padding: 20px;
}

html[data-theme="marketflow"] .rf-page-title {
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    font-weight: 820;
    letter-spacing: -.035em;
}

html[data-theme="marketflow"] .rf-btn {
    border-radius: 10px;
    font-weight: 750;
}

html[data-theme="marketflow"] .rf-btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 72%, #14b8a6));
    box-shadow: 0 12px 26px -18px color-mix(in srgb, var(--brand) 72%, transparent);
}

html[data-theme="marketflow"] .rf-btn-primary:hover:not(:disabled) {
    filter: brightness(1.03);
    transform: translateY(-1px);
    box-shadow: 0 18px 34px -20px color-mix(in srgb, var(--brand) 74%, transparent);
}

html[data-theme="marketflow"] .rf-btn-secondary {
    border-color: var(--mf-border-strong);
    background: var(--color-surface);
}

html[data-theme="marketflow"] .rf-btn-secondary:hover:not(:disabled) {
    background: var(--color-surface-2);
    border-color: color-mix(in srgb, var(--brand) 20%, var(--color-border-strong));
}

html[data-theme="marketflow"] .rf-input,
html[data-theme="marketflow"] .rf-select,
html[data-theme="marketflow"] textarea {
    border-radius: 11px;
    border-color: var(--mf-border-strong);
    background: var(--color-surface-2);
}

html[data-theme="marketflow"] .rf-input:focus,
html[data-theme="marketflow"] .rf-select:focus,
html[data-theme="marketflow"] textarea:focus {
    border-color: color-mix(in srgb, var(--brand) 48%, var(--color-border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 9%, transparent);
}

html[data-theme="marketflow"] .rf-tabs {
    border-radius: 12px;
    background: var(--color-surface-2);
    padding: 4px;
    width: max-content;
    max-width: 100%;
}

html[data-theme="marketflow"] .rf-tab {
    border-radius: 9px;
}

html[data-theme="marketflow"] .rf-tab-active {
    background: var(--color-surface);
    box-shadow: 0 6px 16px -12px rgba(15, 23, 42, .45);
}

html[data-theme="marketflow"] .rf-net-tab {
    border-radius: 10px;
}

html[data-theme="marketflow"] .rf-net-tab-active {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 16%, transparent);
}

/* Dashboard --------------------------------------------------------------- */
html[data-theme="marketflow"] .rf-dash-kpis {
    gap: 12px;
    margin-bottom: 14px;
}

html[data-theme="marketflow"] .rf-dash-kpi {
    position: relative;
    min-height: 94px;
    padding: 17px;
    border-radius: 17px;
    overflow: hidden;
}

html[data-theme="marketflow"] .rf-dash-kpi::after {
    content: "";
    position: absolute;
    inset: auto -30px -40px auto;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--brand) 5%, transparent);
    pointer-events: none;
}

html[data-theme="marketflow"] .rf-dash-kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    box-shadow: 0 10px 22px -15px rgba(15, 23, 42, .5);
}

html[data-theme="marketflow"] .rf-dash-kpi-val {
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: -.025em;
}

html[data-theme="marketflow"] .rf-dash-kpi-label {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .055em;
}

html[data-theme="marketflow"] .rf-dash-row {
    gap: 12px;
    margin-bottom: 12px;
}

html[data-theme="marketflow"] .rf-dash-chart,
html[data-theme="marketflow"] .rf-dash-status,
html[data-theme="marketflow"] .rf-dash-panel {
    border-radius: 18px;
}

html[data-theme="marketflow"] .rf-dash-chart {
    padding: 20px 20px 12px;
}

html[data-theme="marketflow"] .rf-dash-chart-title,
html[data-theme="marketflow"] .rf-dash-status-title,
html[data-theme="marketflow"] .rf-dash-panel-title {
    font-weight: 800;
    letter-spacing: -.01em;
}

html[data-theme="marketflow"] .rf-dash-chart-line {
    stroke-width: 2.6;
}

html[data-theme="marketflow"] .rf-dash-chart-grid {
    opacity: .65;
}

html[data-theme="marketflow"] .rf-dash-panels {
    gap: 12px;
    margin-top: 12px;
}

/* Tables / catalogue ------------------------------------------------------ */
html[data-theme="marketflow"] .rf-table {
    border-collapse: separate;
    border-spacing: 0;
}

html[data-theme="marketflow"] .rf-table thead th {
    background: var(--color-surface-2);
    color: var(--color-text-subtle);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

html[data-theme="marketflow"] .rf-table tbody tr {
    transition: background-color .14s ease;
}

html[data-theme="marketflow"] .rf-table tbody tr:hover {
    background: color-mix(in srgb, var(--brand) 3%, var(--color-surface));
}

html[data-theme="marketflow"] .rf-table td,
html[data-theme="marketflow"] .rf-table th {
    border-color: var(--mf-border);
}

html[data-theme="marketflow"] .rf-chip,
html[data-theme="marketflow"] .rf-badge {
    border-radius: 999px;
}

/* Menus, dialogs and footer ---------------------------------------------- */
html[data-theme="marketflow"] .rf-menu-item {
    border-radius: 9px;
}

html[data-theme="marketflow"] [role="dialog"] > div,
html[data-theme="marketflow"] .modal-content {
    border-radius: 18px;
    border-color: var(--mf-border);
    box-shadow: var(--shadow-4);
}

html[data-theme="marketflow"] footer {
    margin-top: 24px;
    border-radius: 14px;
}

/* Mobile quick dock ------------------------------------------------------- */
.mf-mobile-dock {
    display: none;
}

@media (max-width: 1180px) {
    .mf-dashboard-hero {
        grid-template-columns: 1fr;
    }

    .mf-dashboard-actions {
        max-width: none;
    }
}

@media (max-width: 991px) {
    html[data-theme="marketflow"] .rf-cside {
        width: min(86vw, 290px);
    }

    html[data-theme="marketflow"] .rf-ctopbar {
        padding-inline: 14px;
    }

    html[data-theme="marketflow"] .rf-cside + div > main {
        padding: 20px 16px 94px;
    }

    .mf-dashboard-hero {
        padding: 22px;
        border-radius: 20px;
    }

    .mf-mobile-dock {
        position: fixed;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        align-items: end;
        left: 12px;
        right: 12px;
        bottom: max(10px, env(safe-area-inset-bottom));
        z-index: 55;
        min-height: 64px;
        padding: 6px 8px;
        border: 1px solid var(--mf-border);
        border-radius: 18px;
        background: color-mix(in srgb, var(--color-surface) 92%, transparent);
        box-shadow: 0 18px 48px -20px rgba(15, 23, 42, .42);
        backdrop-filter: blur(18px) saturate(1.15);
        -webkit-backdrop-filter: blur(18px) saturate(1.15);
    }

    html.dark[data-theme="marketflow"] .mf-mobile-dock {
        box-shadow: 0 20px 52px -20px rgba(0, 0, 0, .8);
    }

    .mf-mobile-dock-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-width: 0;
        min-height: 50px;
        border-radius: 12px;
        color: var(--color-text-subtle);
        text-decoration: none;
        font-size: 9px;
        font-weight: 750;
    }

    .mf-mobile-dock-item > svg {
        width: 18px;
        height: 18px;
    }

    .mf-mobile-dock-item.is-active {
        color: var(--brand);
        background: color-mix(in srgb, var(--brand) 8%, transparent);
    }

    .mf-mobile-dock-main {
        position: relative;
        color: var(--color-text-muted);
    }

    .mf-mobile-main-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        margin-top: -19px;
        border: 4px solid var(--color-surface);
        border-radius: 50%;
        background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 68%, #14b8a6));
        color: #ffffff;
        box-shadow: 0 12px 28px -14px color-mix(in srgb, var(--brand) 72%, transparent);
    }

    .mf-mobile-main-icon svg {
        width: 19px;
        height: 19px;
    }

    .mf-mobile-dock-main.is-active .mf-mobile-main-icon {
        box-shadow: 0 12px 32px -10px color-mix(in srgb, var(--brand) 82%, transparent);
    }
}

@media (max-width: 720px) {
    html[data-theme="marketflow"] .rf-ctopbar {
        height: 58px;
        gap: 6px;
    }

    html[data-theme="marketflow"] .rf-cbalance {
        height: 36px;
        padding-inline-start: 9px;
        gap: 5px;
    }

    html[data-theme="marketflow"] .rf-cbalance .rf-btn {
        width: 27px !important;
        height: 27px !important;
    }

    .mf-dashboard-hero {
        padding: 20px;
    }

    .mf-dashboard-copy h2 {
        font-size: clamp(1.55rem, 8vw, 2.1rem);
    }

    .mf-action-grid {
        grid-template-columns: 1fr;
    }

    .mf-action-card {
        min-height: 60px;
    }

    html[data-theme="marketflow"] .rf-dash-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[data-theme="marketflow"] .rf-dash-kpi {
        min-height: 88px;
        padding: 14px;
        gap: 10px;
    }

    html[data-theme="marketflow"] .rf-dash-kpi-icon {
        width: 40px;
        height: 40px;
        border-radius: 11px;
    }

    html[data-theme="marketflow"] .rf-dash-kpi-val {
        font-size: 1.15rem;
    }

    html[data-theme="marketflow"] .rf-net-row {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(92px, 108px);
        grid-template-columns: none;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: inline proximity;
        padding: 2px 1px 8px;
        scrollbar-width: none;
    }

    html[data-theme="marketflow"] .rf-net-row::-webkit-scrollbar {
        display: none;
    }

    html[data-theme="marketflow"] .rf-net-tile {
        min-height: 72px;
        scroll-snap-align: start;
    }
}

@media (max-width: 480px) {
    html[data-theme="marketflow"] .rf-cside + div > main {
        padding-inline: 12px;
    }

    .mf-dashboard-hero {
        margin-inline: -2px;
        padding: 18px;
        border-radius: 18px;
    }

    .mf-eyebrow {
        font-size: 9.5px;
    }

    .mf-dashboard-copy p {
        font-size: 12.5px;
    }

    .mf-hero-ctas {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .mf-hero-primary,
    .mf-hero-secondary {
        width: 100%;
        padding-inline: 9px;
        font-size: 11.5px;
    }

    .mf-social-proof {
        gap: 7px 10px;
        font-size: 10px;
    }

    html[data-theme="marketflow"] .rf-dash-kpis {
        gap: 8px;
    }

    html[data-theme="marketflow"] .rf-dash-kpi {
        align-items: flex-start;
        flex-direction: column;
        min-height: 116px;
    }

    .mf-mobile-dock {
        left: 8px;
        right: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html[data-theme="marketflow"] *,
    html[data-theme="marketflow"] *::before,
    html[data-theme="marketflow"] *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
