/* PropFlow — UI v3 (cohérent avec pro.css, surfaces teintées) */

/* Fond global — mesh indigo doux, pas de blanc */
body,
.app-container {
    background-color: var(--pro-bg-base, var(--pro-bg)) !important;
    background-image:
        radial-gradient(ellipse 100% 55% at 50% -12%, rgba(99, 102, 241, 0.22), transparent 52%),
        radial-gradient(ellipse 45% 38% at 100% 15%, rgba(124, 58, 237, 0.12), transparent 48%),
        radial-gradient(ellipse 40% 32% at 0% 85%, rgba(99, 102, 241, 0.1), transparent 50%) !important;
    background-attachment: fixed !important;
}

/* #region propflow:chrome-header */
/* —— Chrome (header, nav) —— */
:root {
    --pro-header-pad-y: 0px;
    --pro-header-pad-x: 0px;
    --pro-header-inner-min: 0;
    --pro-header-title-fs: 1.0625rem;
    --pro-header-mark: 22px;
    --pro-header-safe-top: env(safe-area-inset-top, 0px);
    --pro-header-chrome-pad-bottom: 0px;
    --pro-header-inner-pad-y: 0px;
    --pro-dock-height: 60px;
    --pro-dock-fab-offset: 60px;
    --pro-dock-icon: 28px;
    /* Gouttière pages : un peu d’air sans réduire trop la largeur utile */
    --pro-page-gutter: 14px;
    /* Header : dégradé diagonal blanc → violet doux, dans les tons de l'accent de l'app */
    --pro-header-bg: linear-gradient(
        135deg,
        #ffffff 0%,
        color-mix(in srgb, var(--pro-accent) 12%, white) 50%,
        color-mix(in srgb, var(--pro-accent) 28%, white) 100%
    );
    --pro-header-border: color-mix(in srgb, var(--pro-accent) 24%, var(--pro-border-subtle));
    --pro-header-shadow: 0 4px 20px color-mix(in srgb, var(--pro-accent) 16%, transparent);
}

