
/* =========================================================
   FXPOSSIBLE — SHARED DASHBOARD HEADER
   Compact • Responsive • Glass-metal depth • SVG controls
========================================================= */

:root {
    --fxp-header-height: 64px;
    --fxp-header-surface: var(--panel, #071426);
    --fxp-header-page: var(--bg, #06101e);
    --fxp-header-border: var(--border, rgba(148, 174, 211, 0.17));
    --fxp-header-text: var(--text, #edf4ff);
    --fxp-header-muted: var(--muted, #91a4bf);
    --fxp-header-blue: var(--blue, #3985ff);
    --fxp-header-danger: #ff657a;
    --fxp-header-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.fxp-dashboard-header,
.fxp-dashboard-header *,
.fxp-header-modal,
.fxp-header-modal * {
    box-sizing: border-box;
}

.fxp-dashboard-header {
    position: sticky;
    top: 0;
    z-index: 9000;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    width: 100%;
    min-width: 0;
    min-height: var(--fxp-header-height);
    padding: 8px clamp(12px, 2vw, 28px);

    color: var(--fxp-header-text);
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.035) 0%,
            rgba(255, 255, 255, 0) 45%
        ),
        var(--fxp-header-surface);

    border-bottom: 1px solid var(--fxp-header-border);
    box-shadow: var(--fxp-header-shadow);
    font-family: Inter, "Segoe UI", Arial, sans-serif;

    isolation: isolate;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.fxp-dashboard-header::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(111, 174, 255, 0.3),
        rgba(255, 255, 255, 0.12),
        transparent
    );
    pointer-events: none;
}

.fxp-dashboard-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.fxp-dashboard-title {
    margin: 0;
    overflow: hidden;
    color: var(--fxp-header-text);
    font-size: clamp(0.94rem, 1.3vw, 1.12rem);
    font-weight: 750;
    letter-spacing: -0.025em;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fxp-dashboard-description {
    display: none;
}

.fxp-dashboard-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 1 auto;
    gap: 9px;
    min-width: 0;
}

/* Shared inline SVG icon appearance */

.fxp-dashboard-header .fxp-icon {
    display: block;
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.fxp-dashboard-header button {
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

.fxp-dashboard-header button:focus-visible,
.fxp-dashboard-header input:focus-visible,
.fxp-header-modal button:focus-visible {
    outline: 2px solid #72adff;
    outline-offset: 3px;
}

/* Search */

.fxp-dashboard-header .search-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;

    width: clamp(170px, 25vw, 320px);
    min-width: 0;
    height: 40px;
    padding: 0 12px;

    color: var(--fxp-header-muted);
    background: color-mix(
        in srgb,
        var(--fxp-header-page) 76%,
        transparent
    );
    border: 1px solid var(--fxp-header-border);
    border-radius: 12px;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.045),
        0 2px 5px rgba(0, 0, 0, 0.1);

    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease,
        transform 180ms ease;
}

.fxp-dashboard-header .search-box:focus-within {
    border-color: rgba(75, 145, 255, 0.75);
    background: var(--fxp-header-page);
    box-shadow:
        0 0 0 3px rgba(57, 133, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.fxp-dashboard-header .search-box input {
    display: block;
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0;

    border: 0;
    outline: 0;
    appearance: none;
    background: transparent;
    color: var(--fxp-header-text);
    font: inherit;
    font-size: 0.81rem;
}

.fxp-dashboard-header .search-box input::placeholder {
    color: var(--fxp-header-muted);
    opacity: 0.88;
}

.fxp-dashboard-header .search-box input::-webkit-search-cancel-button {
    cursor: pointer;
}

/* Search results */

.fxp-header-search-results {
    position: absolute;
    top: calc(100% + 9px);
    left: 0;
    z-index: 9020;

    display: none;
    width: min(420px, calc(100vw - 24px));
    max-height: min(65vh, 440px);
    overflow: auto;
    padding: 7px;

    color: var(--fxp-header-text);
    background: var(--fxp-header-surface);
    border: 1px solid var(--fxp-header-border);
    border-radius: 15px;

    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.045);

    animation: fxpHeaderDropIn 180ms ease both;
}

.fxp-header-search-results.show {
    display: block;
}

.fxp-header-search-heading {
    padding: 8px 10px 9px;
    color: var(--fxp-header-muted);
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.fxp-header-search-result {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--fxp-header-text);
    text-align: left;
    cursor: pointer;
    transition: background 150ms ease, transform 150ms ease;
}

.fxp-header-search-result:hover {
    background: rgba(74, 139, 255, 0.11);
    transform: translateX(2px);
}

.fxp-header-search-result .fxp-icon-box {
    display: grid;
    flex: 0 0 35px;
    width: 35px;
    height: 35px;
    place-items: center;
    border: 1px solid rgba(89, 153, 255, 0.22);
    border-radius: 10px;
    background: linear-gradient(
        145deg,
        rgba(72, 143, 255, 0.18),
        rgba(72, 143, 255, 0.045)
    );
    color: #80b6ff;
}

.fxp-header-search-result-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.fxp-header-search-result-copy strong {
    overflow: hidden;
    font-size: 0.82rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fxp-header-search-result-copy span {
    overflow: hidden;
    color: var(--fxp-header-muted);
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fxp-header-search-empty {
    padding: 20px 12px;
    color: var(--fxp-header-muted);
    font-size: 0.82rem;
    text-align: center;
}

/* Icon buttons */

.fxp-dashboard-header .notification,
.fxp-dashboard-header .profile {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-width: 40px;
    min-height: 40px;
    padding: 6px;

    color: var(--fxp-header-text);
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.055),
        rgba(255, 255, 255, 0.012)
    );
    border: 1px solid var(--fxp-header-border);
    border-radius: 12px;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 3px 8px rgba(0, 0, 0, 0.12);

    cursor: pointer;

    transition:
        transform 170ms ease,
        border-color 170ms ease,
        background 170ms ease,
        box-shadow 170ms ease;
}

.fxp-dashboard-header .notification:hover,
.fxp-dashboard-header .profile:hover {
    transform: translateY(-1px);
    border-color: rgba(107, 165, 255, 0.45);
    background: linear-gradient(
        145deg,
        rgba(74, 139, 255, 0.13),
        rgba(255, 255, 255, 0.025)
    );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 7px 16px rgba(0, 0, 0, 0.16);
}

.fxp-dashboard-header .notification:active,
.fxp-dashboard-header .profile:active {
    transform: translateY(0) scale(0.98);
}

.fxp-dashboard-header .notification {
    width: 40px;
    padding: 0;
}

.fxp-dashboard-header .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    z-index: 2;

    display: none;
    align-items: center;
    justify-content: center;

    min-width: 18px;
    height: 18px;
    padding: 0 5px;

    color: #fff;
    background: linear-gradient(145deg, #ff667a, #d92e50);
    border: 2px solid var(--fxp-header-surface);
    border-radius: 99px;

    box-shadow: 0 2px 9px rgba(230, 50, 82, 0.35);
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
}

/* Avatar with reflective glass finish */

.fxp-dashboard-header .profile {
    justify-content: flex-start;
    max-width: 220px;
    padding: 4px 9px 4px 5px;
    text-align: left;
}

.fxp-dashboard-header .avatar {
    position: relative;
    isolation: isolate;
    display: grid;
    flex: 0 0 34px;
    place-items: center;

    width: 34px;
    height: 34px;
    overflow: hidden;

    color: #fff;
    background:
        radial-gradient(
            circle at 27% 15%,
            rgba(255, 255, 255, 0.68),
            transparent 28%
        ),
        linear-gradient(145deg, #58a1ff 0%, #2765d8 52%, #153b85 100%);

    background-position: center;
    background-size: cover;

    border: 1px solid rgba(190, 221, 255, 0.72);
    border-radius: 50%;

    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.4),
        inset 0 -3px 5px rgba(0, 0, 0, 0.24),
        0 3px 9px rgba(21, 86, 191, 0.28);

    font-size: 0.84rem;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.fxp-dashboard-header .avatar::after {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    right: 0;
    height: 47%;
    border-radius: 50% 50% 45% 45%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.3),
        rgba(255, 255, 255, 0.035)
    );
    pointer-events: none;
}

.fxp-dashboard-header .profile-info {
    display: grid;
    gap: 2px;
    min-width: 0;
    text-align: left;
}

.fxp-dashboard-header .profile-info h4,
.fxp-dashboard-header .profile-info p {
    display: block;
    max-width: 145px;
    margin: 0;
    overflow: hidden;
    color: inherit;
    font-size: 0.77rem;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fxp-dashboard-header .profile-info p {
    color: var(--fxp-header-muted);
    font-size: 0.67rem;
    font-weight: 450;
}

.fxp-header-chevron {
    width: 14px !important;
    height: 14px !important;
    color: var(--fxp-header-muted);
    transition: transform 180ms ease;
}

.fxp-dashboard-header .profile[aria-expanded="true"] .fxp-header-chevron {
    transform: rotate(180deg);
}

/* Dropdown surfaces */

.fxp-dashboard-header .notification-wrapper,
.fxp-dashboard-header .profile-wrapper {
    position: relative;
    flex: 0 0 auto;
}
/* =========================================================
   TRADING JOURNAL — GLOBAL HEADER ACTIONS
   Only shown on trading-journal.html
========================================================= */

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-journal-header-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 0;
}

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-journal-header-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #ffffff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition:
        background 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-journal-add-trade-button {
    background: linear-gradient(135deg, #3985ff, #246bff);
    border-color: rgba(104, 163, 255, 0.55);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 4px 12px rgba(36, 107, 255, 0.2);
}

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-journal-add-trade-button:hover {
    background: linear-gradient(135deg, #5295ff, #3378ff);
    border-color: rgba(137, 183, 255, 0.8);
    box-shadow: 0 6px 16px rgba(36, 107, 255, 0.3);
    transform: translateY(-1px);
}

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-journal-header-plus {
    font-size: 19px;
    font-weight: 500;
    line-height: 1;
}

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-journal-share-button {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.055),
        rgba(255, 255, 255, 0.012)
    );
    border-color: var(--fxp-header-border);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 3px 8px rgba(0, 0, 0, 0.12);
}

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-journal-share-button:hover {
    background: linear-gradient(
        145deg,
        rgba(74, 139, 255, 0.13),
        rgba(255, 255, 255, 0.025)
    );
    border-color: rgba(107, 165, 255, 0.45);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-journal-share-icon {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-journal-header-button:focus-visible {
    outline: 2px solid #79a6ff;
    outline-offset: 3px;
}

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-journal-header-button:active {
    transform: translateY(0) scale(0.98);
}

@media (max-width: 760px) {
    :is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-journal-header-actions {
        gap: 5px;
    }

    :is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-journal-header-button {
        min-height: 36px;
        padding: 0 9px;
        font-size: 11px;
    }
}
.fxp-dashboard-header .notification-dropdown,
.fxp-dashboard-header .profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 9010;

    display: none;
    width: 340px;
    max-width: min(90vw, 380px);
    overflow: hidden;

    color: var(--fxp-header-text);
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.035),
            transparent 42%
        ),
        var(--fxp-header-surface);

    border: 1px solid var(--fxp-header-border);
    border-radius: 16px;

    box-shadow:
        0 25px 75px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    transform-origin: top right;
}

.fxp-dashboard-header .notification-dropdown.show,
.fxp-dashboard-header .profile-dropdown.show {
    display: block;
    animation: fxpHeaderDropIn 190ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes fxpHeaderDropIn {
    from {
        opacity: 0;
        transform: translateY(-7px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Notification header and actions */

.fxp-dashboard-header .notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 16px 12px;
    border-bottom: 1px solid var(--fxp-header-border);
}

.fxp-dashboard-header .notification-header h3 {
    margin: 0;
    color: var(--fxp-header-text);
    font-size: 0.91rem;
    font-weight: 750;
}

.fxp-notification-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fxp-notification-count {
    display: grid;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    place-items: center;
    border: 1px solid rgba(83, 147, 255, 0.24);
    border-radius: 99px;
    background: rgba(57, 133, 255, 0.12);
    color: #8dbbff;
    font-size: 0.68rem;
    font-weight: 800;
}

.fxp-clear-all {
    padding: 5px 0;
    border: 0;
    background: transparent;
    color: #8ebaff;
    font-size: 0.71rem;
    font-weight: 700;
    cursor: pointer;
}

.fxp-clear-all:hover {
    color: #c1dcff;
    text-decoration: underline;
}

.fxp-dashboard-header .notification-content {
    max-height: min(390px, 60vh);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 5px 9px 9px;
    overscroll-behavior: contain;
}

.fxp-dashboard-header .notification-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 5px;
    padding: 10px 8px;
    border: 1px solid transparent;
    border-radius: 11px;
    transition: background 150ms ease, border-color 150ms ease;
}

.fxp-dashboard-header .notification-item:hover {
    border-color: var(--fxp-header-border);
    background: rgba(255, 255, 255, 0.027);
}

.fxp-dashboard-header .notification-item.unread {
    background: rgba(57, 133, 255, 0.055);
}

.fxp-notification-open {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.fxp-dashboard-header .notification-item-icon {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(83, 147, 255, 0.2);
    border-radius: 10px;
    background: linear-gradient(
        145deg,
        rgba(57, 133, 255, 0.17),
        rgba(57, 133, 255, 0.045)
    );
    color: #8dbbff;
}

.fxp-dashboard-header .notification-item-content {
    display: grid;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
}

.fxp-dashboard-header .notification-item-content strong {
    color: var(--fxp-header-text);
    font-size: 0.77rem;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.fxp-dashboard-header .notification-item-content p {
    margin: 0;
    color: var(--fxp-header-muted);
    font-size: 0.73rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.fxp-dashboard-header .notification-item-content span {
    color: var(--fxp-header-muted);
    font-size: 0.65rem;
}

.fxp-notification-delete {
    display: grid;
    flex: 0 0 29px;
    width: 29px;
    height: 29px;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--fxp-header-muted);
    cursor: pointer;
    opacity: 0.75;
    transition:
        color 150ms ease,
        background 150ms ease,
        border-color 150ms ease,
        opacity 150ms ease;
}

.fxp-notification-delete .fxp-icon {
    width: 15px;
    height: 15px;
}

.fxp-notification-delete:hover {
    color: var(--fxp-header-danger);
    background: rgba(255, 91, 116, 0.1);
    border-color: rgba(255, 91, 116, 0.19);
    opacity: 1;
}

.fxp-dashboard-header .empty-notifications {
    padding: 27px 15px 30px;
    color: var(--fxp-header-muted);
    text-align: center;
}

.fxp-dashboard-header .empty-notification-icon {
    display: grid;
    width: 44px;
    height: 44px;
    margin: 0 auto 11px;
    place-items: center;
    border: 1px solid var(--fxp-header-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    color: #8dbbff;
}

.fxp-dashboard-header .empty-notifications strong {
    display: block;
    color: var(--fxp-header-text);
    font-size: 0.84rem;
}

.fxp-dashboard-header .empty-notifications p {
    margin: 5px 0 0;
    font-size: 0.75rem;
}

/* Profile dropdown */

.fxp-dashboard-header .profile-dropdown-user {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 16px;
}

.fxp-dashboard-header .profile-dropdown-user > div:last-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.fxp-dashboard-header .profile-dropdown-user strong {
    color: var(--fxp-header-text);
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

.fxp-dashboard-header .profile-dropdown-user span {
    color: var(--fxp-header-muted);
    font-size: 0.73rem;
    overflow-wrap: anywhere;
}

.fxp-dashboard-header .profile-dropdown-divider {
    height: 1px;
    background: var(--fxp-header-border);
}

.fxp-dashboard-header .profile-menu {
    display: grid;
    gap: 3px;
    padding: 7px;
}

.fxp-dashboard-header .profile-menu-item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 40px;
    padding: 9px 10px;

    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--fxp-header-text);

    font-size: 0.8rem;
    font-weight: 550;
    text-align: left;
    cursor: pointer;

    transition:
        background 150ms ease,
        border-color 150ms ease,
        transform 150ms ease;
}

.fxp-dashboard-header .profile-menu-item:hover {
    transform: translateX(2px);
    border-color: var(--fxp-header-border);
    background: rgba(255, 255, 255, 0.04);
}

.fxp-dashboard-header .profile-menu-item .fxp-icon {
    width: 17px;
    height: 17px;
    color: var(--fxp-header-muted);
}

.fxp-dashboard-header .logout-item {
    margin: 5px 0 7px;
    width: calc(100% - 14px);
    margin-right: 7px;
    margin-left: 7px;
    color: #ff8999;
}

.fxp-dashboard-header .logout-item .fxp-icon {
    color: #ff8999;
}

.fxp-dashboard-header .logout-item:hover {
    border-color: rgba(255, 91, 116, 0.2);
    background: rgba(255, 91, 116, 0.08);
}

/* Branded logout confirmation */

.fxp-header-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;

    background: rgba(2, 7, 16, 0.76);
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);

    animation: fxpModalFadeIn 160ms ease both;
}

.fxp-header-modal-card {
    position: relative;
    width: min(100%, 420px);
    overflow: hidden;
    padding: 24px;

    color: var(--fxp-header-text);
    background:
        radial-gradient(
            circle at 12% 0%,
            rgba(57, 133, 255, 0.13),
            transparent 38%
        ),
        linear-gradient(145deg, #0d1d33, #071222 72%);

    border: 1px solid rgba(134, 174, 231, 0.23);
    border-radius: 19px;

    box-shadow:
        0 30px 100px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);

    animation: fxpModalCardIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.fxp-header-modal-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(151, 195, 255, 0.55),
        transparent
    );
}

.fxp-header-modal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.fxp-header-modal-logo {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(125, 181, 255, 0.4);
    border-radius: 13px;
    background: linear-gradient(145deg, #3985ff, #1647a4);
    color: white;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.38),
        0 7px 18px rgba(29, 91, 205, 0.26);
}

.fxp-header-modal-logo .fxp-icon {
    width: 23px;
    height: 23px;
}

.fxp-header-modal-brand strong {
    display: block;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
}

.fxp-header-modal-brand span {
    display: block;
    margin-top: 3px;
    color: #91a9c9;
    font-size: 0.7rem;
}

.fxp-header-modal-card h2 {
    margin: 0 0 9px;
    font-size: 1.22rem;
    letter-spacing: -0.025em;
}

.fxp-header-modal-card p {
    margin: 0;
    color: #b1c1d8;
    font-size: 0.84rem;
    line-height: 1.7;
}

.fxp-header-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 23px;
}

.fxp-header-modal-actions button {
    flex: 1;
    min-height: 42px;
    padding: 10px 13px;
    border: 1px solid rgba(145, 171, 207, 0.22);
    border-radius: 10px;
    font: inherit;
    font-size: 0.81rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 150ms ease, filter 150ms ease;
}

.fxp-header-modal-actions button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.fxp-header-modal-cancel {
    background: rgba(255, 255, 255, 0.045);
    color: #edf4ff;
}

.fxp-header-modal-confirm {
    border-color: #c73651 !important;
    background: linear-gradient(145deg, #f04c68, #c82748);
    color: white;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 5px 15px rgba(201, 39, 72, 0.2);
}

@keyframes fxpModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fxpModalCardIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Search result highlight */

.fxp-search-highlight {
    outline: 2px solid rgba(81, 151, 255, 0.9) !important;
    outline-offset: 4px !important;
    border-radius: 8px;
    animation: fxpSearchPulse 1.5s ease;
}

@keyframes fxpSearchPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(57, 133, 255, 0); }
    35% { box-shadow: 0 0 0 7px rgba(57, 133, 255, 0.13); }
}

/* Responsive layout */

@media (max-width: 760px) {
    :root {
        --fxp-header-height: 58px;
    }

    .fxp-dashboard-header {
        gap: 10px;
        padding: 7px 12px;
    }

    .fxp-dashboard-heading {
        flex: 0 1 auto;
        max-width: 34%;
    }

    .fxp-dashboard-title {
        font-size: 0.88rem;
    }

    .fxp-dashboard-header-actions {
        flex: 1 1 auto;
        gap: 7px;
    }

    .fxp-dashboard-header .search-box {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        height: 38px;
        padding: 0 9px;
    }

    .fxp-dashboard-header .search-box input {
        font-size: 0.76rem;
    }

    .fxp-dashboard-header .notification,
    .fxp-dashboard-header .profile {
        min-width: 38px;
        min-height: 38px;
    }

    .fxp-dashboard-header .notification {
        width: 38px;
    }

    .fxp-dashboard-header .profile {
        padding: 2px;
        border-color: transparent;
        background: transparent;
        box-shadow: none;
    }

    .fxp-dashboard-header .profile:hover {
        background: rgba(255, 255, 255, 0.045);
        box-shadow: none;
    }

    .fxp-dashboard-header .profile-info,
    .fxp-dashboard-header .fxp-header-chevron {
        display: none;
    }

    .fxp-dashboard-header .avatar {
        flex-basis: 33px;
        width: 33px;
        height: 33px;
    }

    .fxp-dashboard-header .notification-dropdown,
    .fxp-dashboard-header .profile-dropdown {
        position: fixed;
        top: calc(var(--fxp-header-height) + 7px);
        right: 9px;
        width: min(360px, calc(100vw - 18px));
        max-width: none;
    }

    .fxp-header-search-results {
        position: fixed;
        top: calc(var(--fxp-header-height) + 7px);
        left: 9px;
        width: calc(100vw - 18px);
        max-width: none;
    }
}

@media (max-width: 420px) {
    .fxp-dashboard-header {
        gap: 7px;
        padding-right: 8px;
        padding-left: 9px;
    }

    .fxp-dashboard-heading {
        max-width: 28%;
    }

    .fxp-dashboard-title {
        font-size: 0.79rem;
    }

    .fxp-dashboard-header-actions {
        gap: 5px;
    }

    .fxp-dashboard-header .search-box {
        gap: 6px;
        padding: 0 7px;
    }

    .fxp-dashboard-header .search-box .fxp-icon {
        width: 16px;
        height: 16px;
    }

    .fxp-dashboard-header .search-box input {
        font-size: 0.72rem;
    }

    .fxp-dashboard-header .notification {
        width: 35px;
        min-width: 35px;
        min-height: 36px;
    }

    .fxp-dashboard-header .profile {
        min-width: 34px;
        min-height: 36px;
    }
}

.fxp-mobile-menu-toggle,
.fxp-mobile-brand {
    display: none;
}

@media (max-width: 760px) {
    .fxp-dashboard-header {
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr) 38px 38px;
        gap: 7px 9px;
        align-items: center;
        height: auto;
        min-height: 58px;
        padding: 9px 12px 12px;
    }

    .fxp-dashboard-heading,
    .fxp-dashboard-header-actions {
        display: contents;
    }

    .fxp-mobile-menu-toggle {
        grid-column: 1;
        grid-row: 1;
        display: grid;
        width: 36px;
        height: 36px;
        place-items: center;
        padding: 0;
        border: 1px solid rgba(108, 153, 222, .22);
        border-radius: 11px;
        background: rgba(15, 30, 51, .8);
        color: #e8f1ff;
        cursor: pointer;
    }

    .fxp-mobile-menu-toggle .fxp-icon {
        width: 19px;
        height: 19px;
    }

    .fxp-mobile-brand {
        grid-column: 2;
        grid-row: 1;
        display: inline-flex;
        min-width: 0;
        color: #f0f5ff;
        text-decoration: none;
    }

    .fxp-mobile-brand-name {
        display: grid;
        gap: 2px;
        min-width: 0;
    }

    .fxp-mobile-brand-name strong {
        font-size: 15px;
        font-weight: 750;
        letter-spacing: -.3px;
        line-height: 1;
    }

    .fxp-mobile-brand-name strong span {
        color: #3985ff;
    }

    .fxp-mobile-brand-name small {
        color: #8095b4;
        font-size: 7px;
        font-weight: 750;
        letter-spacing: 1px;
    }

    .fxp-dashboard-title {
        grid-column: 1 / -1;
        grid-row: 2;
        display: block;
        max-width: none;
        margin: 8px 0 0;
        font-size: 1.15rem;
        line-height: 1.3;
    }

    .fxp-dashboard-header .search-box {
        grid-column: 1 / -1;
        grid-row: 3;
        width: 100%;
        height: 41px;
        margin-top: 1px;
        border-radius: 11px;
    }

    .fxp-dashboard-header .notification-wrapper {
        grid-column: 3;
        grid-row: 1;
    }

    .fxp-dashboard-header .profile-wrapper {
        grid-column: 4;
        grid-row: 1;
    }

    .fxp-dashboard-header .notification,
    .fxp-dashboard-header .profile {
        width: 38px;
        min-width: 38px;
        height: 38px;
        min-height: 38px;
    }

    .fxp-dashboard-header .avatar {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }

    .fxp-dashboard-header .notification-dropdown,
    .fxp-dashboard-header .profile-dropdown {
        top: 45px;
    }

    .fxp-header-search-results {
        top: calc(100% + 6px);
    }
}

@media (max-width: 360px) {
    .fxp-dashboard-header {
        grid-template-columns: 34px minmax(0, 1fr) 35px 35px;
        gap: 7px;
        padding-right: 9px;
        padding-left: 9px;
    }

    .fxp-mobile-menu-toggle {
        width: 34px;
        height: 34px;
    }

    .fxp-dashboard-header .notification,
    .fxp-dashboard-header .profile {
        width: 35px;
        min-width: 35px;
        height: 35px;
        min-height: 35px;
    }

    .fxp-dashboard-header .avatar {
        flex-basis: 31px;
        width: 31px;
        height: 31px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fxp-dashboard-header *,
    .fxp-header-modal *,
    .fxp-dashboard-header::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.fxp-prop-manager-header .fxp-prop-title-accent {
    color: #3985ff;
}

.fxp-mobile-brand-logo {
    display: none;
}

@media (max-width: 760px) {
    body.fxp-prop-manager-page .fxp-dashboard-header {
        grid-template-columns: 36px minmax(0, 1fr) 38px 38px;
        grid-template-rows: 48px auto auto 58px;
        gap: 7px 9px;
        padding: 10px 18px 15px;
    }

    body.fxp-prop-manager-page .fxp-dashboard-heading {
        max-width: none;
    }

    body.fxp-prop-manager-page .fxp-mobile-brand {
        align-items: center;
        gap: 9px;
    }

    body.fxp-prop-manager-page .fxp-mobile-brand-logo {
        display: block;
        flex: 0 0 46px;
        width: 46px;
        height: 46px;
        object-fit: contain;
    }

    body.fxp-prop-manager-page .fxp-mobile-brand-name strong {
        font-size: 19px;
    }

    body.fxp-prop-manager-page .fxp-mobile-brand-name small {
        font-size: 8px;
    }

    body.fxp-prop-manager-page .fxp-dashboard-title {
        grid-column: 1 / -1;
        grid-row: 2;
        margin: 4px 0 0;
        font-size: clamp(2rem, 7vw, 2.45rem);
        line-height: 1.12;
        letter-spacing: -0.04em;
    }

    body.fxp-prop-manager-page .fxp-dashboard-description {
        display: block;
        grid-column: 1 / -1;
        grid-row: 3;
        margin: 0;
        color: #a4b3cc;
        font-size: 14px;
        line-height: 1.4;
    }

    body.fxp-prop-manager-page .fxp-prop-manager-header-actions {
        grid-column: 1 / -1;
        grid-row: 4;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 142px;
        align-items: stretch;
        gap: 12px;
        width: 100%;
        min-width: 0;
    }

    body.fxp-prop-manager-page #propManagerSearchBox {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        height: 58px;
        min-width: 0;
        margin: 0;
        padding: 0 15px;
        border-radius: 17px;
        font-size: 14px;
    }

    body.fxp-prop-manager-page #propManagerSearchBox input {
        min-width: 0;
        font-size: 14px;
    }

    body.fxp-prop-manager-page .fxp-prop-manager-header-actions .payouts-btn {
        display: none;
    }

    body.fxp-prop-manager-page .fxp-prop-manager-header-actions .add-account-btn {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        height: 58px;
        padding: 0 10px;
        border: 1px solid rgba(86, 155, 255, 0.5);
        border-radius: 14px;
        background: linear-gradient(110deg, #0879ff, #1265ec);
        box-shadow: 0 9px 22px rgba(0, 101, 255, 0.22);
        font-size: 13px;
        line-height: 1.25;
        white-space: normal;
    }
}

@media (max-width: 420px) {
    body.fxp-prop-manager-page .fxp-dashboard-header {
        grid-template-columns: 34px minmax(0, 1fr) 35px 35px;
        gap: 7px;
        padding-right: 10px;
        padding-left: 10px;
    }

    body.fxp-prop-manager-page .fxp-mobile-brand-logo {
        flex-basis: 39px;
        width: 39px;
        height: 39px;
    }

    body.fxp-prop-manager-page .fxp-mobile-brand-name strong {
        font-size: 16px;
    }

    body.fxp-prop-manager-page .fxp-mobile-brand-name small {
        font-size: 7px;
        letter-spacing: 0.7px;
    }

    body.fxp-prop-manager-page .fxp-prop-manager-header-actions {
        grid-template-columns: minmax(0, 1fr) 126px;
        gap: 8px;
    }
}

@media (max-width: 760px) {
    .fxp-dashboard-header {
        grid-template-columns: minmax(0, 1fr) 38px 38px;
        grid-template-rows: 48px auto 42px auto;
        gap: 7px 9px;
        padding: 10px 12px 12px;
    }

    .fxp-dashboard-heading,
    .fxp-dashboard-header-actions {
        display: contents;
        max-width: none;
    }

    .fxp-mobile-menu-toggle {
        display: none !important;
    }

    .fxp-mobile-brand {
        grid-column: 1;
        grid-row: 1;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
        color: #f0f5ff;
        text-decoration: none;
    }

    .fxp-mobile-brand-logo {
        display: block;
        flex: 0 0 36px;
        width: 36px;
        height: 36px;
        object-fit: contain;
    }

    .fxp-mobile-brand-name {
        display: grid;
        gap: 2px;
        min-width: 0;
    }

    .fxp-mobile-brand-name strong {
        font-size: 15px;
        font-weight: 750;
        letter-spacing: -.3px;
        line-height: 1;
    }

    .fxp-mobile-brand-name strong span {
        color: #3985ff;
    }

    .fxp-mobile-brand-name small {
        color: #8095b4;
        font-size: 7px;
        font-weight: 750;
        letter-spacing: 1px;
    }

    .fxp-dashboard-title {
        grid-column: 1 / -1;
        grid-row: 2;
        display: block;
        max-width: none;
        margin: 7px 0 0;
        font-size: 1.15rem;
        line-height: 1.3;
    }

    .fxp-dashboard-header .notification-wrapper {
        grid-column: 2;
        grid-row: 1;
    }

    .fxp-dashboard-header .profile-wrapper {
        grid-column: 3;
        grid-row: 1;
    }

    .fxp-dashboard-header .notification,
    .fxp-dashboard-header .profile {
        width: 38px;
        min-width: 38px;
        height: 38px;
        min-height: 38px;
    }

    .fxp-dashboard-header .notification-dropdown,
    .fxp-dashboard-header .profile-dropdown {
        top: 45px;
    }

    .fxp-dashboard-header > .fxp-dashboard-header-actions > .search-box,
    .fxp-dashboard-header .search-box:not(#propManagerSearchBox) {
        grid-column: 1 / -1;
        grid-row: 3;
        width: 100%;
        height: 42px;
        margin-top: 0;
        border-radius: 11px;
    }

    .fxp-dashboard-header .fxp-journal-header-actions,
    :is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-payout-header-actions {
        grid-column: 1 / -1;
        grid-row: 4;
    }

    body.fxp-prop-manager-page .fxp-dashboard-header {
        grid-template-columns: minmax(0, 1fr) 38px 38px;
        grid-template-rows: 48px auto auto 58px;
    }

    body.fxp-prop-manager-page .fxp-dashboard-description {
        display: block;
        grid-column: 1 / -1;
        grid-row: 3;
        margin: 0;
        color: #a4b3cc;
        font-size: 14px;
        line-height: 1.4;
    }

    body.fxp-prop-manager-page .fxp-prop-manager-header-actions {
        grid-column: 1 / -1;
        grid-row: 4;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 142px;
        align-items: stretch;
        gap: 12px;
        width: 100%;
        min-width: 0;
    }

    body.fxp-prop-manager-page #propManagerSearchBox {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        height: 58px;
        min-width: 0;
        margin: 0;
        padding: 0 15px;
        border-radius: 17px;
        font-size: 14px;
    }

    body.fxp-prop-manager-page #propManagerSearchBox input {
        min-width: 0;
        font-size: 14px;
    }

    body.fxp-prop-manager-page .fxp-prop-manager-header-actions .payouts-btn {
        display: none;
    }

    body.fxp-prop-manager-page .fxp-prop-manager-header-actions .add-account-btn {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        height: 58px;
        padding: 0 10px;
        border: 1px solid rgba(86, 155, 255, 0.5);
        border-radius: 14px;
        background: linear-gradient(110deg, #0879ff, #1265ec);
        box-shadow: 0 9px 22px rgba(0, 101, 255, 0.22);
        font-size: 13px;
        line-height: 1.25;
        white-space: normal;
    }

    body.fxp-brand-only-page .fxp-dashboard-header {
        grid-template-rows: 48px;
        min-height: 58px;
    }

    body.fxp-brand-only-page .goals-topbar,
    body.fxp-brand-only-page .help-topbar,
    body.fxp-brand-only-page .admin-header,
    body.fxp-brand-only-page .topbar {
        display: none !important;
    }
}