.app-top-chrome {
    background: var(--pro-surface-elevated, #fff) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    width: 100% !important;
    max-width: none !important;
    flex-shrink: 0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
}

.app-top-chrome .header-content:not(.app-header-toolbar-wrap) {
    justify-content: stretch !important;
    align-items: stretch !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
    width: 100% !important;
}

.app-top-chrome .header,
.app-top-chrome .header.mobile-only,
.app-top-chrome .app-header-unified {
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    position: static !important;
    top: auto !important;
}

.app-top-chrome .header.mobile-only::after,
.app-top-chrome .header.mobile-only::before,
.app-top-chrome .app-header-unified::after {
    display: none !important;
}

.app-header-brand {
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
}

.app-header-mark {
    display: none !important;
}

.header-text {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    text-align: left !important;
    gap: 0 !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    line-height: 1 !important;
}

.app-top-chrome .header h1,
.app-top-chrome #headerTitle,
.app-top-chrome .propflow-brand-title,
.pc-header-modern .propflow-brand-title,
.pc-header-modern .pc-brand-text h1 {
    font-size: var(--pro-header-title-fs) !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
    color: var(--pro-text) !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    text-shadow: none !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    max-width: 100% !important;
}

.app-header-tagline {
    display: none !important;
}

.pc-header-modern {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    width: 100% !important;
    background: var(--pro-header-bg, var(--pro-surface-elevated, #fff)) !important;
    backdrop-filter: blur(18px) saturate(1.15) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.15) !important;
    border-bottom: 1px solid var(--pro-header-border, var(--pro-border-subtle, rgba(55, 48, 107, 0.1))) !important;
    box-shadow: var(--pro-header-shadow, 0 4px 20px rgba(55, 48, 107, 0.06)) !important;
    padding: 0 !important;
}

.pc-header-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    min-height: 0 !important;
    max-height: none !important;
    width: 100% !important;
    max-width: 920px !important;
    margin: 0 auto !important;
    padding: 12px max(var(--pro-space-page, 16px), env(safe-area-inset-right)) 12px max(var(--pro-space-page, 16px), env(safe-area-inset-left)) !important;
    box-sizing: border-box !important;
}

.pc-header-brand {
    flex: 1 1 auto;
    min-width: 0;
}

.pc-brand-text {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    min-width: 0;
    line-height: 1 !important;
}

.pc-brand-text h1 {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.pc-brand-tagline {
    display: none !important;
}

.pc-nav-modern {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0;
}

.pc-nav-item {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 5px 10px !important;
    min-height: 0 !important;
    border: none !important;
    font-size: var(--pro-fs-base) !important;
    line-height: 1.2 !important;
}

.pc-nav-icon svg {
    width: 18px !important;
    height: 18px !important;
}

.pc-nav-label {
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
}

.pc-header-modern .pc-brand-text h1 {
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
    color: var(--pro-text) !important;
}

.pc-nav-item.active {
    background: var(--pro-accent-muted) !important;
    color: var(--pro-accent) !important;
    border-radius: var(--pro-radius-sm) !important;
    box-shadow: none !important;
}

/* #region propflow:brand-branch */
/* —— Marque PropFlow · branche (Micro / Portage / Total) —— */
.propflow-brand-line .propflow-brand-title,
.propflow-brand-title {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.propflow-brand-root {
    font-weight: 700 !important;
    color: var(--pro-text) !important;
    letter-spacing: -0.03em !important;
}

.propflow-brand-sep {
    margin: 0 0.32em !important;
    color: var(--pro-text-muted) !important;
    font-weight: 400 !important;
    user-select: none !important;
}

.propflow-brand-sep::before {
    content: '\00B7';
}

.propflow-branch-trigger {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    font: inherit !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
    color: var(--pro-text) !important;
    line-height: 1 !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    vertical-align: top !important;
    max-width: 100%;
    min-width: 0;
}

.propflow-context-label {
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    min-width: 0;
    word-break: break-word;
}

@media (max-width: 1023px) {
    .app-top-chrome .propflow-brand-title {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .app-top-chrome .propflow-brand-line,
    .app-top-chrome .header-text {
        width: 100% !important;
        max-width: none !important;
    }

    .app-top-chrome {
        background: var(--pro-header-bg, var(--pro-surface-elevated, #fff)) !important;
        border-bottom: 1px solid var(--pro-header-border, var(--pro-border-subtle, rgba(55, 48, 107, 0.1))) !important;
        box-shadow: var(--pro-header-shadow, 0 4px 20px rgba(55, 48, 107, 0.06)) !important;
    }

    .app-top-chrome .propflow-branch-trigger {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: auto !important;
        flex: 0 1 auto !important;
        max-width: calc(100% - 46px) !important;
        min-width: 0 !important;
        min-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        font-size: var(--pro-header-title-fs) !important;
        font-weight: 600 !important;
        color: var(--pro-text) !important;
        gap: 6px !important;
        text-align: left !important;
        position: relative !important;
        transition: color 0.15s ease !important;
    }

    .app-top-chrome .propflow-branch-trigger.sheet-filter-trigger--active {
        background: transparent !important;
    }

    .app-top-chrome .propflow-context-label {
        flex: 0 1 auto !important;
        min-width: 0 !important;
        padding-left: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        line-height: 1.25 !important;
        letter-spacing: -0.02em !important;
    }

    body[data-account="both"] .app-top-chrome .propflow-context-label {
        flex: 0 0 auto !important;
    }

    .app-top-chrome .propflow-branch-trigger .sheet-filter-trigger__icon {
        width: 26px !important;
        height: 26px !important;
        padding: 5px !important;
        border-radius: 50% !important;
        background: var(--pro-surface-muted, #f3f2f7) !important;
        opacity: 1 !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
        align-self: center !important;
        color: var(--pro-text-muted) !important;
        box-sizing: border-box !important;
    }

    .app-top-chrome .propflow-branch-trigger.sheet-filter-trigger--active .sheet-filter-trigger__icon {
        background: var(--pro-accent-muted) !important;
        color: var(--pro-accent) !important;
    }

    .app-top-chrome .propflow-branch-trigger:active {
        filter: brightness(0.98);
        transform: none !important;
    }

    .app-top-chrome .app-header-toolbar-wrap .header-content {
        display: flex !important;
        align-items: stretch !important;
        padding: 8px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)) !important;
    }

    .app-top-chrome .app-header-toolbar {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .app-top-chrome .app-header-toolbar .app-menu-trigger {
        flex-shrink: 0 !important;
    }

    .app-top-chrome .app-header-toolbar .app-header-brand {
        display: block !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        width: auto !important;
        overflow: hidden !important;
    }

    .app-top-chrome .app-header-toolbar .perf-badges-trigger--header {
        flex-shrink: 0 !important;
    }

    .app-top-chrome .propflow-brand-title,
    .app-top-chrome .propflow-brand-line,
    .app-top-chrome .header-text,
    .app-top-chrome .app-header-brand,
    .app-top-chrome .header.app-header-unified {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
        line-height: 1 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    html.is-webview .app-top-chrome .app-header-toolbar-wrap .header-content {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    html:not(.is-webview) .app-top-chrome .app-header-toolbar-wrap .header-content {
        padding-top: max(8px, env(safe-area-inset-top, 0px)) !important;
    }
}

@media (min-width: 1024px) {
    .pc-header-modern .propflow-branch-trigger {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
        min-height: 44px !important;
        padding: 8px 14px !important;
        border: 1px solid var(--pro-border-subtle, rgba(55, 48, 107, 0.12)) !important;
        border-radius: 12px !important;
        background: var(--pro-surface-muted, #f3f2f7) !important;
        box-shadow: none !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        transition: border-color 0.15s ease, background 0.15s ease !important;
    }

    .pc-header-modern .propflow-branch-trigger:hover {
        border-color: var(--pro-accent-ring) !important;
        background: var(--pro-surface-elevated) !important;
    }

    .pc-header-modern .propflow-branch-trigger.sheet-filter-trigger--active {
        border-color: var(--pro-accent-ring) !important;
        background: var(--pro-accent-muted) !important;
    }

    .pc-header-modern .propflow-branch-trigger .sheet-filter-trigger__icon {
        width: 16px !important;
        height: 16px !important;
        opacity: 0.55;
    }
}

html[data-theme="dark"] .app-top-chrome {
    background: var(--pro-surface-elevated) !important;
}

html[data-theme="dark"] .app-top-chrome .propflow-branch-trigger {
    background: transparent !important;
}

html[data-theme="dark"] .app-top-chrome .propflow-branch-trigger.sheet-filter-trigger--active {
    background: transparent !important;
}

html[data-theme="dark"] .app-top-chrome .propflow-branch-trigger .sheet-filter-trigger__icon {
    background: var(--pro-surface-muted) !important;
}

html[data-theme="dark"] .pc-header-modern .propflow-branch-trigger {
    background: var(--pro-surface-muted) !important;
    border-color: var(--pro-border) !important;
}

.account-context-modal {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-context-section__title {
    margin: 8px 0 4px;
    padding: 0 2px;
    font-size: var(--pro-fs-sm);
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pro-text-muted);
}

.account-context-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 4px;
    padding: 0 2px;
}

.account-context-modal__head .account-context-section__title {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.account-context-modal__close {
    flex-shrink: 0;
    margin: 0 !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 1rem !important;
    border-width: 1px !important;
    opacity: 0.72;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.account-context-modal__close:hover,
.account-context-modal__close:focus-visible {
    opacity: 1;
}

.account-context-section__title:first-child {
    margin-top: 0;
}

.account-context-year-list {
    margin-top: 0;
}

.modal-content--context .account-branch-list--checks {
    margin-bottom: 4px;
}

.modal-content--context .modal-body {
    padding-top: 12px !important;
}

.account-context-modal__footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 8px !important;
}

.account-context-settings-link {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    font-size: var(--pro-fs-sm);
    font-weight: 500;
    line-height: 1.35;
    color: var(--pro-text-muted);
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.account-context-settings-link:hover,
.account-context-settings-link:focus-visible {
    color: var(--pro-control);
    outline: none;
}

.account-context-settings-link:focus-visible {
    outline: 2px solid var(--pro-control-ring);
    outline-offset: 2px;
    border-radius: 4px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.propflow-context-trigger {
    max-width: 100%;
}

.sheet-filter-trigger__icon {
    flex-shrink: 0;
    width: 0.85em;
    height: 0.85em;
    color: var(--pro-text-muted);
    opacity: 0.72;
    transform: translateY(0.5px);
    transition: color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.sheet-filter-trigger[aria-expanded="true"] .sheet-filter-trigger__icon {
    transform: translateY(0.5px) rotate(180deg);
}

.sheet-filter-trigger--active .sheet-filter-trigger__icon {
    color: var(--pro-control);
    opacity: 1;
}

body[data-account="micro"] .propflow-branch-trigger.sheet-filter-trigger--active .sheet-filter-trigger__icon {
    color: var(--pro-accent);
}

body[data-account="portage"] .propflow-branch-trigger.sheet-filter-trigger--active .sheet-filter-trigger__icon {
    color: #0d9488;
}

.propflow-branch-trigger:hover .sheet-filter-trigger__icon,
.propflow-branch-trigger:focus-visible .sheet-filter-trigger__icon,
.stats-year-filter-trigger:hover .sheet-filter-trigger__icon,
.stats-year-filter-trigger:focus-visible .sheet-filter-trigger__icon,
.reports-view-trigger:hover .sheet-filter-trigger__icon,
.reports-view-trigger:focus-visible .sheet-filter-trigger__icon,
.propfirm-sort-trigger:hover .sheet-filter-trigger__icon,
.propfirm-sort-trigger:focus-visible .sheet-filter-trigger__icon {
    opacity: 1;
}

.propflow-branch-trigger:hover:not(.sheet-filter-trigger--active) .sheet-filter-trigger__icon,
.stats-year-filter-trigger:hover:not(.sheet-filter-trigger--active) .sheet-filter-trigger__icon,
.reports-view-trigger:hover:not(.sheet-filter-trigger--active) .sheet-filter-trigger__icon,
.propfirm-sort-trigger:hover:not(.sheet-filter-trigger--active) .sheet-filter-trigger__icon {
    color: var(--pro-text);
}

.propflow-branch-trigger:focus-visible {
    outline: 2px solid var(--pro-accent-ring) !important;
    outline-offset: 2px !important;
}

body[data-account="micro"] .propflow-context-label,
body[data-account="micro"] .propflow-branch-name {
    color: var(--pro-accent) !important;
}

body[data-account="portage"] .propflow-context-label,
body[data-account="portage"] .propflow-branch-name {
    color: #0d9488 !important;
}

body[data-account="both"] .propflow-context-label,
body[data-account="both"] .propflow-branch-name {
    color: #7c3aed !important;
}

.account-branch-list--checks {
    gap: 8px;
}

.account-branch-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--pro-border);
    border-radius: 12px;
    background: var(--pro-surface);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.account-branch-check:hover {
    background: var(--pro-surface-elevated, var(--pro-surface));
}

.account-branch-check[data-branch="micro"]:hover:not(.account-branch-check--selected) {
    border-color: var(--pro-accent-ring);
}

.account-branch-check[data-branch="portage"]:hover:not(.account-branch-check--selected) {
    border-color: rgba(13, 148, 136, 0.35);
}

.account-branch-check[data-branch="micro"].account-branch-check--selected,
.account-branch-check[data-branch="micro"]:has(.account-branch-check__input:checked) {
    border-color: var(--pro-accent-ring);
    background: var(--pro-accent-muted);
    box-shadow: 0 1px 4px var(--pro-chrome-violet-glow);
}

.account-branch-check[data-branch="portage"].account-branch-check--selected,
.account-branch-check[data-branch="portage"]:has(.account-branch-check__input:checked) {
    border-color: rgba(13, 148, 136, 0.45);
    background: rgba(13, 148, 136, 0.12);
    box-shadow: 0 1px 4px rgba(13, 148, 136, 0.18);
}

.account-branch-check[data-branch="micro"].account-branch-check--selected .account-branch-option__name,
.account-branch-check[data-branch="micro"]:has(.account-branch-check__input:checked) .account-branch-option__name {
    color: var(--pro-accent);
}

.account-branch-check[data-branch="portage"].account-branch-check--selected .account-branch-option__name,
.account-branch-check[data-branch="portage"]:has(.account-branch-check__input:checked) .account-branch-option__name {
    color: #0d9488;
}

.account-branch-check__input {
    position: absolute;
    opacity: 0;
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
}

.account-branch-check__box {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border: 2px solid var(--pro-border);
    border-radius: 6px;
    background: var(--pro-surface);
    position: relative;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.account-branch-check__input:checked + .account-branch-check__box {
    border-color: var(--pro-accent);
    background: var(--pro-accent);
}

.account-branch-check[data-branch="portage"] .account-branch-check__input:checked + .account-branch-check__box {
    border-color: #0d9488;
    background: #0d9488;
}

.account-branch-check__input:checked + .account-branch-check__box::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.account-branch-check__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.account-branch-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--pro-border);
}

.modal-content--branch .account-branch-modal__footer .submit-btn {
    min-width: 112px;
}

/* Couleurs header contexte (compte appliqué) — pas les cases de la modale */

@media (max-width: 768px) {
    .propflow-brand-line .propflow-brand-title,
    .propflow-brand-title {
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
        line-height: 1 !important;
    }

    .propflow-brand-sep {
        display: inline !important;
    }

    .propflow-branch-trigger {
        display: inline !important;
        margin-top: 0 !important;
        line-height: inherit !important;
    }

    .propflow-branch-name {
        font-size: 1em !important;
        font-weight: 600 !important;
    }
}

.account-switcher,
.account-switcher--header,
.account-switcher--pc,
.account-switcher-bar {
    display: none !important;
}

.modal-content--branch {
    max-width: 360px !important;
}

.account-branch-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 0 !important;
}

.account-branch-option {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
    width: 100% !important;
    padding: 12px 14px !important;
    border: none !important;
    border-radius: var(--pro-radius-sm) !important;
    background: color-mix(in srgb, var(--pro-accent) 4%, var(--pro-surface-muted)) !important;
    color: var(--pro-text) !important;
    text-align: left !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: background var(--pro-duration) var(--pro-ease) !important;
}

.account-branch-option:hover {
    border-color: transparent !important;
    background: color-mix(in srgb, var(--pro-accent) 10%, var(--pro-surface-muted)) !important;
}

.account-branch-option.active {
    border-color: transparent !important;
    background: var(--pro-accent-muted) !important;
    box-shadow: none !important;
}

.account-branch-option.active .account-branch-option__name {
    color: var(--pro-accent) !important;
}

.account-branch-option.active .account-branch-option__desc {
    color: color-mix(in srgb, var(--pro-accent) 50%, var(--pro-text-muted)) !important;
}

.account-branch-option__name {
    font-size: var(--pro-fs-sm) !important;
    font-weight: 700 !important;
}

.account-branch-option__desc {
    font-size: var(--pro-fs-xs) !important;
    color: var(--pro-text-muted) !important;
}

body[data-account="micro"] .account-branch-option[data-account-branch="micro"] .account-branch-option__name {
    color: var(--pro-accent) !important;
}

body[data-account="portage"] .account-branch-option[data-account-branch="portage"] .account-branch-option__name {
    color: #0d9488 !important;
}

body[data-account="both"] .account-branch-option[data-account-branch="both"] .account-branch-option__name {
    color: #7c3aed !important;
}

/* —— Sélecteur compte (legacy, masqué) —— */
.account-switcher-bar {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 10px var(--pro-space-page) 6px !important;
}

.account-switcher,
.account-switcher--header,
.account-switcher--pc {
    background: var(--pro-glass) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid var(--pro-glass-border) !important;
    border-radius: var(--pro-radius) !important;
    padding: 4px !important;
    box-shadow: var(--pro-shadow-sm) !important;
}

.account-switcher-btn.active {
    background: var(--pro-surface-elevated) !important;
    box-shadow: 0 2px 8px var(--pro-chrome-violet-glow) !important;
    color: var(--pro-accent) !important;
    border: 1px solid var(--pro-accent-ring) !important;
}

body[data-account="micro"] .account-switcher-bar,
body[data-account="portage"] .account-switcher-bar,
body[data-account="both"] .account-switcher-bar {
    box-shadow: none !important;
}

/* #region propflow:navigation-dock */
/* —— Navigation —— */
.nav.nav-dock {
    position: fixed !important;
    z-index: 10040 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
}

/* Clavier (champ focus) uniquement — pas la barre d’URL du navigateur */
.nav.nav-dock.nav-dock--keyboard-hidden,
html.is-mobile-shell body > .nav.nav-dock.nav-dock--keyboard-hidden,
html.is-browser-shell.is-mobile-shell body > .nav.nav-dock.nav-dock--keyboard-hidden,
body > .nav.nav-dock.nav-dock--keyboard-hidden {
    transform: translateY(110%) !important;
    -webkit-transform: translateY(110%) !important;
    pointer-events: none !important;
}

html.is-browser-shell.is-mobile-shell body > .nav.nav-dock,
html.is-mobile-shell body > .nav.nav-dock,
body > .nav.nav-dock {
    z-index: 10040 !important;
}

/* Tip long-press dock (icônes seules) */
.dock-tab-tip {
    position: fixed;
    z-index: 10070;
    left: 0;
    top: 0;
    max-width: min(72vw, 220px);
    padding: 7px 11px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--pro-text, #111827) 92%, transparent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, calc(-100% - 10px)) scale(0.96);
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.dock-tab-tip.is-visible {
    opacity: 1;
    transform: translate(-50%, calc(-100% - 10px)) scale(1);
}

html[data-theme="dark"] .dock-tab-tip {
    background: color-mix(in srgb, #f8fafc 94%, transparent);
    color: #111827;
}

.nav {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    border-radius: var(--pro-radius-xl) !important;
    border: 1px solid var(--pro-glass-border) !important;
    background: var(--pro-glass-strong) !important;
    backdrop-filter: blur(24px) saturate(1.25) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.25) !important;
    box-shadow: var(--pro-shadow-float) !important;
    padding: 5px 6px !important;
}

.nav-tabs {
    max-width: none !important;
}

.nav-tab {
    border-radius: 14px !important;
    color: var(--pro-text-muted) !important;
    transition: transform 0.2s var(--pro-ease), background 0.2s var(--pro-ease), color 0.2s var(--pro-ease) !important;
}

.nav-tab.active {
    background: color-mix(in srgb, var(--pro-accent) 14%, transparent) !important;
    color: var(--pro-accent) !important;
    box-shadow: none !important;
}

.nav-tab.active .nav-text {
    color: var(--pro-accent) !important;
    font-weight: 650 !important;
}

.nav-tab.active .nav-icon svg,
.nav-tabs--dock .nav-tab.active .nav-tab__svg {
    stroke: var(--pro-accent) !important;
    opacity: 1 !important;
}

/* Dock bas : SVG direct (plus de boîte .nav-icon 44×44) */
.nav-tabs--dock {
    gap: 2px !important;
    align-items: center !important;
    padding: 0 !important;
}

.nav-tabs--dock .nav-tab {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    min-height: 52px !important;
    padding: 6px 4px !important;
    transform: none !important;
}

.nav-tabs--dock .nav-tab.active {
    transform: none !important;
}

.nav-tabs--dock .nav-tab__svg {
    width: var(--pro-dock-icon, 24px) !important;
    height: var(--pro-dock-icon, 24px) !important;
    min-width: var(--pro-dock-icon, 24px) !important;
    min-height: var(--pro-dock-icon, 24px) !important;
    flex-shrink: 0 !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2 !important;
    opacity: 0.9 !important;
    transform: none !important;
}

.nav-tabs--dock .nav-tab.active .nav-tab__svg {
    stroke-width: 2.25 !important;
    opacity: 1 !important;
    stroke: var(--pro-accent) !important;
}

.nav-tabs--dock .nav-text {
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 0.75rem !important;
    line-height: 1.1 !important;
    margin: 0 !important;
}

/* Ancien wrapper : neutre si encore présent quelque part */
.nav-tabs--dock .nav-icon {
    display: contents !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

.content {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)) !important;
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* #region propflow:cards */
/* —— Cartes —— */
.enhanced-card,
.overview-master-card,
.card,
.simple-history-card,
.revolut-transaction-group {
    background: linear-gradient(
        165deg,
        var(--pro-surface-elevated) 0%,
        var(--pro-surface-card, var(--pro-surface)) 100%
    ) !important;
    border: none !important;
    border-radius: var(--pro-radius-lg) !important;
    box-shadow: var(--pro-shadow-card) !important;
    margin-bottom: 16px !important;
}

.enhanced-card:hover,
.overview-master-card:hover,
.simple-history-card:hover {
    box-shadow: var(--pro-shadow) !important;
    border-color: transparent !important;
}

.card-title {
    font-size: var(--pro-fs-md) !important;
    font-weight: 650 !important;
    letter-spacing: -0.02em !important;
    color: var(--pro-text) !important;
}

.page-block-title,
.stats-page-title {
    margin: 0 0 14px !important;
    padding: 0 !important;
    font-size: var(--pro-fs-page-title, 1.375rem) !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
    line-height: 1.2 !important;
    color: var(--pro-text) !important;
}

.page-title-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin: 0 0 14px;
    padding: 0;
}

.page-title-row.stats-page-head {
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 0;
    font-size: var(--pro-fs-filter-row, var(--pro-fs-page-title, 1.375rem));
    line-height: 1.2;
    display: none;
}

/* Filtres & sélecteurs — même échelle sur chaque ligne (titre page, historique, métrique firms) */
.history-page-head,
.propfirm-section-head {
    font-size: var(--pro-fs-filter-row, var(--pro-fs-page-title, 1.375rem));
    line-height: 1.2;
}

.history-page-head {
    display: none;
}

.stats-year-filter-trigger__value,
.reports-view-trigger__value,
.reports-firm-trigger__value,
.propfirm-section-metric__label,
.page#history .history-page-head .history-month-trigger,
.page#history .history-page-head .history-month-trigger__value,
.page#history .history-page-head .history-month-total {
    font-size: inherit;
    line-height: inherit;
}

.page-title-row .stats-page-title {
    margin: 0 !important;
    flex: 0 0 auto;
    min-width: 0;
    font-size: inherit !important;
}

.propfirm-rankings-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
    padding: 0 2px;
}

.propfirm-rankings-head__main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.propfirm-rankings-head__title {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--pro-text, #111827);
}

.propfirm-group-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    max-width: 100%;
}

.propfirm-group-inline .reports-view-inline__opt {
    font-size: 0.75rem;
}

.propfirm-bagels-trigger {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 6px 10px;
    border: 1px solid color-mix(in srgb, var(--pro-border, #d4d0db) 80%, transparent);
    border-radius: 999px;
    background: var(--pro-surface-elevated, #f0eef5);
    color: var(--pro-text, #111827);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.propfirm-bagels-trigger[hidden] {
    display: none !important;
}

.propfirm-bagels-trigger__icon {
    flex: 0 0 auto;
    color: var(--pro-accent);
    opacity: 0.9;
}

.propfirm-bagels-trigger__label {
    white-space: nowrap;
}

.propfirm-bagels-trigger:hover,
.propfirm-bagels-trigger:focus-visible {
    border-color: color-mix(in srgb, var(--pro-accent) 45%, var(--pro-border, #d4d0db));
    color: var(--pro-accent);
    background: color-mix(in srgb, var(--pro-accent) 8%, var(--pro-surface-elevated, #f0eef5));
    outline: none;
}

.propfirm-bagels-trigger:focus-visible {
    outline: 2px solid var(--pro-control-ring, var(--pro-accent));
    outline-offset: 2px;
}

.stats-page-head__filters,
.reports-section-head__filters {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0;
    min-width: 0;
}

.reports-view-inline {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0.2rem 0.85rem;
    width: 100%;
    margin: 0 0 14px;
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.reports-view-inline::-webkit-scrollbar {
    display: none;
}

.reports-view-inline__opt {
    flex: 0 0 auto;
    margin: 0;
    padding: 2px 0;
    border: none;
    background: none;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--pro-text-muted, #6b7280);
    cursor: pointer;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    border-radius: 4px;
}

.reports-view-inline__opt:hover {
    color: var(--pro-text, #111827);
}

.reports-view-inline__opt:focus-visible {
    outline: 2px solid var(--pro-control-ring, var(--pro-accent));
    outline-offset: 2px;
}

.reports-view-inline__opt.is-active {
    color: var(--pro-accent);
    font-weight: 700;
}

.reports-view-inline--timeline {
    margin-bottom: 0;
}

/* Bilan mensuel : les catégories sont réparties sur toute la largeur (segmented control),
   plus lisible qu'une liste de libellés tassés à gauche. */
#reportsViewInlineBilan {
    gap: 2px;
    padding: 3px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--pro-border-subtle, #e5e7eb) 55%, transparent);
    overflow: visible;
}

#reportsViewInlineBilan .reports-view-inline__opt {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 7px 4px;
    border-radius: 7px;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.12s ease, color 0.12s ease;
}

#reportsViewInlineBilan .reports-view-inline__opt.is-active {
    background: var(--pro-surface, #fff);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.page-title-row.stats-page-head .stats-year-filter-trigger,
.page-title-row.stats-page-head .reports-view-trigger,
.page-title-row.stats-page-head .reports-firm-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    margin-left: 0.35em;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    font-size: inherit;
    font-weight: 600;
    line-height: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    border-radius: 4px;
    vertical-align: baseline;
    white-space: nowrap;
}

.page-title-row.stats-page-head .sheet-filter-trigger__icon {
    width: 0.85em;
    height: 0.85em;
}

.stats-year-filter-trigger__value,
.reports-view-trigger__value,
.reports-firm-trigger__value {
    font-weight: 600;
    color: var(--pro-control);
    white-space: nowrap;
}

.stats-year-filter-trigger:focus-visible,
.reports-view-trigger:focus-visible,
.reports-firm-trigger:focus-visible,
.propfirm-sort-trigger:focus-visible {
    outline: 2px solid var(--pro-control-ring);
    outline-offset: 2px;
}

.propfirm-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
    padding: 0;
}

.propfirm-section-metric {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
}

.propfirm-section-metric__label {
    font-weight: 600;
    color: var(--pro-control);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.propfirm-section-head .propfirm-pie-icon-btn {
    flex-shrink: 0;
    margin: 0;
}

.propfirm-section-head .propfirm-sort-filter {
    flex-shrink: 0;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    gap: 0;
}

/* #region propflow:perf-badges */
/* —— Trophée badges perf (couleur = niveau ROI, année Stats) —— */
.perf-badges-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    gap: 0;
    border: 1px solid rgba(100, 116, 139, 0.35);
    border-radius: 11px;
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.perf-badges-trigger--with-roi {
    width: auto;
    min-width: 38px;
    padding: 0 9px 0 7px;
    gap: 5px;
}

.perf-badges-trigger__roi {
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.perf-badges-trigger__roi[hidden] {
    display: none !important;
}

.perf-badges-trigger__icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
}

.perf-badges-trigger__ring-glow,
.perf-badges-trigger__ring-track,
.perf-badges-trigger__ring-progress,
.perf-badges-trigger__ring-cap {
    display: none;
    pointer-events: none;
}

.perf-badges-trigger__trophy {
    position: relative;
    z-index: 1;
    display: block;
}

.perf-badges-trigger__stats {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1px;
    width: max-content;
    min-width: 0;
}

.perf-badges-trigger__goal {
    font-size: 0.5rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    min-width: 0;
    padding-top: 1px;
    border-top: 1px solid currentColor;
    opacity: 0.52;
    text-align: center;
}

.perf-badges-trigger__goal[hidden] {
    display: none !important;
}

.perf-badges-trigger svg {
    display: block;
}

.perf-badges-trigger:hover {
    transform: translateY(-1px);
}

.perf-badges-trigger:active {
    transform: scale(0.96);
}

.perf-badges-trigger:focus-visible {
    outline: 2px solid var(--pro-accent-ring);
    outline-offset: 2px;
}

.perf-badges-trigger--poor {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.35);
}

.perf-badges-trigger--poor:hover {
    background: rgba(220, 38, 38, 0.18);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.22);
}

.perf-badges-trigger--toImprove {
    color: #ea580c;
    background: rgba(234, 88, 12, 0.12);
    border-color: rgba(234, 88, 12, 0.35);
}

.perf-badges-trigger--toImprove:hover {
    background: rgba(234, 88, 12, 0.18);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.22);
}

.perf-badges-trigger--good {
    color: #ca8a04;
    background: rgba(202, 138, 4, 0.14);
    border-color: rgba(202, 138, 4, 0.38);
}

.perf-badges-trigger--good:hover {
    background: rgba(202, 138, 4, 0.2);
    box-shadow: 0 4px 12px rgba(202, 138, 4, 0.24);
}

.perf-badges-trigger--veryGood {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.35);
}

.perf-badges-trigger--veryGood:hover {
    background: rgba(22, 163, 74, 0.18);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.22);
}

.perf-badges-trigger--remarkable {
    color: #047857;
    background: rgba(4, 120, 87, 0.12);
    border-color: rgba(4, 120, 87, 0.35);
}

.perf-badges-trigger--remarkable:hover {
    background: rgba(4, 120, 87, 0.18);
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.22);
}

.perf-badges-trigger--exceptional {
    color: #0e7490;
    background: rgba(14, 116, 144, 0.12);
    border-color: rgba(14, 116, 144, 0.35);
}

.perf-badges-trigger--exceptional:hover {
    background: rgba(14, 116, 144, 0.18);
    box-shadow: 0 4px 12px rgba(14, 116, 144, 0.22);
}

.perf-badges-trigger--goat {
    color: #b45309;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.28), rgba(245, 158, 11, 0.22));
    border-color: rgba(245, 158, 11, 0.45);
}

.perf-badges-trigger--goat:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.38), rgba(245, 158, 11, 0.3));
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.perf-badges-trigger--neutral:hover {
    background: rgba(100, 116, 139, 0.16);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.18);
}

/* Header : trophée + ROI sans cadre */
.perf-badges-trigger--header {
    width: auto;
    height: auto;
    min-height: 44px;
    padding: 4px 2px;
    gap: 6px;
    align-items: center;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.perf-badges-trigger--header.perf-badges-trigger--with-roi {
    min-width: 0;
    padding: 4px 0 4px 2px;
    gap: 4px;
    align-items: center;
}

.perf-badges-trigger--header .perf-badges-trigger__icon-wrap {
    width: 22px;
    height: 22px;
    margin-bottom: 0;
}

.perf-badges-trigger--header svg.perf-badges-trigger__trophy {
    width: 18px;
    height: 18px;
}

.perf-badges-trigger--header .perf-badges-trigger__roi {
    font-size: 0.54rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    color: currentColor;
    text-align: center;
}

.perf-badges-trigger--header .perf-badges-trigger__goal {
    display: block !important;
    font-size: 0.54rem;
    font-weight: 700;
    padding-top: 1px;
    opacity: 0.7;
    min-width: 0;
    color: currentColor;
}

.perf-badges-trigger--goal-reached.perf-badges-trigger--header .perf-badges-trigger__goal {
    opacity: 0.82;
}

.perf-badges-trigger--header:is(
    .perf-badges-trigger--poor,
    .perf-badges-trigger--toImprove,
    .perf-badges-trigger--good,
    .perf-badges-trigger--veryGood,
    .perf-badges-trigger--remarkable,
    .perf-badges-trigger--exceptional,
    .perf-badges-trigger--goat,
    .perf-badges-trigger--neutral
) {
    background: transparent;
    border: none;
    box-shadow: none;
}

.perf-badges-trigger--header:is(
    .perf-badges-trigger--poor,
    .perf-badges-trigger--toImprove,
    .perf-badges-trigger--good,
    .perf-badges-trigger--veryGood,
    .perf-badges-trigger--remarkable,
    .perf-badges-trigger--exceptional,
    .perf-badges-trigger--goat,
    .perf-badges-trigger--neutral
):hover,
.perf-badges-trigger--header:is(
    .perf-badges-trigger--poor,
    .perf-badges-trigger--toImprove,
    .perf-badges-trigger--good,
    .perf-badges-trigger--veryGood,
    .perf-badges-trigger--remarkable,
    .perf-badges-trigger--exceptional,
    .perf-badges-trigger--goat,
    .perf-badges-trigger--neutral
):active,
.perf-badges-trigger--header:hover,
.perf-badges-trigger--header:active {
    background: transparent;
    border: none;
    box-shadow: none;
    transform: none;
    opacity: 0.78;
}

.pc-header-actions .perf-badges-trigger--header .perf-badges-trigger__icon-wrap {
    width: 22px;
    height: 22px;
}

.pc-header-actions .perf-badges-trigger--header svg.perf-badges-trigger__trophy {
    width: 18px;
    height: 18px;
}

.pc-header-actions .perf-badges-trigger--header .perf-badges-trigger__roi {
    font-size: 0.54rem;
}

.app-header-toolbar-wrap,
.app-header-toolbar-wrap .header-content {
    width: 100% !important;
}

.app-header-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.app-header-toolbar .app-header-brand {
    flex: 1 1 auto;
    min-width: 0;
}

.app-menu-trigger {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 9px;
    background: color-mix(in srgb, var(--pro-accent) 6%, transparent);
    color: var(--pro-text);
    cursor: pointer;
    position: relative;
    z-index: 2;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: transparent;
    transition:
        background var(--pro-duration, 0.18s) var(--pro-ease, ease),
        color var(--pro-duration, 0.18s) var(--pro-ease, ease);
}

.app-menu-trigger svg {
    width: 18px;
    height: 18px;
    display: block;
}

.app-menu-trigger:hover,
.app-menu-trigger:focus-visible,
.app-menu-trigger.is-open {
    background: color-mix(in srgb, var(--pro-accent) 12%, transparent);
    color: var(--pro-accent);
    outline: none;
}

.pc-header-brand {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
}

.pc-header-brand .app-menu-trigger {
    width: 34px;
    height: 34px;
}

.pc-header-brand .app-menu-trigger svg {
    width: 17px;
    height: 17px;
}

/* #region propflow:app-menu */
/* —— Menu latéral ——
   Hors .app-container. Ne doit JAMAIS capturer les clics tant que .is-open
   (les enfants ont pointer-events:auto par défaut et bloquent le burger sinon). */
.app-menu-drawer {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    z-index: 10050 !important;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    overflow: hidden;
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.app-menu-drawer.is-open {
    display: block !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

.app-menu-drawer:not(.is-open),
.app-menu-drawer:not(.is-open) * {
    pointer-events: none !important;
}

.app-menu-drawer[hidden]:not(.is-open) {
    display: none !important;
}

.app-menu-drawer__backdrop {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(28, 25, 40, 0.32);
    opacity: 0;
    transition: opacity 0.18s ease;
    cursor: pointer;
}

.app-menu-drawer.is-open .app-menu-drawer__backdrop {
    opacity: 1;
}

.app-menu-drawer__panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(236px, calc(100vw - 88px));
    max-width: 72vw;
    display: flex;
    flex-direction: column;
    background: var(--pro-surface-elevated, #f0eef5);
    box-shadow: 8px 0 28px rgba(55, 48, 107, 0.12);
    -webkit-transform: translateX(-104%);
    transform: translateX(-104%);
    transition: transform 0.2s var(--pro-ease, ease);
    padding:
        max(12px, env(safe-area-inset-top, 0px))
        10px
        max(14px, env(safe-area-inset-bottom, 0px))
        max(10px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    outline: none;
    will-change: transform;
}

.app-menu-drawer.is-open .app-menu-drawer__panel {
    -webkit-transform: translateX(0);
    transform: translateX(0);
}

.app-menu-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 2px 10px;
    min-height: 32px;
}

.app-menu-drawer__title {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 650;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: transparent;
    user-select: none;
    pointer-events: none;
}

.app-menu-drawer__close {
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: color-mix(in srgb, var(--pro-accent) 6%, transparent);
    color: var(--pro-text-muted);
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
}

.app-menu-drawer__close:hover,
.app-menu-drawer__close:focus-visible {
    background: color-mix(in srgb, var(--pro-accent) 12%, transparent);
    color: var(--pro-accent);
    outline: none;
}

.app-menu-drawer__nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-menu-drawer__item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: none;
    border-radius: 10px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    color: inherit;
    font: inherit;
    transition: background 0.15s var(--pro-ease, ease);
}

.app-menu-drawer__item:hover,
.app-menu-drawer__item:focus-visible {
    background: color-mix(in srgb, var(--pro-accent) 8%, transparent);
    outline: none;
}

.app-menu-drawer__item:active {
    background: color-mix(in srgb, var(--pro-accent) 12%, transparent);
}

.app-menu-drawer__item-label {
    font-size: 0.8125rem;
    font-weight: 650;
    color: var(--pro-text);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.app-menu-drawer__item-hint {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--pro-text-muted);
    line-height: 1.3;
    opacity: 0.88;
}

body.app-menu-open {
    overflow: hidden;
}

.pc-header-actions .perf-badges-trigger:not(.perf-badges-trigger--header) {
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.pc-header-actions .perf-badges-trigger:not(.perf-badges-trigger--header).perf-badges-trigger--with-roi {
    width: auto;
    min-width: 40px;
    padding: 0 11px 0 9px;
    gap: 6px;
}

.pc-header-actions .perf-badges-trigger:not(.perf-badges-trigger--header) .perf-badges-trigger__roi {
    font-size: 0.75rem;
}

.perf-badge-legend-body {
    padding-top: 4px !important;
}

.perf-badge-legend__context {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: var(--pro-fs-sm);
    font-weight: 600;
    line-height: 1.4;
    color: var(--pro-text);
    background: var(--pro-surface-muted);
    border: 1px solid var(--pro-border-subtle);
}

.perf-badge-legend__formula {
    margin: 0 0 14px;
}

.perf-badge-legend__formula-title {
    margin: 0 0 6px;
    font-size: var(--pro-fs-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pro-text-muted);
}

.perf-badge-legend__formula-line {
    margin: 0;
    font-size: var(--pro-fs-sm);
    line-height: 1.45;
    color: var(--pro-text);
    font-variant-numeric: tabular-nums;
}

.perf-badge-legend__intro {
    margin: 0 0 14px;
    font-size: var(--pro-fs-sm);
    line-height: 1.45;
    color: var(--pro-text-muted);
}

.perf-badge-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.perf-badge-legend__row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--pro-surface-muted);
    border: 1px solid var(--pro-border-subtle);
}

.perf-badge-legend__dot {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    margin-top: 4px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.perf-badge-legend__dot.poor { background: #dc2626; border-color: rgba(220, 38, 38, 0.45); }
.perf-badge-legend__dot.toImprove { background: #ea580c; border-color: rgba(234, 88, 12, 0.45); }
.perf-badge-legend__dot.good { background: #ca8a04; border-color: rgba(202, 138, 4, 0.45); }
.perf-badge-legend__dot.veryGood { background: #16a34a; border-color: rgba(22, 163, 74, 0.45); }
.perf-badge-legend__dot.remarkable { background: #047857; border-color: rgba(4, 120, 87, 0.45); }
.perf-badge-legend__dot.exceptional { background: #0e7490; border-color: rgba(14, 116, 144, 0.45); }
.perf-badge-legend__dot.goat {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-color: rgba(245, 158, 11, 0.55);
}

.perf-badge-legend__chip {
    flex-shrink: 0;
    margin: 0 !important;
    padding: 6px 12px !important;
    font-size: 0.72rem !important;
    white-space: nowrap;
}

.perf-badge-legend__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.perf-badge-legend__range {
    font-size: var(--pro-fs-sm);
    font-weight: 700;
    color: var(--pro-text);
    font-variant-numeric: tabular-nums;
}

.perf-badge-legend__desc {
    font-size: var(--pro-fs-xs);
    line-height: 1.35;
    color: var(--pro-text-muted);
}

.propfirm-section-head .propfirm-sort-filter .sheet-filter-trigger__icon {
    width: 0.85em;
    height: 0.85em;
}

.page-title-row__filters {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

/* Filtre type Google Sheets — select compact avec chevron */
.sheet-filter {
    display: inline-flex;
    align-items: center;
    max-width: min(100%, 220px);
    min-width: 0;
    vertical-align: middle;
}

.sheet-filter--branch {
    max-width: min(42vw, 120px);
}

.propflow-brand-title .propflow-branch-trigger {
    font-size: inherit !important;
    margin-left: 0;
}

.propflow-brand-title .sheet-filter-trigger__icon {
    width: 0.85em;
    height: 0.85em;
}

.sheet-filter--year {
    max-width: min(46vw, 148px);
}

.sheet-filter__select {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    margin: 0;
    padding: 5px 30px 5px 10px !important;
    border: 1px solid var(--pro-border) !important;
    border-radius: 8px !important;
    background-color: var(--pro-surface-muted) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235c5766' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 9px center !important;
    background-size: 12px !important;
    color: var(--pro-text) !important;
    font-size: var(--pro-fs-sm) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.sheet-filter__select:focus-visible {
    outline: 2px solid var(--pro-control-ring) !important;
    outline-offset: 1px;
}

.propflow-brand-title .sheet-filter--branch {
    margin-left: 0.45em;
}

.stats-page-year-bar {
    display: none !important;
}

/* #region propflow:kpi */
/* —— KPI —— */
.kpi-card,
.stat-card.kpi-card {
    background: var(--pro-surface-elevated) !important;
    border: 1px solid var(--pro-border-subtle) !important;
    border-radius: var(--pro-radius) !important;
    box-shadow: var(--pro-shadow-sm) !important;
}

.kpi-card:hover {
    border-color: var(--pro-accent-ring) !important;
    background: var(--pro-surface) !important;
    box-shadow: var(--pro-shadow) !important;
}

.kpi-value {
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
    color: var(--pro-text) !important;
}

/* #region propflow:fab */
/* —— FAB (au-dessus du dock, sous le menu drawer) —— */
.fab-floating {
    background: var(--pro-accent) !important;
    color: var(--pro-on-accent) !important;
    box-shadow: 0 3px 12px color-mix(in srgb, var(--pro-accent) 22%, transparent) !important;
    border: none !important;
    border-radius: 16px !important;
    font-size: 1.5rem !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    z-index: 10045 !important;
    transition: transform 0.15s var(--pro-ease, ease), background 0.15s var(--pro-ease, ease) !important;
}

.fab-floating:hover,
.fab-floating:focus-visible {
    background: var(--pro-accent-hover, #4f46e5) !important;
    outline: none !important;
}

.fab-floating:active {
    transform: scale(0.96) !important;
}

/* #region propflow:tabs-filters */
/* —— Onglets & filtres —— */
.filter-btn {
    border-radius: var(--pro-radius-full) !important;
    background: var(--pro-surface-muted) !important;
    border: none !important;
    color: var(--pro-text-secondary) !important;
}

.filter-btn.active {
    background: var(--pro-accent) !important;
    color: var(--pro-on-accent) !important;
    border-color: transparent !important;
}

/* Coquille pages : gouttière légère (texte lisible, largeur maximisée) */
.page#stats,
.page#history,
.page#bilan,
.page#firms-stats,
.page#balance,
.page#lab,
.page#firm-tax,
.page#psi-track,
.page#ir-calc,
.page#money-mgmt,
.page#challenge-stats {
    padding:
        0
        max(var(--pro-page-gutter), env(safe-area-inset-right, 0px))
        calc(20px + env(safe-area-inset-bottom))
        max(var(--pro-page-gutter), env(safe-area-inset-left, 0px)) !important;
    box-sizing: border-box;
}

.page#stats > .stats-page-title {
    margin-bottom: 14px !important;
}

/* Cartes plein cadre dans la gouttière page (pas de padding latéral en plus) */
.page#stats .overview-master-card.stats-section:not(.propfirm-rankings-card):not(.firm-timeline-card) {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
}

.page#lab .lab-card,
.page#firm-tax .tool-page-card,
.page#psi-track .tool-page-card,
.page#ir-calc .tool-page-card {
    padding: 14px 12px !important;
    margin: 0 0 14px !important;
    background: var(--pro-surface-elevated, #f0eef5) !important;
    border: none !important;
    border-radius: var(--pro-radius, 12px) !important;
    box-shadow: var(--pro-shadow-sm, 0 1px 2px rgba(26, 24, 22, 0.04)) !important;
}

.page#lab .lab-card:hover,
.page#firm-tax .tool-page-card:hover,
.page#psi-track .tool-page-card:hover,
.page#ir-calc .tool-page-card:hover {
    transform: none !important;
    box-shadow: var(--pro-shadow-sm, 0 1px 2px rgba(26, 24, 22, 0.04)) !important;
    border-color: transparent !important;
}

.tool-page-intro,
.page#lab .lab-page-intro {
    margin: 0 0 12px;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--pro-text-muted, #6b7280);
}

.page#lab .lab-card__head,
.page#lab .lab-form,
.page#lab .lab-roi-expense-callout,
.page#lab .lab-suggest-btn,
.page#lab .lab-result,
.page#lab .lab-page-intro,
.page#firm-tax .tool-page-intro,
.page#firm-tax .firm-tax-branch-tabs,
.page#firm-tax #firmTaxSettingsForm,
.page#firm-tax .firm-tax-settings__actions,
.page#ir-calc .tool-page-intro,
.page#ir-calc .ir-calc-body {
    padding-left: 0;
    padding-right: 0;
}

/* Détail firm : tête + nav métriques (mobile + desktop) */
.page#stats .firm-timeline-card.overview-master-card.stats-section,
.firm-timeline-card.overview-master-card {
    padding: 12px 12px 10px !important;
    margin: 0 0 14px !important;
    background: var(--pro-surface-elevated, #f0eef5) !important;
    border: none !important;
    border-radius: var(--pro-radius, 12px) !important;
    box-shadow: var(--pro-shadow-sm, 0 1px 2px rgba(26, 24, 22, 0.04)) !important;
}

.firm-timeline-card:hover {
    transform: none !important;
    box-shadow: var(--pro-shadow-sm, 0 1px 2px rgba(26, 24, 22, 0.04)) !important;
    border-color: transparent !important;
}

.firm-timeline-head {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.firm-timeline-head__row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-height: 28px;
}

.firm-timeline-back {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 6px 10px 6px 6px;
    border: none;
    border-radius: 8px;
    background: color-mix(in srgb, var(--pro-accent) 8%, transparent);
    color: var(--pro-accent);
    font-size: var(--pro-fs-sm, 0.8125rem);
    font-weight: 650;
    line-height: 1.2;
    cursor: pointer;
}

.firm-timeline-back:hover,
.firm-timeline-back:focus-visible {
    background: color-mix(in srgb, var(--pro-accent) 14%, transparent);
    outline: none;
}

.firm-timeline-back svg {
    display: block;
    flex-shrink: 0;
}

.firm-timeline-back__label {
    white-space: nowrap;
}

.page#firms-stats.is-firm-detail .propfirm-rankings-card,
.page#propfirm-compare.is-firm-detail .propfirm-rankings-card {
    display: none !important;
}

.page#firms-stats.is-firm-detail .firm-timeline-card,
.page#propfirm-compare.is-firm-detail .firm-timeline-card {
    margin-top: 0 !important;
}

/* Détail firm : masquer le classement pour une vue dédiée */
.page#firms-stats.is-firm-detail [data-widget-id="propfirm-analysis"],
.page#propfirm-compare.is-firm-detail [data-widget-id="propfirm-analysis"] {
    display: none !important;
}

.page#firms-stats .firm-timeline-card[hidden],
.page#propfirm-compare .firm-timeline-card[hidden] {
    display: none !important;
}

.page#propfirm-compare.is-firm-detail .firms-hub-catalog {
    display: none !important;
}

.firm-timeline-head__hint {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: var(--pro-fs-sm, 0.8125rem);
    line-height: 1.3;
    color: var(--pro-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.firm-timeline-head--active .firm-timeline-head__hint {
    font-weight: 650;
    color: var(--pro-text);
}

.firm-timeline-metric-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    touch-action: pan-y;
}

.firm-timeline-metric-nav[hidden] {
    display: none !important;
}

.firm-timeline-view-trigger {
    max-width: 100%;
}

.firm-timeline-toggle {
    flex: 0 0 auto;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    border: none;
    border-radius: 8px;
    background: color-mix(in srgb, var(--pro-accent) 8%, transparent);
    font-size: var(--pro-fs-sm, 0.8125rem);
    font-weight: 600;
    line-height: 1.25;
    color: var(--pro-accent);
    cursor: pointer;
    white-space: nowrap;
}

.firm-timeline-toggle:hover,
.firm-timeline-toggle:focus-visible {
    background: color-mix(in srgb, var(--pro-accent) 14%, transparent);
    outline: none;
}

.firm-timeline-toggle__icon {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.firm-timeline-toggle[aria-expanded="true"] .firm-timeline-toggle__icon {
    transform: rotate(180deg);
}

.firm-timeline-card--collapsed {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

.firm-timeline-card:not(.firm-timeline-card--collapsed) .firm-timeline-head {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--pro-border-subtle, rgba(55, 48, 107, 0.08));
}

.firm-timeline-body {
    padding-top: 2px;
}

.history-page-head {
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 0;
    margin: 0 0 14px !important;
    padding: 0 !important;
}

.history-page-head .stats-page-title {
    margin: 0 !important;
    flex: 0 0 auto;
    min-width: 0;
    font-size: inherit !important;
}

.page#history .history-page-head .history-month-trigger {
    flex: 0 1 auto;
    min-width: 0;
    margin-left: 0.35em;
    text-align: left;
    white-space: nowrap;
    font-size: inherit;
    font-weight: 600;
    line-height: inherit;
}

.page#history .history-page-head .history-month-trigger__value {
    white-space: nowrap;
}

.page#history .history-page-head .sheet-filter-trigger__icon {
    width: 0.85em;
    height: 0.85em;
}

.page#history .history-page-head .history-month-total {
    margin-left: auto;
    flex: 0 0 auto;
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 380px) {
    .history-page-head {
        flex-wrap: nowrap;
        align-items: baseline;
    }

    .page#history .history-page-head .history-month-total {
        margin-left: auto;
        text-align: right;
    }
}

.page#stats .stats-module__head--compact .card-title {
    display: none !important;
}

/* Segmented : rapports mensuels & PropFirm — 1 ligne WebView */
.propfirm-nav-tabs,
.reports-nav-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 3px !important;
    margin: 8px 0 12px !important;
    overflow: hidden !important;
    background: var(--pro-surface-muted) !important;
    border: none !important;
    border-radius: var(--pro-radius) !important;
    box-shadow: none !important;
}

.stats-mode-switch[hidden] {
    display: none !important;
}

.propfirm-tab,
.report-tab {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 8px 4px !important;
    border: none !important;
    border-radius: calc(var(--pro-radius) - 3px) !important;
    background: transparent !important;
    color: var(--pro-text-muted) !important;
    font-size: var(--pro-fs-xs) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    text-align: center !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
    transition: background var(--pro-duration) var(--pro-ease), color var(--pro-duration) var(--pro-ease), box-shadow var(--pro-duration) var(--pro-ease) !important;
}

.propfirm-tab .tab-label-full,
.report-tab .tab-label-full {
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.stats-subnav .propfirm-tab .tab-label-full,
.stats-subnav .report-tab .tab-label-full {
    overflow: visible !important;
    text-overflow: unset !important;
}

.propfirm-tab .tab-label-short,
.report-tab .tab-label-short,
.tab-label-short {
    display: none !important;
}

.propfirm-tab:hover,
.report-tab:hover {
    color: var(--pro-accent) !important;
    background: color-mix(in srgb, var(--pro-accent-muted) 55%, transparent) !important;
}

.propfirm-tab.active,
.report-tab.active {
    background: var(--pro-surface-elevated) !important;
    color: var(--pro-accent) !important;
    box-shadow: 0 1px 6px var(--pro-chrome-violet-glow) !important;
    border: 1px solid var(--pro-accent-ring) !important;
    font-weight: 700 !important;
}

@media (max-width: 380px) {
    .propfirm-tab,
    .report-tab {
        font-size: 0.58rem !important;
        padding: 7px 2px !important;
        letter-spacing: -0.02em !important;
    }
}

@media (min-width: 520px) {
    .propfirm-tab,
    .report-tab {
        font-size: var(--pro-fs-sm) !important;
        padding: 8px 12px !important;
    }
}

html[data-theme="dark"] .propfirm-nav-tabs,
html[data-theme="dark"] .reports-nav-tabs {
    background: var(--pro-surface-muted) !important;
    border-color: var(--pro-border) !important;
}

html[data-theme="dark"] .propfirm-tab.active,
html[data-theme="dark"] .report-tab.active {
    background: color-mix(in srgb, var(--pro-accent-muted) 65%, var(--pro-surface-elevated)) !important;
    color: var(--pro-accent) !important;
    border-color: var(--pro-accent-ring) !important;
}

/* Sous-navigation légère (PropFirm, Bilan) — secondaire au fil d'Ariane */
.stats-subnav.propfirm-nav-tabs,
.stats-subnav.reports-nav-tabs {
    gap: 4px !important;
    padding: 0 0 4px !important;
    margin: 0 0 4px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid var(--pro-border-subtle) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.stats-subnav .propfirm-tab,
.stats-subnav .report-tab {
    flex: 0 0 auto !important;
    padding: 6px 10px !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: 2px solid transparent !important;
    margin-bottom: -1px !important;
}

.stats-subnav .propfirm-tab:hover,
.stats-subnav .report-tab:hover {
    background: transparent !important;
    color: var(--pro-text) !important;
}

.stats-subnav .propfirm-tab.active,
.stats-subnav .report-tab.active {
    background: transparent !important;
    color: var(--pro-accent) !important;
    border: none !important;
    border-bottom: 2px solid var(--pro-accent) !important;
    box-shadow: none !important;
    font-weight: 700 !important;
}

.stats-year-bar {
    padding: 14px 16px !important;
    background: var(--pro-surface-elevated) !important;
}

.stats-year-select,
.quick-form-input,
.form-input,
input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    background: color-mix(in srgb, var(--pro-accent) 4%, var(--pro-surface-muted)) !important;
    border: none !important;
    color: var(--pro-text) !important;
    border-radius: var(--pro-radius-sm) !important;
    box-shadow: none !important;
}

.stats-year-select:focus,
.quick-form-input:focus,
.form-input:focus,
input:focus,
select:focus,
textarea:focus {
    border: none !important;
    box-shadow: none !important;
    background: color-mix(in srgb, var(--pro-accent) 9%, var(--pro-surface-muted)) !important;
    outline: none !important;
}

/* #region propflow:history-tx */
/* —— Historique — transactions —— */
/* Groupes par jour : surface douce, sans trait latéral */
#history .revolut-transaction-group {
    background: var(--pro-surface-elevated, #f0eef5) !important;
    border: none !important;
    box-shadow: var(--pro-shadow-sm, 0 1px 2px rgba(26, 24, 22, 0.04)) !important;
    padding: 8px 10px 6px !important;
    margin: 0 0 12px 0 !important;
    border-radius: var(--pro-radius, 12px) !important;
}

#history .revolut-transaction-group:hover {
    transform: none !important;
    box-shadow: var(--pro-shadow-sm, 0 1px 2px rgba(26, 24, 22, 0.04)) !important;
    border-color: transparent !important;
}

#history .revolut-transactions-list {
    display: flex;
    flex-direction: column;
    gap: 1px !important;
}