@media (max-width: 420px) {
    .fxp-dashboard-header {
        grid-template-columns: minmax(0, 1fr) 35px 35px;
        gap: 7px;
        padding-right: 10px;
        padding-left: 10px;
    }

    .fxp-mobile-brand-logo {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }

    .fxp-mobile-brand-name strong {
        font-size: 14px;
    }

    .fxp-dashboard-header .notification,
    .fxp-dashboard-header .profile {
        width: 35px;
        min-width: 35px;
        height: 35px;
        min-height: 35px;
    }

    body.fxp-prop-manager-page .fxp-prop-manager-header-actions {
        grid-template-columns: minmax(0, 1fr) 126px;
        gap: 8px;
    }

    body.fxp-prop-manager-page .fxp-dashboard-header {
        grid-template-columns: minmax(0, 1fr) 35px 35px;
    }
}

@media (min-width: 761px) {
    body.fxp-brand-only-page #fxpossibleGlobalHeader {
        display: none !important;
    }
}

/* =====================================================
   FXPOSSIBLE HEADER — STICKY POSITION AND CONTENT GAP
===================================================== */

.fxp-dashboard-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-sizing: border-box;
    margin-bottom: 8px;
    flex-shrink: 0;
}

/*
 * Keep a subtle visual separation between the header and the first
 * dashboard card without adding a large blank band.
 */
main > .fxp-dashboard-header + *,
main .fxp-dashboard-header + * {
    margin-top: 2px;
}

/* Preserve the avatar's image crop and the existing 3D avatar treatment. */
.fxp-dashboard-header .avatar {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.fxp-dashboard-header .avatar.fxp-avatar-loaded {
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.28),
        inset 0 -2px 4px rgba(0, 0, 0, 0.24),
        0 2px 8px rgba(0, 0, 0, 0.18);
}

.fxp-dashboard-header .avatar.fxp-avatar-loaded::after {
    content: none !important;
    display: none !important;
}

.fxp-mobile-only-global-search {
    display: none !important;
}

@media (max-width: 760px) {
    .fxp-dashboard-header {
        display: grid;
        grid-template-columns: max-content minmax(0, 1fr) 26px 26px;
        grid-template-rows: 32px;
        align-items: center;
        gap: 5px;
        min-height: 44px;
        height: auto;
        padding: 5px 8px;
    }

    .fxp-dashboard-header .fxp-dashboard-heading,
    .fxp-dashboard-header .fxp-dashboard-header-actions {
        display: contents;
        max-width: none;
    }

    .fxp-dashboard-header .fxp-mobile-brand {
        grid-column: 1;
        grid-row: 1;
        align-items: center;
        gap: 4px;
        width: max-content;
        max-width: 38vw;
        min-width: 0;
        overflow: hidden;
    }

    .fxp-dashboard-header .fxp-mobile-brand-logo {
        display: block;
        flex: 0 0 22px;
        width: 22px;
        height: 22px;
        object-fit: contain;
    }

    .fxp-dashboard-header .fxp-mobile-brand-name {
        display: grid;
        gap: 2px;
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
    }

    .fxp-dashboard-header .fxp-mobile-brand-name strong {
        overflow: hidden;
        font-size: 10px;
        line-height: 1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .fxp-dashboard-header .fxp-mobile-brand-name small {
        overflow: hidden;
        font-size: 5px;
        letter-spacing: 0.55px;
        text-overflow: clip;
        white-space: nowrap;
    }

    .fxp-dashboard-header #dashboardSearch {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        width: 100%;
        min-width: 0;
        height: 28px;
        margin: 0;
        padding: 0 6px;
        border-radius: 9px;
        overflow: hidden;
    }

    .fxp-dashboard-header .fxp-mobile-only-global-search {
        display: flex !important;
    }

    .fxp-dashboard-header #dashboardSearch .fxp-icon {
        width: 14px;
        height: 14px;
    }

    .fxp-dashboard-header #dashboardSearch input {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        padding: 0;
        font-size: 9px;
        text-overflow: ellipsis;
    }

    .fxp-dashboard-header .notification-wrapper {
        grid-column: 3;
        grid-row: 1;
        width: 26px;
        height: 26px;
    }

    .fxp-dashboard-header .profile-wrapper {
        grid-column: 4;
        grid-row: 1;
        width: 26px;
        height: 26px;
    }

    .fxp-dashboard-header .notification,
    .fxp-dashboard-header .profile {
        width: 26px;
        min-width: 26px;
        height: 26px;
        min-height: 26px;
    }

    .fxp-dashboard-header .avatar {
        flex-basis: 22px;
        width: 22px;
        height: 22px;
    }

    .fxp-mobile-header-content {
        display: block;
        width: 100%;
        min-width: 0;
        padding: 10px 12px 0;
    }

    .fxp-mobile-header-content .fxp-dashboard-title {
        display: block;
        max-width: none;
        margin: 0 0 4px;
        overflow: visible;
        font-size: clamp(1.25rem, 5vw, 1.65rem);
        line-height: 1.2;
        white-space: normal;
    }

    .fxp-mobile-header-content .fxp-dashboard-description {
        display: block;
        margin: 0 0 12px;
        color: #a4b3cc;
        font-size: 12px;
        line-height: 1.45;
    }

    .fxp-mobile-header-content .fxp-prop-manager-header-actions,
    .fxp-mobile-header-content .fxp-journal-header-actions,
    .fxp-mobile-header-content .fxp-payout-header-actions {
        width: 100%;
        margin: 10px 0 14px;
    }

    .fxp-mobile-header-content .fxp-journal-header-actions,
    .fxp-mobile-header-content .fxp-payout-header-actions {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 7px;
    }

    .fxp-mobile-header-content .fxp-finance-add-record {
        margin: 8px 0 14px;
    }

    body.fxp-brand-only-page .fxp-dashboard-header {
        grid-template-rows: 32px;
        min-height: 44px;
    }

    body.fxp-prop-manager-page .fxp-dashboard-header {
        grid-template-columns: max-content minmax(0, 1fr) 26px 26px;
        grid-template-rows: 32px;
        min-height: 44px;
        padding: 5px 8px;
    }

    body.fxp-prop-manager-page .fxp-mobile-brand {
        gap: 4px;
    }

    body.fxp-prop-manager-page .fxp-mobile-brand-logo {
        flex-basis: 22px;
        width: 22px;
        height: 22px;
    }

    body.fxp-prop-manager-page .fxp-mobile-brand-name strong {
        font-size: 10px;
    }

    body.fxp-prop-manager-page .fxp-mobile-brand-name small {
        font-size: 5px;
    }

    body.fxp-prop-manager-page .fxp-mobile-header-content .fxp-dashboard-title {
        margin-bottom: 4px;
        font-size: clamp(1.65rem, 7vw, 2.25rem);
        letter-spacing: -0.04em;
    }

    body.fxp-prop-manager-page .fxp-mobile-header-content .fxp-prop-manager-header-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 126px;
        gap: 8px;
        margin-top: 12px;
    }

    body.fxp-prop-manager-page .fxp-mobile-header-content #propManagerSearchBox {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        height: 48px;
        margin: 0;
    }

    body.fxp-prop-manager-page .fxp-mobile-header-content .add-account-btn {
        grid-column: 2;
        grid-row: 1;
        height: 48px;
    }

    body.fxp-prop-manager-page .fxp-mobile-header-content .payouts-btn {
        display: none;
    }
}