#history .revolut-date-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 4px 8px;
    margin: 0;
    background: transparent;
}

#history .revolut-date-header:first-child {
    padding-top: 2px;
}

#history .revolut-date-title {
    font-size: var(--pro-fs-xs, 12px);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--pro-text-muted);
}

#history .revolut-date-amount {
    font-size: var(--pro-fs-xs, 12px);
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    color: var(--pro-text-secondary, var(--pro-text-muted));
    flex-shrink: 0;
}

#history .revolut-transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 !important;
    padding: 9px 8px !important;
    cursor: pointer;
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
    background: transparent !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    transform: none !important;
    transition: background-color 0.15s ease;
}

#history .revolut-transaction-item:nth-child(even) {
    background: color-mix(in srgb, var(--pro-accent) 3.5%, transparent) !important;
}

#history .revolut-transaction-item:last-child {
    margin-bottom: 0 !important;
}

#history .revolut-transaction-item:hover,
#history .revolut-transaction-item:focus-visible {
    background: color-mix(in srgb, var(--pro-accent) 9%, transparent) !important;
    transform: none !important;
    outline: none;
}

#history .revolut-transaction-item--context-target {
    background: color-mix(in srgb, var(--pro-accent) 14%, transparent) !important;
}

html[data-theme="dark"] #history .revolut-transaction-item--context-target {
    background: color-mix(in srgb, var(--pro-accent) 22%, transparent) !important;
}