@media (max-width: 420px) {
    .fxp-dashboard-header {
        grid-template-columns: max-content minmax(0, 1fr) 26px 26px;
        gap: 5px;
        padding-right: 7px;
        padding-left: 7px;
    }

    .fxp-dashboard-header .notification,
    .fxp-dashboard-header .profile {
        width: 26px;
        min-width: 26px;
        height: 26px;
        min-height: 26px;
    }

    .fxp-dashboard-header .avatar {
        flex-basis: 22px;
        width: 22px;
        height: 22px;
    }

    body.fxp-prop-manager-page .fxp-dashboard-header {
        grid-template-columns: max-content minmax(0, 1fr) 26px 26px;
        padding-right: 7px;
        padding-left: 7px;
    }

    body.fxp-prop-manager-page .fxp-mobile-header-content .fxp-prop-manager-header-actions {
        grid-template-columns: minmax(0, 1fr) 116px;
    }
}
/* Remove the extra separator and its associated vertical space before Logout. */
.fxp-dashboard-header .profile-dropdown-divider:last-of-type {
    display: none !important;
}

.fxp-dashboard-header .profile-dropdown .profile-menu + .profile-dropdown-divider {
    display: none !important;
}

.fxp-dashboard-header .profile-dropdown .logout-item {
    margin-top: 0 !important;
    padding-top: 10px !important;
}
/* FXpossible: keep uploaded profile avatars visible */
.fxp-dashboard-header .avatar {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
}

.fxp-dashboard-header .avatar.fxp-avatar-loaded {
    background-image: none !important;
    background-color: #03142c !important;
    color: transparent !important;
}

.fxp-dashboard-header .avatar.fxp-avatar-loaded > img {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: inherit !important;
    z-index: 1 !important;
}


.fxp-prop-manager-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.fxp-prop-manager-header-actions .add-account-btn {
    height: 31px;
    padding: 0 15px;
    border: none;
    border-radius: 4px;
    background: linear-gradient(90deg, #1746c8, #2d6dff);
    color: #fff;
    font-size: 10px;
    cursor: pointer;
    white-space: nowrap;
}

.fxp-prop-manager-header-actions .payouts-btn {
    display: inline-flex;
    text-decoration: none;
}

@media (max-width: 900px) {
    .fxp-prop-manager-header-actions {
        gap: 5px;
    }

    .fxp-prop-manager-header-actions .add-account-btn {
        padding: 0 9px;
    }
}
/* Previous / Next controls for the single-trade page only */
.fxp-single-trade-navigation {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.fxp-single-trade-navigation span {
    color: var(--muted, #94a3b8);
    font-size: 12px;
    white-space: nowrap;
}

.fxp-single-trade-navigation button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    background: #03142c;
    color: #ffffff;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.fxp-single-trade-navigation button:hover {
    background: #0b2850;
    border-color: #38bdf8;
}

.fxp-single-trade-navigation button:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

@media (max-width: 600px) {
    .fxp-single-trade-navigation {
        gap: 6px;
    }

    .fxp-single-trade-navigation span {
        font-size: 11px;
    }
}

/* =========================================================
   FXPOSSIBLE PAYOUTS — GLOBAL HEADER ACTIONS
========================================================= */

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-payout-header-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 0;
}

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-payout-header-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid rgba(72, 145, 255, 0.42);
    border-radius: 10px;
    color: #eaf3ff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        transform 160ms ease,
        box-shadow 160ms ease;
}

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-payout-header-button:hover {
    transform: translateY(-1px);
    border-color: rgba(100, 170, 255, 0.85);
}

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-payout-header-button:active {
    transform: translateY(0);
}

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-payout-header-button--secondary {
    background: rgba(40, 112, 211, 0.12);
    border-color: rgba(78, 143, 235, 0.4);
}

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-payout-header-button--secondary:hover {
    background: rgba(40, 112, 211, 0.24);
}

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-payout-header-button--primary {
    color: #ffffff;
    background: linear-gradient(135deg, #0879f9, #0757c8);
    border-color: #2587ff;
    box-shadow: 0 4px 12px rgba(0, 105, 255, 0.18);
}

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-payout-header-button--primary:hover {
    background: linear-gradient(135deg, #238cff, #0865df);
    box-shadow: 0 5px 16px rgba(0, 105, 255, 0.28);
}

@media (max-width: 760px) {
    :is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-payout-header-actions {
        gap: 5px;
    }

    :is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-payout-header-button {
        min-height: 35px;
        padding: 0 8px;
        gap: 4px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    :is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-payout-header-button {
        padding: 0 7px;
    }
}
/* ==========================================================
   FXPOSSIBLE FINANCE — GLOBAL HEADER ADD-RECORD BUTTON
   ========================================================== */

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-finance-add-record {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 39px;
    padding: 8px 13px;

    color: #ffffff;
    background: linear-gradient(135deg, #1d6cff, #1054d6);
    border: 1px solid rgba(125, 178, 255, .45);
    border-radius: 10px;

    font: inherit;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;

    box-shadow: 0 5px 18px rgba(29, 108, 255, .17);

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-finance-add-record:hover {
    transform: translateY(-1px);
    border-color: #8bb9ff;
    box-shadow: 0 8px 23px rgba(29, 108, 255, .27);
}

:is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-finance-add-record:active {
    transform: translateY(0);
}

.fxp-finance-add-icon {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .14);
    font-size: 16px;
    line-height: 1;
}

/* ==========================================================
   GLOBAL FINANCE MODAL
   ========================================================== */

.fxp-finance-modal-overlay {
    position: fixed;
    z-index: 100000;
    inset: 0;

    display: grid;
    place-items: center;

    padding: 22px;
    overflow-y: auto;

    background: rgba(1, 6, 15, .78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.fxp-finance-modal-overlay[hidden] {
    display: none !important;
}

body.fxp-finance-modal-open {
    overflow: hidden;
}

.fxp-finance-modal {
    position: relative;
    width: min(620px, 100%);
    max-height: min(850px, calc(100dvh - 44px));
    overflow: auto;

    color: #edf5ff;
    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(29, 108, 255, .11),
            transparent 36%
        ),
        linear-gradient(150deg, #0c1728, #060d19 75%);

    border: 1px solid #263d59;
    border-radius: 19px;

    box-shadow:
        0 35px 100px rgba(0, 0, 0, .58),
        0 0 40px rgba(29, 108, 255, .08);

    animation: fxpFinanceModalEnter .2s ease-out;
}

@keyframes fxpFinanceModalEnter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fxp-finance-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;

    padding: 22px 23px 18px;
    border-bottom: 1px solid #1b3048;
}

.fxp-finance-modal-eyebrow {
    color: #81b5ff;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.6px;
}

.fxp-finance-modal-header h2 {
    margin: 6px 0;
    color: #f0f6ff;
    font-size: 22px;
    letter-spacing: -.5px;
}

.fxp-finance-modal-header p {
    margin: 0;
    color: #8ea5c0;
    font-size: 12px;
}

.fxp-finance-modal-close {
    display: grid;
    place-items: center;
    flex: 0 0 35px;
    width: 35px;
    height: 35px;

    padding: 0;
    border: 1px solid #263a53;
    border-radius: 10px;
    background: #0a1727;
    color: #9cb0c9;

    font: inherit;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}

.fxp-finance-modal-close:hover {
    border-color: #477bc1;
    color: #ffffff;
}

.fxp-finance-modal-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;

    margin: 18px 23px 0;
    padding: 5px;

    background: #050d19;
    border: 1px solid #1d3047;
    border-radius: 12px;
}

.fxp-finance-modal-tabs button {
    min-height: 40px;
    padding: 9px 12px;

    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #91a6bf;

    font: inherit;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.fxp-finance-modal-tabs button.active[data-finance-type="expense"] {
    color: #ffb1bf;
    background: rgba(255, 113, 136, .1);
    border-color: rgba(255, 113, 136, .23);
}

.fxp-finance-modal-tabs button.active[data-finance-type="income"] {
    color: #75ebc2;
    background: rgba(40, 214, 160, .1);
    border-color: rgba(40, 214, 160, .23);
}

.fxp-finance-modal-body {
    display: grid;
    gap: 16px;
    padding: 20px 23px;
}

.fxp-finance-modal-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.fxp-finance-modal-field > label,
.fxp-finance-category-heading > label {
    color: #b6c7dc;
    font-size: 11px;
    font-weight: 800;
}

.fxp-finance-modal-field input,
.fxp-finance-modal-field select,
.fxp-finance-modal-field textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 43px;
    padding: 10px 12px;

    border: 1px solid #263d57;
    border-radius: 10px;
    outline: none;

    color: #edf5ff;
    background: #050d19;

    font: inherit;
    font-size: 12px;
}

.fxp-finance-modal-field textarea {
    min-height: 78px;
    resize: vertical;
}

.fxp-finance-modal-field input:focus,
.fxp-finance-modal-field select:focus,
.fxp-finance-modal-field textarea:focus {
    border-color: #287cff;
    box-shadow: 0 0 0 3px rgba(29, 108, 255, .11);
}

.fxp-finance-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.fxp-finance-category-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.fxp-finance-category-heading button {
    padding: 5px 8px;
    border: 1px solid rgba(29, 108, 255, .3);
    border-radius: 7px;
    color: #94bcff;
    background: rgba(29, 108, 255, .08);
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.fxp-finance-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.fxp-finance-category-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-width: 0;
    min-height: 73px;
    padding: 8px 4px;

    border: 1px solid #233952;
    border-radius: 10px;

    color: #91a6bf;
    background: #07111f;

    font: inherit;
    font-size: 9px;
    font-weight: 750;
    text-align: center;
    cursor: pointer;

    transition:
        border-color .16s ease,
        background .16s ease,
        color .16s ease;
}

.fxp-finance-category-tile svg {
    width: 21px;
    height: 21px;
    flex: 0 0 21px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fxp-finance-category-tile span {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.fxp-finance-category-tile:hover {
    border-color: #3d6ca4;
    color: #e2eeff;
}

.fxp-finance-category-tile.selected {
    border-color: #3486ff;
    color: #d6e8ff;
    background: rgba(29, 108, 255, .14);
    box-shadow: inset 0 0 0 1px rgba(29, 108, 255, .1);
}

.fxp-finance-modal-message {
    min-height: 16px;
    color: #74e6bb;
    font-size: 11px;
}

.fxp-finance-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;

    padding: 16px 23px 21px;
    border-top: 1px solid #1b3048;
}

.fxp-finance-cancel,
.fxp-finance-save {
    min-height: 41px;
    padding: 10px 15px;
    border-radius: 10px;

    font: inherit;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.fxp-finance-cancel {
    border: 1px solid #293d54;
    color: #b9cbe0;
    background: #091423;
}

.fxp-finance-save {
    border: 1px solid rgba(117, 176, 255, .45);
    color: #ffffff;
    background: linear-gradient(135deg, #287cff, #1055dc);
    box-shadow: 0 5px 17px rgba(29, 108, 255, .17);
}

.fxp-finance-save:disabled {
    opacity: .65;
    cursor: wait;
}

@media (max-width: 760px) {
    :is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-finance-add-record {
        min-height: 36px;
        padding: 7px 9px;
    }

    :is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-finance-add-label {
        display: none;
    }
}

@media (max-width: 520px) {
    .fxp-finance-modal-overlay {
        padding: 10px;
        align-items: end;
    }

    .fxp-finance-modal {
        width: 100%;
        max-height: calc(100dvh - 20px);
        border-radius: 17px;
    }

    .fxp-finance-modal-header,
    .fxp-finance-modal-body {
        padding-right: 15px;
        padding-left: 15px;
    }

    .fxp-finance-modal-tabs {
        margin-right: 15px;
        margin-left: 15px;
    }

    .fxp-finance-modal-footer {
        padding-right: 15px;
        padding-left: 15px;
    }

    .fxp-finance-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fxp-finance-modal-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .fxp-finance-modal {
        animation: none;
    }

    :is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-finance-add-record {
        transition: none;
    }
}

.fxp-image-download-overlay {
    position: fixed;
    z-index: 100010;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(1, 6, 15, .8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.fxp-image-download-overlay[hidden] {
    display: none !important;
}

.fxp-image-download-dialog {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 12px;
    width: min(390px, 100%);
    padding: 25px;
    border: 1px solid rgba(94, 143, 204, .42);
    border-radius: 17px;
    color: #edf5ff;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(29, 108, 255, .18), transparent 43%),
        linear-gradient(150deg, #0c192b, #050c17 78%);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .58);
    animation: fxpFinanceModalEnter .18s ease-out;
}

.fxp-image-download-close {
    position: absolute;
    top: 13px;
    right: 13px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid #263a53;
    border-radius: 9px;
    color: #b7c8dd;
    background: #0a1727;
    font: inherit;
    font-size: 21px;
    cursor: pointer;
}

.fxp-image-download-brand {
    color: #81b5ff;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.5px;
}

.fxp-image-download-dialog h2 {
    margin: 0;
    color: #f0f6ff;
    font-size: 19px;
}

.fxp-image-download-preview {
    display: block;
    width: 100%;
    max-height: min(42vh, 300px);
    object-fit: contain;
    border: 1px solid #203650;
    border-radius: 11px;
    background: #030914;
}

.fxp-image-download-message {
    min-height: 16px;
    margin: 0;
    color: #91a8c4;
    font-size: 11px;
    text-align: center;
}

.fxp-image-download-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 43px;
    padding: 10px 14px;
    border: 1px solid rgba(125, 178, 255, .45);
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, #287cff, #1055dc);
    box-shadow: 0 5px 18px rgba(29, 108, 255, .2);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.fxp-image-download-action:hover {
    filter: brightness(1.1);
}

.fxp-image-download-action:disabled {
    cursor: wait;
    opacity: .7;
}

.fxp-image-download-action svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

img[data-record-image],
.payout-gallery-card__preview,
.screenshot-preview,
#certificatePreviewImage,
.st-screenshot-stage-image,
.st-thumb img,
#stLightboxImage,
.history-image-modal img,
.history-gallery-visual img:not(.history-gallery-placeholder-logo),
.history-sphere-card img,
.history-edit-screenshot-card img {
    -webkit-touch-callout: none;
    user-select: none;
}

@media (max-width: 520px) {
    .fxp-image-download-overlay {
        align-items: end;
        padding: 10px;
    }

    .fxp-image-download-dialog {
        padding: 22px 18px 18px;
        border-radius: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fxp-image-download-dialog {
        animation: none;
    }
}
/* ==========================================================
   FXPOSSIBLE FINANCE TRACKER — FULL-WIDTH HEADER
   ========================================================== */

body:has(.ft-page) #fxpossibleGlobalHeader {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box;
}

body:has(.ft-page) #fxpossibleGlobalHeader .fxp-dashboard-heading {
    flex: 1 1 auto;
    min-width: 0;
}

body:has(.ft-page) #fxpossibleGlobalHeader .fxp-dashboard-header-actions {
    flex: 0 0 auto;
    margin-left: auto;
    justify-content: flex-end;
    min-width: 0;
}

body:has(.ft-page) #fxpossibleGlobalHeader .fxp-dashboard-title {
    white-space: nowrap;
}

body:has(.ft-page) #fxpossibleGlobalHeader .fxp-finance-add-record {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 39px;
    padding: 8px 13px;

    color: #ffffff;
    background: linear-gradient(135deg, #1d6cff, #1054d6);
    border: 1px solid rgba(125, 178, 255, .45);
    border-radius: 10px;

    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;

    box-shadow: 0 5px 18px rgba(29, 108, 255, .2);
    transition: transform .18s ease, box-shadow .18s ease;
}

body:has(.ft-page) #fxpossibleGlobalHeader .fxp-finance-add-record:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(29, 108, 255, .32);
}

@media (max-width: 850px) {
    body:has(.ft-page) #fxpossibleGlobalHeader {
        gap: 12px;
    }

    body:has(.ft-page) #fxpossibleGlobalHeader .fxp-dashboard-title {
        white-space: normal;
    }
}

.fxp-category-modal-overlay {
    position: fixed;
    z-index: 100001;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(1, 6, 15, .78);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
}

.fxp-category-modal-overlay[hidden] {
    display: none !important;
}

.fxp-category-dialog {
    width: min(420px, 100%);
    overflow: hidden;
    border: 1px solid #2a4261;
    border-radius: 16px;
    color: #edf5ff;
    background:
        radial-gradient(circle at 100% 0%, rgba(29, 108, 255, .13), transparent 42%),
        linear-gradient(150deg, #0c1728, #060d19 78%);
    box-shadow: 0 28px 80px rgba(0, 0, 0, .56);
}

.fxp-category-dialog-header {
    position: relative;
    padding: 22px 22px 16px;
    border-bottom: 1px solid #1b3048;
}

.fxp-category-dialog-header h2 {
    margin: 8px 45px 5px 0;
    color: #f0f6ff;
    font-size: 19px;
}

.fxp-category-dialog-header p {
    margin: 0;
    color: #8ea5c0;
    font-size: 11px;
}

.fxp-category-dialog-header .fxp-finance-modal-close {
    position: absolute;
    top: 17px;
    right: 18px;
}

.fxp-category-dialog-body {
    display: grid;
    gap: 8px;
    padding: 20px 22px 13px;
}

.fxp-category-dialog-body label {
    color: #b6c7dc;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .45px;
}

.fxp-category-dialog-body input {
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;
    border: 1px solid #263d57;
    border-radius: 10px;
    outline: none;
    color: #edf5ff;
    background: #050d19;
    font: inherit;
    font-size: 12px;
}

.fxp-category-dialog-body input:focus {
    border-color: #287cff;
    box-shadow: 0 0 0 3px rgba(29, 108, 255, .11);
}

.fxp-category-dialog-message {
    min-height: 16px;
    color: #ff9aa9;
    font-size: 10px;
}

.fxp-category-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding: 13px 22px 20px;
    border-top: 1px solid #1b3048;
}

@media (max-width: 520px) {
    .fxp-category-modal-overlay {
        align-items: end;
        padding: 10px;
    }

    .fxp-category-dialog {
        border-radius: 15px;
    }
}

/* In light mode the search field uses the parent as its single visible control. */
html[data-theme="light"] .fxp-dashboard-header .search-box {
    color: #64748b;
    background: #ffffff !important;
    border-color: #dce5f0;
}

html[data-theme="light"] .fxp-dashboard-header .search-box input[type="search"],
html[data-theme="light"] .fxp-dashboard-header .search-box input[type="search"]:focus {
    width: 100%;
    min-width: 0;
    min-height: 0 !important;
    height: 100%;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: none !important;
    color: #17243a !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme="light"] .fxp-dashboard-header .search-box:focus-within {
    background: #ffffff !important;
    border-color: #216cff;
    box-shadow: 0 0 0 3px rgba(33, 108, 255, .12);
}

html[data-theme="light"] .fxp-dashboard-header .search-box input[type="search"]::placeholder {
    color: #8795a9 !important;
    opacity: 1;
}

html[data-theme="light"] :is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-journal-share-button,
html[data-theme="light"] :is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-journal-share-button:hover {
    color: #1d4ed8 !important;
    background: #eaf1ff !important;
    border-color: #c7d8f5 !important;
    box-shadow: none !important;
}

html[data-theme="light"] :is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-journal-share-button:hover {
    color: #1e40af !important;
    background: #dbeafe !important;
    border-color: #93b4e8 !important;
}

html[data-theme="light"] :is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-journal-share-button :is(
    .fxp-journal-share-icon,
    span
) {
    color: inherit !important;
}

html[data-theme="light"] :is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-payout-header-button--secondary,
html[data-theme="light"] :is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-payout-header-button--secondary:hover {
    color: #1d4ed8 !important;
    background: #eaf1ff !important;
    border-color: #c7d8f5 !important;
    box-shadow: none !important;
}

html[data-theme="light"] :is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-payout-header-button--secondary :is(svg, span) {
    color: inherit !important;
}

html[data-theme="light"] :is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-payout-header-button--primary,
html[data-theme="light"] :is(.fxp-dashboard-header, .fxp-mobile-header-content) .fxp-payout-header-button--primary:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, #0879f9, #0757c8) !important;
    border-color: #2587ff !important;
}

@media (max-width: 760px) {
    body:has(.ft-page) #fxpossibleGlobalHeader {
        gap: 7px;
    }
}

@media (max-width: 760px) {
    #fxpossibleGlobalHeader {
        display: block !important;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        padding: 5px 8px !important;
    }

    #fxpossibleGlobalHeader .fxp-mobile-header-row {
        display: grid;
        grid-template-columns: max-content minmax(0, 1fr) 30px 30px;
        align-items: center;
        gap: 6px;
        width: 100%;
        min-width: 0;
        min-height: 34px;
    }

    #fxpossibleGlobalHeader .fxp-mobile-brand {
        display: inline-flex !important;
        grid-column: 1 !important;
        grid-row: 1 !important;
        align-items: center;
        gap: 5px;
        width: auto;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    #fxpossibleGlobalHeader .fxp-mobile-brand-logo {
        display: block !important;
        flex: 0 0 25px !important;
        width: 25px !important;
        height: 25px !important;
        object-fit: contain;
    }

    #fxpossibleGlobalHeader .fxp-mobile-brand-name {
        display: grid !important;
        flex: 0 1 auto;
        gap: 2px;
        min-width: 0;
        overflow: hidden;
    }

    #fxpossibleGlobalHeader .fxp-mobile-brand-name strong {
        overflow: hidden;
        font-size: 10px;
        line-height: 1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #fxpossibleGlobalHeader .fxp-mobile-brand-name small {
        overflow: hidden;
        font-size: 5px;
        letter-spacing: 0.55px;
        white-space: nowrap;
    }

    #fxpossibleGlobalHeader #dashboardSearch {
        display: flex !important;
        grid-column: 2 !important;
        grid-row: 1 !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 30px !important;
        margin: 0 !important;
        padding: 0 7px !important;
        border-radius: 9px;
        overflow: hidden;
    }

    #fxpossibleGlobalHeader #dashboardSearch .fxp-icon {
        flex: 0 0 14px;
        width: 14px;
        height: 14px;
    }

    #fxpossibleGlobalHeader #dashboardSearch input {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0 !important;
        height: 100%;
        padding: 0;
        font-size: 9px;
    }

    #fxpossibleGlobalHeader .notification-wrapper,
    #fxpossibleGlobalHeader .profile-wrapper {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
    }

    #fxpossibleGlobalHeader .notification-wrapper {
        grid-column: 3 !important;
        grid-row: 1 !important;
    }

    #fxpossibleGlobalHeader .profile-wrapper {
        grid-column: 4 !important;
        grid-row: 1 !important;
    }

    #fxpossibleGlobalHeader .notification,
    #fxpossibleGlobalHeader .profile {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 30px !important;
        min-width: 30px !important;
        height: 30px !important;
        min-height: 30px !important;
    }

    #fxpossibleGlobalHeader .profile {
        margin: 0 !important;
        padding: 2px !important;
        border-radius: 50%;
        overflow: visible;
    }

    #fxpossibleGlobalHeader .avatar {
        display: grid;
        flex: 0 0 26px !important;
        flex-basis: 26px !important;
        width: 26px !important;
        height: 26px !important;
        min-width: 26px;
        min-height: 26px;
        box-sizing: border-box;
        border-radius: 50%;
        line-height: 1;
        font-size: 11px;
    }

    #fxpossibleGlobalHeader .avatar img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: inherit;
    }
}