html[data-theme="dark"] #history .revolut-transaction-item:hover,
html[data-theme="dark"] #history .revolut-transaction-item:focus-visible {
    background: color-mix(in srgb, var(--pro-accent) 12%, transparent) !important;
}

#history .revolut-transaction-content {
    min-width: 0;
    flex: 1;
}

#history .revolut-transaction-title {
    font-size: var(--pro-fs-base);
    font-weight: 600;
    color: var(--pro-text);
    margin: 0;
    line-height: 1.35;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    overflow-wrap: anywhere;
}

#history .history-branch-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.05em;
    height: 1.05em;
    margin-left: 0.35em;
    vertical-align: 0.08em;
    border-radius: 4px;
    font-size: 0.68em;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    flex-shrink: 0;
}

#history .history-branch-badge--micro {
    color: color-mix(in srgb, var(--pro-accent, #6366f1) 88%, #1e1b4b);
    background: color-mix(in srgb, var(--pro-accent, #6366f1) 14%, transparent);
}

#history .history-branch-badge--portage {
    color: color-mix(in srgb, var(--pro-success, #15803d) 90%, #052e16);
    background: color-mix(in srgb, var(--pro-success, #15803d) 14%, transparent);
}

#history .revolut-transaction-meta {
    margin-top: 1px;
    font-size: var(--pro-fs-xs);
    color: var(--pro-text-muted);
}

#history .revolut-transaction-ref {
    color: var(--pro-text-muted);
}

#history .revolut-transaction-amount {
    margin-right: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    white-space: nowrap !important;
    max-width: 46% !important;
    font-size: var(--pro-fs-base) !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    font-variant-numeric: tabular-nums;
}

#history .revolut-transaction-amount.positive {
    color: var(--pro-success, #16a34a) !important;
    -webkit-text-fill-color: var(--pro-success, #16a34a) !important;
    background: transparent !important;
    border: none !important;
}

#history .revolut-transaction-amount.negative {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    background: transparent !important;
    border: none !important;
}

html[data-theme="dark"] #history .revolut-transaction-amount.negative {
    color: #f1f5f9 !important;
    -webkit-text-fill-color: #f1f5f9 !important;
    background: transparent !important;
    border: none !important;
}

#history .revolut-transaction-amount .original-amount {
    margin-right: 0.35em;
    white-space: nowrap;
    font-size: var(--pro-fs-xs);
    font-weight: 500;
    opacity: 0.75;
}

#history .transaction-amount-simple {
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

/* —— Modales —— */
.modal-content {
    background: var(--pro-surface-elevated) !important;
    border: none !important;
    border-radius: var(--pro-radius-lg) !important;
    box-shadow: var(--pro-shadow-float) !important;
    color: var(--pro-text) !important;
}

.modal-header {
    border-bottom: none !important;
    padding-bottom: 10px !important;
}

.modal-title {
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
}

.close-btn {
    border: none !important;
    background: color-mix(in srgb, var(--pro-accent) 8%, transparent) !important;
    border-radius: 8px !important;
    color: var(--pro-text-muted) !important;
}

.close-btn:hover,
.close-btn:focus-visible {
    background: color-mix(in srgb, var(--pro-accent) 14%, transparent) !important;
    color: var(--pro-accent) !important;
    outline: none !important;
}

/* —— Modal transactions bilan / jour —— */
#dayTransactionsModal .modal-content--report-txs {
    max-width: min(440px, calc(100vw - 24px));
    max-height: min(78vh, 640px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#dayTransactionsModal .modal-content--report-txs .modal-header {
    padding: 14px 14px 8px !important;
    flex: 0 0 auto;
}

#dayTransactionsModal .modal-content--report-txs .modal-title {
    font-size: 1.05rem !important;
}

#dayTransactionsModal .modal-content--report-txs .modal-body.report-tx-modal {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 14px 14px !important;
    overflow: hidden;
    min-height: 0;
    flex: 1 1 auto;
}

.report-tx-modal__period {
    margin: 0;
    font-size: var(--pro-fs-sm, 0.8125rem);
    font-weight: 600;
    color: var(--pro-text-muted);
    line-height: 1.35;
}

.report-tx-modal__summary {
    flex: 0 0 auto;
}

.report-tx-modal__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    border-radius: var(--pro-radius-sm, 8px);
    overflow: hidden;
    background: var(--pro-border-subtle, rgba(0, 0, 0, 0.08));
    border: 1px solid var(--pro-border-subtle, rgba(0, 0, 0, 0.08));
}

.report-tx-modal__stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 6px;
    background: var(--pro-surface, #fff);
    text-align: center;
    min-width: 0;
}

.report-tx-modal__stat-k {
    font-size: 0.625rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--pro-text-muted);
    line-height: 1.2;
}

.report-tx-modal__stat-v {
    font-size: 0.8125rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    color: var(--pro-text);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.report-tx-modal__stat.is-pos .report-tx-modal__stat-v {
    color: var(--pro-success, #15803d);
}

.report-tx-modal__stat.is-neg .report-tx-modal__stat-v {
    color: var(--pro-danger, #b91c1c);
}

.report-tx-modal__stat.is-neutral .report-tx-modal__stat-v {
    color: var(--pro-text);
}

.report-tx-modal__empty {
    margin: 0;
    padding: 14px 12px;
    text-align: center;
    font-size: var(--pro-fs-sm, 0.8125rem);
    font-weight: 600;
    color: var(--pro-text-muted);
    background: color-mix(in srgb, var(--pro-accent) 4%, var(--pro-surface, #fff));
    border-radius: var(--pro-radius-sm, 8px);
}

.report-tx-modal__list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -2px;
    padding: 0 2px;
}

.report-tx-modal__rows {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--pro-border-subtle, rgba(0, 0, 0, 0.08));
    border-radius: var(--pro-radius-sm, 8px);
    overflow: hidden;
    background: var(--pro-surface, #fff);
}

.report-tx-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 11px;
    border-bottom: 1px solid var(--pro-border-subtle, rgba(0, 0, 0, 0.08));
}

.report-tx-row:last-child {
    border-bottom: none;
}

.report-tx-row:nth-child(even) {
    background: color-mix(in srgb, var(--pro-accent) 3.5%, transparent);
}

.report-tx-row__main {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1 1 auto;
}

.report-tx-row__title {
    font-size: 0.8125rem;
    font-weight: 650;
    color: var(--pro-text);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.report-tx-row__meta {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--pro-text-muted);
    line-height: 1.3;
}

.report-tx-row__amount {
    flex: 0 0 auto;
    font-size: 0.8125rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    line-height: 1.2;
}

.report-tx-row__amount.is-pos {
    color: var(--pro-success, #15803d);
}

.report-tx-row__amount.is-neg {
    color: var(--pro-danger, #b91c1c);
}

.data-card {
    background: color-mix(in srgb, var(--pro-accent) 4%, var(--pro-surface-muted)) !important;
    border: none !important;
    border-radius: var(--pro-radius-sm, 8px) !important;
    box-shadow: none !important;
}

.data-card:hover {
    transform: none !important;
    background: color-mix(in srgb, var(--pro-accent) 9%, var(--pro-surface-muted)) !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

.data-copy-textarea {
    border: none !important;
    background: color-mix(in srgb, var(--pro-accent) 4%, var(--pro-surface-muted)) !important;
    border-radius: var(--pro-radius-sm, 8px) !important;
    box-shadow: none !important;
}

@media (min-width: 1024px) {
    .content {
        padding-top: 12px !important;
    }

    .account-switcher-bar {
        top: 60px !important;
        background: var(--pro-glass) !important;
        backdrop-filter: blur(12px) !important;
        border-bottom: 1px solid var(--pro-glass-border) !important;
    }

    .nav {
        max-width: 420px !important;
    }
}

/* —— Header unifié mobile —— */
.app-header-unified {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    position: static !important;
}

.account-switcher--header {
    display: flex !important;
    gap: 4px !important;
    max-width: 920px !important;
    margin: 0 auto !important;
}

.account-switcher--pc {
    display: inline-flex !important;
    gap: 4px !important;
}

.account-switcher--header .account-switcher-btn,
.account-switcher--pc .account-switcher-btn {
    flex: 1 !important;
    min-height: 40px !important;
    padding: 8px 10px !important;
    border-radius: 9px !important;
    font-size: var(--pro-fs-sm) !important;
    font-weight: 600 !important;
    color: var(--pro-text-muted) !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
}

.account-switcher--header .account-switcher-label {
    display: block !important;
    text-align: center !important;
}

body[data-account="micro"] .account-switcher--header .account-switcher-btn.active,
body[data-account="micro"] .account-switcher--pc .account-switcher-btn.active {
    color: var(--pro-accent) !important;
}

body[data-account="portage"] .account-switcher--header .account-switcher-btn.active,
body[data-account="portage"] .account-switcher--pc .account-switcher-btn.active {
    color: #0d9488 !important;
}

body[data-account="both"] .account-switcher--header .account-switcher-btn.active,
body[data-account="both"] .account-switcher--pc .account-switcher-btn.active {
    color: #7c3aed !important;
}

/* —— Dock mobile (WebView + navigateur) : compact, aligné sur le header —— */
@media (max-width: 1023px) {
    /* body.transform piège position:fixed → dock hors zone visible dans Chrome/Safari mobile */
    html.is-mobile-shell body,
    html.is-browser-shell.is-mobile-shell body {
        transform: none !important;
        -webkit-transform: none !important;
    }

    .nav.nav-dock,
    html.is-browser-shell .nav.nav-dock,
    html.is-mobile-shell .nav.nav-dock,
    html.is-webview .nav.nav-dock,
    html.is-browser-shell.is-mobile-shell body > .nav.nav-dock,
    body > .nav.nav-dock {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        z-index: 10040 !important;
        transform: translate3d(0, 0, 0) !important;
        -webkit-transform: translate3d(0, 0, 0) !important;
    }

    .nav.nav-dock.nav-dock--keyboard-hidden,
    html.is-mobile-shell body > .nav.nav-dock.nav-dock--keyboard-hidden,
    html.is-browser-shell.is-mobile-shell body > .nav.nav-dock.nav-dock--keyboard-hidden,
    body > .nav.nav-dock.nav-dock--keyboard-hidden {
        transform: translateY(110%) !important;
        -webkit-transform: translateY(110%) !important;
        pointer-events: none !important;
    }

    /* Masque le contenu scrollable sous le dock + barre système */
    .app-container::after {
        content: '';
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(var(--pro-dock-height) + env(safe-area-inset-bottom, 0px));
        background-color: var(--pro-bg-base, var(--pro-bg, #e4e2ec));
        background-image:
            radial-gradient(ellipse 100% 55% at 50% -12%, rgba(99, 102, 241, 0.22), transparent 52%),
            radial-gradient(ellipse 45% 38% at 100% 15%, rgba(124, 58, 237, 0.12), transparent 48%),
            radial-gradient(ellipse 40% 32% at 0% 85%, rgba(99, 102, 241, 0.1), transparent 50%);
        background-attachment: fixed;
        z-index: 998;
        pointer-events: none;
    }

    .nav.nav-dock {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 4px 0 calc(2px + env(safe-area-inset-bottom, 0px)) !important;
        border-radius: 0 !important;
        z-index: 10040 !important;
        background: var(--pro-glass-strong, rgba(240, 238, 245, 0.96)) !important;
        backdrop-filter: blur(20px) saturate(1.2) !important;
        -webkit-backdrop-filter: blur(20px) saturate(1.2) !important;
        border-top: 1px solid var(--pro-glass-border, rgba(99, 102, 241, 0.16)) !important;
        box-shadow: 0 -1px 12px var(--pro-chrome-shadow, rgba(55, 48, 107, 0.08)) !important;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    .nav-tabs--dock,
    .nav-tabs--stats-dock {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        align-items: center !important;
        gap: 2px !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .nav-tabs--stats-dock .nav-text {
        display: block !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        font-size: 0.625rem !important;
        font-weight: 550 !important;
        letter-spacing: 0 !important;
        line-height: 1.1 !important;
        margin: 0 !important;
        color: var(--pro-text-muted) !important;
    }

    .nav-tabs--dock .nav-tab.active .nav-text {
        display: block !important;
        font-weight: 650 !important;
        color: var(--pro-accent) !important;
    }

    .nav-tabs--dock .nav-tab__svg {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        min-height: 26px !important;
        display: block !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
    }

    .nav-tabs--dock .nav-tab {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
        min-width: 0 !important;
        width: 100% !important;
        min-height: 52px !important;
        padding: 8px 2px 6px !important;
        border: none !important;
        background: transparent !important;
        -webkit-tap-highlight-color: transparent !important;
        touch-action: manipulation !important;
        user-select: none !important;
        -webkit-user-select: none !important;
    }

    .nav-tabs--dock .nav-tab:active {
        transform: scale(0.97) !important;
    }

    .nav-tabs--dock .nav-tab.active {
        background: var(--pro-accent-muted) !important;
        color: var(--pro-accent) !important;
        box-shadow: none !important;
        border-radius: 10px !important;
        margin: 0 2px !important;
    }

    /* WebView : menu bord à bord, 5 colonnes égales */
    html.is-webview .nav.nav-dock {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    .nav-tabs--dock .nav-tab.active .nav-tab__svg {
        stroke: var(--pro-accent) !important;
    }

    .nav-tabs--dock .nav-tab.active .nav-text {
        color: var(--pro-accent) !important;
    }

    .fab-floating {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: fixed !important;
        right: 16px !important;
        bottom: calc(var(--pro-dock-fab-offset) + env(safe-area-inset-bottom)) !important;
        width: 52px !important;
        height: 52px !important;
        z-index: 10045 !important;
    }

    .content {
        padding-bottom: calc(var(--pro-dock-height) + env(safe-area-inset-bottom, 0px)) !important;
    }

    .content,
    .app-container {
        overscroll-behavior-y: none;
    }

    .page#stats .stats-page-title,
    .page#history .stats-page-title {
        font-size: inherit !important;
        margin-bottom: 0 !important;
    }

    .page-title-row.stats-page-head,
    .history-page-head,
    .propfirm-section-head {
        font-size: var(--pro-fs-filter-row-compact, var(--pro-fs-page-title-compact, 1.25rem)) !important;
        margin-bottom: 10px !important;
    }
}

@media (min-width: 1024px) {
    .account-switcher-bar {
        display: none !important;
    }

    /* Dock de navigation visible sur tous les navigateurs desktop */
    .nav.nav-dock {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        position: fixed !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        bottom: 16px !important;
        width: min(480px, calc(100vw - 32px)) !important;
        max-width: 480px !important;
        margin: 0 !important;
        padding: 6px 10px !important;
        border-radius: var(--pro-radius-xl, 20px) !important;
        border: 1px solid var(--pro-glass-border) !important;
        background: var(--pro-glass-strong) !important;
        backdrop-filter: blur(24px) saturate(1.25) !important;
        -webkit-backdrop-filter: blur(24px) saturate(1.25) !important;
        box-shadow: var(--pro-shadow-float) !important;
        z-index: 1001 !important;
    }

    .nav-tabs--dock,
    .nav-tabs--stats-dock {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        align-items: center !important;
        gap: 2px !important;
        width: 100% !important;
    }

    .nav-tabs--dock .nav-tab {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
        min-width: 0 !important;
        min-height: 52px !important;
        padding: 8px 2px 6px !important;
        border: none !important;
        background: transparent !important;
        cursor: pointer !important;
        user-select: none !important;
        -webkit-user-select: none !important;
    }

    .nav-tabs--dock .nav-tab.active {
        background: var(--pro-accent-muted) !important;
        color: var(--pro-accent) !important;
        box-shadow: none !important;
        border-radius: 12px !important;
    }

    .nav-tabs--dock .nav-tab__svg {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        min-height: 26px !important;
        display: block !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
    }

    .nav-tabs--stats-dock .nav-text {
        display: block !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        font-size: 0.625rem !important;
        font-weight: 550 !important;
        letter-spacing: 0 !important;
        line-height: 1.1 !important;
        margin: 0 !important;
        color: var(--pro-text-muted) !important;
    }

    .nav-tabs--dock .nav-tab.active .nav-text {
        display: block !important;
        font-weight: 650 !important;
        color: var(--pro-accent) !important;
    }

    .pc-nav-modern {
        display: none !important;
    }

    .content {
        padding-bottom: calc(var(--pro-dock-height) + 32px) !important;
    }

    .fab-floating {
        right: 24px !important;
        bottom: calc(var(--pro-dock-height) + 24px) !important;
    }

    .page#stats [data-widget-id="monthly-reports"],
    .page#bilan [data-widget-id="monthly-reports-bilan"],
    .page#balance [data-widget-id="monthly-reports-bilan"] {
        margin-top: 8px;
    }

    .page#stats .reports-section-head.stats-section-head {
        display: flex;
        align-items: baseline;
        flex-wrap: nowrap;
        gap: 0;
        margin: 0 0 8px;
        padding: 0;
        font-size: var(--pro-fs-filter-row, var(--pro-fs-page-title, 1.375rem));
        line-height: 1.2;
    }

    .page#stats .reports-section-head .stats-section-head__title {
        margin: 0;
        flex: 0 0 auto;
        font: inherit;
        font-size: inherit;
        font-weight: 700;
        line-height: inherit;
        color: var(--pro-text);
    }

    .page#stats .reports-view-inline {
        margin-bottom: 12px;
    }

    .page#stats .reports-section-head .reports-section-filter {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin: 0;
        margin-left: 0.35em;
        padding: 0;
        border: none;
        background: none;
        font: inherit;
        font-size: inherit;
        font-weight: 600;
        line-height: inherit;
        cursor: pointer;
        color: var(--pro-accent);
    }

    .page#stats .reports-section-head__filters {
        display: inline-flex;
        align-items: baseline;
        flex-wrap: wrap;
        min-width: 0;
    }

    .page#stats .reports-section-head .reports-section-filter .sheet-filter-trigger__icon {
        flex-shrink: 0;
        opacity: 0.85;
    }
}

/* —— Vue d'ensemble : Performance · avant impôt / Efficacité · après impôt —— */
.overview-tax-title {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0;
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    text-transform: inherit;
    color: inherit;
}

.overview-tax-title__main {
    color: var(--pro-text-muted);
}

.overview-tax-title__sep {
    margin: 0 0.32em;
    color: var(--pro-text-muted);
    user-select: none;
}

.overview-tax-title__sep::before {
    content: '\00B7';
}

.overview-tax-label {
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    text-transform: inherit;
    white-space: nowrap;
}

.overview-tax-label--after {
    color: #16a34a;
}

.overview-tax-label--before {
    color: var(--pro-accent);
}

html[data-theme="dark"] .overview-tax-label--after {
    color: #4ade80;
}

html[data-theme="dark"] .overview-tax-label--before {
    color: #a78bfa;
}

.kpi-zone__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.kpi-card--flow {
    min-height: 84px !important;
    padding: 14px 12px !important;
    border-radius: var(--pro-radius) !important;
    background: var(--pro-surface-muted) !important;
    border: 1px solid var(--pro-border-subtle) !important;
    box-shadow: var(--pro-shadow-sm) !important;
}

.kpi-card--flow .kpi-value {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
}

.kpi-card--withdrawals.kpi-card--flow {
    background: linear-gradient(145deg, var(--pro-success-bg), var(--pro-surface-muted)) !important;
    border-color: var(--pro-success-border) !important;
}

.kpi-card--expenses-total.kpi-card--flow {
    background: linear-gradient(145deg, var(--pro-danger-bg), var(--pro-surface-muted)) !important;
    border-color: var(--pro-danger-border) !important;
}

.kpi-card--profit-negative {
    background: linear-gradient(145deg, var(--pro-danger-bg), var(--pro-surface-elevated)) !important;
    border-color: var(--pro-danger-border) !important;
}

.kpi-card--profit-negative .kpi-value,
.kpi-card--profit-negative .stat-value.kpi-value {
    color: var(--pro-danger) !important;
    -webkit-text-fill-color: var(--pro-danger) !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
}

.overview-efficiency-block {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--pro-border-subtle);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.overview-efficiency-block .overview-efficiency-empty {
    margin: 0;
    padding: 10px 12px;
    font-size: var(--pro-fs-xs);
    font-weight: 600;
    color: var(--pro-text-muted);
    text-align: center;
    background: var(--pro-surface-muted);
    border-radius: var(--pro-radius);
}

.overview-efficiency-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    background: var(--pro-surface-muted);
    border: 1px solid var(--pro-border-subtle);
    border-radius: var(--pro-radius);
}

.overview-efficiency-panel[hidden] {
    display: none !important;
}

.overview-efficiency-panel__title {
    margin: 0;
    font-size: var(--pro-fs-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pro-text-muted);
}

.overview-efficiency-panel__title .overview-tax-title {
    text-transform: inherit;
}

.overview-efficiency-hero {
    padding: 14px 12px;
    border-radius: var(--pro-radius);
    border: 1px solid var(--pro-border-subtle);
    background: linear-gradient(145deg, var(--pro-accent-muted), var(--pro-surface-elevated));
}

.overview-efficiency-hero--positive {
    border-color: var(--pro-success-border);
    background: linear-gradient(145deg, var(--pro-success-bg), var(--pro-surface-elevated));
}

.overview-efficiency-hero--negative {
    border-color: var(--pro-danger-border);
    background: linear-gradient(145deg, var(--pro-danger-bg), var(--pro-surface-elevated));
}

.overview-efficiency-hero__label,
.overview-efficiency-hero__amount,
.overview-efficiency-hero__hint {
    margin: 0;
    font-size: var(--pro-fs-xs);
    color: var(--pro-text-muted);
    line-height: 1.35;
}

.overview-efficiency-hero__value {
    margin: 4px 0 2px;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--pro-text);
    line-height: 1.1;
}

.overview-efficiency-hero--positive .overview-efficiency-hero__value {
    color: var(--pro-success);
}

.overview-efficiency-hero--negative .overview-efficiency-hero__value {
    color: var(--pro-danger);
}

.overview-efficiency-hero__amount {
    margin: 2px 0 0;
    font-size: var(--pro-fs-md);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--pro-text-muted);
}

.overview-efficiency-hero--positive .overview-efficiency-hero__amount {
    color: var(--pro-success);
}

.overview-efficiency-hero--negative .overview-efficiency-hero__amount {
    color: var(--pro-danger);
}

.overview-efficiency-hero .propfirm-flow-bar {
    margin-top: 12px;
}

.overview-efficiency-firms__title {
    margin: 0 0 2px;
    font-size: var(--pro-fs-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pro-text-muted);
}

.overview-efficiency-firms__hint,
.overview-efficiency-empty,
.overview-efficiency-firms-empty {
    margin: 0 0 8px;
    font-size: var(--pro-fs-xs);
    color: var(--pro-text-muted);
    line-height: 1.35;
}

.overview-efficiency-firm {
    padding: 10px 0 0;
    border-top: 1px solid var(--pro-border-subtle);
}

.overview-efficiency-firm:first-of-type {
    border-top: none;
    padding-top: 4px;
}

.overview-efficiency-firm__head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 6px;
}

.overview-efficiency-firm__rank {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--pro-accent-muted);
    color: var(--pro-accent);
    font-size: 0.65rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.overview-efficiency-firm[data-rank="1"] .overview-efficiency-firm__rank {
    background: rgba(234, 179, 8, 0.2);
    color: #a16207;
}

.overview-efficiency-firm[data-rank="2"] .overview-efficiency-firm__rank {
    background: rgba(148, 163, 184, 0.2);
    color: #64748b;
}

.overview-efficiency-firm[data-rank="3"] .overview-efficiency-firm__rank {
    background: rgba(205, 127, 50, 0.15);
    color: #b45309;
}

.overview-efficiency-firm__name {
    flex: 1;
    min-width: 0;
    font-size: var(--pro-fs-base);
    font-weight: 700;
    color: var(--pro-text);
}

.overview-efficiency-firm__roi {
    font-size: var(--pro-fs-xs);
    font-weight: 600;
    color: var(--pro-accent);
    white-space: nowrap;
}

/* —— Courbe vue d'ensemble (carte dédiée, plein cadre) —— */
.stats-overview-chart.overview-chart-card,
.page#stats .overview-chart-card.stats-section.stats-overview-chart {
    margin: 0 0 14px !important;
    padding: 12px 0 10px !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    background: var(--pro-surface-elevated, #f0eef5) !important;
    border: none !important;
    border-radius: var(--pro-radius, 12px) !important;
    box-shadow: var(--pro-shadow-sm, 0 1px 2px rgba(26, 24, 22, 0.04)) !important;
    overflow: hidden;
}

.stats-overview-chart.overview-chart-card:hover,
.page#stats .overview-chart-card.stats-section.stats-overview-chart:hover {
    transform: none !important;
    box-shadow: var(--pro-shadow-sm, 0 1px 2px rgba(26, 24, 22, 0.04)) !important;
    border-color: transparent !important;
}