@media (max-width: 360px) {
    #fxpossibleGlobalHeader .fxp-mobile-header-row {
        grid-template-columns: max-content minmax(0, 1fr) 28px 28px;
        gap: 5px;
    }

    #fxpossibleGlobalHeader .notification-wrapper,
    #fxpossibleGlobalHeader .profile-wrapper,
    #fxpossibleGlobalHeader .notification,
    #fxpossibleGlobalHeader .profile {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        min-width: 28px !important;
        height: 28px;
        min-height: 28px !important;
    }

    #fxpossibleGlobalHeader .avatar {
        flex: 0 0 24px !important;
        flex-basis: 24px !important;
        width: 24px !important;
        height: 24px !important;
        min-width: 24px;
        min-height: 24px;
    }

    #fxpossibleGlobalHeader .profile {
        padding: 2px !important;
    }

    #fxpossibleGlobalHeader .avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: inherit;
    }
}


/* =========================================================
   FXPOSSIBLE — SHARED LOGOUT CONFIRMATION IMPROVEMENTS
========================================================= */

/* Actual FXpossible logo */
.fxp-header-modal-logo {
    overflow: hidden;
    background: #ffffff;
}

.fxp-header-modal-logo img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 3px;
    object-fit: contain;
    object-position: center;
    border-radius: inherit;
}

/* Make the cancel button clearly visible in dark mode */
.fxp-header-modal-cancel {
    color: #f1f6ff !important;
    background: rgba(255, 255, 255, 0.09) !important;
    border: 1px solid rgba(175, 198, 231, 0.35) !important;
    font-weight: 750;
}

.fxp-header-modal-cancel:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    border-color: rgba(175, 198, 231, 0.55) !important;
}

/* Logout error */
.fxp-header-modal-error {
    margin-top: 12px !important;
    padding: 10px 12px;
    color: #ffb8c0 !important;
    background: rgba(220, 53, 78, 0.12);
    border: 1px solid rgba(220, 53, 78, 0.28);
    border-radius: 9px;
    font-size: 0.78rem !important;
}

/* Prevent button changes while signing out */
.fxp-header-modal-actions button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* =========================================================
   LIGHT THEME
========================================================= */

html[data-theme="light"] .fxp-header-modal-card {
    color: #172b47;
    background:
        radial-gradient(
            circle at 12% 0%,
            rgba(57, 133, 255, 0.10),
            transparent 40%
        ),
        linear-gradient(145deg, #ffffff, #f2f6fd);
    border: 1px solid #d4dfed;
    box-shadow: 0 25px 75px rgba(24, 49, 83, 0.22);
}

html[data-theme="light"] .fxp-header-modal-brand strong {
    color: #172b47 !important;
}

html[data-theme="light"] .fxp-header-modal-brand span {
    color: #62758e !important;
}

html[data-theme="light"] .fxp-header-modal-card h2 {
    color: #142b4a !important;
}

html[data-theme="light"] .fxp-header-modal-card p {
    color: #52657e !important;
}

html[data-theme="light"] .fxp-header-modal-cancel {
    color: #183452 !important;
    background: #e8f0fb !important;
    border: 1px solid #b9cce5 !important;
    font-weight: 800;
    box-shadow: 0 2px 5px rgba(34, 67, 111, 0.06);
}

html[data-theme="light"] .fxp-header-modal-cancel:hover {
    color: #102d51 !important;
    background: #dce9fa !important;
    border-color: #8eadd5 !important;
}

html[data-theme="light"] .fxp-header-modal-confirm {
    color: #ffffff !important;
}

html[data-theme="light"] .fxp-header-modal-error {
    color: #a91f36 !important;
    background: #fff0f2;
    border-color: #f0c0c8;
}