/* Raccourci Bilan depuis Général (sous la courbe — pas de 2e slot réservé) */
.overview-hub {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 4px 0 12px;
    padding: 0;
}

.overview-hub__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 14px 14px 14px 16px;
    border: none;
    border-radius: var(--pro-radius, 12px);
    background: var(--pro-surface-elevated, #f0eef5);
    box-shadow: var(--pro-shadow-sm, 0 1px 2px rgba(26, 24, 22, 0.04));
    color: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition:
        background var(--pro-duration, 0.18s) var(--pro-ease, ease),
        transform var(--pro-duration, 0.18s) var(--pro-ease, ease);
}

.overview-hub__link:hover,
.overview-hub__link:focus-visible {
    background: color-mix(in srgb, var(--pro-accent) 8%, var(--pro-surface-elevated, #f0eef5));
    outline: none;
}

.overview-hub__link:active {
    transform: scale(0.985);
}

.overview-hub__copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.overview-hub__title {
    font-size: var(--pro-fs-sm, 0.9375rem);
    font-weight: 650;
    line-height: 1.25;
    color: var(--pro-text);
}

.overview-hub__sub {
    font-size: var(--pro-fs-xs, 0.75rem);
    font-weight: 500;
    line-height: 1.35;
    color: var(--pro-text-muted, #6b7280);
}

.overview-hub__chevron {
    flex: 0 0 auto;
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1;
    color: var(--pro-text-muted, #6b7280);
    opacity: 0.7;
}

html[data-theme="dark"] .overview-hub__link {
    background: var(--pro-surface-elevated);
}

html[data-theme="dark"] .overview-hub__link:hover,
html[data-theme="dark"] .overview-hub__link:focus-visible {
    background: color-mix(in srgb, var(--pro-accent) 12%, var(--pro-surface-elevated));
}

.overview-chart-card__head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
    padding: 0 12px;
    box-sizing: border-box;
}

.overview-chart-card__head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.overview-lens-inline,
.overview-lens-inline.reports-view-inline {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
    overflow: visible;
}

.overview-lens-inline .reports-view-inline__opt {
    font-size: 0.75rem;
}

.overview-chart-card__title {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: var(--pro-fs-md, 0.875rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--pro-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-chart-card__hint {
    margin: 0;
    font-size: var(--pro-fs-xs);
    color: var(--pro-text-muted);
    line-height: 1.35;
}

.overview-chart-card__hint:empty {
    display: none;
}

.overview-chart-card__empty {
    margin: 8px 12px 0;
    font-size: var(--pro-fs-xs);
    color: var(--pro-text-muted);
    line-height: 1.35;
}

.overview-chart-canvas-wrap {
    position: relative;
    width: 100%;
    height: min(42vh, 360px);
    min-height: 280px;
    max-height: 420px;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    overflow: hidden;
}

.overview-chart-canvas-inner {
    position: absolute;
    inset: 28px 0 28px;
    width: 100%;
    left: 0;
    right: 0;
}

.overview-chart-canvas-inner canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* #region propflow:chart-readout */
#chartReadoutBar.chart-readout-bar {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    transition: min-height 0.12s ease, margin-bottom 0.12s ease;
    box-sizing: border-box;
}

#chartReadoutBar.chart-readout-bar.is-visible {
    min-height: 32px;
    margin-bottom: 2px;
}

#chartReadoutBar .chart-readout {
    position: static;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    padding: 4px 10px;
    font-weight: 600;
    pointer-events: none;
    z-index: 5;
    opacity: 1;
    transition: opacity 0.12s ease, background 0.12s ease;
    font-size: var(--pro-fs-sm);
    color: var(--pro-text);
    background: var(--pro-surface-elevated);
    border-radius: var(--pro-radius-sm);
    border: none;
    box-shadow: var(--pro-shadow-sm);
    line-height: 1.25;
    max-width: 100%;
}

#chartReadoutBar .chart-readout--default,
#chartReadoutBar .chart-readout--hover {
    pointer-events: none;
}

#chartReadoutBar .chart-readout--hover {
    pointer-events: auto;
    cursor: pointer;
}

#chartReadoutBar .chart-readout__row {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

#chartReadoutBar .chart-readout__amount,
#chartReadoutBar .chart-readout__delta {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

#chartReadoutBar .chart-readout__amount.is-positive,
#chartReadoutBar .chart-readout__delta.is-positive {
    color: var(--pro-success);
}

#chartReadoutBar .chart-readout__amount.is-negative,
#chartReadoutBar .chart-readout__delta.is-negative {
    color: var(--pro-danger);
}

#chartReadoutBar .chart-readout__amount.is-neutral,
#chartReadoutBar .chart-readout__delta.is-neutral {
    color: var(--pro-text);
}

#chartReadoutBar .chart-readout__date {
    font-size: var(--pro-fs-xs);
    font-weight: 600;
    color: var(--pro-text-muted);
    white-space: nowrap;
}

/* —— Métriques sous la courbe —— */
.stats-chart-viewport {
    display: block;
}

.chart-metrics-strip {
    margin-top: 10px;
    padding: 12px 12px 0;
    border-top: 1px solid var(--pro-border-subtle);
    box-sizing: border-box;
}

.chart-metrics-strip[hidden] {
    display: none !important;
}

.chart-metrics-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    min-width: 0;
}

.chart-metrics-compare {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-width: 0;
    border-radius: var(--pro-radius-sm, 8px);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--pro-border-subtle, #e5e7eb) 90%, transparent);
    background: var(--pro-surface-elevated, #f0eef5);
}

.chart-metrics-compare__head,
.chart-metrics-compare__row {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 0;
    width: 100%;
    min-width: 0;
}

.chart-metrics-compare__head {
    background: color-mix(in srgb, var(--pro-surface-muted, #e8e6ef) 70%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--pro-border-subtle, #e5e7eb) 90%, transparent);
}

.chart-metrics-compare__section {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    margin: 0;
    padding: 10px 12px 4px;
    border-top: 1px solid color-mix(in srgb, var(--pro-border-subtle, #e5e7eb) 85%, transparent);
    background: color-mix(in srgb, var(--pro-surface-muted, #e8e6ef) 45%, transparent);
}

.chart-metrics-compare__head + .chart-metrics-compare__section {
    border-top: none;
}

.chart-metrics-compare__section-label {
    font-size: 0.625rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pro-text-muted, #6b7280);
    line-height: 1.2;
}

.chart-metrics-compare__section + .chart-metrics-compare__row {
    border-top: none;
}

.chart-metrics-compare__col-h {
    padding: 8px 10px;
    font-size: 0.6875rem;
    font-weight: 750;
    letter-spacing: 0.03em;
    line-height: 1.2;
    text-align: right;
}

.chart-metrics-compare__col-h--brut {
    color: var(--pro-accent, #6366f1);
    background: color-mix(in srgb, var(--pro-accent, #6366f1) 8%, transparent);
}

.chart-metrics-compare__col-h--net {
    color: var(--pro-success, #047857);
    background: color-mix(in srgb, var(--pro-success, #047857) 8%, transparent);
}

.chart-metrics-compare__row {
    margin: 0;
    padding: 0;
    border: none;
    border-top: 1px solid color-mix(in srgb, var(--pro-border-subtle, #e5e7eb) 70%, transparent);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
}

.chart-metrics-compare__row:first-of-type,
.chart-metrics-compare__head + .chart-metrics-compare__row {
    border-top: none;
}

.chart-metrics-compare__row--interactive {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    text-align: left;
    font: inherit;
    color: inherit;
    width: 100%;
    border: none;
    background: transparent;
}

.chart-metrics-compare__row--interactive:hover {
    background: color-mix(in srgb, var(--pro-accent, #6366f1) 6%, transparent);
}

.chart-metrics-compare__row--interactive:active {
    background: color-mix(in srgb, var(--pro-accent, #6366f1) 9%, transparent);
}

.chart-metrics-compare__row--interactive:focus-visible {
    outline: 2px solid var(--pro-control-ring, var(--pro-accent));
    outline-offset: -2px;
}

.chart-metrics-compare__label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    padding: 11px 12px;
}

.chart-metrics-compare__label-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    font-weight: 650;
    line-height: 1.25;
    color: var(--pro-text, #111827);
}

.chart-metrics-compare__row--interactive .chart-metrics-compare__label-text {
    padding-right: 0;
}

.chart-metrics-compare__label .chart-metric__hint {
    margin: 0;
    font-size: 0.625rem;
    line-height: 1.3;
    color: var(--pro-text-muted, #6b7280);
}

.chart-metrics-compare__vals {
    display: contents;
}

.chart-metrics-compare__val {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    min-height: 100%;
    padding: 10px 10px;
}

.chart-metrics-compare__val--brut {
    background: color-mix(in srgb, var(--pro-accent, #6366f1) 5%, transparent);
}

.chart-metrics-compare__val--net {
    background: color-mix(in srgb, var(--pro-success, #047857) 5%, transparent);
}

.chart-metrics-compare__row--shared .chart-metrics-compare__val--single {
    grid-column: 2 / -1;
    justify-content: center;
    background: color-mix(in srgb, var(--pro-surface-muted, #e8e6ef) 40%, transparent);
}

.chart-metrics-compare__val .chart-metric__v {
    font-size: clamp(0.9375rem, 3.8vw, 1.125rem);
    font-weight: 700;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.chart-metrics-compare__row--shared .chart-metrics-compare__val--single .chart-metric__v {
    text-align: center;
}

/* TEST : grille 2 colonnes pour métriques partagées (dépenses moy / retraits / dépenses) */
/* #region propflow:chart-metrics-duo */
.chart-metrics-duo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    width: 100%;
    background: color-mix(in srgb, var(--pro-border-subtle, #e5e7eb) 90%, transparent);
    border-top: 1px solid color-mix(in srgb, var(--pro-border-subtle, #e5e7eb) 85%, transparent);
}

.chart-metrics-compare__section + .chart-metrics-duo {
    border-top: none;
}

.chart-metrics-duo__tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin: 0;
    padding: 12px;
    min-width: 0;
    border: 0;
    background: var(--pro-surface-elevated, #f0eef5);
    color: inherit;
    text-align: left;
    font: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.chart-metrics-duo__tile--interactive {
    cursor: pointer;
}

.chart-metrics-duo__tile--interactive:hover {
    background: color-mix(in srgb, var(--pro-surface-muted, #e8e6ef) 55%, var(--pro-surface-elevated, #f0eef5));
}

.chart-metrics-duo__tile--interactive:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--pro-accent, #6366f1) 55%, transparent);
    outline-offset: -2px;
    z-index: 1;
}

.chart-metrics-duo__k {
    font-size: 0.6875rem;
    font-weight: 650;
    line-height: 1.25;
    color: var(--pro-text-muted, #6b7280);
}

.chart-metrics-duo__tile .chart-metric__v {
    font-size: clamp(0.9375rem, 3.8vw, 1.125rem);
    font-weight: 700;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.chart-metrics-side {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border-radius: var(--pro-radius-sm, 8px);
    background: color-mix(in srgb, var(--pro-surface-muted, #e8e6ef) 55%, transparent);
}

.chart-metrics-side__title {
    margin: 0 0 2px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--pro-text-muted, #6b7280);
}

.chart-metrics-side__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 2px;
    align-items: baseline;
}

.chart-metrics-side__k {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pro-text, #111827);
}

.chart-metrics-side__row .chart-metric__v {
    grid-column: 2;
    grid-row: 1;
    font-size: 0.9375rem;
    text-align: right;
}

.chart-metrics-side__row .chart-metric__hint {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 0.625rem;
}

.chart-metrics-detail-stack,
.chart-metrics-detail {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.chart-metric-card--row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    text-align: left;
}

.chart-metric-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.chart-metrics-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    width: 100%;
    min-width: 0;
}

.chart-metrics-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.chart-metrics-col__title {
    margin: 0 2px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--pro-text-muted);
    line-height: 1.2;
}

.chart-metrics-col--brut .chart-metrics-col__title {
    color: var(--pro-accent, #6366f1);
}

.chart-metrics-col--net .chart-metrics-col__title {
    color: var(--pro-success, #047857);
}

.chart-metrics-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chart-metrics-panel__primary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.chart-metrics-panel__secondary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chart-metrics-panel__brut-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chart-metrics-panel__brut-label {
    margin: 2px 2px 0;
    font-size: 0.6875rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    color: var(--pro-accent, #6366f1);
    line-height: 1.3;
}

.chart-metrics-panel__streaks {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.chart-metric-card.chart-metric-card--compact.chart-metric-card--streak {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    text-align: left;
    gap: 4px;
    min-height: 0;
    height: 100%;
    padding: 10px 12px;
}

.chart-metric-card--streak .chart-metric__k {
    width: 100%;
    min-height: 2.5em;
    margin: 0;
    text-align: left;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
    max-height: 2.5em;
}

.chart-metric-card--streak .chart-metric__v {
    width: 100%;
    margin: 0;
    text-align: left;
    line-height: 1.2;
}

.chart-metric-card--streak .chart-metric__hint {
    display: block;
    width: 100%;
    min-height: 1.35em;
    margin: 0;
    margin-top: auto;
    padding-top: 2px;
    font-size: 0.625rem;
    line-height: 1.35;
    text-align: left;
    color: var(--pro-text-muted, #6b7280);
    white-space: normal;
}

.chart-metric-card--wide {
    width: 100%;
}

.chart-metric-card--story {
    align-items: flex-start;
    text-align: left;
    gap: 6px;
    min-height: 0;
    padding: 12px 14px;
}

.chart-metric-card--interactive {
    width: 100%;
    cursor: pointer;
    text-align: left;
    border: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    font: inherit;
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.chart-metric-card--interactive:hover {
    border-color: color-mix(in srgb, var(--pro-accent) 22%, transparent);
    box-shadow: none;
    background: color-mix(in srgb, var(--pro-accent) 8%, var(--pro-surface-elevated, #f0eef5));
}

.chart-metric-card--interactive:active {
    transform: scale(0.995);
}

.chart-metric-card--interactive:focus-visible {
    outline: 2px solid var(--pro-accent);
    outline-offset: 2px;
}

.chart-metric__k--with-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.chart-metric__k-text {
    min-width: 0;
}

.chart-metric__detail-icon {
    flex-shrink: 0;
    color: var(--pro-text-muted);
    opacity: 0.7;
    transition: color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.chart-metric-card--interactive:hover .chart-metric__detail-icon,
.chart-metric-card--interactive:focus-visible .chart-metric__detail-icon {
    color: var(--pro-accent);
    opacity: 1;
    transform: translateX(1px);
}

#taxImpactBreakdownModal .modal-content--tax-impact,
#brutAvgBreakdownModal .modal-content--tax-impact,
#chartMetricHintModal .modal-content--metric-hint {
    max-width: 400px;
}

/* #region propflow:metric-hint-modal */
.metric-hint-modal {
    padding-top: 0;
}

.metric-hint-modal__body {
    margin: 0;
    font-size: var(--pro-fs-sm, 0.875rem);
    line-height: 1.45;
    color: var(--pro-text);
    white-space: pre-wrap;
}

.tax-impact-modal {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 0;
}

.tax-impact-modal__period {
    margin: 0;
    font-size: var(--pro-fs-sm);
    color: var(--pro-text-muted);
    line-height: 1.4;
}

.tax-impact-modal__note {
    margin: 0;
    padding: 0 2px;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--pro-text-muted);
}

.tax-impact-modal__extras {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tax-impact-modal__extras:empty {
    display: none;
}

.tax-impact-modal__list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--pro-border-subtle);
    border-radius: var(--pro-radius-sm);
    overflow: hidden;
    background: var(--pro-surface);
}

.tax-impact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--pro-border-subtle);
}

.tax-impact-row:last-child {
    border-bottom: none;
}

.tax-impact-row__label {
    font-size: var(--pro-fs-sm);
    font-weight: 600;
    color: var(--pro-text);
}

.tax-impact-row__values {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-shrink: 0;
}

.tax-impact-row__amount {
    font-size: var(--pro-fs-sm);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--pro-text);
    white-space: nowrap;
}

.tax-impact-row__amount.is-pos {
    color: var(--pro-success);
}

.tax-impact-row__amount.is-neg {
    color: var(--pro-danger);
}

.tax-impact-row__pct {
    min-width: 2.75rem;
    font-size: var(--pro-fs-xs);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--pro-text-muted);
    text-align: right;
}

.chart-metric-story__line {
    margin: 0;
    font-size: clamp(0.9375rem, 4vw, 1.0625rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--pro-text);
    font-variant-numeric: tabular-nums;
}

.chart-metric-story__sub {
    margin: 0;
    font-size: var(--pro-fs-xs);
    line-height: 1.35;
    color: var(--pro-text-muted);
}

.chart-metric-compare {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    margin-top: 2px;
}

.chart-metric-compare__col {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--pro-surface-muted) 88%, transparent);
    border: 1px solid var(--pro-border-subtle);
}

.chart-metric-compare__col--better {
    border-color: color-mix(in srgb, var(--pro-success) 35%, var(--pro-border-subtle));
    background: color-mix(in srgb, var(--pro-success) 8%, var(--pro-surface-muted));
}

.chart-metric-compare__col--micro.chart-metric-compare__col--better {
    border-color: color-mix(in srgb, var(--pro-accent) 35%, var(--pro-border-subtle));
    background: color-mix(in srgb, var(--pro-accent) 8%, var(--pro-surface-muted));
}

.chart-metric-compare__col--portage.chart-metric-compare__col--better {
    border-color: color-mix(in srgb, #0d9488 35%, var(--pro-border-subtle));
    background: color-mix(in srgb, #0d9488 8%, var(--pro-surface-muted));
}

.chart-metric-compare__divider {
    width: 1px;
    background: var(--pro-border-subtle);
}

.chart-metric-compare__branch {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pro-text-muted);
}

.chart-metric-compare__amount {
    font-size: clamp(0.8125rem, 3.6vw, 0.9375rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--pro-text);
    font-variant-numeric: tabular-nums;
}

.chart-metric-compare__share {
    font-size: clamp(1rem, 4.4vw, 1.125rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--pro-accent);
    font-variant-numeric: tabular-nums;
}

.chart-metric-compare__col--portage .chart-metric-compare__share {
    color: #0d9488;
}

.chart-metric-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    padding: 11px 12px;
    border-radius: var(--pro-radius-sm, 8px);
    background: color-mix(in srgb, var(--pro-accent) 4%, var(--pro-surface-elevated, #f0eef5));
    border: 1px solid transparent;
    box-shadow: none;
}

.chart-metric-card--hero {
    min-height: 72px;
    padding: 14px 16px;
}

.chart-metric-card--hero .chart-metric__v {
    font-size: clamp(1.125rem, 5.2vw, 1.375rem);
    line-height: 1.1;
}

.chart-metric-card--accent {
    background: color-mix(in srgb, var(--pro-accent) 10%, var(--pro-surface-elevated, #f0eef5));
    border-color: color-mix(in srgb, var(--pro-accent) 18%, transparent);
}

.chart-metric-card--duo {
    padding: 12px 14px;
}

.chart-metric-duo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.chart-metric-duo__item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 0;
}

.chart-metric-duo__divider {
    align-self: stretch;
    width: 1px;
    background: color-mix(in srgb, var(--pro-accent) 18%, var(--pro-border-subtle));
}

.chart-metric-card--compact {
    align-items: center;
    text-align: center;
    padding: 10px 8px;
    min-height: 64px;
}

.chart-metric-card--compact .chart-metric__k {
    text-align: center;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
    max-height: 2.5em;
}

.chart-metric-card--compact .chart-metric__v {
    font-size: clamp(0.8125rem, 3.4vw, 0.9375rem);
}

.chart-metric__k {
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pro-text-muted);
    max-width: 100%;
}

.chart-metric-card--hero .chart-metric__k {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-metric__v {
    font-size: clamp(0.9375rem, 4.2vw, 1.125rem);
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
    color: var(--pro-text);
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-metric__hint {
    display: block;
    margin-top: 4px;
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--pro-text-muted);
}

.chart-metric-story__sub--muted {
    opacity: 0.85;
    font-size: 0.6875rem;
}

.chart-metric__v--accent {
    color: var(--pro-accent); /* brut / ROI */
}

.chart-metric__v--pos {
    color: var(--pro-success);
}

.chart-metric__v--neg {
    color: var(--pro-danger);
}

.chart-metric__hint {
    display: block;
    margin-top: 4px;
    font-size: 0.625rem;
    line-height: 1.3;
    font-weight: 500;
    color: var(--pro-text-muted);
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
}

html[data-theme="dark"] .chart-metric-card {
    background: color-mix(in srgb, var(--pro-surface-muted) 94%, var(--pro-surface-elevated) 6%);
    box-shadow: none;
}

html[data-theme="dark"] .chart-metric-card--accent {
    background: color-mix(in srgb, var(--pro-accent) 14%, var(--pro-surface-muted) 86%);
    border-color: color-mix(in srgb, var(--pro-accent) 28%, var(--pro-border-subtle));
}

@media (max-width: 1023px) {
    /* Ancien layout Firms-dans-#stats : min-height plein écran retiré (laissait un trou sous la bannière Bilan). */
    body[data-stats-module="main"] [data-widget-id="propfirm-analysis"] {
        scroll-margin-top: 12px;
    }
}

@media (max-width: 380px) {
    .chart-metrics-panel__primary {
        grid-template-columns: 1fr;
    }

    .chart-metrics-panel__secondary {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .chart-metric-compare {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .chart-metric-compare__divider {
        display: none;
    }

    .chart-metric-card--hero,
    .chart-metric-card--compact {
        min-height: 0;
        padding: 11px 12px;
    }

    .chart-metric-card--compact:not(.chart-metric-card--streak) {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        gap: 10px;
    }

    .chart-metric-card--compact:not(.chart-metric-card--streak) .chart-metric__k {
        flex: 1 1 auto;
        max-height: none;
        -webkit-line-clamp: unset;
        display: block;
        text-align: left;
    }

    .chart-metric-card--compact:not(.chart-metric-card--streak) .chart-metric__v {
        flex: 0 0 auto;
        font-size: 0.9375rem;
    }

    .chart-metric-card--streak {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        text-align: left;
    }

    .chart-metric-card--streak .chart-metric__k,
    .chart-metric-card--streak .chart-metric__v,
    .chart-metric-card--streak .chart-metric__hint {
        text-align: left;
    }
}

/* —— Mode sombre (aligné pro.css) —— */
html[data-theme="dark"] body,
html[data-theme="dark"] .app-container {
    background-color: var(--pro-bg) !important;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(99, 102, 241, 0.2), transparent 50%),
        radial-gradient(ellipse 40% 30% at 100% 0%, rgba(124, 58, 237, 0.12), transparent 40%) !important;
}

@media (max-width: 1023px) {
    html[data-theme="dark"] .app-container::after {
        background-color: var(--pro-bg, #16181d) !important;
        background-image:
            radial-gradient(ellipse 80% 50% at 50% -10%, rgba(99, 102, 241, 0.2), transparent 50%),
            radial-gradient(ellipse 40% 30% at 100% 0%, rgba(124, 58, 237, 0.12), transparent 40%) !important;
    }
}

html[data-theme="dark"] .app-top-chrome,
html[data-theme="dark"] .header.mobile-only,
html[data-theme="dark"] .pc-header-modern,
html[data-theme="dark"] .nav {
    background: var(--pro-glass-strong) !important;
    border-color: var(--pro-glass-border) !important;
}

html[data-theme="dark"] .enhanced-card,
html[data-theme="dark"] .overview-master-card,
html[data-theme="dark"] .kpi-card {
    background: linear-gradient(
        165deg,
        var(--pro-surface-elevated) 0%,
        var(--pro-surface-card, var(--pro-surface)) 100%
    ) !important;
    border-color: var(--pro-border) !important;
}

html[data-theme="dark"] .account-switcher--header,
html[data-theme="dark"] .account-switcher--pc,
html[data-theme="dark"] .account-switcher {
    background: var(--pro-glass) !important;
    border-color: var(--pro-glass-border) !important;
}

html[data-theme="dark"] .account-switcher-btn.active {
    background: var(--pro-surface-muted) !important;
    border-color: var(--pro-accent-ring) !important;
}

html[data-theme="dark"] .stats-year-select,
html[data-theme="dark"] .quick-form-input,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background: color-mix(in srgb, var(--pro-accent) 8%, var(--pro-surface-muted)) !important;
    border: none !important;
    color: var(--pro-text) !important;
}

/* —— Surcharges legacy (moins de blanc) —— */
.metric-row,
.stat-item-fluid,
.dashboard-card,
.promo-card,
.widget-config-item,
.transaction-card {
    background: var(--pro-surface) !important;
    border-color: var(--pro-border-subtle) !important;
}

.chart-container,
[style*="background: white"],
[style*="background: #fff"],
[style*="background:#fff"] {
    background-color: var(--pro-surface-elevated) !important;
}

/* —— Tableau de bord KPI unifié —— */
.stats-kpi-panel,
.page#stats .overview-master-card.stats-section,
.page#history .overview-master-card.stats-section,
.page#bilan .overview-master-card.stats-section,
.page#balance .overview-master-card.stats-section {
    padding: 16px 0 !important;
    margin-top: 0 !important;
    margin-bottom: 16px !important;
}

.stats-module__head,
.stats-kpi-panel__head {
    display: none !important;
}

.stats-module__titles .card-title,
.stats-kpi-panel__titles .card-title {
    margin: 0 0 4px !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: var(--pro-text) !important;
}

.stats-module__subtitle,
.stats-kpi-panel__subtitle {
    margin: 0;
    font-size: var(--pro-fs-xs);
    color: var(--pro-text-muted);
    line-height: 1.35;
}

/* Filtre année dans le header (visible sur Stats uniquement) */
.header-content {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
}

.stats-year-filter--header {
    display: none;
    align-items: baseline;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.stats-year-trigger {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    margin: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.stats-year-display {
    font-size: inherit;
    font-weight: 600 !important;
    line-height: inherit;
    color: var(--pro-control) !important;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.app-header-unified .stats-year-trigger {
    font-size: 1.125rem;
    letter-spacing: -0.03em;
}

.pc-header-modern .stats-year-trigger {
    font-size: 1.25rem;
    letter-spacing: -0.03em;
}

.stats-year-filter--header .stats-year-select,
.stats-page-year-bar .stats-year-select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 16px;
}

.stats-page-year-bar {
    margin: -4px 0 16px;
    padding: 0;
}

.stats-page-year-bar .stats-year-trigger {
    gap: 0;
}

.stats-page-year-bar .stats-year-trigger:focus-within .stats-year-display,
.stats-year-trigger:has(.stats-year-select:focus-visible) .stats-year-display,
.stats-year-trigger:has(.stats-year-select:focus-visible) .stats-view-trigger__value {
    outline: 2px solid var(--pro-control-ring) !important;
    outline-offset: 2px;
    border-radius: 4px;
}

.pc-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

@media (max-width: 380px) {
    :root {
        --pro-header-mark: 28px;
    }

    .perf-badges-trigger--header .perf-badges-trigger__icon-wrap {
        width: 20px;
        height: 20px;
    }

    .perf-badges-trigger--header svg.perf-badges-trigger__trophy {
        width: 17px;
        height: 17px;
    }

    .perf-badges-trigger--header .perf-badges-trigger__roi {
        font-size: 0.52rem;
    }

    .perf-badges-trigger--header .perf-badges-trigger__goal {
        font-size: 0.52rem;
        min-width: 0;
    }
}

html.is-webview .perf-badges-trigger--header .perf-badges-trigger__icon-wrap {
    width: 24px;
    height: 24px;
}

html.is-webview .perf-badges-trigger--header svg.perf-badges-trigger__trophy {
    width: 20px;
    height: 20px;
}

html.is-webview .perf-badges-trigger--header .perf-badges-trigger__roi,
html.is-webview .perf-badges-trigger--header .perf-badges-trigger__goal {
    font-size: 0.6rem;
    min-width: 0;
}

/* Sélecteurs de vue Stats — préfixe neutre + valeur contrôle (pas le violet « brut ») */
.stats-view-picker,
.overview-lens-bar,
.reports-view-bar,
.propfirm-sort-wrap,
.history-month-bar {
    margin: 0 0 12px !important;
    padding: 0 !important;
}

.stats-view-picker__head,
.reports-view-head,
.propfirm-sort-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

.stats-view-trigger,
.overview-lens-trigger,
.reports-view-trigger,
.history-month-trigger,
.propfirm-sort-trigger {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    font-weight: 600;
    line-height: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    border-radius: 4px;
    text-align: left;
}

.stats-view-trigger:focus-visible,
.overview-lens-trigger:focus-visible,
.reports-view-trigger:focus-visible,
.history-month-trigger:focus-visible,
.propfirm-sort-trigger:focus-visible {
    outline: 2px solid var(--pro-control-ring);
    outline-offset: 2px;
}

.stats-view-trigger__prefix,
.propfirm-sort-trigger__prefix,
.reports-view-trigger__prefix,
.overview-lens-trigger__prefix,
.history-month-trigger__prefix {
    font-weight: 600;
    color: var(--pro-text);
}

.stats-view-trigger__prefix::after,
.propfirm-sort-trigger__prefix::after,
.reports-view-trigger__prefix::after,
.overview-lens-trigger__prefix::after,
.history-month-trigger__prefix::after {
    content: '\00a0';
}

.stats-view-trigger__value,
.propfirm-sort-trigger__value,
.reports-view-trigger__value,
.overview-lens-trigger__value,
.history-month-trigger__value {
    font-weight: 600;
    color: var(--pro-control);
}

.page#history .history-page-head .history-month-trigger__value {
    white-space: nowrap;
}

.page#history .history-month-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    width: 100% !important;
}

.page#history .history-month-trigger {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}

.history-month-total {
    flex-shrink: 0;
    font-weight: 600;
    color: #111827;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    line-height: inherit;
}

html[data-theme="dark"] #history .history-month-total {
    color: var(--pro-text);
}

#overviewTaxLensModal .account-branch-option.active .account-branch-option__name,
#reportsViewModal .account-branch-option.active .account-branch-option__name,
#propfirmSortModal .account-branch-option.active .account-branch-option__name,
#accountContextModal .account-branch-option.active .account-branch-option__name {
    color: var(--pro-accent) !important;
}

html[data-theme="dark"] .account-branch-option.active {
    background: color-mix(in srgb, var(--pro-accent-muted) 70%, var(--pro-surface-muted)) !important;
    border-color: var(--pro-accent) !important;
}

#reportsViewModal .propfirm-sort-option,
#propfirmSortModal .propfirm-sort-option {
    position: relative;
}

#reportsViewModal .account-branch-option,
#propfirmSortModal .account-branch-option {
    padding-right: 40px !important;
}

#reportsViewModal .propfirm-sort-mark,
#propfirmSortModal .propfirm-sort-mark {
    position: absolute;
    top: 7px;
    right: 7px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--pro-text-muted);
    cursor: pointer;
    opacity: 0.42;
    transition: opacity var(--pro-duration) var(--pro-ease), color var(--pro-duration) var(--pro-ease), background var(--pro-duration) var(--pro-ease);
}

#reportsViewModal .propfirm-sort-mark:hover,
#propfirmSortModal .propfirm-sort-mark:hover {
    opacity: 0.9;
    background: rgba(15, 23, 42, 0.06);
}

#reportsViewModal .propfirm-sort-mark:focus-visible,
#propfirmSortModal .propfirm-sort-mark:focus-visible {
    outline: 2px solid var(--pro-control-ring);
    outline-offset: 1px;
    opacity: 1;
}

#reportsViewModal .propfirm-sort-mark__icon,
#propfirmSortModal .propfirm-sort-mark__icon {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linejoin: round;
}

#reportsViewModal .propfirm-sort-mark--on,
#propfirmSortModal .propfirm-sort-mark--on {
    opacity: 1;
    color: #d97706;
}

#reportsViewModal .propfirm-sort-mark--on .propfirm-sort-mark__icon,
#propfirmSortModal .propfirm-sort-mark--on .propfirm-sort-mark__icon {
    fill: currentColor;
    stroke: currentColor;
}

/* —— Historique : picker mois / années (léger, type calendrier) —— */
#historyMonthModal .modal-content {
    max-width: 340px !important;
    border-radius: 20px !important;
    overflow: hidden;
}

#historyMonthModal .modal-header {
    padding: 18px 18px 6px !important;
    border-bottom: none !important;
}

#historyMonthModal .modal-title {
    font-size: var(--pro-fs-xl) !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em;
}

#historyMonthModal .close-btn {
    opacity: 0.55;
    transition: opacity var(--pro-duration) var(--pro-ease);
}

#historyMonthModal .close-btn:hover {
    opacity: 0.85;
}

#historyMonthModal .history-picker-list {
    display: flex;
    flex-direction: column;
    max-height: min(62vh, 440px);
    overflow-y: auto;
    padding: 2px 14px 18px;
    -webkit-overflow-scrolling: touch;
}

.history-picker-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.history-picker-year-rail {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 0 0 12px;
    padding: 0 0 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.history-picker-year-rail::-webkit-scrollbar {
    display: none;
}

.history-picker-year-chip {
    flex: 0 0 auto;
    margin: 0;
    padding: 8px 14px;
    min-height: 36px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--pro-text-muted);
    font-size: var(--pro-fs-md);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background var(--pro-duration) var(--pro-ease), color var(--pro-duration) var(--pro-ease);
}

.history-picker-year-chip:hover,
.history-picker-year-chip:focus-visible {
    background: rgba(15, 23, 42, 0.05);
    color: var(--pro-text);
}

html[data-theme="dark"] .history-picker-year-chip:hover,
html[data-theme="dark"] .history-picker-year-chip:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    color: var(--pro-text);
}

.history-picker-year-chip.active {
    background: var(--pro-accent-muted);
    color: var(--pro-accent);
    box-shadow: inset 0 0 0 1.5px var(--pro-accent-ring);
}

.history-picker-full-year {
    display: block;
    width: 100%;
    margin: 0 0 14px;
    padding: 10px 14px;
    border: none;
    border-radius: 999px;
    background: var(--pro-accent-muted);
    color: var(--pro-accent);
    font-size: var(--pro-fs-base);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background var(--pro-duration) var(--pro-ease), box-shadow var(--pro-duration) var(--pro-ease);
}

.history-picker-full-year:hover {
    filter: brightness(0.98);
}

.history-picker-full-year.active {
    box-shadow: inset 0 0 0 1.5px var(--pro-accent-ring);
}

.history-picker-months {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.history-picker-month {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin: 0;
    padding: 8px 4px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--pro-text);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background var(--pro-duration) var(--pro-ease), color var(--pro-duration) var(--pro-ease);
}

.history-picker-month:hover,
.history-picker-month:focus-visible {
    background: rgba(15, 23, 42, 0.05);
}

html[data-theme="dark"] .history-picker-month:hover,
html[data-theme="dark"] .history-picker-month:focus-visible {
    background: rgba(255, 255, 255, 0.06);
}

.history-picker-month__label {
    font-size: var(--pro-fs-base);
    font-weight: 600;
    letter-spacing: -0.01em;
    text-transform: capitalize;
}

.history-picker-month.active {
    background: var(--pro-accent-muted);
    color: var(--pro-accent);
}

.history-picker-month.active .history-picker-month__label {
    font-weight: 700;
}

.history-picker-month--empty {
    opacity: 0.38;
}

.history-picker-month--empty:hover,
.history-picker-month--empty:focus-visible {
    opacity: 0.55;
}

.history-month-list__empty {
    margin: 0;
    padding: 16px 8px;
    font-size: var(--pro-fs-sm);
    color: var(--pro-text-muted);
    text-align: center;
}

/* Bloque les clics fantômes sur les transactions après fermeture du picker mois (JS + repli CSS court) */
#history.history-ghost-click-guard .revolut-transaction-item {
    pointer-events: none;
}

/* Superposition : hauteur = max des deux vues (pas de saut au changement d'onglet) */
.overview-lens-panels.kpi-dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.overview-lens-panels > .overview-lens-panel {
    grid-area: 1 / 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.overview-lens-panels[data-overview-lens="before"] .overview-lens-panel[data-overview-lens="after"],
.overview-lens-panels[data-overview-lens="after"] .overview-lens-panel[data-overview-lens="before"] {
    visibility: hidden;
    pointer-events: none;
    z-index: 0;
}

.overview-lens-panels[data-overview-lens="before"] .overview-lens-panel[data-overview-lens="before"],
.overview-lens-panels[data-overview-lens="after"] .overview-lens-panel[data-overview-lens="after"] {
    visibility: visible;
    pointer-events: auto;
    z-index: 1;
}

.overview-lens-panel .overview-efficiency-block {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.overview-lens-panels .overview-tax-label,
.overview-lens-panels .overview-tax-title__sep {
    display: none;
}

.kpi-dashboard {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.kpi-zone {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kpi-zone__title {
    margin: 0;
    font-size: var(--pro-fs-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pro-text-muted);
}

.kpi-zone__title--with-tax .overview-tax-title {
    text-transform: inherit;
}

.kpi-zone--hero,
.kpi-zone--flow {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.kpi-card--expenses-total {
    position: relative !important;
}

.kpi-info-btn {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 2 !important;
    width: 26px !important;
    height: 26px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid var(--pro-accent-ring) !important;
    border-radius: 50% !important;
    background: var(--pro-accent-muted) !important;
    color: var(--pro-accent) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: transform 0.15s ease, background 0.15s ease !important;
}

.kpi-info-btn:hover,
.kpi-info-btn:focus-visible {
    background: var(--pro-accent) !important;
    color: #fff !important;
    transform: scale(1.06) !important;
    outline: none !important;
}

.kpi-info-btn .icon-sm {
    width: 14px !important;
    height: 14px !important;
}

.expense-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.expense-breakdown-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border-radius: var(--pro-radius);
    background: var(--pro-surface-muted);
    border: 1px solid var(--pro-border);
}

.expense-breakdown-row__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.expense-breakdown-row__label {
    font-size: var(--pro-fs-sm);
    font-weight: 600;
    color: var(--pro-text);
}

.expense-breakdown-row__amount {
    font-size: var(--pro-fs-sm);
    font-weight: 700;
    color: var(--pro-text);
    white-space: nowrap;
}

.expense-breakdown-row__bar {
    height: 6px;
    border-radius: 999px;
    background: var(--pro-border);
    overflow: hidden;
}

.expense-breakdown-row__bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--pro-accent);
    transition: width 0.25s ease;
}

.expense-breakdown-row__pct {
    font-size: var(--pro-fs-xs);
    color: var(--pro-text-muted);
    text-align: right;
}

.expense-breakdown-row--challenge .expense-breakdown-row__bar-fill {
    background: var(--pro-danger, #dc2626);
}

.expense-breakdown-row--activation .expense-breakdown-row__bar-fill {
    background: var(--pro-warning, #d97706);
}

.expense-breakdown-row--funded .expense-breakdown-row__bar-fill {
    background: var(--pro-accent);
}

.expense-breakdown-row--tax .expense-breakdown-row__bar-fill {
    background: var(--pro-text-muted);
}

.expense-breakdown-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--pro-border);
}

.expense-breakdown-footer__label {
    font-size: var(--pro-fs-sm);
    font-weight: 600;
    color: var(--pro-text-muted);
}

.expense-breakdown-footer__value {
    font-size: var(--pro-fs-lg);
    font-weight: 700;
    color: var(--pro-danger, #dc2626);
}

/* —— PropFirm perf : barres retraits / dépenses —— */
.propfirm-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.propfirm-card__name-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.4em;
    min-width: 0;
}

.propfirm-card__name {
    font-size: var(--pro-fs-md);
    font-weight: 700;
    color: var(--pro-text);
    line-height: 1.25;
}

.propfirm-card__net {
    font-size: var(--pro-fs-md);
    font-weight: 700;
    white-space: nowrap;
    color: var(--pro-text);
}

.propfirm-card__net--positive {
    color: var(--pro-success, #16a34a) !important;
}

.propfirm-card__net--negative {
    color: var(--pro-danger, #dc2626) !important;
}

.propfirm-card__rank {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.propfirm-card__rank[data-rank="1"] {
    background: #f1c40f;
}

.propfirm-card__rank[data-rank="2"] {
    background: #95a5a6;
}

.propfirm-card__rank[data-rank="3"] {
    background: #cd7f32;
}

.propfirm-flow-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
}

.propfirm-flow-bar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.propfirm-flow-bar__label {
    font-size: var(--pro-fs-xs);
    font-weight: 600;
    color: var(--pro-text-muted);
}

.propfirm-flow-bar__meta {
    font-size: var(--pro-fs-xs);
    font-weight: 600;
    color: var(--pro-text);
    white-space: nowrap;
}

.propfirm-flow-bar__track {
    height: 6px;
    border-radius: 999px;
    background: var(--pro-border);
    overflow: hidden;
}

.propfirm-flow-bar__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width 0.25s ease;
}

.propfirm-flow-bar--gain .propfirm-flow-bar__fill {
    background: var(--pro-success, #22c55e);
}

.propfirm-flow-bar--expense .propfirm-flow-bar__fill {
    background: var(--pro-danger, #ef4444);
}

.propfirm-flow-bar__label--emphasis,
.propfirm-flow-bar__meta--emphasis {
    font-weight: 700 !important;
    color: var(--pro-text) !important;
}

.propfirm-flow-bar--roi .propfirm-flow-bar__track {
    height: 8px;
}

.propfirm-flow-bar--roi-negative .propfirm-flow-bar__fill {
    background: var(--pro-danger, #ef4444);
}

.propfirm-flow-bar--roi-poor .propfirm-flow-bar__fill {
    background: #dc2626;
}

.propfirm-flow-bar--roi-toImprove .propfirm-flow-bar__fill {
    background: #ea580c;
}

.propfirm-flow-bar--roi-good .propfirm-flow-bar__fill {
    background: #ca8a04;
}

.propfirm-flow-bar--roi-veryGood .propfirm-flow-bar__fill,
.propfirm-flow-bar--roi-excellent .propfirm-flow-bar__fill {
    background: #16a34a;
}

.propfirm-flow-bar--roi-remarkable .propfirm-flow-bar__fill {
    background: #047857;
}

.propfirm-flow-bar--roi-exceptional .propfirm-flow-bar__fill {
    background: #0e7490;
}

.propfirm-flow-bar--roi-goat .propfirm-flow-bar__fill {
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #eab308);
}

.propfirm-card__foot--compact {
    justify-content: flex-end;
    margin-top: 0;
    padding-top: 4px;
    border-top: none;
}

.propfirm-card__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: var(--pro-fs-xs);
    color: var(--pro-text-muted);
}

.propfirm-card__foot .roi-indicator {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.propfirm-card__count {
    font-size: var(--pro-fs-xs);
    font-weight: 600;
    color: var(--pro-text-muted);
    white-space: nowrap;
}

/* —— Firms : une carte par firm, toutes les métriques ensemble —— */
.page#stats .overview-master-card.stats-section.propfirm-rankings-card,
.propfirm-rankings-card {
    padding: 0 !important;
    margin: 0 0 14px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.propfirm-rankings-card:hover {
    box-shadow: none !important;
    border-color: transparent !important;
    transform: none !important;
}

.propfirm-rankings-card .propfirm-sort-wrap {
    padding: 0 2px;
}

.pfirm-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pfirm-card {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 2px 8px;
    width: 100%;
    margin: 0;
    padding: 10px 10px 10px 8px;
    border: none;
    border-radius: var(--pro-radius, 12px);
    background: var(--pro-surface-elevated, #f0eef5);
    box-shadow: var(--pro-shadow-sm, 0 1px 2px rgba(26, 24, 22, 0.04));
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    -webkit-appearance: none;
    transition:
        background var(--pro-duration, 0.18s) var(--pro-ease, ease),
        box-shadow var(--pro-duration, 0.18s) var(--pro-ease, ease);
}

.pfirm-card:hover,
.pfirm-card:focus-visible {
    background: color-mix(in srgb, var(--pro-accent) 6%, var(--pro-surface-elevated, #f0eef5));
    outline: none;
}

.pfirm-card.is-selected {
    background: color-mix(in srgb, var(--pro-accent) 9%, var(--pro-surface-elevated, #f0eef5));
    box-shadow: 0 0 0 1.5px var(--pro-accent);
}

.pfirm-card__rank {
    padding-top: 1px;
    font-size: 0.6875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--pro-text-muted);
    text-align: right;
}

.pfirm-card:nth-child(1) .pfirm-card__rank,
.pfirm-card__rank[data-rank="1"] {
    color: var(--pro-warning, #b45309);
}

.pfirm-card:nth-child(2) .pfirm-card__rank,
.pfirm-card__rank[data-rank="2"] {
    color: var(--pro-text-secondary, #5c5650);
}

.pfirm-card:nth-child(3) .pfirm-card__rank,
.pfirm-card__rank[data-rank="3"] {
    color: color-mix(in srgb, var(--pro-warning, #b45309) 70%, var(--pro-text-muted));
}

.pfirm-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 10px 0 2px;
    padding: 0 4px;
}

.pfirm-pager__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: var(--pro-radius-sm, 8px);
    background: var(--pro-surface-elevated, #f0eef5);
    box-shadow: var(--pro-shadow-sm, 0 1px 2px rgba(26, 24, 22, 0.04));
    color: var(--pro-text);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.pfirm-pager__btn:hover:not(:disabled),
.pfirm-pager__btn:focus-visible:not(:disabled) {
    background: color-mix(in srgb, var(--pro-accent) 10%, var(--pro-surface-elevated, #f0eef5));
    outline: none;
}

.pfirm-pager__btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.pfirm-pager__status {
    min-width: 5.5rem;
    text-align: center;
    font-size: var(--pro-fs-xs, 0.75rem);
    font-weight: 600;
    color: var(--pro-text-muted, #6b7280);
    font-variant-numeric: tabular-nums;
}

.pfirm-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.pfirm-card__top {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.pfirm-card__name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.875rem;
    font-weight: 650;
    color: var(--pro-text);
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.pfirm-card__count {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--pro-text-muted);
}

.pfirm-card__roi {
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--pro-text-muted);
}

.pfirm-card__roi.is-brut {
    color: var(--pro-accent, #6366f1);
}

.pfirm-card__roi.is-neg {
    color: var(--pro-danger, #b91c1c);
}

.pfirm-card__roi.is-pos {
    color: var(--pro-accent, #6366f1);
}

.pfirm-card__roi-pair {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    flex: 0 0 auto;
    line-height: 1.2;
}

.pfirm-card__roi-lbl {
    font-size: 0.5625rem;
    font-weight: 600;
    color: inherit;
    opacity: 0.72;
    text-transform: none;
}

.reports-view-inline__prefix {
    flex: 0 0 auto;
    margin: 0;
    padding: 2px 0;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--pro-text-muted, #6b7280);
    white-space: nowrap;
    user-select: none;
}

.propfirm-sort-inline {
    display: none !important;
}

.pfirm-card__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 10px;
}

/* —— Classement performance PropFirm (préfixe + valeur violette) —— */
.propfirm-sort-wrap {
    margin: 0 0 8px !important;
}

.propfirm-section-head.propfirm-sort-wrap {
    margin: 0 0 8px !important;
}

.pfirm-card__metric {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.pfirm-card__metric-lbl {
    font-size: 0.5625rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--pro-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pfirm-card__metric-val {
    font-size: 0.8125rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--pro-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pfirm-card__metric--withdrawals .pfirm-card__metric-lbl,
.pfirm-card__metric--withdrawals .pfirm-card__metric-val {
    color: var(--pro-success, #047857);
}

.pfirm-card__metric--expenses .pfirm-card__metric-lbl,
.pfirm-card__metric--expenses .pfirm-card__metric-val {
    color: var(--pro-danger, #b91c1c);
}

.pfirm-card__metric-val.is-pos {
    color: var(--pro-success, #047857);
}

.pfirm-card__metric-val.is-neg {
    color: var(--pro-danger, #b91c1c);
}

html[data-theme="dark"] .pfirm-card {
    background: var(--pro-surface-elevated);
}

html[data-theme="dark"] .pfirm-card__roi.is-brut,
html[data-theme="dark"] .pfirm-card__roi.is-pos {
    color: var(--pro-accent, #818cf8);
}

html[data-theme="dark"] .pfirm-card__metric--withdrawals .pfirm-card__metric-lbl,
html[data-theme="dark"] .pfirm-card__metric--withdrawals .pfirm-card__metric-val,
html[data-theme="dark"] .pfirm-card__metric-val.is-pos {
    color: var(--pro-success, #4ade80);
}

html[data-theme="dark"] .pfirm-card__metric--expenses .pfirm-card__metric-lbl,
html[data-theme="dark"] .pfirm-card__metric--expenses .pfirm-card__metric-val,
html[data-theme="dark"] .pfirm-card__metric-val.is-neg,
html[data-theme="dark"] .pfirm-card__roi.is-neg {
    color: var(--pro-danger, #f87171);
}

@media (max-width: 360px) {
    .pfirm-card__metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* —— Classement performance PropFirm (préfixe + valeur violette) —— */
.propfirm-sort-wrap {
    margin: 0 0 12px !important;
}

.propfirm-section-head.propfirm-sort-wrap {
    margin: 0 0 12px !important;
}

.page#stats .propfirm-charts-container {
    padding: 0 !important;
    margin: 0 !important;
}

.propfirm-sort-head {
    justify-content: space-between;
}

.propfirm-sort-wrap[hidden] {
    display: none !important;
}

.propfirm-performance-content .propfirm-card {
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid transparent;
    background: var(--pro-surface, transparent);
    color: inherit;
    cursor: pointer;
    font: inherit;
    transition: border-color var(--pro-duration, 0.15s) var(--pro-ease, ease),
        box-shadow var(--pro-duration, 0.15s) var(--pro-ease, ease);
}

.propfirm-performance-content .propfirm-card:focus-visible {
    outline: 2px solid var(--pro-accent);
    outline-offset: 2px;
}

.propfirm-performance-content .propfirm-card--selected {
    border-color: var(--pro-accent);
    box-shadow: 0 0 0 1px var(--pro-accent-muted, rgba(37, 99, 235, 0.2));
}

.kpi-card--hero {
    min-height: 92px !important;
    padding: 16px 14px !important;
    border-radius: var(--pro-radius) !important;
    container-type: inline-size;
}

.kpi-hero-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
    width: 100%;
}

.kpi-hero-stack__label {
    font-size: var(--pro-fs-sm);
    font-weight: 600;
    line-height: 1.2;
    color: var(--pro-text-muted);
}

.kpi-card--hero.kpi-card--profit .kpi-hero-stack__label {
    color: var(--pro-text-muted);
}

.kpi-card--hero.kpi-card--roi .kpi-hero-stack__label {
    color: var(--pro-text-muted);
}

.kpi-card--hero .kpi-value,
.kpi-card--hero .kpi-hero-stack__value {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
}

.kpi-card--hero.kpi-card--profit .kpi-value,
.kpi-card--hero.kpi-card--profit .stat-value.kpi-value,
.kpi-card--hero.kpi-card--profit .kpi-hero-stack__value {
    font-size: clamp(0.82rem, 9cqi, 1.25rem);
    line-height: 1.2;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    max-width: 100%;
}
