/* =========================================================
   FXPOSSIBLE — TRADING JOURNAL
========================================================= */

:root {

    --journal-bg: #050811;

    --journal-card: #0b101b;

    --journal-card-2: #0d1320;

    --journal-border: #182131;

    --journal-border-light: #202b3d;

    --journal-text: #eef3ff;

    --journal-muted: #7d8798;

    --journal-blue: #246bff;

    --journal-blue-light: #4382ff;

    --journal-green: #32c979;

    --journal-red: #ef5b68;

    --journal-orange: #f19b4a;

    --journal-purple: #8c6cff;

    --journal-radius: 10px;
}


/* =========================================================
   BASE
========================================================= */

* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;

    background: var(--journal-bg);

    color: var(--journal-text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    overflow-x: hidden;
}


button,
input,
select,
textarea {
    font: inherit;
}


button {
    cursor: pointer;
}


/* =========================================================
   MAIN
========================================================= */

.journal-main {

    flex: 1;

    min-width: 0;

    padding:
        18px
        20px
        32px;

    overflow-x: hidden;
}


/* =========================================================
   HEADER
========================================================= */

.journal-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    margin-bottom: 13px;
}


.journal-header h1 {

    margin: 0;

    font-size: 20px;

    line-height: 1.2;

    letter-spacing: -0.35px;

    font-weight: 700;
}


.journal-header p {

    margin: 4px 0 0;

    color: var(--journal-muted);

    font-size: 10px;
}


.header-actions {

    display: flex;

    align-items: center;

    gap: 7px;
}


.small-icon-button {

    width: 32px;

    height: 32px;

    padding: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    border: 1px solid var(--journal-border);

    border-radius: 8px;

    background: var(--journal-card);

    color: var(--journal-muted);

    transition:
        .2s ease;
}


.small-icon-button:hover {

    color: var(--journal-text);

    border-color: var(--journal-border-light);

    background: var(--journal-card-2);

    transform: translateY(-1px);
}


.small-icon-button svg {

    width: 15px;

    height: 15px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.7;

    stroke-linecap: round;

    stroke-linejoin: round;
}


.add-trade-button {

    height: 32px;

    padding:
        0
        13px;

    display: flex;

    align-items: center;

    gap: 6px;

    border: none;

    border-radius: 8px;

    background: var(--journal-blue);

    color: #fff;

    font-size: 10px;

    font-weight: 600;

    box-shadow:
        0 6px 18px
        rgba(36, 107, 255, .18);

    transition:
        .2s ease;
}


.add-trade-button:hover {

    background: var(--journal-blue-light);

    transform: translateY(-1px);

    box-shadow:
        0 8px 22px
        rgba(36, 107, 255, .25);
}


.button-plus {

    font-size: 17px;

    line-height: 1;

    font-weight: 300;
}


/* =========================================================
   FILTER BAR
========================================================= */

.filter-bar {

    display: flex;

    align-items: center;

    gap: 6px;

    flex-wrap: wrap;

    margin-bottom: 10px;
}


.filter-control {

    height: 30px;

    min-width: 106px;

    padding:
        0
        10px;

    border:
        1px solid
        var(--journal-border);

    border-radius: 7px;

    background: var(--journal-card);

    color: var(--journal-text);

    outline: none;

    font-size: 9px;

    color-scheme: dark;
}


.filter-control:focus {

    border-color:
        rgba(36,107,255,.6);
}


.date-control {

    min-width: 145px;
}


/* =========================================================
   KPI GRID
========================================================= */

.kpi-grid {

    display: grid;

    grid-template-columns:
        repeat(7, minmax(0, 1fr));

    gap: 7px;

    margin-bottom: 10px;
}


.kpi-card {

    min-width: 0;

    height: 88px;

    padding: 11px;

    position: relative;

    overflow: hidden;

    border:
        1px solid
        var(--journal-border);

    border-radius:
        var(--journal-radius);

    background:
        linear-gradient(
            145deg,
            #0d1420,
            #080d16
        );

    transition:
        transform .2s ease,
        border-color .2s ease;
}


.kpi-card:hover {

    transform: translateY(-1px);

    border-color:
        var(--journal-border-light);
}


.kpi-top {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 5px;
}


.kpi-top > span {

    color: var(--journal-muted);

    font-size: 8px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.kpi-card strong {

    display: block;

    margin-top: 7px;

    font-size: 17px;

    line-height: 1;

    letter-spacing: -.3px;
}


.kpi-card small {

    display: block;

    margin-top: 6px;

    color: var(--journal-muted);

    font-size: 7px;
}


.positive {
    color: var(--journal-green);
}


.negative {
    color: var(--journal-red);
}


/* =========================================================
   ANIMATED ICONS
========================================================= */

.animated-icon {

    width: 24px;

    height: 24px;

    flex-shrink: 0;

    position: relative;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 7px;

    background:
        rgba(36,107,255,.10);

    color: var(--journal-blue-light);
}


/* Money */

.money-icon::before {

    content: "";

    width: 9px;

    height: 6px;

    border:
        1.5px solid
        currentColor;

    border-radius: 50%;

    animation:
        iconFloat 2.4s ease-in-out infinite;
}


.money-icon::after {

    content: "";

    position: absolute;

    width: 13px;

    height: 1px;

    background: currentColor;

    opacity: .35;

    transform: rotate(-45deg);

    animation:
        iconSweep 2.4s ease-in-out infinite;
}


/* Bars */

.bars-icon {

    gap: 2px;

    align-items: flex-end;

    padding-bottom: 5px;
}


.bars-icon i {

    width: 3px;

    border-radius: 2px;

    background: currentColor;

    animation:
        barPulse 1.3s ease-in-out infinite;
}


.bars-icon i:nth-child(1) {
    height: 6px;
    animation-delay: -.3s;
}


.bars-icon i:nth-child(2) {
    height: 11px;
    animation-delay: -.15s;
}


.bars-icon i:nth-child(3) {
    height: 15px;
}


/* Ring */

.ring-icon {

    border-radius: 50%;
}


.ring-icon::before {

    content: "";

    width: 12px;

    height: 12px;

    border:
        2px solid
        rgba(67,130,255,.2);

    border-top-color:
        var(--journal-blue-light);

    border-radius: 50%;

    animation:
        ringSpin 2.2s linear infinite;
}


/* Trend */

.trend-icon::before {

    content: "";

    width: 13px;

    height: 8px;

    border-top:
        1.5px solid
        currentColor;

    border-right:
        1.5px solid
        currentColor;

    transform:
        rotate(-25deg)
        translateY(2px);

    animation:
        trendMove 1.8s ease-in-out infinite;
}


/* Loss */

.loss-icon {

    color: var(--journal-red);

    background:
        rgba(239,91,104,.08);
}


.loss-icon::before {

    content: "";

    width: 12px;

    height: 7px;

    border-bottom:
        1.5px solid
        currentColor;

    transform:
        rotate(20deg);

    animation:
        lossMove 1.8s ease-in-out infinite;
}


/* Trophy */

.trophy-icon {

    color: #4f88ff;
}


.trophy-icon::before {

    content: "";

    width: 9px;

    height: 9px;

    border:
        1.5px solid
        currentColor;

    border-radius:
        2px 2px 4px 4px;

    animation:
        iconFloat 2.5s ease-in-out infinite;
}


/* Danger */

.danger-icon {

    color: var(--journal-red);

    background:
        rgba(239,91,104,.08);
}


.danger-icon::before {

    content: "";

    width: 10px;

    height: 10px;

    border-left:
        1.5px solid
        currentColor;

    border-bottom:
        1.5px solid
        currentColor;

    transform:
        rotate(-45deg);

    animation:
        dangerPulse 1.8s ease-in-out infinite;
}


@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}


@keyframes iconSweep {

    0%,
    100% {
        opacity: .2;
        transform: translateX(-2px) rotate(-45deg);
    }

    50% {
        opacity: .7;
        transform: translateX(2px) rotate(-45deg);
    }
}


@keyframes barPulse {

    0%,
    100% {
        transform: scaleY(.7);
    }

    50% {
        transform: scaleY(1.1);
    }
}


@keyframes ringSpin {

    to {
        transform: rotate(360deg);
    }
}


@keyframes trendMove {

    0%,
    100% {
        transform:
            rotate(-25deg)
            translate(0,2px);
    }

    50% {
        transform:
            rotate(-25deg)
            translate(2px,0);
    }
}


@keyframes lossMove {

    0%,
    100% {
        transform:
            rotate(20deg)
            translateY(0);
    }

    50% {
        transform:
            rotate(20deg)
            translateY(2px);
    }
}


@keyframes dangerPulse {

    0%,
    100% {
        transform:
            rotate(-45deg)
            scale(1);
    }

    50% {
        transform:
            rotate(-45deg)
            scale(.85);
    }
}


/* =========================================================
   CARDS
========================================================= */

.journal-card {

    min-width: 0;

    border:
        1px solid
        var(--journal-border);

    border-radius:
        var(--journal-radius);

    background:
        var(--journal-card);

    overflow: hidden;
}


.card-header {

    min-height: 43px;

    padding:
        9px 12px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    border-bottom:
        1px solid
        var(--journal-border);
}


.card-header h3 {

    margin: 0;

    font-size: 10px;

    font-weight: 600;
}


.card-header span {

    display: block;

    margin-top: 2px;

    color: var(--journal-muted);

    font-size: 7px;
}


.card-select {

    height: 25px;

    padding:
        0 8px;

    border:
        1px solid
        var(--journal-border);

    border-radius: 6px;

    background:
        var(--journal-card-2);

    color: var(--journal-muted);

    outline: none;

    font-size: 8px;

    color-scheme: dark;
}


/* =========================================================
   ANALYTICS ROW
========================================================= */

/* =========================================================
   JOURNAL DASHBOARD GRID
========================================================= */

.journal-dashboard-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        285px;

    gap: 10px;

    align-items: start;
}


.journal-dashboard-left {

    min-width: 0;
}


.journal-dashboard-right {

    min-width: 0;
}

.journal-dashboard-right .risk-card {

    width: 100%;

    min-height: 380px;
}
.journal-dashboard-right .risk-card {
    width: 100%;
}


.analytics-row {

    display: grid;

    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(260px, .9fr);

    gap: 8px;

    margin-bottom: 8px;
}


.history-calendar-row {

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        285px;

    gap: 8px;

    margin-bottom: 8px;
}

/* =========================================================
   EQUITY
========================================================= */

.equity-chart {

    height: 168px;

    position: relative;

    padding:
        10px 12px;
}


.chart-grid-lines span {

    width: 100%;

    height: 1px;

    background:
        rgba(255,255,255,.035);
}

.equity-svg {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    display: block;
    overflow: hidden;
}


.chart-grid-lines {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    pointer-events: none;
}


.equity-path {

    fill: none;

    stroke:
        var(--journal-blue);

    stroke-width: 2.2;

    stroke-linecap: round;

    stroke-linejoin: round;

    filter:
        drop-shadow(
            0 0 5px
            rgba(36,107,255,.4)
        );
}


.equity-area {

    fill:
        url(#equityFill);

    opacity: .75;
}


.equity-empty {

    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    color: var(--journal-muted);

    font-size: 8px;
}


.equity-footer {

    display: flex;

    align-items: center;

    gap: 7px;

    padding:
        7px 12px;

    border-top:
        1px solid
        var(--journal-border);

    color: var(--journal-muted);

    font-size: 8px;
}


.equity-footer strong {

    color: var(--journal-text);

    font-size: 9px;

    margin-right: 12px;
}


/* =========================================================
   R DISTRIBUTION
========================================================= */

.r-content {

    height: 205px;

    padding:
        12px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 17px;
}


.r-donut {

    width: 126px;

    height: 126px;

    position: relative;

    flex-shrink: 0;
}


.r-donut-ring {
    position: absolute;

    inset: 0;

    border-radius: 50%;

    background:
        conic-gradient(
            var(--journal-blue) 0 20%,
            var(--journal-green) 20% 40%,
            var(--journal-purple) 40% 60%,
            var(--journal-orange) 60% 80%,
            var(--journal-red) 80% 100%
        );

    transform: rotate(0deg);

    transform-origin: center center;

    transition: filter .2s ease;
}

/* Gentle interaction */



.r-donut-ring::after {

    content: "";

    position: absolute;

    inset: 27px;

    border-radius: 50%;

    background:
        var(--journal-card);
}


.r-center {

    position: absolute;

    inset: 0;

    z-index: 2;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;
}


.r-center strong {

    font-size: 20px;

    line-height: 1;
}


.r-center span {

    margin-top: 4px;

    color: var(--journal-muted);

    font-size: 7px;
}


@keyframes donutFloat {

    0%,
    100% {
        transform:
            rotate(0deg)
            scale(1);
    }

    50% {
        transform:
            rotate(4deg)
            scale(1.018);
    }
}


.r-legend {

    display: flex;

    flex-direction: column;

    gap: 8px;

    min-width: 110px;
}


.r-item {

    display: grid;

    grid-template-columns:
        7px 1fr auto;

    align-items: center;

    gap: 6px;

    padding: 0;

    border: none;

    background: transparent;

    color: var(--journal-muted);

    text-align: left;

    font-size: 6px;

    transition:
        color .2s ease,
        transform .2s ease;
}


.r-item:hover {

    color: var(--journal-text);

    transform: translateX(2px);
}


.r-item strong {

    color: var(--journal-text);

    font-size: 6px;
}


.legend-dot {

    width: 6px;

    height: 6px;

    border-radius: 50%;
}


.legend-dot.blue {
    background: var(--journal-blue);
}


.legend-dot.green {
    background: var(--journal-green);
}


.legend-dot.purple {
    background: var(--journal-purple);
}


.legend-dot.orange {
    background: var(--journal-orange);
}


.legend-dot.red {
    background: var(--journal-red);
}


/* =========================================================
   RISK CALCULATOR
========================================================= */

.risk-card {

    display: flex;

    flex-direction: column;
}


.risk-fields {

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 7px;

    padding:
        11px 12px;
}


.risk-fields label {

    display: flex;

    flex-direction: column;

    gap: 4px;
}


.risk-fields label span {

    color: var(--journal-muted);

    font-size: 7px;
}


.risk-fields input {

    width: 100%;

    height: 28px;

    padding:
        0 8px;

    border:
        1px solid
        var(--journal-border);

    border-radius: 6px;

    background:
        var(--journal-card-2);

    color: var(--journal-text);

    outline: none;

    font-size: 8px;
}


.risk-fields input:focus {

    border-color:
        rgba(36,107,255,.6);
}


.risk-result {

    margin:
        0 12px 9px;

    padding:
        10px;

    border:
        1px solid
        rgba(36,107,255,.22);

    border-radius: 7px;

    background:
        rgba(36,107,255,.06);
}


.risk-result span {

    display: block;

    color: var(--journal-blue-light);

    font-size: 7px;
}


.risk-result strong {

    display: block;

    margin-top: 4px;

    color: #fff;

    font-size: 19px;
}


.risk-button {

    margin:
        auto 12px 12px;

    height: 29px;

    border: none;

    border-radius: 6px;

    background:
        var(--journal-blue);

    color: #fff;

    font-size: 8px;

    font-weight: 600;
}


.risk-button:hover {

    background:
        var(--journal-blue-light);
}


/* =========================================================
   PERFORMANCE BY PAIR
========================================================= */

.pair-card {

    margin-bottom: 8px;
}


.pair-list {

    padding:
        13px 14px;

    display: flex;

    flex-direction: column;

    gap: 10px;
}


.pair-chart-row {

    display: grid;

    grid-template-columns:
        58px
        minmax(0, 1fr)
        58px;

    align-items: center;

    gap: 9px;

    min-height: 20px;

    cursor: pointer;

    transition:
        transform .2s ease;
}


.pair-chart-row:hover {

    transform:
        translateX(2px);
}


.pair-chart-name {

    color:
        var(--journal-text);

    font-size: 8px;

    font-weight: 600;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.pair-chart-track {

    height: 8px;

    position: relative;

    overflow: hidden;

    border-radius: 20px;

    background:
        #151d2a;
}


.pair-chart-fill {

    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--journal-blue),
            var(--journal-blue-light)
        );

    box-shadow:
        0 0 8px
        rgba(36,107,255,.16);

    transition:
        width .55s cubic-bezier(.22,.61,.36,1);
}


.pair-chart-fill.negative {

    background:
        linear-gradient(
            90deg,
            var(--journal-red),
            #ff7180
        );

    box-shadow:
        0 0 8px
        rgba(239,91,104,.14);
}


.pair-chart-value {

    text-align: right;

    color:
        var(--journal-text);

    font-size: 8px;

    font-weight: 600;

    white-space: nowrap;
}


.pair-chart-row:hover .pair-chart-name {

    color:
        var(--journal-blue-light);
}


.pair-chart-row:hover .pair-chart-fill {

    filter:
        brightness(1.12);
}


.empty-small {

    padding: 16px;

    text-align: center;

    color:
        var(--journal-muted);

    font-size: 8px;
}

/* =========================================================
   HISTORY + CALENDAR
========================================================= */

.history-calendar-row {

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        285px;

    gap: 8px;

    margin-bottom: 8px;
}


/* =========================================================
   TABLE
========================================================= */

.history-card {

    min-width: 0;
}


.trade-table-wrap {

    width: 100%;

    overflow-x: auto;

    scrollbar-width: thin;
}


.trade-table {

    width: 100%;

    border-collapse: collapse;

    min-width: 620px;
}


.trade-table th {

    padding:
        8px 10px;

    text-align: left;

    color: var(--journal-muted);

    font-size: 7px;

    font-weight: 500;

    border-bottom:
        1px solid
        var(--journal-border);

    white-space: nowrap;
}


.trade-table td {

    padding:
        9px 10px;

    color: var(--journal-text);

    font-size: 8px;

    border-bottom:
        1px solid
        rgba(26,34,48,.65);

    white-space: nowrap;
}


.trade-table tbody tr {

    transition:
        background .2s ease;
}


.trade-table tbody tr:hover {

    background:
        rgba(36,107,255,.035);
}


.result-win {

    color:
        var(--journal-green);
}


.result-loss {

    color:
        var(--journal-red);
}


.direction-long {

    color:
        var(--journal-green);
}


.direction-short {

    color:
        var(--journal-red);
}


.empty-table {

    height: 80px;

    text-align: center;

    color:
        var(--journal-muted) !important;
}


/* =========================================================
   SEE ALL
========================================================= */

.see-all-button {

    height: 32px;

    padding:
        0
        13px;
	
    display: flex;

    align-items: center;

    gap: 6px;

    border: none;

    border-radius: 8px;

    background: var(--journal-blue);

    color: #fff;

    font-size: 10px;

    font-weight: 600;

    box-shadow:
        0 6px 18px
        rgba(36, 107, 255, .18);

    transition:
        .2s ease;

}


.see-all-button:hover {

    background: var(--journal-blue-light);

    transform: translateY(-1px);

    box-shadow:
        0 8px 22px
        rgba(36, 107, 255, .25);

}


/* =========================================================
   CALENDAR
========================================================= */

.calendar-card {

    min-width: 0;
}


.calendar-navigation {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding:
        8px 12px;
}


.calendar-navigation button {

    width: 23px;

    height: 23px;

    border:
        1px solid
        var(--journal-border);

    border-radius: 5px;

    background:
        var(--journal-card-2);

    color:
        var(--journal-muted);
}


.calendar-navigation strong {

    font-size: 8px;

    font-weight: 600;
}


.calendar-grid {

    display: grid;

    grid-template-columns:
        repeat(7, 1fr);

    gap: 3px;

    padding:
        0 9px 9px;
}


.calendar-day-name {

    padding:
        4px 0;

    color:
        var(--journal-muted);

    text-align: center;

    font-size: 6px;
}


.calendar-day {

    min-height: 27px;

    display: flex;

    align-items: center;

    justify-content: center;

    position: relative;

    border-radius: 5px;

    color:
        var(--journal-muted);

    font-size: 7px;
}


.calendar-day.has-trades {

    color:
        var(--journal-text);

    background:
        rgba(255,255,255,.018);
}


.calendar-day.profitable::after,
.calendar-day.losing::after,
.calendar-day.breakeven::after {

    content: "";

    position: absolute;

    bottom: 3px;

    width: 4px;

    height: 4px;

    border-radius: 50%;
}


.calendar-day.profitable::after {
    background: var(--journal-green);
}


.calendar-day.losing::after {
    background: var(--journal-red);
}


.calendar-day.breakeven::after {
    background: var(--journal-muted);
}


.calendar-day.today {

    outline:
        1px solid
        rgba(36,107,255,.6);

    color:
        var(--journal-blue-light);
}


.calendar-legend {

    display: flex;

    justify-content: center;

    gap: 10px;

    padding:
        8px;

    border-top:
        1px solid
        var(--journal-border);

    color:
        var(--journal-muted);

    font-size: 6px;
}


.calendar-legend span {

    display: flex;

    align-items: center;

    gap: 4px;
}


.calendar-legend i {

    width: 5px;

    height: 5px;

    border-radius: 50%;
}


.green-dot {
    background: var(--journal-green);
}


.red-dot {
    background: var(--journal-red);
}


.gray-dot {
    background: var(--journal-muted);
}


.fullscreen-button {

    width: 25px;

    height: 25px;

    padding: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    border:
        1px solid
        var(--journal-border);

    border-radius: 6px;

    background:
        var(--journal-card-2);

    color:
        var(--journal-muted);
}


.fullscreen-button svg {

    width: 12px;

    height: 12px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.6;

    stroke-linecap: round;
}


.fullscreen-button:hover {

    color:
        var(--journal-text);
}


/* =========================================================
   BOTTOM FEATURES
========================================================= */

.bottom-feature-grid {

    display: grid;

    grid-template-columns:
        1fr
        1fr
        1fr;

    gap: 8px;
}


.feature-card {

    min-height: 150px;
}


.ai-preview {

    display: flex;

    gap: 10px;

    padding: 14px;
}


.ai-pulse {

    width: 25px;

    height: 25px;

    flex-shrink: 0;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(67,130,255,.8) 0,
            rgba(36,107,255,.15) 35%,
            transparent 70%
        );

    animation:
        aiPulse 2.2s ease-in-out infinite;
}


.ai-preview strong {

    font-size: 9px;
}


.ai-preview p {

    margin: 4px 0 0;

    color:
        var(--journal-muted);

    font-size: 8px;

    line-height: 1.5;
}


@keyframes aiPulse {

    0%,
    100% {
        transform: scale(.9);
        opacity: .6;
    }

    50% {
        transform: scale(1.12);
        opacity: 1;
    }
}


#journalNotes {

    width: calc(100% - 24px);

    height: 82px;

    margin:
        12px;

    resize: none;

    padding: 9px;

    border:
        1px solid
        var(--journal-border);

    border-radius: 7px;

    background:
        var(--journal-card-2);

    color:
        var(--journal-text);

    outline: none;

    font-size: 8px;
}


#journalNotes:focus {

    border-color:
        rgba(36,107,255,.55);
}


/* =========================================================
   FULLSCREEN CALENDAR
========================================================= */

.calendar-card.calendar-fullscreen {

    position: fixed;

    inset: 12px;

    z-index: 9999;

    background:
        #070b13;

    box-shadow:
        0 25px 80px
        rgba(0,0,0,.65);
}


.calendar-card.calendar-fullscreen .calendar-grid {

    grid-template-columns:
        repeat(7, 1fr);

    gap: 7px;

    padding: 20px;
}


.calendar-card.calendar-fullscreen .calendar-day {

    min-height: 75px;

    font-size: 11px;

    border:
        1px solid
        rgba(255,255,255,.03);
}


.calendar-card.calendar-fullscreen .calendar-day-name {

    font-size: 9px;

    padding: 10px 0;
}


.calendar-card.calendar-fullscreen .calendar-legend {

    font-size: 9px;
}


.calendar-card.calendar-fullscreen .calendar-navigation {

    padding:
        15px 20px;
}


.calendar-card.calendar-fullscreen .calendar-navigation strong {

    font-size: 13px;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1250px) {

    .kpi-grid {

        grid-template-columns:
            repeat(4, minmax(0,1fr));
    }


    .journal-dashboard-grid {

        grid-template-columns:
            1fr;
    }


    .journal-dashboard-right {

        width: 100%;
    }


    .analytics-row {

        grid-template-columns:
            minmax(0, 1.25fr)
            minmax(0, 1fr);
    }


    .history-calendar-row {

        grid-template-columns:
            1fr;
    }

}



@media (max-width: 900px) {

    .journal-main {

        padding:
            15px;
    }


    .journal-header {

        align-items: flex-start;

        flex-direction: column;
    }


    .header-actions {

        width: 100%;
    }


    .analytics-row {

        grid-template-columns:
            1fr;
    }


    .journal-dashboard-right {

        width: 100%;
    }


    .bottom-feature-grid {

        grid-template-columns:
            1fr;
    }

}

@media (max-width: 650px) {

    .kpi-grid {

        grid-template-columns:
            repeat(2, minmax(0,1fr));
    }


    .filter-control {

        flex: 1;

        min-width: 110px;
    }


    .date-control {

        min-width: 100%;
    }


    .r-content {

        justify-content:
            flex-start;
    }

}

.equity-tooltip {
    position: absolute;
    left: 24%;
    top: 49%;
    transform: translate(-50%, -50%) translateY(8px);
    min-width: 150px;
    max-width: 210px;

    padding: 10px 12px;

    background: rgba(9, 15, 27, 0.97);
    border: 1px solid var(--journal-border);
    border-radius: 8px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.35),
        0 0 14px rgba(36, 107, 255, 0.08);

    z-index: 20;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.18s ease,
        visibility 0.18s ease,
        transform 0.18s ease;
}

.equity-tooltip.show {
    opacity: 1;
    visibility: visible;

    transform: translate(-50%, -50%) translateY(0);
}


.equity-tooltip-title {
    color: var(--journal-text);
    font-size: 9px;
    font-weight: 700;
    margin-bottom: 2px;
}

.equity-tooltip-date {
    color: var(--journal-muted);
    font-size: 7px;
    margin-bottom: 8px;
}

.equity-tooltip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}

.equity-tooltip-row span {
    color: var(--journal-muted);
    font-size: 7px;
}

.equity-tooltip-row strong {
    color: var(--journal-text);
    font-size: 7px;
    font-weight: 600;
    text-align: right;
}

.equity-tooltip-divider {
    height: 1px;
    background: rgba(255,255,255,.06);
    margin: 7px 0 5px;
}

.equity-tooltip-point {
    fill: var(--journal-card);
    stroke: var(--journal-blue);
    stroke-width: 2;
    cursor: pointer;
    transition: r .15s ease, filter .15s ease;
}

.equity-tooltip-point:hover {
    filter: drop-shadow(0 0 5px rgba(36,107,255,.65));
}

.equity-plot-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* =========================================================
   TRADE RESULT COLORS
========================================================= */

.trade-result-win {
    color: var(--journal-green);
    font-weight: 600;
}

.trade-result-loss {
    color: var(--journal-red);
    font-weight: 600;
}

.trade-result-breakeven {
    color: var(--journal-text);
    font-weight: 600;
}

.trade-result-open {
    color: var(--journal-blue-light);
    font-weight: 600;
}

/* =========================================================
   EQUITY TOOLTIP — RESULT COLORS
========================================================= */

.equity-tooltip .trade-result-win {
    color: var(--journal-green);
    font-weight: 600;
}

.equity-tooltip .trade-result-loss {
    color: var(--journal-red);
    font-weight: 600;
}

.equity-tooltip .trade-result-breakeven {
    color: var(--journal-text);
    font-weight: 600;
}

.equity-tooltip .trade-result-open {
    color: var(--journal-blue-light);
    font-weight: 600;
}

/* =========================================================
   R DISTRIBUTION — 360° ROTATION
========================================================= */

#rDonutRing.r-spin {
    animation:
        rDistributionSpin 1s cubic-bezier(.4, 0, .2, 1);
}

@keyframes rDistributionSpin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}

/* =========================================================
   FX CALCULATOR — PROFESSIONAL COMPACT DESIGN
   ========================================================= */

.risk-card {
    position: relative;
    min-width: 0;
    height: auto;
    min-height: 0;
    align-self: start;

    /* Important: allows the account dropdown to float outside */
    overflow: visible;
}


/* =========================================================
   ACCOUNT SELECTOR
   ========================================================= */

.fx-account-control {
    position: relative;
    width: 145px;
    min-width: 145px;
    z-index: 50;
}

.fx-account-dropdown-button {
    width: 100%;
    height: 28px;
    padding: 0 9px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;

    border: 1px solid var(--journal-border-light);
    border-radius: 7px;

    background:
        linear-gradient(
            180deg,
            #111827,
            #0b111c
        );

    color: var(--journal-text);

    font-size: 8px;
    font-weight: 500;

    text-align: left;

    transition:
        border-color .18s ease,
        background .18s ease,
        box-shadow .18s ease;
}

.fx-account-dropdown-button:hover {
    border-color: rgba(36,107,255,.65);

    background:
        linear-gradient(
            180deg,
            #131c2c,
            #0c1320
        );

    box-shadow:
        0 0 0 2px rgba(36,107,255,.05);
}

.fx-account-dropdown-button[aria-expanded="true"] {
    border-color: rgba(36,107,255,.7);

    box-shadow:
        0 0 0 2px rgba(36,107,255,.08);
}

#fxAccountSummary {
    min-width: 0;

    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.fx-dropdown-arrow {
    flex-shrink: 0;

    color: var(--journal-muted);

    font-size: 8px;

    transition:
        transform .18s ease;
}

.fx-account-dropdown-button[aria-expanded="true"]
.fx-dropdown-arrow {
    transform: rotate(180deg);
}


/* =========================================================
   ACCOUNT DROPDOWN PANEL
   ========================================================= */

.fx-account-dropdown {
    position: absolute;

    top: calc(100% + 7px);
    right: 0;

    width: 265px;

    z-index: 9999;

    display: none;

    border:
        1px solid
        var(--journal-border-light);

    border-radius: 9px;

    background:
        linear-gradient(
            180deg,
            #0d1420,
            #090f19
        );

    box-shadow:
        0 18px 45px rgba(0,0,0,.55),
        0 4px 14px rgba(0,0,0,.25);

    overflow: hidden;
}

.fx-account-dropdown.show {
    display: block;
}


/* Dropdown header */

.fx-account-dropdown-header {
    min-height: 38px;

    padding: 8px 10px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom:
        1px solid
        var(--journal-border);
}

.fx-account-dropdown-header strong {
    color: var(--journal-text);

    font-size: 8px;
    font-weight: 600;
}

.fx-account-dropdown-header span {
    color: var(--journal-muted);

    font-size: 7px;
}


/* Account option area */

.fx-account-options {
    max-height: 220px;

    padding: 5px;

    overflow-y: auto;
    overflow-x: hidden;

    scrollbar-width: thin;
}


/* Individual account */

.fx-account-option {
    width: 100%;
    min-height: 43px;

    padding: 7px 8px;

    display: flex;
    align-items: center;

    gap: 8px;

    border:
        1px solid
        transparent;

    border-radius: 6px;

    background: transparent;

    color: var(--journal-text);

    text-align: left;

    transition:
        background .15s ease,
        border-color .15s ease;
}

.fx-account-option:hover {
    background:
        rgba(36,107,255,.06);

    border-color:
        rgba(36,107,255,.10);
}

.fx-account-option.selected {
    background:
        rgba(36,107,255,.09);

    border-color:
        rgba(36,107,255,.18);
}


/* Checkbox */

.fx-account-check {
    width: 16px;
    height: 16px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid
        var(--journal-border-light);

    border-radius: 4px;

    background:
        rgba(255,255,255,.015);

    color:
        var(--journal-blue-light);

    font-size: 8px;

    transition:
        .15s ease;
}

.fx-account-option.selected .fx-account-check {
    border-color:
        rgba(36,107,255,.65);

    background:
        rgba(36,107,255,.13);
}


/* Account name */

.fx-account-option-main {
    min-width: 0;
    flex: 1;

    display: flex;
    flex-direction: column;

    gap: 2px;
}

.fx-account-option-main strong {
    color: var(--journal-text);

    font-size: 8px;
    font-weight: 600;
}

.fx-account-option-main span {
    color: var(--journal-muted);

    font-size: 6.5px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Account balance */

.fx-account-option-size {
    flex-shrink: 0;

    color: var(--journal-text);

    font-size: 7px;
    font-weight: 500;

    white-space: nowrap;
}


/* Empty state */

.fx-account-empty {
    padding: 16px 10px;

    text-align: center;

    color: var(--journal-muted);

    font-size: 7px;
}


/* =========================================================
   ACCOUNT RISK BAR
   ========================================================= */

.fx-account-risk-bar {
    min-height: 39px;

    padding: 7px 12px;

    display: flex;
    align-items: center;

    gap: 22px;

    border-bottom:
        1px solid
        var(--journal-border);
}

.fx-account-risk-bar > div {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 2px;
}

.fx-account-risk-bar span {
    color: var(--journal-muted);

    font-size: 6.5px;
}

.fx-account-risk-bar strong {
    color: var(--journal-text);

    font-size: 8px;
    font-weight: 600;
}

.fx-edit-account-button {
    width: 23px;
    height: 23px;

    margin-left: auto;

    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid
        var(--journal-border);

    border-radius: 6px;

    background:
        var(--journal-card-2);

    color: var(--journal-muted);

    font-size: 10px;

    transition:
        .18s ease;
}

.fx-edit-account-button:hover {
    color: var(--journal-blue-light);

    border-color:
        rgba(36,107,255,.55);

    background:
        rgba(36,107,255,.07);
}


/* =========================================================
   CALCULATOR BODY
   ========================================================= */

.fx-calculator-fields {
    padding: 9px 12px 8px;

    display: flex;
    flex-direction: column;

    gap: 7px;

    min-height: 0;
}

.fx-calculator-fields label {
    display: flex;
    flex-direction: column;

    gap: 4px;
}

.fx-calculator-fields label > span,
.fx-field-label {
    color: var(--journal-muted);

    font-size: 6.5px;
    font-weight: 500;
}


/* =========================================================
   INPUTS
   ========================================================= */

.fx-calculator-input {
    width: 100%;
    height: 27px;

    padding: 0 8px;

    border:
        1px solid
        var(--journal-border);

    border-radius: 6px;

    background:
        var(--journal-card-2);

    color: var(--journal-text);

    outline: none;

    font-size: 7.5px;

    color-scheme: dark;

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

.fx-calculator-input:hover {
    border-color:
        var(--journal-border-light);
}

.fx-calculator-input:focus {
    border-color:
        rgba(36,107,255,.65);

    box-shadow:
        0 0 0 2px rgba(36,107,255,.06);
}


/* =========================================================
   STOP LOSS MODE
   ========================================================= */

.fx-stop-section {
    display: flex;
    flex-direction: column;

    gap: 4px;
}

.fx-stop-modes {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 4px;
}

.fx-stop-mode {
    min-height: 26px;

    padding: 0 5px;

    border:
        1px solid
        var(--journal-border);

    border-radius: 6px;

    background:
        var(--journal-card-2);

    color:
        var(--journal-muted);

    font-size: 6.5px;
    font-weight: 500;

    transition:
        .16s ease;
}

.fx-stop-mode:hover {
    color: var(--journal-text);

    border-color:
        var(--journal-border-light);
}

.fx-stop-mode.active {
    color:
        var(--journal-blue-light);

    border-color:
        rgba(36,107,255,.5);

    background:
        rgba(36,107,255,.08);
}

.fx-stop-fields {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 6px;
}

.fx-stop-fields.hidden {
    display: none;
}

#fxPipFields {
    grid-template-columns: 1fr;
}


/* =========================================================
   MESSAGE
   ========================================================= */

.fx-calculator-message {
    display: none;

    margin: 0 0 2px;

    padding: 6px 8px;

    border:
        1px solid
        rgba(239,91,104,.25);

    border-radius: 6px;

    background:
        rgba(239,91,104,.06);

    color:
        var(--journal-red);

    font-size: 6.5px;
}

.fx-calculator-message.show {
    display: block;
}


/* =========================================================
   POSITION RESULTS — COMPACT
   ========================================================= */

.fx-results {
    margin: 1px 0 3px;

    border:
        1px solid
        var(--journal-border);

    border-radius: 7px;

    background:
        rgba(255,255,255,.012);

    overflow: hidden;

    min-height: 0;
}

.fx-results-header {
    min-height: 29px;

    padding: 6px 8px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 6px;

    border-bottom:
        1px solid
        var(--journal-border);
}

.fx-results-header > span {
    color:
        var(--journal-blue-light);

    font-size: 6.5px;
    font-weight: 600;
}

.fx-results-header small {
    max-width: 150px;

    color:
        var(--journal-muted);

    font-size: 5.5px;

    text-align: right;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================================================
   TWO RESULTS PER ROW
   ========================================================= */

#fxResults {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 5px;

    padding: 5px;

    max-height: 145px;

    overflow-y: auto;
    overflow-x: hidden;

    min-height: 0;

    scrollbar-width: thin;
}


/* Empty result */

.fx-results-empty {
    grid-column: 1 / -1;

    padding: 11px 7px;

    color:
        var(--journal-muted);

    text-align: center;

    font-size: 6.5px;
}


/* =========================================================
   INDIVIDUAL RESULT CARD
   ========================================================= */

.fx-result-row {
    width: 100%;
    height: 58px;
    min-width: 0;
    min-height: 58px;
    max-height: 58px;

    padding: 4px;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    grid-template-rows:
        1fr
        21px;

    align-items: center;

    column-gap: 4px;
    row-gap: 2px;

    border:
        1px solid
        var(--journal-border);

    border-radius: 6px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.025),
            rgba(255,255,255,.008)
        );

    box-sizing: border-box;

    overflow: hidden;

    transition:
        border-color .15s ease,
        background .15s ease;
}

.fx-result-row:hover {
    border-color:
        rgba(36,107,255,.28);

    background:
        rgba(36,107,255,.035);
}


/* Account */

.fx-result-account {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 2px;
}

.fx-result-account strong {
    min-width: 0;

    color:
        var(--journal-text);

    font-size: 6.5px;
    font-weight: 600;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fx-result-account span {
    min-width: 0;

    color:
        var(--journal-muted);

    font-size: 5px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Risk */

.fx-result-risk {
    display: flex;
    flex-direction: column;

    align-items: flex-end;

    gap: 2px;
}

.fx-result-risk span {
    color:
        var(--journal-muted);

    font-size: 5px;
}

.fx-result-risk strong {
    color:
        var(--journal-text);

    font-size: 6.5px;
    font-weight: 600;

    white-space: nowrap;
}


/* Lot size */

.fx-result-lot {
    min-width: 0;

    display: flex;
    align-items: baseline;

    gap: 3px;
}

.fx-result-lot strong {
    color:
        hsl(0, 0%, 98%);

    font-size: 11px;
    line-height: 1;

    font-weight: 700;
}

.fx-result-lot span {
    color:
        var(--journal-muted);

    font-size: 5.5px;
}


/* Copy button */

.fx-copy-button {
    width: 100%;
    min-width: 0;

    height: 21px;

    padding: 0 5px;

    border:
        1px solid
        var(--journal-border);

    border-radius: 5px;

    background:
        var(--journal-card-2);

    color:
        var(--journal-muted);

    font-size: 5.5px;
    font-weight: 600;

    transition:
        .15s ease;
}

.fx-copy-button:hover {
    color:
        var(--journal-text);

    border-color:
        rgba(36,107,255,.5);

    background:
        rgba(36,107,255,.06);
}

.fx-copy-button.copied {
    color:
        var(--journal-green);

    border-color:
        rgba(50,201,121,.3);

    background:
        rgba(50,201,121,.06);
}


/* =========================================================
   CALCULATE BUTTON
   ========================================================= */

.fx-calculate-button {
    width: 100%;

    height: 29px;

    margin: 1px 0 3px;

    flex-shrink: 0;

    border: none;

    border-radius: 6px;

    background:
        linear-gradient(
            135deg,
            var(--journal-blue),
            #3276ff
        );

    color: #fff;

    font-size: 7px;
    font-weight: 600;

    box-shadow:
        0 5px 14px
        rgba(36,107,255,.15);

    transition:
        .18s ease;
}

.fx-calculate-button:hover {
    background:
        linear-gradient(
            135deg,
            var(--journal-blue-light),
            #4b88ff
        );

    transform:
        translateY(-1px);

    box-shadow:
        0 7px 18px
        rgba(36,107,255,.22);
}


/* =========================================================
   ACCOUNT CHIPS
   ========================================================= */

.fx-account-chip {
    display: inline-flex;
    align-items: center;

    gap: 5px;

    max-width: 100%;

    padding: 2px 5px;

    border-radius: 4px;

    background:
        rgba(36,107,255,.08);

    color:
        var(--journal-blue-light);

    font-size: 6.5px;
}

.fx-account-chip-label {
    min-width: 0;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.fx-account-chip button {
    padding: 0;

    border: none;

    background: transparent;

    color:
        var(--journal-muted);

    font-size: 8px;

    line-height: 1;
}

.fx-account-chip button:hover {
    color:
        var(--journal-red);
}


/* =========================================================
   SELECTION COUNT
   ========================================================= */

.fx-account-selection-count {
    margin-left: auto;

    color:
        var(--journal-muted);

    font-size: 8px;
    font-weight: 600;

    white-space: nowrap;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 650px) {

    .fx-account-control {
        width: 135px;
        min-width: 135px;
    }

    .fx-account-dropdown {
        right: auto;
        left: 0;

        width: 250px;
    }

    #fxResults {
        grid-template-columns: 1fr;
    }

    .fx-result-row {
        grid-template-columns:
            minmax(0, 1fr)
            auto;
    }
}

/* =========================================================
   FXpossible — Account Selector Professional Layout
   ========================================================= */

.fx-account-control {
    position: relative;
    width: 145px;
    min-width: 145px;
}

/* Main selector button */
.fx-account-dropdown-button {
    width: 100%;
    min-width: 0;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;

    padding: 0 10px;

    overflow: hidden;
    white-space: nowrap;

    cursor: pointer;
}

/* The selected-account summary */
#fxAccountSummary {
    min-width: 0;
    flex: 1;

    display: flex;
    align-items: center;
    gap: 4px;

    overflow: hidden;
    white-space: nowrap;
}

/* Individual selected-account chip */
.fx-account-chip {
    min-width: 0;
    max-width: 100%;

    display: inline-flex;
    align-items: center;
    gap: 4px;

    overflow: hidden;
}

/* Account text inside chip */
.fx-account-chip-label {
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Remove X */
.fx-account-chip button {
    flex: 0 0 auto;

    width: 16px;
    height: 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    border: 0;
    background: transparent;

    cursor: pointer;
}

/* Dropdown arrow must never be pushed away */
.fx-dropdown-arrow {
    flex: 0 0 auto;
}

/* =========================================================
   Dropdown
   ========================================================= */

.fx-account-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;

    width: 280px;
    max-width: calc(100vw - 30px);

    max-height: 330px;

    overflow-y: auto;
    overflow-x: hidden;

    z-index: 1000;
}

/* Header */
.fx-account-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    min-width: 0;
}

/* Account options container */
.fx-account-options {
    display: flex;
    flex-direction: column;
    gap: 6px;

    min-width: 0;
}

/* Individual account */
.fx-account-option {
    width: 100%;
    min-width: 0;

    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;

    box-sizing: border-box;
}

/* Account text area */
.fx-account-option-main {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 2px;

    overflow: hidden;
}

/* Account ID */
.fx-account-option-main strong {
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Prop firm / account name */
.fx-account-option-main span {
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Account balance */
.fx-account-option-size {
    flex: 0 0 auto;

    white-space: nowrap;
}

/* =========================================================
   Smaller screens
   ========================================================= */

@media (max-width: 700px) {

    .fx-account-control {
        width: 130px;
        min-width: 130px;
    }

    .fx-account-dropdown {
        width: 260px;
        max-width: calc(100vw - 24px);
    }
}

/* =========================================================
   FXpossible — INSTRUMENT COMBOBOX
   ========================================================= */

.fx-instrument-combobox {
    position: relative;
    width: 100%;
    min-width: 0;
    z-index: 40;
}

.fx-instrument-combobox-control {
    width: 100%;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;

    padding: 0 8px;

    border: 1px solid var(--journal-border);
    border-radius: 6px;

    background: var(--journal-card-2);
    color: var(--journal-text);

    font: inherit;
    font-size: 7.5px;
    text-align: left;

    cursor: pointer;
    outline: none;
}

.fx-instrument-combobox-control:hover {
    border-color: var(--journal-text-muted);
}

.fx-instrument-combobox.open
.fx-instrument-combobox-control {
    border-color: var(--journal-text-muted);
}

.fx-instrument-selected {
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: var(--journal-text);
}

.fx-instrument-arrow {
    flex: 0 0 auto;

    font-size: 9px;
    line-height: 1;

    color: var(--journal-text-muted);

    transition:
        transform 0.15s ease;
}

.fx-instrument-combobox.open
.fx-instrument-arrow {
    transform: rotate(180deg);
}


/* =========================================================
   DROPDOWN
   ========================================================= */

.fx-instrument-combobox-dropdown {
    position: absolute;

    top: calc(100% + 4px);
    left: 0;

    width: 100%;
    min-width: 220px;

    max-height: 300px;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border: 1px solid var(--journal-border);
    border-radius: 7px;

    background: var(--journal-card-2);

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.35);

    z-index: 100;
}

.fx-instrument-combobox-dropdown[hidden] {
    display: none;
}


/* =========================================================
   SEARCH
   ========================================================= */

.fx-instrument-search-wrapper {
    flex: 0 0 auto;

    display: flex;
    align-items: center;

    gap: 6px;

    padding: 7px;

    border-bottom:
        1px solid var(--journal-border);

    background:
        var(--journal-card-2);
}

.fx-instrument-search-icon {
    flex: 0 0 auto;

    color:
        var(--journal-text-muted);

    font-size: 11px;
}

.fx-instrument-search {
    width: 100%;
    min-width: 0;

    height: 25px;

    padding: 0 7px;

    border:
        1px solid var(--journal-border);

    border-radius: 5px;

    background:
        var(--journal-card);

    color:
        var(--journal-text);

    outline: none;

    font: inherit;
    font-size: 7.5px;
}

.fx-instrument-search::placeholder {
    color:
        var(--journal-text-muted);
}

.fx-instrument-search:focus {
    border-color:
        var(--journal-text-muted);
}


/* =========================================================
   OPTIONS
   ========================================================= */

.fx-instrument-options {
    min-height: 0;

    overflow-y: auto;

    padding: 3px;
}

.fx-instrument-group {
    margin-bottom: 3px;
}

.fx-instrument-group:last-child {
    margin-bottom: 0;
}

.fx-instrument-group-label {
    padding: 5px 7px 3px;

    color:
        var(--journal-text-muted);

    font-size: 6.5px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fx-instrument-option {
    width: 100%;

    min-height: 29px;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto
        16px;

    align-items: center;

    gap: 5px;

    padding: 0 7px;

    border: 0;
    border-radius: 5px;

    background: transparent;

    color:
        var(--journal-text);

    font: inherit;

    text-align: left;

    cursor: pointer;
}

.fx-instrument-option:hover {
    background:
        var(--journal-card);
}

.fx-instrument-option.selected {
    background:
        var(--journal-card);
}

.fx-instrument-option-symbol {
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color:
        var(--journal-text);

    font-size: 7.5px;
    font-weight: 600;
}

.fx-instrument-option-meta {
    color:
        var(--journal-text-muted);

    font-size: 6px;
}

.fx-instrument-option-check {
    width: 16px;

    text-align: center;

    color:
        var(--journal-text);

    font-size: 8px;
    font-weight: 600;
}

.fx-instrument-option.unavailable {
    opacity: 0.55;
}

.fx-instrument-empty {
    padding: 12px 8px;

    color:
        var(--journal-text-muted);

    font-size: 7px;

    text-align: center;
}

/* =========================================================
   FXPOSSIBLE — ADD TRADE MODAL
   COMPACT PROFESSIONAL 2-COLUMN LAYOUT
========================================================= */


/* =========================================================
   MODAL CONTAINER
========================================================= */

#addTradeModal {
    position: fixed;
    inset: 0;

    z-index: 10000;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    padding: 16px;

    visibility: hidden;
    opacity: 0;
    pointer-events: none;

    transition:
        opacity 180ms ease,
        visibility 180ms ease;
}

#addTradeModal.show {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}


/* =========================================================
   BACKDROP
========================================================= */

.add-trade-modal-backdrop {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    padding: 16px;

    background: rgba(3, 7, 15, 0.72);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}


/* =========================================================
   MODAL CARD
========================================================= */

.add-trade-modal {
    position: relative;
    z-index: 2;

    width: min(550px, 100%);
    max-width: 550px;

    margin: 0 auto;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;

    background:
        linear-gradient(
            145deg,
            rgba(19, 29, 45, 0.99),
            rgba(8, 14, 24, 0.99)
        );

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.60),
        0 0 0 1px rgba(80, 150, 255, 0.03),
        0 0 40px rgba(35, 115, 220, 0.08);

    transform: translateY(10px) scale(0.98);
    opacity: 0;

    transition:
        transform 200ms cubic-bezier(.2, .8, .2, 1),
        opacity 160ms ease;
}

#addTradeModal.show .add-trade-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}


/* =========================================================
   HEADER
========================================================= */

.add-trade-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 15px 18px 11px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.add-trade-modal-header h2 {
    margin: 0;

    font-size: 18px;
    font-weight: 700;

    letter-spacing: -0.3px;

    color: #ffffff;
}

.add-trade-modal-header p {
    margin: 2px 0 0;

    font-size: 10px;

    color: rgba(255, 255, 255, 0.45);
}


/* CLOSE BUTTON */

.add-trade-close {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 8px;

    background: rgba(255, 255, 255, 0.05);

    color: var(--journal-muted);

    font-size: 19px;
    line-height: 1;

    cursor: pointer;

    transition:
        background 150ms ease,
        color 150ms ease;
}

.add-trade-close:hover {
    background: rgba(255, 255, 255, 0.10);
    color: var(--journal-text);
}


/* =========================================================
   FORM
========================================================= */

#addTradeForm {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    column-gap: 12px;
    row-gap: 8px;

    padding: 12px 18px 15px;
}


/* =========================================================
   FORM FIELD
========================================================= */

.add-trade-field {
    min-width: 0;
}

.add-trade-field label {
    display: block;

    margin-bottom: 3px;

    font-size: 9px;
    font-weight: 600;

    color: rgba(255, 255, 255, 0.62);
}


/* =========================================================
   INPUTS / SELECTS
========================================================= */

.add-trade-field input,
.add-trade-field select {
    width: 100%;
    height: 34px;

    box-sizing: border-box;

    padding: 0 10px;

    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 7px;

    background: rgba(255, 255, 255, 0.045);

    color: #ffffff;

    font-size: 11px;

    outline: none;

    transition:
        border-color 150ms ease,
        background 150ms ease,
        box-shadow 150ms ease;
}

.add-trade-field input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.add-trade-field input:focus,
.add-trade-field select:focus {
    border-color: rgba(70, 145, 255, 0.65);

    background: rgba(255, 255, 255, 0.06);

    box-shadow:
        0 0 0 3px rgba(55, 130, 235, 0.10);
}

.add-trade-field select option {
    background: #101a2a;
    color: #ffffff;
}


/* =========================================================
   FULL WIDTH ELEMENTS
========================================================= */

.add-trade-field:has(#tradeAccountSelector),
.add-trade-field:has(#addTradeMessage),
.add-trade-position-preview,
.add-trade-actions {
    grid-column: 1 / -1;
}


/* Before screenshot stays inside one column */

.add-trade-field:has(#tradeBeforeScreenshot) {
    grid-column: span 1;
}


/* Result screenshot stays inside one column */

.add-trade-result-screenshot {
    grid-column: span 1;
}

.add-trade-result-screenshot[hidden] {
    display: none;
}


/* =========================================================
   ACCOUNT SELECTOR
========================================================= */

.add-trade-account-selector {
    position: relative;

    width: 100%;
}

.add-trade-account-button {
    width: 100%;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    box-sizing: border-box;

    padding: 0 10px;

    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 7px;

    background: rgba(255, 255, 255, 0.045);

    color: rgba(255, 255, 255, 0.80);

    font-size: 11px;

    cursor: pointer;

    transition:
        background 150ms ease,
        border-color 150ms ease;
}

.add-trade-account-button:hover {
    background: rgba(255, 255, 255, 0.065);

    border-color:
        rgba(70, 145, 255, 0.35);
}


/* =========================================================
   ACCOUNT DROPDOWN
========================================================= */

.add-trade-account-dropdown {
    position: absolute;

    left: 0;
    right: 0;
    top: calc(100% + 5px);

    z-index: 50;

    max-height: 190px;

    overflow-y: auto;

    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 9px;

    background: #101a2a;

    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.45);
}

.add-trade-account-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 9px 10px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.07);

    font-size: 10px;
}

.add-trade-account-header span {
    color: rgba(255, 255, 255, 0.40);
}

.add-trade-account-option {
    display: flex;
    align-items: center;

    gap: 8px;

    padding: 7px 10px;

    font-size: 10px;

    cursor: pointer;
}

.add-trade-account-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.add-trade-account-option input {
    width: 13px;
    height: 13px;

    margin: 0;
}

.add-trade-account-empty {
    padding: 12px;

    color: rgba(255, 255, 255, 0.45);

    font-size: 10px;
}


/* =========================================================
   STOP LOSS / RISK REWARD INPUT
========================================================= */

.add-trade-input-with-unit {
    position: relative;
}

.add-trade-input-with-unit input {
    padding-right: 48px;
}

.add-trade-input-with-unit span {
    position: absolute;

    right: 10px;
    top: 50%;

    transform: translateY(-50%);

    font-size: 9px;

    color: rgba(255, 255, 255, 0.38);

    pointer-events: none;
}


/* =========================================================
   INTENDED TAKE PROFIT
========================================================= */

.add-trade-tp-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 34px;

    box-sizing: border-box;

    padding: 0 10px;

    border: 1px solid rgba(70, 145, 255, 0.12);
    border-radius: 7px;

    background:
        rgba(50, 120, 220, 0.055);
}

.add-trade-tp-preview span {
    font-size: 9px;

    color: rgba(255, 255, 255, 0.50);
}

.add-trade-tp-preview strong {
    font-size: 11px;

    color: #ffffff;
}


/* =========================================================
   POSITION SIZE PREVIEW
========================================================= */

.add-trade-position-preview {
    padding: 9px 10px;

    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;

    background:
        rgba(255, 255, 255, 0.025);
}

.add-trade-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 5px;
}

.add-trade-preview-header strong {
    font-size: 10px;

    color: #ffffff;
}

.add-trade-preview-header span {
    font-size: 8px;

    color: rgba(255, 255, 255, 0.35);
}

.add-trade-position-results {
    min-height: 22px;
}

.add-trade-preview-empty,
.add-trade-preview-loading {
    font-size: 9px;

    line-height: 1.25;

    color: rgba(255, 255, 255, 0.38);
}


/* =========================================================
   RESULT SCREENSHOT
========================================================= */

.add-trade-field-hint {
    margin-top: 4px;

    font-size: 8px;

    line-height: 1.25;

    color: rgba(255, 255, 255, 0.30);
}


/* =========================================================
   FILE INPUT
========================================================= */

.add-trade-field input[type="file"] {
    height: 34px;

    padding: 4px 7px;

    font-size: 9px;

    cursor: pointer;
}

.add-trade-field input[type="file"]::file-selector-button {
    height: 25px;

    margin-right: 7px;

    padding: 0 8px;

    border: 0;
    border-radius: 5px;

    background: rgba(70, 145, 255, 0.15);

    color: rgba(255, 255, 255, 0.80);

    font-size: 9px;

    cursor: pointer;
}


/* =========================================================
   FORM MESSAGE
========================================================= */

.add-trade-message {
    min-height: 13px;

    font-size: 9px;
}

.add-trade-message.error {
    color: #ff7272;
}

.add-trade-message.success {
    color: #62d99b;
}


/* =========================================================
   ACTIONS
========================================================= */

.add-trade-actions {
    display: flex;

    align-items: center;
    justify-content: flex-end;

    gap: 7px;

    padding-top: 2px;
}

.add-trade-cancel,
.add-trade-save {
    height: 34px;

    padding: 0 15px;

    border-radius: 7px;

    font-size: 10px;
    font-weight: 600;

    cursor: pointer;
}

.add-trade-cancel {
    border:
        1px solid rgba(255, 255, 255, 0.09);

    background:
        rgba(255, 255, 255, 0.04);

    color:
        rgba(255, 255, 255, 0.65);
}

.add-trade-cancel:hover {
    background:
        rgba(255, 255, 255, 0.08);
}

.add-trade-save {
    border:
        1px solid rgba(65, 140, 255, 0.40);

    background:
        linear-gradient(
            135deg,
            #2477e8,
            #185bc0
        );

    color: #ffffff;

    box-shadow:
        0 6px 18px rgba(30, 105, 220, 0.20);
}

.add-trade-save:hover {
    filter: brightness(1.08);
}


/* =========================================================
   BODY LOCK
========================================================= */

body.add-trade-modal-open {
    overflow: hidden;
}

/* =========================================================
   ADD TRADE — JOURNAL HEADER BACKGROUND FOCUS
   ---------------------------------------------------------
   When Add Trade is open, the main Trading Journal header
   becomes part of the subdued/blurred background.

   The Add Trade panel itself is NOT affected.
========================================================= */

body.add-trade-modal-open .journal-header {

    filter:
        blur(8px);

    opacity:
        0.14;

    transform:
        translateY(-2px)
        scale(0.995);

    pointer-events:
        none;

    user-select:
        none;

    transition:
        filter 220ms ease,
        opacity 220ms ease,
        transform 220ms ease;
}


/* Keep the header controls visually subdued too */

body.add-trade-modal-open .journal-header .header-actions {

    filter:
        blur(2px);

    opacity:
        0.55;

}


/* Remove the focus effect when Add Trade closes */

body:not(.add-trade-modal-open) .journal-header {

    filter:
        blur(0);

    opacity:
        1;

    transform:
        translateY(0)
        scale(1);

    pointer-events:
        auto;

    user-select:
        auto;

    transition:
        filter 220ms ease,
        opacity 220ms ease,
        transform 220ms ease;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {

    #addTradeModal {
        padding: 10px;
    }

    .add-trade-modal-backdrop {
        padding: 10px;
    }

    .add-trade-modal {
        width: 100%;
        max-width: 100%;
    }

    #addTradeForm {
        grid-template-columns: 1fr;

        padding: 12px 15px 15px;

        row-gap: 9px;
    }

    .add-trade-field:has(#tradeAccountSelector),
    .add-trade-field:has(#addTradeMessage),
    .add-trade-position-preview,
    .add-trade-actions,
    .add-trade-field:has(#tradeBeforeScreenshot),
    .add-trade-result-screenshot {
        grid-column: auto;
    }

    .add-trade-modal-header {
        padding: 14px 15px 10px;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    #addTradeModal,
    .add-trade-modal,
    .add-trade-close,
    .add-trade-field input,
    .add-trade-field select,
    .add-trade-account-button,
    .add-trade-save,
    .add-trade-cancel {
        transition: none;
    }
}

/* =========================================================
   FXPOSSIBLE — ADD TRADE INSTRUMENT SELECTOR
   SINGLE UNIFIED SEARCH / SELECTION CONTROL
========================================================= */

.add-trade-instrument-selector {
    position: relative;
    width: 100%;
    min-width: 0;
}


/* =========================================================
   MAIN CONTROL
========================================================= */

.add-trade-instrument-button {
    width: 100%;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;

    box-sizing: border-box;

    padding: 0 10px;

    border: 1px solid var(--journal-border-light);
    border-radius: 7px;

    background:
        linear-gradient(
            180deg,
            #111827,
            #0b111c
        );

    color: var(--journal-text);

    font-family: inherit;
    font-size: 11px;
    font-weight: 500;

    text-align: left;

    cursor: pointer;

    outline: none;

    transition:
        border-color .16s ease,
        background .16s ease,
        box-shadow .16s ease;
}


.add-trade-instrument-button:hover {

    border-color:
        rgba(36, 107, 255, .55);

    background:
        linear-gradient(
            180deg,
            #131c2c,
            #0c1320
        );
}


.add-trade-instrument-selector.open
.add-trade-instrument-button {

    border-color:
        rgba(36, 107, 255, .70);

    box-shadow:
        0 0 0 2px rgba(36, 107, 255, .08);

}


#tradeInstrumentValue {

    min-width: 0;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    color:
        var(--journal-muted);
}


#tradeInstrumentValue.selected {

    color:
        var(--journal-text);

    font-weight: 600;

}


.add-trade-instrument-arrow {

    flex: 0 0 auto;

    color:
        var(--journal-muted);

    font-size: 9px;

    transition:
        transform .16s ease;
}


.add-trade-instrument-selector.open
.add-trade-instrument-arrow {

    transform:
        rotate(180deg);

    color:
        var(--journal-blue-light);
}


/* =========================================================
   DROPDOWN
========================================================= */

.add-trade-instrument-dropdown {

    position: absolute;

    left: 0;
    right: 0;

    top: calc(100% + 5px);

    z-index: 200;

    width: 100%;

    max-height: 280px;

    overflow: hidden;

    box-sizing: border-box;

    border:
        1px solid
        var(--journal-border-light);

    border-radius: 9px;

    background:
        linear-gradient(
            180deg,
            #0d1420,
            #090f19
        );

    box-shadow:
        0 18px 45px rgba(0, 0, 0, .55),
        0 5px 15px rgba(0, 0, 0, .30);
}


.add-trade-instrument-dropdown[hidden] {
    display: none;
}


/* =========================================================
   SEARCH — INSIDE SAME DROPDOWN
========================================================= */

.add-trade-instrument-search {

    position: relative;

    display: flex;
    align-items: center;

    height: 38px;

    padding: 0 10px;

    border-bottom:
        1px solid
        var(--journal-border);

    background:
        rgba(255, 255, 255, .015);
}


.add-trade-search-icon {

    position: absolute;

    left: 10px;

    color:
        var(--journal-muted);

    font-size: 13px;

    pointer-events: none;
}


#tradeInstrumentSearch {

    width: 100%;
    height: 27px;

    box-sizing: border-box;

    padding:
        0 8px 0 27px;

    border:
        1px solid
        var(--journal-border);

    border-radius: 6px;

    outline: none;

    background:
        var(--journal-card-2);

    color:
        var(--journal-text);

    font-family: inherit;

    font-size: 10px;

    color-scheme: dark;

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}


#tradeInstrumentSearch::placeholder {

    color:
        var(--journal-muted);

    opacity: .75;

}


#tradeInstrumentSearch:focus {

    border-color:
        rgba(36, 107, 255, .60);

    box-shadow:
        0 0 0 2px
        rgba(36, 107, 255, .07);

}


/* =========================================================
   OPTIONS
========================================================= */

.add-trade-instrument-options {

    max-height: 235px;

    padding: 5px;

    overflow-y: auto;
    overflow-x: hidden;

    scrollbar-width: thin;

    scrollbar-color:
        var(--journal-border-light)
        transparent;
}


.add-trade-instrument-option {

    width: 100%;
    min-height: 31px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    box-sizing: border-box;

    padding: 0 9px;

    border:
        1px solid
        transparent;

    border-radius: 6px;

    background:
        transparent;

    color:
        var(--journal-text);

    font-family: inherit;

    font-size: 10px;
    font-weight: 500;

    text-align: left;

    cursor: pointer;

    transition:
        background .13s ease,
        border-color .13s ease;
}


.add-trade-instrument-option:hover {

    background:
        rgba(36, 107, 255, .08);

    border-color:
        rgba(36, 107, 255, .15);

}


.add-trade-instrument-option.selected {

    background:
        rgba(36, 107, 255, .12);

    border-color:
        rgba(36, 107, 255, .24);

    color:
        var(--journal-blue-light);

}


.add-trade-instrument-symbol {

    min-width: 0;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}


.add-trade-instrument-check {

    flex: 0 0 auto;

    color:
        var(--journal-blue-light);

    font-size: 11px;
    font-weight: 700;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.add-trade-instrument-empty {

    padding: 14px 10px;

    color:
        var(--journal-muted);

    font-size: 9px;

    text-align: center;
}


/* =========================================================
   SCROLLBAR
========================================================= */

.add-trade-instrument-options::-webkit-scrollbar {
    width: 5px;
}

.add-trade-instrument-options::-webkit-scrollbar-track {
    background: transparent;
}

.add-trade-instrument-options::-webkit-scrollbar-thumb {

    background:
        var(--journal-border-light);

    border-radius: 10px;
}

.add-trade-instrument-options::-webkit-scrollbar-thumb:hover {

    background:
        rgba(36, 107, 255, .45);
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {

    .add-trade-instrument-dropdown {
        max-height: 250px;
    }

    .add-trade-instrument-options {
        max-height: 205px;
    }

}
/* =========================================================
   FXpossible — GLOBAL JOURNAL FILTERS
========================================================= */

.journal-global-filters {
    position: relative;
    z-index: 50;

    display: grid;

    grid-template-columns:
        repeat(4, minmax(150px, 1fr))
        minmax(145px, 1fr)
        minmax(145px, 1fr);

    gap: 8px;

    align-items: center;
}


/* =========================================================
   FILTER WRAPPER
========================================================= */

.journal-filter-dropdown {
    position: relative;

    min-width: 0;
}


/* =========================================================
   FILTER BUTTON
========================================================= */

.journal-filter-button {

    width: 100%;

    min-width: 0;

    height: 38px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 8px;

    padding:
        0 11px;

    cursor: pointer;

    text-align: left;

    overflow: hidden;
}


.journal-filter-label {

    min-width: 0;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}


.journal-filter-chevron {

    flex:
        0 0 auto;

    opacity: .6;

    font-size: 11px;

    transition:
        transform .15s ease;
}


.journal-filter-dropdown.open
.journal-filter-chevron {

    transform:
        rotate(180deg);
}


/* =========================================================
   DROPDOWN MENU
========================================================= */

.journal-filter-menu {

    position: absolute;

    top:
        calc(100% + 5px);

    left: 0;

    width: 100%;

    min-width: 190px;

    max-height: 280px;

    overflow-y: auto;

    padding: 5px;

    display: none;

    box-sizing: border-box;

    border:
        1px solid
        var(--journal-border);

    border-radius: 8px;

    background:
        var(--journal-card);

    box-shadow:
        0 14px 35px
        rgba(0,0,0,.38);

    z-index: 1000;
}


.journal-filter-dropdown.open
.journal-filter-menu {

    display: block;
}


/* =========================================================
   MENU OPTION
========================================================= */

.journal-filter-option {

    width: 100%;

    min-height: 34px;

    display: flex;

    align-items: center;

    gap: 8px;

    padding:
        7px 8px;

    box-sizing: border-box;

    border: 0;

    border-radius: 5px;

    background: transparent;

    color: inherit;

    cursor: pointer;

    text-align: left;

    font-size: 11px;
}


.journal-filter-option:hover {

    background:
        rgba(255,255,255,.055);
}


.journal-filter-option.selected {

    background:
        rgba(36,107,255,.10);
}


/* =========================================================
   CHECKBOX
========================================================= */

.journal-filter-option input {

    width: 14px;
    height: 14px;

    flex:
        0 0 14px;

    accent-color:
        var(--journal-blue);
}


.journal-filter-option-text {

    min-width: 0;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* =========================================================
   ALL OPTION
========================================================= */

.journal-filter-all {

    margin-bottom: 4px;

    padding-bottom: 7px;

    border-bottom:
        1px solid
        var(--journal-border);
}


/* =========================================================
   DATE FILTERS
========================================================= */

.journal-global-filters
.date-control {

    height: 38px;

    box-sizing: border-box;
}


/* =========================================================
   FILTER SCROLLBAR
========================================================= */

.journal-filter-menu::-webkit-scrollbar {

    width: 5px;
}


.journal-filter-menu::-webkit-scrollbar-thumb {

    border-radius: 10px;

    background:
        rgba(255,255,255,.15);
}


/* =========================================================
   SMALLER DESKTOP
========================================================= */

@media (max-width: 1100px) {

    .journal-global-filters {

        grid-template-columns:
            repeat(3, minmax(145px, 1fr));
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .journal-global-filters {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 430px) {

    .journal-global-filters {

        grid-template-columns:
            1fr;
    }
}

/* =========================================================
   FXpossible — PHASE 2 TRADE HISTORY
========================================================= */


/* ---------------------------------------------------------
   FIXED HISTORY CARD
--------------------------------------------------------- */

.history-card {

    min-height: 0;

    overflow: hidden;
}


/* ---------------------------------------------------------
   INTERNAL TABLE SCROLL
--------------------------------------------------------- */

.trade-history-scroll {

    width: 100%;

    height: 196px;

    max-height: 196px;

    overflow-y: auto;

    overflow-x: hidden;

    scrollbar-width: thin;
}


/* Chrome / Edge scrollbar */

.trade-history-scroll::-webkit-scrollbar {

    width: 5px;
}


.trade-history-scroll::-webkit-scrollbar-thumb {

    border-radius: 10px;

    background:
        rgba(255,255,255,.14);
}


.trade-history-scroll::-webkit-scrollbar-track {

    background: transparent;
}


/* ---------------------------------------------------------
   TABLE
--------------------------------------------------------- */

.trade-history-scroll
.trade-table {

    width: 100%;

    table-layout: fixed;

    border-collapse: collapse;
}


/* ---------------------------------------------------------
   STICKY HEADER
--------------------------------------------------------- */

.trade-history-scroll
.trade-table thead {

    position: sticky;

    top: 0;

    z-index: 5;

    background:
        var(--journal-card);
}


/* ---------------------------------------------------------
   COLUMN WIDTHS
--------------------------------------------------------- */

.trade-history-scroll
.trade-table th:nth-child(1),
.trade-history-scroll
.trade-table td:nth-child(1) {

    width: 10%;
}


.trade-history-scroll
.trade-table th:nth-child(2),
.trade-history-scroll
.trade-table td:nth-child(2) {

    width: 30%;
}


.trade-history-scroll
.trade-table th:nth-child(3),
.trade-history-scroll
.trade-table td:nth-child(3) {

    width: 12%;
}


.trade-history-scroll
.trade-table th:nth-child(4),
.trade-history-scroll
.trade-table td:nth-child(4) {

    width: 10%;
}


.trade-history-scroll
.trade-table th:nth-child(5),
.trade-history-scroll
.trade-table td:nth-child(5) {

    width: 10%;
}


.trade-history-scroll
.trade-table th:nth-child(6),
.trade-history-scroll
.trade-table td:nth-child(6) {

    width: 8%;
}


.trade-history-scroll
.trade-table th:nth-child(7),
.trade-history-scroll
.trade-table td:nth-child(7) {

    width: 12%;
}


.trade-history-scroll
.trade-table th:nth-child(8),
.trade-history-scroll
.trade-table td:nth-child(8) {

    width: 8%;
}


/* ---------------------------------------------------------
   COMPACT ROW
--------------------------------------------------------- */

.trade-history-scroll
.trade-table tbody tr {

    height: 43px;

    max-height: 43px;
}


/* =========================================================
   FXpossible — TRADE HISTORY ACCOUNT CHIPS
   Horizontal navigation — NO visible scrollbar
========================================================= */

.trade-account-list {

    position: relative;

    display: flex;

    align-items: center;

    width: 100%;

    min-width: 0;

    overflow: hidden;

    padding-right: 22px;

    box-sizing: border-box;
}


/*
 * The actual horizontal track.
 * It can move horizontally, but the scrollbar is hidden.
 */

.trade-account-track {

    display: flex;

    align-items: center;

    gap: 4px;

    min-width: max-content;

    transform: translateX(0);

    transition:
        transform .25s ease;

    will-change: transform;
}


/*
 * Individual account box
 */

.trade-account-chip {

    flex:
        0 0 auto;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    height: 22px;

    max-width: 112px;

    padding:
        0 7px;

    box-sizing: border-box;

    border:
        1px solid
        rgba(36,107,255,.35);

    border-radius: 5px;

    background:
        rgba(36,107,255,.08);

    color:
        var(--journal-text);

    font-size: 9px;

    font-weight: 600;

    line-height: 1;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/*
 * Small right-side navigation button.
 */

.trade-account-next {

    position: absolute;

    top: 50%;

    right: 0;

    transform:
        translateY(-50%);

    display: none;

    align-items: center;

    justify-content: center;

    width: 20px;

    height: 22px;

    padding: 0;

    border:
        1px solid
        rgba(36,107,255,.35);

    border-radius: 5px;

    background:
        var(--journal-card);

    color:
        var(--journal-blue);

    font-size: 15px;

    font-weight: 700;

    line-height: 1;

    cursor: pointer;

    z-index: 3;

    box-shadow:
        -5px 0 8px
        rgba(7,11,20,.8);
}


.trade-account-next:hover {

    background:
        rgba(36,107,255,.12);

    color:
        #fff;
}


/*
 * Only show the arrow when there really
 * are hidden accounts.
 */

.trade-account-list.has-more
.trade-account-next {

    display: flex;
}


/*
 * When there is no more content,
 * the arrow disappears.
 */

.trade-account-list.end
.trade-account-next {

    display: none;
}

/* ---------------------------------------------------------
   TRADE ROW HOVER
--------------------------------------------------------- */

.trade-history-scroll
.trade-table tbody tr:hover {

    background:
        rgba(255,255,255,.025);
}


/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */

@media (max-width: 900px) {

    .trade-history-scroll {

        overflow-x: auto;
    }

    .trade-history-scroll
    .trade-table {

        min-width: 760px;
    }
}

/* =========================================================
   FXpossible — TRADE HISTORY ACCOUNT CHIPS
   Horizontal scroll without visible scrollbar
========================================================= */

.trade-account-scroll-wrap {

    position: relative;

    display: flex;

    align-items: center;

    width: 100%;

    min-width: 0;

    overflow: hidden;

    padding-right: 0;
}


.trade-account-list {

    width: 100%;

    min-width: 0;

    overflow-x: auto;

    overflow-y: hidden;

    scrollbar-width: none;

    -ms-overflow-style: none;

    scroll-behavior: smooth;
}


.trade-account-list::-webkit-scrollbar {

    display: none;
}


.trade-account-track {

    display: flex;

    align-items: center;

    flex-wrap: nowrap;

    gap: 4px;

    width: max-content;

    min-width: 100%;
}


.trade-account-chip {

    flex:
        0 0 auto;

    max-width: 110px;

    height: 22px;

    display: inline-flex;

    align-items: center;

    padding:
        0 7px;

    border:
        1px solid
        rgba(36,107,255,.35);

    border-radius: 5px;

    background:
        rgba(36,107,255,.08);

    color:
        var(--journal-text);

    font-size: 9px;

    font-weight: 600;

    line-height: 1;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* ---------------------------------------------------------
   RIGHT ARROW
--------------------------------------------------------- */

.trade-account-scroll-button {

    position: absolute;

    right: 0;

    top: 50%;

    transform:
        translateY(-50%);

    width: 20px;

    height: 22px;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 0;

    border:
        1px solid
        rgba(36,107,255,.45);

    border-radius: 5px;

    background:
        var(--journal-card);

    color:
        var(--journal-blue);

    font-size: 16px;

    font-weight: 700;

    line-height: 1;

    cursor: pointer;

    z-index: 3;

    box-shadow:
        -5px 0 10px
        rgba(5,10,20,.8);

    transition:
        background .15s ease,
        transform .15s ease;
}


.trade-account-scroll-button:hover {

    background:
        rgba(36,107,255,.15);

    transform:
        translateY(-50%)
        translateX(1px);
}

/* =====================================================
   FXpossible — ADD TRADE FORM SCROLL
===================================================== */

.add-trade-modal {
    max-height: 90vh;
    overflow: hidden;
}

.add-trade-modal form#addTradeForm {
    max-height: calc(90vh - 80px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    box-sizing: border-box;
}

/* Scrollbar for the ADD TRADE FORM */
.add-trade-modal form#addTradeForm::-webkit-scrollbar {
    width: 7px;
}

.add-trade-modal form#addTradeForm::-webkit-scrollbar-track {
    background: transparent;
}

.add-trade-modal form#addTradeForm::-webkit-scrollbar-thumb {
    background: #1d6cff;
    border-radius: 10px;
}

.add-trade-modal form#addTradeForm::-webkit-scrollbar-thumb:hover {
    background: #2f7bff;
}

/* =====================================================
   ADD TRADE SCREENSHOT LAYOUT
===================================================== */

.add-trade-screenshots-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

.add-trade-screenshots-grid .add-trade-field {
    min-width: 0;
}


/* Screenshot preview */

.trade-screenshot-preview {
    margin-top: 10px;
    width: 100%;
    height: 180px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #070d18;
    padding: 5px;
    box-sizing: border-box;
}

.trade-screenshot-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 7px;
    background: #050b16;
}


/* Keep the result field occupying the same grid structure */

.add-trade-result-screenshot {
    min-width: 0;
}


/* Smaller screens */

@media (max-width: 700px) {
    .add-trade-screenshots-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   FXpossible — TRADE HISTORY / RISK CALCULATOR HEIGHT SYNC
   ---------------------------------------------------------
   • Trade History shows exactly 3 data rows before scrolling.
   • SL & Risk Calculator stretches to the same overall height
     as the left dashboard content.
   • Position Results absorbs the extra vertical space.
   • Position Results scrolls internally when results exceed it.
   • Both vertical scrollbars use FXpossible brand colors.
   ========================================================= */

/* ---------------------------------------------------------
   DESKTOP HEIGHT SYNC
   --------------------------------------------------------- */
@media (min-width: 1251px) {

    /*
     * The dashboard grid contains:
     *   LEFT  = Equity/R Distribution + Trade History
     *   RIGHT = SL & Risk Calculator
     *
     * Let the grid determine the total row height from the LEFT
     * content, then make the calculator fill that same height.
     */
    .journal-dashboard-right {
        height: 100%;
        align-self: stretch;
    }

    .journal-dashboard-right .risk-card {
        height: 100%;
        min-height: 0;
        align-self: stretch;
        overflow: visible;
    }

    /*
     * Trade History:
     * 43px rows × 3 rows = 129px.
     * 23px-ish table header sits above those rows.
     * 153px gives the intended 3-row visible viewport.
     */
    .trade-history-scroll {
        height: 153px;
        max-height: 153px;
        overflow-y: auto;
        overflow-x: hidden;

        scrollbar-width: thin;
        scrollbar-color:
            var(--journal-blue)
            transparent;
    }

    /* FXpossible branded Chromium scrollbar */
    .trade-history-scroll::-webkit-scrollbar,
    #fxResults::-webkit-scrollbar {
        width: 5px;
        height: 5px;
    }

    .trade-history-scroll::-webkit-scrollbar-track,
    #fxResults::-webkit-scrollbar-track {
        background: transparent;
        border-radius: 10px;
    }

    .trade-history-scroll::-webkit-scrollbar-thumb,
    #fxResults::-webkit-scrollbar-thumb {
        background: var(--journal-blue);
        border-radius: 10px;
        border: 1px solid transparent;
        background-clip: padding-box;
    }

    .trade-history-scroll::-webkit-scrollbar-thumb:hover,
    #fxResults::-webkit-scrollbar-thumb:hover {
        background: var(--journal-blue-light);
        background-clip: padding-box;
    }

    /*
     * Position Results becomes the flexible section of the
     * calculator. This is what makes it grow instead of leaving
     * empty space above the Calculate Position button.
     */
    .journal-dashboard-right .fx-calculator-card .fx-results {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .journal-dashboard-right .fx-calculator-card #fxResults {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        overflow-x: hidden;

        scrollbar-width: thin;
        scrollbar-color:
            var(--journal-blue)
            transparent;
    }

    /*
     * Keep the Calculate Position button pinned to the bottom
     * of the calculator card.
     */
    .journal-dashboard-right .fx-calculator-card .fx-calculate-button {
        flex: 0 0 29px;
        margin-top: auto;
    }
}


/* ---------------------------------------------------------
   NARROW / STACKED LAYOUT
   --------------------------------------------------------- */
@media (max-width: 1250px) {

    .journal-dashboard-right {
        height: auto;
    }

    .journal-dashboard-right .risk-card {
        height: auto;
        min-height: 380px;
        align-self: start;
    }

    .journal-dashboard-right .fx-calculator-card .fx-results {
        flex: 0 0 auto;
    }

    .journal-dashboard-right .fx-calculator-card #fxResults {
        max-height: 145px;
        overflow-y: auto;

        scrollbar-width: thin;
        scrollbar-color:
            var(--journal-blue)
            transparent;
    }

    .trade-history-scroll {
        height: 153px;
        max-height: 153px;
        overflow-y: auto;

        scrollbar-width: thin;
        scrollbar-color:
            var(--journal-blue)
            transparent;
    }

    .trade-history-scroll::-webkit-scrollbar,
    #fxResults::-webkit-scrollbar {
        width: 5px;
        height: 5px;
    }

    .trade-history-scroll::-webkit-scrollbar-track,
    #fxResults::-webkit-scrollbar-track {
        background: transparent;
        border-radius: 10px;
    }

    .trade-history-scroll::-webkit-scrollbar-thumb,
    #fxResults::-webkit-scrollbar-thumb {
        background: var(--journal-blue);
        border-radius: 10px;
        border: 1px solid transparent;
        background-clip: padding-box;
    }

    .trade-history-scroll::-webkit-scrollbar-thumb:hover,
    #fxResults::-webkit-scrollbar-thumb:hover {
        background: var(--journal-blue-light);
        background-clip: padding-box;
    }
}

.fx-trading-notification {
    position: fixed !important;
    top: 24px;
    left: 50%;
    transform: translate(-50%, -18px);

    width: min(520px, calc(100vw - 32px));

    display: flex;
    align-items: flex-start;
    gap: 13px;

    padding: 15px 17px;

    background: rgba(10, 18, 35, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;

    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.35),
        0 4px 18px rgba(0, 0, 0, 0.20);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    color: #fff;

    opacity: 0;
    visibility: hidden;

    z-index: 2147483647 !important;

    transition:
        opacity 0.22s ease,
        transform 0.22s ease,
        visibility 0.22s ease;
}

.fx-trading-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.fx-trading-notification.success {
    border-color: rgba(61, 210, 145, 0.45);
}

.fx-trading-notification.error {
    border-color: rgba(255, 92, 92, 0.50);
}

.fx-trading-notification.warning {
    border-color: rgba(255, 183, 77, 0.50);
}

.fx-trading-notification-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    font-size: 16px;
    font-weight: 800;

    background: rgba(255, 255, 255, 0.08);
}

.fx-trading-notification.success .fx-trading-notification-icon {
    color: #62d99b;
    background: rgba(98, 217, 155, 0.12);
}

.fx-trading-notification.error .fx-trading-notification-icon {
    color: #ff7272;
    background: rgba(255, 114, 114, 0.12);
}

.fx-trading-notification.warning .fx-trading-notification-icon {
    color: #ffbf63;
    background: rgba(255, 191, 99, 0.12);
}

.fx-trading-notification-content {
    min-width: 0;
    flex: 1;
}

.fx-trading-notification-title {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 3px;
}

.fx-trading-notification-message {
    font-size: 12px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.72);
}

.fx-trading-notification-close {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;

    border: 0;
    border-radius: 7px;

    background: transparent;
    color: rgba(255, 255, 255, 0.55);

    font-size: 21px;
    line-height: 1;

    cursor: pointer;
}

.fx-trading-notification-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* =========================================================
   FXpossible — ADD TRADE SETTINGS / CUSTOM FIELDS
========================================================= */

.add-trade-title-group {
    min-width: 0;
}

.add-trade-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-trade-settings-button {
    width: 27px;
    height: 27px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255,255,255,.09);
    border-radius: 8px;

    background:
        linear-gradient(
            145deg,
            rgba(28,43,67,.95),
            rgba(10,18,31,.95)
        );

    color: #c7d5e9;

    font-size: 13px;

    cursor: pointer;

    transition:
        transform .16s ease,
        border-color .16s ease,
        background .16s ease,
        box-shadow .16s ease;
}

.add-trade-settings-button:hover {
    transform: translateY(-1px);

    border-color:
        rgba(75,139,255,.65);

    background:
        linear-gradient(
            145deg,
            rgba(35,56,88,.98),
            rgba(12,23,40,.98)
        );

    box-shadow:
        0 6px 16px rgba(0,0,0,.28);
}


/* =========================================================
   CUSTOM FIELD CONTAINER
========================================================= */

.add-trade-custom-fields {
    display: contents;
}

.fxp-custom-trade-field {
    min-width: 0;
}

.fxp-custom-trade-checkbox {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    gap: 9px;

    color:
        var(--journal-text);

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.fxp-custom-trade-checkbox input {
    width: 17px !important;
    height: 17px !important;

    accent-color:
        #4a89ff;
}


/* =========================================================
   CUSTOM IMAGE PREVIEW
========================================================= */

.fxp-custom-trade-image-preview {
    margin-top: 9px;

    width: 100%;

    border:
        1px solid rgba(255,255,255,.08);

    border-radius: 10px;

    overflow: hidden;

    background:
        rgba(4,9,18,.75);
}

.fxp-custom-trade-image-preview img {
    display: block;

    width: 100%;
    max-height: 220px;

    object-fit: contain;

    background:
        #050b16;
}


/* =========================================================
   SETTINGS OVERLAY
========================================================= */

.fxp-custom-fields-settings-overlay {
    position: fixed;
    inset: 0;

    z-index: 12000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 18px;

    background:
        rgba(2,6,14,.74);

    backdrop-filter:
        blur(16px);

    -webkit-backdrop-filter:
        blur(16px);

    animation:
        fxpCustomSettingsFade
        .18s ease;
}

@keyframes fxpCustomSettingsFade {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}


/* =========================================================
   SETTINGS CARD
========================================================= */

.fxp-custom-fields-settings {
    width:
        min(720px, 100%);

    max-height:
        min(780px, 90vh);

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border:
        1px solid rgba(255,255,255,.09);

    border-radius:
        18px;

    background:
        linear-gradient(
            145deg,
            rgba(18,29,47,.99),
            rgba(6,12,23,.99)
        );

    box-shadow:
        0 30px 90px rgba(0,0,0,.68),
        0 0 45px rgba(38,113,230,.09);
}


/* =========================================================
   SETTINGS HEADER
========================================================= */

.fxp-custom-fields-settings-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 18px;

    padding:
        20px 22px 16px;

    border-bottom:
        1px solid rgba(255,255,255,.07);
}

.fxp-custom-fields-title-row {
    display: flex;
    align-items: center;
    gap: 9px;
}

.fxp-custom-fields-settings h3 {
    margin: 0;

    color:
        #f0f5ff;

    font-size: 17px;
    font-weight: 800;
}

.fxp-custom-fields-unlimited {
    padding:
        4px 8px;

    border:
        1px solid rgba(74,137,255,.22);

    border-radius:
        999px;

    background:
        rgba(74,137,255,.08);

    color:
        #8eb7ff;

    font-size:
        9px;

    font-weight:
        800;

    text-transform:
        uppercase;

    letter-spacing:
        .05em;
}

.fxp-custom-fields-settings-header p {
    margin:
        5px 0 0;

    color:
        rgba(220,231,248,.48);

    font-size:
        10px;
}

.fxp-custom-fields-close {
    width: 31px;
    height: 31px;

    flex: 0 0 auto;

    border:
        1px solid rgba(255,255,255,.07);

    border-radius:
        8px;

    background:
        rgba(255,255,255,.04);

    color:
        #a9b8ce;

    font-size:
        19px;

    cursor:
        pointer;
}


/* =========================================================
   SETTINGS LIST
========================================================= */

.fxp-custom-fields-list {
    flex: 1;

    overflow-y:
        auto;

    padding:
        16px 18px;

    scrollbar-width:
        thin;
}

.fxp-custom-fields-list::-webkit-scrollbar {
    width: 6px;
}

.fxp-custom-fields-list::-webkit-scrollbar-track {
    background:
        rgba(255,255,255,.025);
}

.fxp-custom-fields-list::-webkit-scrollbar-thumb {
    background:
        rgba(74,137,255,.38);

    border-radius:
        999px;
}


/* =========================================================
   SETTING ROW
========================================================= */

.fxp-custom-field-setting {
    display: flex;
    align-items: flex-start;

    gap: 12px;

    padding:
        13px;

    margin-bottom:
        9px;

    border:
        1px solid rgba(255,255,255,.07);

    border-radius:
        12px;

    background:
        rgba(255,255,255,.025);
}

.fxp-custom-field-setting-number {
    width: 25px;
    height: 25px;

    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius:
        7px;

    background:
        rgba(74,137,255,.10);

    color:
        #8fb6ff;

    font-size:
        10px;

    font-weight:
        800;
}

.fxp-custom-field-setting-main {
    flex: 1;

    min-width: 0;
}

.fxp-custom-field-setting-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.3fr)
        minmax(150px, .7fr);

    gap:
        10px;
}

.fxp-custom-field-setting label {
    display: block;

    margin-bottom:
        5px;

    color:
        rgba(220,231,248,.52);

    font-size:
        9px;

    font-weight:
        800;

    text-transform:
        uppercase;

    letter-spacing:
        .04em;
}

.fxp-custom-field-setting input,
.fxp-custom-field-setting select {
    width: 100%;

    min-height:
        38px;

    box-sizing:
        border-box;

    border:
        1px solid rgba(255,255,255,.08);

    border-radius:
        9px;

    outline:
        none;

    background:
        rgba(5,12,23,.86);

    color:
        #dce7f8;

    padding:
        0 10px;

    font-size:
        11px;

    font-weight:
        600;
}

.fxp-custom-field-options {
    margin-top:
        10px;
}

.fxp-custom-field-delete {
    width: 34px;
    height: 34px;

    flex: 0 0 auto;

    margin-top: 2px;

    border:
        1px solid rgba(255,83,104,.13);

    border-radius:
        8px;

    background:
        rgba(255,83,104,.055);

    color:
        #ff7182;

    cursor:
        pointer;

    transition:
        background .15s ease,
        border-color .15s ease,
        transform .15s ease;
}

.fxp-custom-field-delete:hover {
    transform:
        translateY(-1px);

    border-color:
        rgba(255,83,104,.42);

    background:
        rgba(255,83,104,.10);
}


/* =========================================================
   EMPTY STATE
========================================================= */

.fxp-custom-fields-empty {
    min-height:
        220px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 7px;

    text-align: center;
}

.fxp-custom-fields-empty-icon {
    font-size:
        28px;

    opacity:
        .72;

    margin-bottom:
        4px;
}

.fxp-custom-fields-empty strong {
    color:
        #dce7f8;

    font-size:
        13px;
}

.fxp-custom-fields-empty span {
    max-width:
        320px;

    color:
        rgba(220,231,248,.42);

    font-size:
        10px;

    line-height:
        1.5;
}


/* =========================================================
   SETTINGS FOOTER
========================================================= */

.fxp-custom-fields-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 10px;

    padding:
        14px 18px;

    border-top:
        1px solid rgba(255,255,255,.07);

    background:
        rgba(3,8,17,.42);
}

.fxp-custom-fields-add,
.fxp-custom-fields-done {
    min-height:
        38px;

    border-radius:
        9px;

    padding:
        0 14px;

    font-size:
        11px;

    font-weight:
        800;

    cursor:
        pointer;
}

.fxp-custom-fields-add {
    border:
        1px solid rgba(74,137,255,.28);

    background:
        rgba(74,137,255,.09);

    color:
        #9bc0ff;
}

.fxp-custom-fields-done {
    border:
        1px solid rgba(255,255,255,.08);

    background:
        rgba(255,255,255,.05);

    color:
        #d3ddef;
}

.fxp-custom-fields-add span {
    margin-right:
        5px;

    font-size:
        15px;
}


@media (max-width: 640px) {

    .fxp-custom-fields-settings-overlay {
        padding:
            10px;
    }

    .fxp-custom-fields-settings {
        max-height:
            94vh;
    }

    .fxp-custom-field-setting-grid {
        grid-template-columns:
            1fr;
    }

}

/* =========================================================
   FXpossible — INSTRUMENT FAVORITES
========================================================= */


/* ---------------------------------------------------------
   OPTION + STAR WRAPPER
--------------------------------------------------------- */

.add-trade-instrument-option-row {

    width: 100%;

    display: flex;
    align-items: stretch;

    box-sizing: border-box;

}


.add-trade-instrument-option-row
.add-trade-instrument-option {

    flex: 1;

    min-width: 0;

}


/* ---------------------------------------------------------
   FAVORITE STAR
--------------------------------------------------------- */

.add-trade-instrument-favorite {

    width: 34px;

    min-width: 34px;

    flex: 0 0 34px;

    display: flex;

    align-items: center;

    justify-content: center;

    border: 0;

    border-left:
        1px solid
        rgba(255,255,255,.035);

    border-radius: 0 6px 6px 0;

    background:
        transparent;

    color:
        rgba(180,195,220,.35);

    font-size: 15px;

    line-height: 1;

    cursor: pointer;

    transition:
        color .14s ease,
        background .14s ease,
        transform .14s ease;

}


.add-trade-instrument-favorite:hover {

    background:
        rgba(255,255,255,.045);

    color:
        rgba(255,255,255,.78);

}


.add-trade-instrument-favorite:active {

    transform:
        scale(.88);

}


.add-trade-instrument-favorite.active {

    color:
        #ffd45c;

    text-shadow:
        0 0 8px
        rgba(255,212,92,.30);

}


/* ---------------------------------------------------------
   FAVORITE ROW
--------------------------------------------------------- */

.add-trade-instrument-option-row.favorite {

    border-radius:
        6px;

}


.add-trade-instrument-option-row.favorite
.add-trade-instrument-option {

    background:
        rgba(255,212,92,.035);

}


.add-trade-instrument-option-row.favorite:hover
.add-trade-instrument-option {

    background:
        rgba(255,212,92,.065);

}


/* ---------------------------------------------------------
   SECTION LABELS
--------------------------------------------------------- */

.add-trade-instrument-section-label {

    display: flex;

    align-items: center;

    gap: 6px;

    min-height: 25px;

    padding:
        6px 8px 4px;

    color:
        rgba(220,231,248,.38);

    font-size:
        8px;

    font-weight:
        800;

    text-transform:
        uppercase;

    letter-spacing:
        .065em;

    user-select:
        none;

}


.add-trade-instrument-section-label span {

    color:
        #ffd45c;

    font-size:
        10px;

}


.add-trade-instrument-all-label {

    margin-top:
        3px;

    padding-top:
        9px;

    border-top:
        1px solid
        rgba(255,255,255,.045);

}


/* ---------------------------------------------------------
   SELECTED FAVORITE
--------------------------------------------------------- */

.add-trade-instrument-option-row.favorite
.add-trade-instrument-option.selected {

    background:
        rgba(36,107,255,.13);

    border-color:
        rgba(36,107,255,.28);

}


.add-trade-instrument-option-row.favorite
.add-trade-instrument-option.selected
+ .add-trade-instrument-favorite {

    color:
        #ffd45c;

}


/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */

@media (max-width: 520px) {

    .add-trade-instrument-favorite {

        width:
            38px;

        min-width:
            38px;

        flex-basis:
            38px;

        font-size:
            16px;

    }

}

/* =========================================================
   ADD TRADE — ENTRY TYPE PRIMARY POSITION
========================================================= */

#tradeEntryTypeNav {

    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 7px;

}


#tradeEntryTypeNav .fxp-3d-choice {

    min-height: 42px;

    font-weight: 800;

}


#tradeEntryTypeNav .fxp-3d-choice.active {

    box-shadow:
        0 0 0 1px
        rgba(74,137,255,.16),
        0 8px 22px
        rgba(0,0,0,.18);

}


@media (max-width: 520px) {

    #tradeEntryTypeNav {

        grid-template-columns:
            1fr;

    }

}

/* =========================================================
   TRADE HISTORY — BEFORE SCREENSHOT
========================================================= */

.trade-history-screenshot-cell {
    text-align: center;
    vertical-align: middle;
}

.trade-history-before-screenshot {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 52px;
    padding: 5px 9px;

    border: 1px solid var(--blue);
    border-radius: 6px;

    background: linear-gradient(
        135deg,
        var(--blue),
        var(--blue-light)
    );

    color: #fff;

    font-size: 10px;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        opacity 0.18s ease;
}

.trade-history-before-screenshot:hover {
    transform: translateY(-1px);

    box-shadow:
        0 6px 14px
        var(--blue-glow);
}

.trade-history-before-screenshot:active {
    transform: translateY(0);
}

.trade-history-no-screenshot {
    opacity: 0.45;
    font-size: 10px;
}

/* =========================================================
   MT5 + MANUAL ACCOUNT LIFECYCLE
========================================================= */
.fxp-account-lifecycle-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.fxp-account-lifecycle-choice {
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.04);
    color: inherit;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    text-align: left;
    transition: .15s ease;
}

.fxp-account-lifecycle-choice.active {
    border-color: rgba(70,130,255,.8);
    background: rgba(70,130,255,.14);
}

.history-account-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.trade-history-scroll .trade-account-list.has-many {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--journal-blue) rgba(255,255,255,.12);
}

.trade-history-scroll .trade-account-list.has-many::-webkit-scrollbar {
    display: block;
    height: 6px;
}

.trade-history-scroll .trade-account-list.has-many::-webkit-scrollbar-track {
    background: rgba(255,255,255,.12);
    border-radius: 6px;
}

.trade-history-scroll .trade-account-list.has-many::-webkit-scrollbar-thumb {
    background: var(--journal-blue);
    border-radius: 6px;
}

.trade-history-scroll .trade-account-track {
    width: max-content;
    min-width: max-content;
}

.trade-history-scroll .trade-account-list.has-many .trade-account-track {
    transform: none !important;
    transition: none;
    will-change: auto;
}

.trade-history-scroll .trade-account-list.has-many .trade-account-next {
    display: none !important;
}

.trade-history-scroll .trade-table th:nth-child(2),
.trade-history-scroll .trade-table td:nth-child(2) {
    min-width: 155px;
    max-width: 190px;
}

.history-account-list.has-many {
    display: flex;
    flex-wrap: nowrap;
    max-width: 190px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--journal-blue) rgba(255,255,255,.12);
    white-space: nowrap;
}

.history-account-list.has-many .history-account-chip {
    flex: 0 0 auto;
}

.history-account-list.has-many::-webkit-scrollbar {
    height: 6px;
}

.history-account-list.has-many::-webkit-scrollbar-track {
    background: rgba(255,255,255,.12);
    border-radius: 6px;
}

.history-account-list.has-many::-webkit-scrollbar-thumb {
    background: var(--journal-blue);
    border-radius: 6px;
}

.history-full-table th:nth-child(3),
.history-full-table td:nth-child(3) {
    min-width: 155px;
    max-width: 190px;
}

.history-account-source {
    font-size: 9px;
    line-height: 1;
    padding: 3px 5px;
    border-radius: 999px;
    border: 1px solid currentColor;
    opacity: .8;
}

.journal-card.journal-ai-card,
.journal-card.ai-strategy-card {
    display: flex;
    flex-direction: column;
    min-height: 205px;
    height: 205px;
    overflow: hidden;
}

.journal-ai-action {
    flex: 0 0 auto;
    border: 1px solid rgba(70, 145, 255, .38);
    border-radius: 7px;
    padding: 6px 9px;
    background: rgba(70, 145, 255, .1);
    color: #9bc7ff;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.journal-ai-action:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.journal-ai-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 4px 4px;
    color: var(--journal-text, #dce7f8);
    font-size: 11px;
    line-height: 1.5;
    scrollbar-width: thin;
    scrollbar-color: rgba(70, 130, 255, .5) transparent;
}

.journal-ai-scroll p {
    margin: 4px 0 8px;
    color: var(--journal-muted, #9aa9bf);
}

.journal-ai-scroll h4 {
    margin: 8px 0 3px;
    color: #9bc7ff;
    font-size: 10px;
}

.journal-ai-scroll ul {
    margin: 2px 0 8px;
    padding-left: 16px;
}

.journal-ai-scroll li {
    margin: 2px 0;
}

.journal-ai-error {
    color: #ff9a9a;
}

.journal-ai-meta {
    color: var(--journal-muted, #9aa9bf);
    font-size: 9px;
}

.journal-strategy-editor {
    flex: 0 0 auto;
    max-height: 42px;
    overflow-y: auto;
    color: var(--journal-text, #dce7f8);
    font-size: 10px;
}

.journal-strategy-editor[open] {
    max-height: 150px;
}

.journal-strategy-editor summary {
    padding: 5px 4px;
    color: #9bc7ff;
    cursor: pointer;
}

.journal-strategy-editor label {
    display: block;
    margin: 6px 4px;
    color: var(--journal-muted, #9aa9bf);
}

.journal-strategy-editor input,
.journal-strategy-editor textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin-top: 3px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 6px;
    padding: 6px 7px;
    background: rgba(4, 11, 24, .72);
    color: var(--journal-text, #dce7f8);
    font: inherit;
}

.journal-strategy-editor textarea {
    resize: vertical;
}

#journalStrategySaveStatus {
    display: inline-block;
    margin: 6px 4px;
}

@media (max-width: 1100px) {
    .journal-card.journal-ai-card,
    .journal-card.ai-strategy-card {
        min-height: 220px;
        height: 220px;
    }
}

@media (max-width: 600px) {
    .journal-card.journal-ai-card,
    .journal-card.ai-strategy-card {
        min-height: 240px;
        height: 240px;
    }
}


/* =========================================================
   FXPOSSIBLE — AI TRADE REVIEW COMPONENTS
========================================================= */

.journal-ai-section {
    min-width: 0;
    margin: 0 0 12px;
    padding: 9px;
    border: 1px solid rgba(77, 145, 255, 0.16);
    border-radius: 9px;
    background: rgba(9, 25, 49, 0.48);
    overflow-wrap: anywhere;
}

.journal-ai-section > h4 {
    margin: 0 0 7px;
    color: #a8d1ff;
    font-size: 11px;
    font-weight: 700;
}

.journal-ai-section > p {
    margin: 5px 0;
    line-height: 1.55;
}

.journal-ai-trade-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

.journal-ai-trade {
    min-width: 0;
    padding: 9px;
    border: 1px solid rgba(65, 135, 255, 0.25);
    border-radius: 8px;
    background: rgba(3, 15, 33, 0.8);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.journal-ai-trade-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.journal-ai-trade-heading strong {
    color: #83baff;
    font-size: 11px;
}

.journal-ai-trade-heading span {
    color: #dceaff;
    font-size: 10px;
    font-weight: 600;
}

.journal-ai-trade-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 8px 0;
}

.journal-ai-trade-metrics span {
    min-width: 0;
    padding: 6px;
    border: 1px solid rgba(125, 165, 220, 0.1);
    border-radius: 5px;
    background: rgba(19, 42, 73, 0.42);
    color: #c3d8f5;
    font-size: 10px;
    overflow-wrap: anywhere;
}

.journal-ai-trade > p {
    margin: 6px 0;
    overflow-wrap: anywhere;
}

.journal-ai-section ul {
    padding-left: 17px;
}

.journal-ai-section li {
    margin: 4px 0;
    overflow-wrap: anywhere;
}

/* Keep the AI card fixed while its inner analysis scrolls. */
.journal-card.journal-ai-card,
.journal-card.ai-strategy-card {
    min-width: 0;
    min-height: 205px;
    overflow: hidden;
}

.journal-ai-scroll {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

@media (max-width: 600px) {
    .journal-ai-trade-metrics {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* =========================================================
   FXPOSSIBLE — AI INTELLIGENCE DASHBOARD
   FOUNDATION
========================================================= */

.fxp-ai-dashboard {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 16px;
    width: 100%;
    min-width: 0;
}

.fxp-ai-panel,
.journal-ai-card.fxp-ai-panel,
.ai-strategy-card.fxp-ai-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 650px;
    overflow: hidden;

    padding: 14px;

    border: 1px solid rgba(54, 125, 255, 0.25);
    border-radius: 15px;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(24, 75, 155, 0.13),
            transparent 48%
        ),
        linear-gradient(
            160deg,
            #06152d,
            #020b1c 65%,
            #030d20
        );

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
}


/* HEADER */

.fxp-ai-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    width: 100%;
    min-width: 0;

    padding: 2px 2px 13px;
    margin-bottom: 10px;

    border-bottom: 1px solid rgba(91, 150, 255, 0.15);
}

.fxp-ai-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.fxp-ai-logo {
    display: block;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    object-fit: contain;

    padding: 5px;

    border: 1px solid rgba(68, 139, 255, 0.25);
    border-radius: 12px;

    background: rgba(22, 72, 145, 0.15);

    filter: drop-shadow(0 0 9px rgba(40, 125, 255, 0.28));
}

.fxp-ai-brand h3 {
    margin: 0 0 4px;
    color: #f0f6ff;
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -0.35px;
}

.fxp-ai-brand span {
    display: block;
    color: #91a9c9;
    font-size: 10px;
    line-height: 1.4;
}


/* STRATEGY BRAIN */

.fxp-ai-brain-logo {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;
    flex: 0 0 48px;

    border: 1px solid rgba(63, 135, 255, 0.42);
    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(37, 114, 255, 0.3),
            rgba(7, 30, 70, 0.9)
        );

    font-size: 27px;

    box-shadow:
        0 0 20px rgba(26, 111, 255, 0.22),
        inset 0 0 12px rgba(74, 147, 255, 0.15);
}


/* HEADER ACTIONS */

.fxp-ai-header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
    flex: 0 0 auto;
}

.fxp-ai-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    min-width: 86px;
    min-height: 34px;

    border: 1px solid rgba(30, 130, 255, 0.65);
    border-radius: 8px;

    background: linear-gradient(
        135deg,
        rgba(0, 105, 255, 0.32),
        rgba(0, 64, 160, 0.18)
    );

    color: #8dccff;
    font-size: 11px;

    box-shadow:
        0 0 12px rgba(0, 100, 255, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.fxp-refresh-icon {
    font-size: 17px;
    line-height: 1;
}

.fxp-ai-updated {
    display: flex;
    align-items: center;
    gap: 5px;

    color: #8ea8c9;
    font-size: 9px;
    white-space: nowrap;
}

.fxp-ai-status-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;

    border-radius: 50%;
    background: #18d6a0;

    box-shadow: 0 0 7px rgba(24, 214, 160, 0.7);
}


/* CONTENT AREA */

.fxp-ai-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;

    width: 100%;
    min-width: 0;
    min-height: 0;

    overflow-x: hidden;
    overflow-y: auto;

    padding: 2px 2px 8px;

    scrollbar-width: thin;
    scrollbar-color: rgba(55, 128, 255, 0.65) transparent;
}

.fxp-ai-content::-webkit-scrollbar {
    width: 5px;
}

.fxp-ai-content::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: rgba(55, 128, 255, 0.55);
}

.fxp-strategy-editor {
    flex: 0 0 auto;
    margin-top: 10px;
}


/* RESPONSIVE */

@media (max-width: 1050px) {
    .fxp-ai-dashboard {
        grid-template-columns: minmax(0, 1fr);
    }

    .fxp-ai-panel,
    .journal-ai-card.fxp-ai-panel,
    .ai-strategy-card.fxp-ai-panel {
        min-height: 560px;
    }
}

@media (max-width: 560px) {
    .fxp-ai-panel,
    .journal-ai-card.fxp-ai-panel,
    .ai-strategy-card.fxp-ai-panel {
        min-height: 480px;
        padding: 10px;
    }

    .fxp-ai-header {
        align-items: flex-start;
        gap: 7px;
    }

    .fxp-ai-logo,
    .fxp-ai-brain-logo {
        width: 39px;
        height: 39px;
        flex-basis: 39px;
    }

    .fxp-ai-brand h3 {
        font-size: 13px;
    }

    .fxp-ai-brand span {
        font-size: 9px;
    }

    .fxp-ai-updated {
        font-size: 8px;
    }

    .fxp-ai-refresh {
        min-width: 70px;
        min-height: 30px;
        font-size: 10px;
    }
}


/* =========================================================
   FXPOSSIBLE AI — LAYOUT CORRECTION
   Overrides legacy 205px / 220px / 240px card sizing
========================================================= */

/* Let the AI dashboard occupy the entire parent grid row */
.bottom-feature-grid > .fxp-ai-dashboard {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
}

/* Two equally sized, spacious panels */
.fxp-ai-dashboard {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 18px;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}

.fxp-ai-dashboard > .fxp-ai-panel {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 500px !important;
    height: auto !important;
    max-height: 500px !important;
    box-sizing: border-box;
    overflow: hidden;
}

.fxp-ai-dashboard .fxp-ai-content {
    width: 100%;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
}

/* The two AI cards must not inherit old fixed heights */
.journal-card.journal-ai-card.fxp-ai-panel,
.journal-card.ai-strategy-card.fxp-ai-panel {
    height: auto !important;
    min-height: 760px !important;
    max-height: none !important;
}

/* Tablet */
@media (max-width: 1100px) {
    .fxp-ai-dashboard {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .fxp-ai-dashboard > .fxp-ai-panel {
        min-height: 650px !important;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .fxp-ai-dashboard {
        gap: 12px;
    }

    .fxp-ai-dashboard > .fxp-ai-panel {
        min-height: 560px !important;
        padding: 12px;
    }
}


/* =========================================================
   FXPOSSIBLE — ANIMATED AI BRAIN
========================================================= */

.fxp-ai-brain-logo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    width: 54px;
    height: 54px;
    flex: 0 0 54px;

    border: 1px solid rgba(48, 137, 255, .55);
    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(25, 110, 255, .28),
            rgba(3, 19, 49, .96) 72%
        );

    box-shadow:
        0 0 12px rgba(0, 105, 255, .3),
        0 0 28px rgba(0, 105, 255, .16),
        inset 0 0 14px rgba(50, 140, 255, .2);
}

.fxp-brain-svg {
    width: 46px;
    height: 46px;
    overflow: visible;
    animation: fxpBrainFloat 3s ease-in-out infinite;
}

.fxp-brain-ring {
    transform-origin: 50px 50px;
    animation: fxpBrainOrbit 9s linear infinite;
}

.fxp-brain-left,
.fxp-brain-right {
    transform-box: fill-box;
    transform-origin: center;
    animation: fxpBrainPulse 2.8s ease-in-out infinite;
}

.fxp-brain-right {
    animation-delay: .25s;
}

.fxp-brain-nodes {
    animation: fxpNeuralGlow 1.8s ease-in-out infinite alternate;
}

@keyframes fxpBrainFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

@keyframes fxpBrainOrbit {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fxpBrainPulse {
    0%, 100% {
        opacity: .82;
    }

    50% {
        opacity: 1;
    }
}

@keyframes fxpNeuralGlow {
    from {
        opacity: .55;
    }

    to {
        opacity: 1;
        filter: drop-shadow(0 0 5px #51baff);
    }
}


/* =====================================================
   PERFORMANCE BY PAIR + RECENT PROFITABLE TRADES
===================================================== */

.journal-performance-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    min-width: 0;
    align-items: stretch;
}

.journal-performance-two-column > .journal-card {
    width: 100%;
    min-width: 0;
    min-height: 280px;
    height: auto;
    box-sizing: border-box;
    margin: 0;
}

.journal-performance-two-column .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.journal-performance-two-column .pair-list,
.journal-performance-two-column #recentProfitableTrades {
    min-width: 0;
    width: 100%;
}

/* Tablet and mobile */

@media (max-width: 850px) {
    .journal-performance-two-column {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* Make both performance cards exactly the same height */

.journal-performance-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.journal-performance-two-column > .journal-card {
    height: 100% !important;
    min-height: 320px;
    align-self: stretch;
    box-sizing: border-box;
}


/* =========================================================
   FXPOSSIBLE — AI TRADE REVIEW PERFORMANCE SUMMARY
========================================================= */

.fxp-review-overview {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    min-width: 0;
    color: #e5edfb;
}

.fxp-review-greeting {
    padding: 17px 18px;
    border: 1px solid rgba(72, 137, 255, .2);
    border-radius: 13px;
    background:
        radial-gradient(
            ellipse at 5% 0%,
            rgba(44, 112, 255, .17),
            transparent 65%
        ),
        linear-gradient(
            135deg,
            rgba(16, 39, 75, .75),
            rgba(7, 17, 34, .85)
        );
}

.fxp-review-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #79aaff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
}

.fxp-review-greeting h4 {
    margin: 0;
    color: #f1f6ff;
    font-size: 17px;
    font-weight: 750;
    line-height: 1.4;
}

.fxp-review-greeting p {
    margin: 7px 0 0;
    color: #91a5c2;
    font-size: 11px;
    line-height: 1.6;
}

.fxp-review-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 11px;
}

.fxp-review-section-heading h4 {
    margin: 0;
    color: #eaf2ff;
    font-size: 13px;
    font-weight: 750;
}

.fxp-review-sample {
    padding: 5px 9px;
    border: 1px solid rgba(90, 145, 230, .2);
    border-radius: 20px;
    background: rgba(45, 105, 205, .09);
    color: #9fc5ff;
    font-size: 9px;
    font-weight: 700;
}

.fxp-review-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.fxp-review-metric {
    min-width: 0;
    padding: 12px 11px;
    border: 1px solid rgba(115, 151, 205, .13);
    border-radius: 11px;
    background: linear-gradient(
        145deg,
        rgba(22, 40, 67, .8),
        rgba(9, 21, 39, .88)
    );
}

.fxp-review-metric-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    color: #91a4c0;
    font-size: 9px;
    font-weight: 650;
}

.fxp-review-metric-icon {
    color: #80b5ff;
    font-size: 15px;
}

.fxp-review-metric > strong {
    display: block;
    margin-top: 10px;
    color: #edf4ff;
    font-size: clamp(14px, 1.5vw, 20px);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.fxp-review-metric.is-positive > strong {
    color: #55dba0;
}

.fxp-review-metric.is-negative > strong {
    color: #ff858d;
}

.fxp-review-insights-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

.fxp-review-insight-panel {
    min-width: 0;
    padding: 13px;
    border: 1px solid rgba(105, 145, 205, .14);
    border-radius: 11px;
    background: rgba(10, 24, 44, .7);
    overflow-wrap: anywhere;
}

.fxp-review-insight-panel > h4 {
    margin: 0 0 10px;
    color: #c5dcff;
    font-size: 12px;
    font-weight: 750;
}

.fxp-review-insight-panel p,
.fxp-review-insight-panel li {
    color: #aebed4;
    font-size: 10px;
    line-height: 1.65;
}

.fxp-review-insight-panel ul {
    padding-left: 16px;
}

.fxp-review-highlighted {
    min-width: 0;
    padding: 13px;
    border: 1px solid rgba(105, 145, 205, .14);
    border-radius: 11px;
    background: rgba(8, 20, 38, .72);
}

.fxp-review-table-wrap {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(75, 135, 230, .45) transparent;
}

.fxp-review-table {
    width: 100%;
    min-width: 540px;
    border-collapse: collapse;
    text-align: left;
}

.fxp-review-table th {
    padding: 10px 9px;
    border-bottom: 1px solid rgba(125, 155, 200, .15);
    color: #8298b8;
    font-size: 9px;
    font-weight: 750;
    white-space: nowrap;
}

.fxp-review-table td {
    padding: 11px 9px;
    border-bottom: 1px solid rgba(125, 155, 200, .08);
    color: #c9d7eb;
    font-size: 10px;
    vertical-align: top;
}

.fxp-review-table td strong,
.fxp-review-table td small {
    display: block;
}

.fxp-review-table td small {
    margin-top: 4px;
    color: #7186a4;
    font-size: 9px;
}

.fxp-review-table .is-positive {
    color: #55dba0;
    font-weight: 750;
}

.fxp-review-table .is-negative {
    color: #ff858d;
    font-weight: 750;
}

.fxp-review-no-trades {
    padding: 18px 10px;
    color: #8295b1;
    font-size: 11px;
    text-align: center;
}

.fxp-review-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 25px 18px;
    text-align: center;
}

.fxp-review-empty-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 15px;
    border: 1px solid rgba(80, 145, 255, .22);
    border-radius: 19px;
    background: rgba(50, 110, 220, .09);
    color: #80b5ff;
}

.fxp-review-empty-icon svg {
    width: 38px;
    height: 38px;
}

.fxp-review-empty h4 {
    margin: 0;
    color: #e7f0ff;
    font-size: 15px;
}

.fxp-review-empty p {
    max-width: 360px;
    color: #91a3bd;
    font-size: 11px;
    line-height: 1.6;
}

.fxp-review-progress {
    width: min(100%, 340px);
    margin-top: 12px;
}

.fxp-review-progress-track {
    height: 6px;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
}

.fxp-review-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2875ff, #62b5ff);
    transition: width .3s ease;
}

.fxp-review-progress small {
    display: block;
    margin-top: 8px;
    color: #8fa5c3;
    font-size: 10px;
}

@media (max-width: 900px) {
    .fxp-review-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .fxp-review-insights-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .fxp-review-greeting {
        padding: 14px;
    }

    .fxp-review-greeting h4 {
        font-size: 15px;
    }

    .fxp-review-metric {
        padding: 10px;
    }
}


/* ============================================================
   FXPOSSIBLE — AI TRADE REVIEW REFERENCE DESIGN
============================================================ */

.fxp-review-greeting {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    margin-bottom: 18px;
    border: 1px solid rgba(27, 125, 255, .22);
    border-radius: 15px;
    background: linear-gradient(
        120deg,
        rgba(12, 39, 70, .78),
        rgba(8, 22, 42, .94)
    );
}

.fxp-review-greeting-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    color: #39a8ff;
    background: rgba(25, 128, 255, .12);
    border: 1px solid rgba(53, 151, 255, .3);
    border-radius: 50%;
}

.fxp-review-greeting h4 {
    margin: 7px 0;
    color: #edf5ff;
    font-size: 17px;
    line-height: 1.45;
}

.fxp-review-greeting p {
    margin: 0;
    color: #8fa8c6;
    font-size: 11px;
}

.fxp-review-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.fxp-review-metric {
    min-width: 0;
    min-height: 105px;
    padding: 13px 11px;
    border: 1px solid rgba(83, 126, 177, .2);
    border-radius: 13px;
    background: linear-gradient(
        145deg,
        rgba(20, 40, 66, .92),
        rgba(9, 22, 41, .96)
    );
}

.fxp-review-metric-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    color: #91a8c5;
    font-size: 10px;
    font-weight: 600;
}

.fxp-review-metric-icon {
    display: inline-flex;
    color: #53a9ff;
}

.fxp-review-metric > strong {
    display: block;
    margin-top: 14px;
    color: #edf5ff;
    font-size: clamp(17px, 2vw, 24px);
    font-weight: 750;
    overflow-wrap: anywhere;
}

.fxp-review-metric.is-positive > strong {
    color: #16d5a0;
}

.fxp-review-metric.is-negative > strong,
.fxp-review-metric.is-drawdown > strong {
    color: #ff6478;
}

.fxp-review-insights-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
    gap: 13px;
    align-items: stretch;
    margin-top: 15px;
}

.fxp-review-insight-panel {
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(76, 119, 168, .2);
    border-radius: 14px;
    background: rgba(8, 22, 41, .82);
}

.fxp-review-panel-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    color: #55aaff;
}

.fxp-review-panel-heading h4 {
    margin: 0;
    color: #dceaff;
    font-size: 13px;
    font-weight: 700;
}

.fxp-ai-insight-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fxp-ai-insight-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 11px;
    border: 1px solid rgba(76, 119, 168, .17);
    border-radius: 11px;
    background: rgba(18, 39, 66, .62);
}

.fxp-ai-insight-icon {
    width: 37px;
    height: 37px;
    flex: 0 0 37px;
    display: grid;
    place-items: center;
    color: #54b1ff;
    border: 1px solid rgba(48, 139, 255, .25);
    border-radius: 11px;
    background: rgba(27, 111, 219, .13);
}

.fxp-ai-insight-item.is-warning .fxp-ai-insight-icon {
    color: #ffbf54;
    border-color: rgba(255, 185, 65, .25);
    background: rgba(255, 175, 42, .09);
}

.fxp-ai-insight-copy {
    min-width: 0;
}

.fxp-ai-insight-copy strong {
    display: block;
    margin: 1px 0 5px;
    color: #dceaff;
    font-size: 11px;
}

.fxp-ai-insight-copy p {
    margin: 0;
    color: #9eb1ca;
    font-size: 11px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.fxp-performance-chart-wrap {
    width: 100%;
    min-width: 0;
}

.fxp-performance-chart-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 13px;
    margin-bottom: 10px;
    color: #a5b9d2;
    font-size: 10px;
}

.fxp-performance-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.fxp-performance-chart-legend i {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 2px;
}

.fxp-performance-chart-legend i.is-win {
    background: #12c994;
}

.fxp-performance-chart-legend i.is-loss {
    background: #f05268;
}

.fxp-chart-trade-count {
    margin-left: auto;
    color: #7893b3;
}

.fxp-performance-svg {
    display: block;
    width: 100%;
    height: 245px;
    overflow: visible;
}

.fxp-performance-empty {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    color: #829bb9;
}

.fxp-performance-empty > div {
    color: #399eff;
}

.fxp-performance-empty strong {
    color: #dceaff;
    font-size: 12px;
}

.fxp-performance-empty span {
    max-width: 240px;
    font-size: 11px;
    line-height: 1.5;
}

.fxp-review-muted {
    color: #8198b5;
    font-size: 11px;
}

@media (max-width: 900px) {
    .fxp-review-insights-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .fxp-review-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fxp-review-greeting {
        align-items: flex-start;
        padding: 12px;
    }

    .fxp-review-greeting-icon {
        width: 43px;
        height: 43px;
        flex-basis: 43px;
    }

    .fxp-review-greeting h4 {
        font-size: 14px;
    }

    .fxp-performance-svg {
        height: 205px;
    }
}


/* ============================================================
   FXPOSSIBLE — COMPACT AI DASHBOARD
   Reference layout: maximum 500px per AI panel
============================================================ */

.fxp-ai-dashboard {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    align-items: stretch;
}


.fxp-ai-dashboard > .fxp-ai-panel,
.fxp-ai-dashboard .journal-card.fxp-ai-panel {
    width: 100% !important;
    height: auto !important;
    min-height: 500px !important;
    max-height: none !important;

    display: flex !important;
    flex-direction: column !important;

    overflow: hidden !important;
    box-sizing: border-box !important;
}

.fxp-ai-dashboard .fxp-ai-content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: #28527e transparent;
}

.fxp-ai-dashboard .fxp-ai-content::-webkit-scrollbar,
.fxp-review-explanation::-webkit-scrollbar,
.fxp-ai-insight-list::-webkit-scrollbar {
    width: 5px;
}

.fxp-ai-dashboard .fxp-ai-content::-webkit-scrollbar-thumb,
.fxp-review-explanation::-webkit-scrollbar-thumb,
.fxp-ai-insight-list::-webkit-scrollbar-thumb {
    background: #28527e;
    border-radius: 10px;
}

/* Greeting and snapshot share ONE card */

.fxp-review-performance {
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding: 15px;
    margin-bottom: 13px;
    border: 1px solid rgba(37, 128, 255, .28);
    border-radius: 15px;
    background: linear-gradient(
        135deg,
        rgba(9, 37, 67, .95),
        rgba(7, 20, 39, .98)
    );
}

.fxp-review-greeting {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0 0 12px;
    margin: 0;
    border: 0;
    border-bottom: 1px solid rgba(90, 137, 190, .2);
    border-radius: 0;
    background: transparent;
}

.fxp-review-greeting-icon {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
}

.fxp-review-greeting-copy {
    min-width: 0;
    flex: 1;
}

.fxp-review-greeting-copy h4 {
    margin: 2px 0 5px;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.3;
    color: #f0f6ff;
}

.fxp-review-explanation {
    max-height: 48px;
    overflow-y: auto;
    padding-right: 5px;
    color: #a2b5ce;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.55;
}

.fxp-review-performance .fxp-review-section-heading {
    margin: 0;
}

.fxp-review-performance .fxp-review-section-heading h4 {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    color: #dceaff;
}

.fxp-review-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.fxp-review-metric {
    min-height: 75px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(20, 43, 70, .68);
}

.fxp-review-metric-heading {
    font-size: 9px;
}

.fxp-review-metric > strong {
    margin-top: 10px;
    font-size: clamp(15px, 1.5vw, 21px);
}

/* Insights scroll independently */

.fxp-review-insights-grid {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    gap: 12px;
    align-items: stretch;
    margin-top: 0;
}

.fxp-review-insight-panel {
    min-height: 0;
    max-height: 235px;
    display: flex;
    flex-direction: column;
    padding: 12px;
}

.fxp-review-panel-heading {
    flex: 0 0 auto;
    margin-bottom: 10px;
}

.fxp-ai-insight-list {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: #28527e transparent;
}

.fxp-ai-insight-item {
    padding: 8px;
    gap: 8px;
}

.fxp-ai-insight-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
}

.fxp-ai-insight-copy strong {
    font-size: 10px;
}

.fxp-ai-insight-copy p {
    font-size: 10px;
    line-height: 1.45;
}

/* Chart remains compact */

.fxp-review-chart-panel {
    min-width: 0;
}

.fxp-performance-svg {
    height: 175px;
}

.fxp-review-highlighted {
    margin-top: 12px;
}

@media (max-width: 850px) {
    .fxp-ai-dashboard {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .fxp-ai-dashboard > .fxp-ai-panel,
    .fxp-ai-dashboard .journal-card.fxp-ai-panel {
        height: 500px !important;
        min-height: 500px !important;
        max-height: 500px !important;
    }

    .fxp-review-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fxp-review-insights-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .fxp-review-insight-panel {
        max-height: 210px;
    }
}


/* ============================================================
   FXPOSSIBLE — AI TRADE REVIEW FULL-WIDTH LAYOUT
   Only affects the AI section of the Trading Journal.
============================================================ */

/* The bottom feature section now has one remaining dashboard. */
.journal-dashboard-grid > .bottom-feature-grid {
    grid-template-columns: minmax(0, 1fr) !important;
}

/* Let the AI dashboard occupy the entire available row. */
.journal-dashboard-grid
> .bottom-feature-grid
> .fxp-ai-dashboard {
    grid-column: 1 / -1 !important;

    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    overflow: visible !important;
}

/* The outer AI Trade Review panel grows with its content. */
.fxp-ai-dashboard > .fxp-ai-panel,
.fxp-ai-dashboard .journal-card.fxp-ai-panel {
    width: 100% !important;
    max-width: none !important;

    height: auto !important;
    min-height: 500px !important;
    max-height: none !important;

    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Preserve scrolling inside the review content. */
.fxp-ai-dashboard .fxp-ai-content {
    min-height: 0 !important;
    max-height: none !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Remove the old fixed 500px mobile height. */
@media (max-width: 600px) {
    .fxp-ai-dashboard > .fxp-ai-panel,
    .fxp-ai-dashboard .journal-card.fxp-ai-panel {
        height: auto !important;
        min-height: 500px !important;
        max-height: none !important;
    }
}


/* =========================================================
   FXPOSSIBLE — PERFORMANCE SNAPSHOT REDESIGN
   Compact status banner inspired by the supplied screenshot
========================================================= */

.fxp-review-performance-snapshot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 18px 0 22px;
    padding: 16px 18px;
    overflow: hidden;
    border: 1px solid rgba(44, 211, 151, 0.28);
    border-radius: 15px;
    background:
        radial-gradient(
            ellipse at 0% 50%,
            rgba(20, 184, 126, 0.10),
            transparent 54%
        ),
        linear-gradient(
            115deg,
            rgba(3, 24, 34, 0.98),
            rgba(3, 17, 29, 0.98)
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025),
        0 5px 18px rgba(0, 0, 0, 0.12);
}

.fxp-review-snapshot-status {
    display: flex;
    align-items: center;
    gap: 13px;
    flex: 1 1 auto;
    min-width: 0;
}

.fxp-review-snapshot-status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(
        145deg,
        #39e6a0,
        #13b978
    );
    box-shadow:
        0 0 0 4px rgba(35, 211, 139, 0.08),
        0 0 18px rgba(35, 211, 139, 0.15);
}

.fxp-review-snapshot-copy {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.fxp-review-snapshot-copy > strong {
    color: #36d99a;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.fxp-review-snapshot-copy > span {
    color: #a9c1d1;
    font-size: 11px;
    line-height: 1.55;
}

.fxp-review-snapshot-separator {
    padding: 0 3px;
    color: #39dca0;
}

.fxp-review-snapshot-metrics {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 12px;
}

.fxp-review-snapshot-metric {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 96px;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid rgba(87, 150, 177, 0.23);
    border-radius: 10px;
    background: rgba(2, 17, 29, 0.62);
}

.fxp-review-snapshot-label {
    color: #a7c4d0;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.35;
    white-space: nowrap;
}

.fxp-review-snapshot-metric > strong {
    color: #f2f8fc;
    font-size: 18px;
    font-weight: 750;
    line-height: 1.25;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.fxp-review-snapshot-metric > strong.is-positive {
    color: #30d994;
}

.fxp-review-snapshot-metric > strong.is-negative {
    color: #ff747e;
}


/* =========================================================
   AI TRADE REVIEW — HEADER TIMESTAMP
========================================================= */

.fxp-ai-header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 7px;
    min-width: 0;
}

.fxp-ai-updated {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    max-width: 100%;
    color: #91a9bb;
    font-size: 10px;
    line-height: 1.45;
    text-align: right;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.fxp-ai-status-dot {
    display: inline-block;
    flex: 0 0 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #32d996;
    box-shadow: 0 0 8px rgba(50, 217, 150, 0.35);
}


/* =========================================================
   RESPONSIVE SNAPSHOT LAYOUT
========================================================= */

@media (max-width: 680px) {
    .fxp-review-performance-snapshot {
        align-items: stretch;
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .fxp-review-snapshot-metrics {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        width: 100%;
    }

    .fxp-review-snapshot-metric {
        min-width: 0;
        padding: 10px;
    }

    .fxp-review-snapshot-metric > strong {
        font-size: 17px;
    }

    .fxp-ai-header-actions {
        align-items: flex-end;
    }

    .fxp-ai-updated {
        max-width: 220px;
    }
}

@media (max-width: 420px) {
    .fxp-review-snapshot-copy > span {
        font-size: 10px;
    }

    .fxp-review-snapshot-status {
        gap: 10px;
    }

    .fxp-review-snapshot-status-icon {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }
}

/* ============================================================
   FXPOSSIBLE — TRADE PERFORMANCE CARD OVERFLOW FIX
   Keeps the existing chart and content inside the card.
   Does not change chart functionality or design.
============================================================ */

/* Keep the Trade Performance panel within its grid column. */

.fxp-review-chart-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* Keep the chart wrapper inside the available card width. */

.fxp-performance-chart-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* Prevent the chart legend from stretching the card. */

.fxp-performance-chart-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Allow the trade count to wrap when space is limited. */

.fxp-chart-trade-count {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* Scale the existing SVG chart to fit the card. */

.fxp-performance-svg {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 175px;
    box-sizing: border-box;
    overflow: hidden;
}

/* Keep the heading and its icon within the panel. */

.fxp-review-chart-panel .fxp-review-panel-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.fxp-review-chart-panel .fxp-review-panel-heading h4 {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* Prevent grid and flex children from forcing horizontal overflow. */

.fxp-review-insights-grid,
.fxp-review-insights-grid > .fxp-review-insight-panel {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* Keep the chart fitted on smaller screens. */

@media (max-width: 600px) {
    .fxp-performance-svg {
        height: 175px;
    }

    .fxp-performance-chart-legend {
        gap: 6px 10px;
    }
}


/* =========================================================
   FXPOSSIBLE — TRADING JOURNAL EXPORT & SHARE MODAL
   Dark navy · Electric blue · Clean dashboard styling
========================================================= */

:root {
    --fxp-export-bg: #07162b;
    --fxp-export-surface: #0b1e36;
    --fxp-export-surface-hover: #102846;
    --fxp-export-border: rgba(133, 169, 220, 0.17);
    --fxp-export-border-active: rgba(65, 133, 255, 0.55);
    --fxp-export-text: #f3f7ff;
    --fxp-export-muted: #91a4bf;
    --fxp-export-blue: #3d82f6;
    --fxp-export-blue-hover: #5594ff;
    --fxp-export-radius: 16px;
}

/* Modal overlay */
.fxp-export-modal,
.fxp-share-modal,
.journal-export-modal,
.export-modal-overlay {
    color: var(--fxp-export-text);
}

.fxp-export-modal::backdrop,
.fxp-share-modal::backdrop,
.journal-export-modal::backdrop {
    background: rgba(1, 8, 20, 0.78);
    backdrop-filter: blur(8px);
}

/* Modal panel */
.fxp-export-modal .modal-content,
.fxp-share-modal .modal-content,
.journal-export-modal .modal-content,
.export-modal-overlay .modal-content,
.fxp-export-modal .modal-card,
.fxp-share-modal .modal-card,
.journal-export-modal .modal-card {
    background:
        radial-gradient(
            circle at top right,
            rgba(49, 112, 218, 0.12),
            transparent 38%
        ),
        var(--fxp-export-bg);
    color: var(--fxp-export-text);
    border: 1px solid var(--fxp-export-border);
    border-radius: var(--fxp-export-radius);
    box-shadow:
        0 28px 90px rgba(0, 0, 0, 0.48),
        0 0 0 1px rgba(255, 255, 255, 0.015);
}

/* Headings and supporting text */
.fxp-export-modal h1,
.fxp-export-modal h2,
.fxp-export-modal h3,
.fxp-share-modal h1,
.fxp-share-modal h2,
.fxp-share-modal h3,
.journal-export-modal h1,
.journal-export-modal h2,
.journal-export-modal h3,
.export-modal-overlay h1,
.export-modal-overlay h2,
.export-modal-overlay h3 {
    color: var(--fxp-export-text);
    letter-spacing: -0.025em;
    font-weight: 750;
}

.fxp-export-modal p,
.fxp-share-modal p,
.journal-export-modal p,
.export-modal-overlay p {
    color: var(--fxp-export-muted);
    line-height: 1.65;
}

/* Export options and selectable cards */
.fxp-export-modal .export-option,
.fxp-export-modal .share-option,
.fxp-share-modal .export-option,
.fxp-share-modal .share-option,
.journal-export-modal .export-option,
.journal-export-modal .share-option {
    background: var(--fxp-export-surface);
    color: var(--fxp-export-text);
    border: 1px solid var(--fxp-export-border);
    border-radius: 12px;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        transform 160ms ease,
        box-shadow 160ms ease;
}

.fxp-export-modal .export-option:hover,
.fxp-export-modal .share-option:hover,
.fxp-share-modal .export-option:hover,
.fxp-share-modal .share-option:hover,
.journal-export-modal .export-option:hover,
.journal-export-modal .share-option:hover {
    background: var(--fxp-export-surface-hover);
    border-color: var(--fxp-export-border-active);
    transform: translateY(-1px);
}

.fxp-export-modal .export-option:focus-within,
.fxp-export-modal .share-option:focus-within,
.fxp-share-modal .export-option:focus-within,
.fxp-share-modal .share-option:focus-within {
    border-color: var(--fxp-export-blue);
    box-shadow: 0 0 0 3px rgba(61, 130, 246, 0.14);
}

/* Inputs, selects and textareas */
.fxp-export-modal input,
.fxp-export-modal select,
.fxp-export-modal textarea,
.fxp-share-modal input,
.fxp-share-modal select,
.fxp-share-modal textarea,
.journal-export-modal input,
.journal-export-modal select,
.journal-export-modal textarea,
.export-modal-overlay input,
.export-modal-overlay select,
.export-modal-overlay textarea {
    background: #03142c;
    color: #eaf2ff;
    border: 1px solid rgba(133, 169, 220, 0.24);
    border-radius: 9px;
    outline: none;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.fxp-export-modal input::placeholder,
.fxp-export-modal textarea::placeholder,
.fxp-share-modal input::placeholder,
.fxp-share-modal textarea::placeholder {
    color: #7086a5;
}

.fxp-export-modal input:focus,
.fxp-export-modal select:focus,
.fxp-export-modal textarea:focus,
.fxp-share-modal input:focus,
.fxp-share-modal select:focus,
.fxp-share-modal textarea:focus,
.journal-export-modal input:focus,
.journal-export-modal select:focus,
.journal-export-modal textarea:focus {
    border-color: var(--fxp-export-blue);
    box-shadow: 0 0 0 3px rgba(61, 130, 246, 0.15);
}

/* Primary action buttons */
.fxp-export-modal .primary-button,
.fxp-export-modal .export-button,
.fxp-export-modal .share-button,
.fxp-share-modal .primary-button,
.fxp-share-modal .export-button,
.fxp-share-modal .share-button,
.journal-export-modal .primary-button,
.journal-export-modal .export-button,
.journal-export-modal .share-button {
    background: linear-gradient(135deg, #3478ef, #2463d9);
    color: #fff;
    border: 1px solid rgba(113, 164, 255, 0.42);
    border-radius: 9px;
    font-weight: 700;
    transition:
        background 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.fxp-export-modal .primary-button:hover,
.fxp-export-modal .export-button:hover,
.fxp-export-modal .share-button:hover,
.fxp-share-modal .primary-button:hover,
.fxp-share-modal .export-button:hover,
.fxp-share-modal .share-button:hover,
.journal-export-modal .primary-button:hover,
.journal-export-modal .export-button:hover,
.journal-export-modal .share-button:hover {
    background: linear-gradient(135deg, #5594ff, #3478ef);
    box-shadow: 0 6px 22px rgba(37, 103, 226, 0.24);
    transform: translateY(-1px);
}

/* Secondary and close buttons */
.fxp-export-modal .secondary-button,
.fxp-share-modal .secondary-button,
.journal-export-modal .secondary-button,
.fxp-export-modal .close-button,
.fxp-share-modal .close-button,
.journal-export-modal .close-button {
    background: rgba(148, 170, 204, 0.07);
    color: #c8d6eb;
    border: 1px solid var(--fxp-export-border);
    border-radius: 9px;
}

.fxp-export-modal .secondary-button:hover,
.fxp-share-modal .secondary-button:hover,
.journal-export-modal .secondary-button:hover,
.fxp-export-modal .close-button:hover,
.fxp-share-modal .close-button:hover,
.journal-export-modal .close-button:hover {
    background: rgba(148, 170, 204, 0.14);
    color: #fff;
}

/* Dividers */
.fxp-export-modal hr,
.fxp-share-modal hr,
.journal-export-modal hr {
    border: 0;
    border-top: 1px solid var(--fxp-export-border);
}

/* Small screens */
@media (max-width: 600px) {
    .fxp-export-modal .modal-content,
    .fxp-share-modal .modal-content,
    .journal-export-modal .modal-content,
    .export-modal-overlay .modal-content,
    .fxp-export-modal .modal-card,
    .fxp-share-modal .modal-card,
    .journal-export-modal .modal-card {
        width: calc(100% - 24px);
        max-width: 100%;
        max-height: calc(100dvh - 24px);
        overflow-y: auto;
        border-radius: 14px;
    }
}

/* =========================================================
   FXPOSSIBLE — TRADING JOURNAL EXPORT & SHARE MODAL
   Scoped to the dynamically-created journal tools modal.
   ========================================================= */

#journalToolOverlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(1, 7, 18, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 180ms ease,
        visibility 180ms ease;
}

#journalToolOverlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#journalToolOverlay .journal-tool-modal {
    position: relative;
    width: 100%;
    max-width: 590px;
    max-height: min(86vh, 760px);
    overflow-y: auto;
    padding: 0;
    border: 1px solid #203b59;
    border-radius: 20px;
    background:
        radial-gradient(
            ellipse at top right,
            rgba(22, 131, 255, 0.09),
            transparent 48%
        ),
        #071321;
    color: #edf5ff;
    box-shadow:
        0 28px 90px rgba(0, 0, 0, 0.48),
        0 0 0 1px rgba(255, 255, 255, 0.015);
    transform: translateY(10px) scale(0.985);
    transition: transform 180ms ease;
    scrollbar-width: thin;
    scrollbar-color: #294763 transparent;
}

#journalToolOverlay.open .journal-tool-modal {
    transform: translateY(0) scale(1);
}

/* Modal heading */

#journalToolOverlay .journal-tool-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 27px 28px 23px;
    border-bottom: 1px solid #192e45;
}

#journalToolOverlay #journalToolTitle {
    margin: 0;
    color: #f1f7ff;
    font-size: clamp(21px, 3vw, 25px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.7px;
}

#journalToolOverlay #journalToolSubtitle {
    max-width: 460px;
    margin: 9px 0 0;
    color: #91a6bf;
    font-size: 13px;
    line-height: 1.65;
}

#journalToolOverlay .journal-tool-close {
    display: grid;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    place-items: center;
    margin: -4px -5px 0 0;
    padding: 0;
    border: 1px solid #263e58;
    border-radius: 11px;
    background: #0b1b2d;
    color: #a9bdd3;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        color 160ms ease;
}

#journalToolOverlay .journal-tool-close:hover {
    border-color: #397ec5;
    background: #102b47;
    color: #ffffff;
}

#journalToolOverlay .journal-tool-close:focus-visible,
#journalToolOverlay .journal-export-action:focus-visible {
    outline: 2px solid #1683ff;
    outline-offset: 3px;
}

/* Modal content */

#journalToolOverlay #journalToolBody {
    padding: 25px 28px 28px;
}

/* Selected account */

#journalToolOverlay .journal-export-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    margin-bottom: 23px;
    padding: 15px 17px;
    border: 1px solid #1c3855;
    border-radius: 13px;
    background: rgba(11, 30, 50, 0.82);
}

#journalToolOverlay .journal-export-context > span {
    flex: 0 0 auto;
    color: #91a6bf;
    font-size: 12px;
    font-weight: 600;
}

#journalToolOverlay .journal-export-context > strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #c9e3ff;
    font-size: 13px;
    font-weight: 750;
    text-align: right;
}

/* Export options */

#journalToolOverlay .journal-export-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

#journalToolOverlay .journal-export-action {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    min-height: 100px;
    padding: 19px 18px;
    overflow: hidden;
    border: 1px solid #203953;
    border-radius: 14px;
    background: linear-gradient(
        145deg,
        #0c1e32 0%,
        #091727 100%
    );
    color: #edf5ff;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease,
        opacity 160ms ease;
}

#journalToolOverlay .journal-export-action::after {
    position: absolute;
    top: 0;
    right: 0;
    width: 64px;
    height: 64px;
    border-radius: 0 0 0 64px;
    background: rgba(22, 131, 255, 0.035);
    content: "";
    pointer-events: none;
    transition: background 160ms ease;
}

#journalToolOverlay .journal-export-action:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: #2878c2;
    background: linear-gradient(
        145deg,
        #102943 0%,
        #0b1d31 100%
    );
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

#journalToolOverlay .journal-export-action:hover:not(:disabled)::after {
    background: rgba(22, 131, 255, 0.10);
}

#journalToolOverlay .journal-export-action strong {
    position: relative;
    z-index: 1;
    color: #f0f6ff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.4;
}

#journalToolOverlay .journal-export-action small {
    position: relative;
    z-index: 1;
    color: #8fa7c1;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.55;
}

#journalToolOverlay .journal-export-action:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Share option spans both columns for a balanced final row */

#journalToolOverlay .journal-export-action[data-export="share"] {
    grid-column: 1 / -1;
    min-height: 76px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 19px;
    border-color: rgba(22, 131, 255, 0.38);
    background: linear-gradient(
        110deg,
        rgba(22, 131, 255, 0.13),
        rgba(10, 28, 47, 0.96) 70%
    );
}

#journalToolOverlay .journal-export-action[data-export="share"]::before {
    flex: 0 0 auto;
    order: 2;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(94, 174, 255, 0.30);
    border-radius: 10px;
    background: rgba(22, 131, 255, 0.12);
    color: #83c1ff;
    content: "↗";
    font-size: 20px;
    line-height: 1;
}

#journalToolOverlay .journal-export-action[data-export="share"]:hover:not(:disabled) {
    border-color: #398fff;
    background: linear-gradient(
        110deg,
        rgba(22, 131, 255, 0.20),
        rgba(10, 28, 47, 0.98) 75%
    );
}

/* Export progress and feedback */

#journalToolOverlay #journalExportStatus {
    min-height: 0;
    margin-top: 16px;
    color: #a8bed5;
    font-size: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

#journalToolOverlay #journalExportStatus:empty {
    display: none;
}

#journalToolOverlay .journal-tool-status {
    padding: 11px 13px;
    border: 1px solid #203953;
    border-radius: 10px;
    background: #091a2b;
}

/* Responsive layout */

@media (max-width: 600px) {
    #journalToolOverlay {
        align-items: flex-end;
        padding: 10px;
    }

    #journalToolOverlay .journal-tool-modal {
        max-width: 100%;
        max-height: 91dvh;
        border-radius: 18px;
    }

    #journalToolOverlay .journal-tool-head {
        padding: 22px 19px 19px;
        gap: 12px;
    }

    #journalToolOverlay #journalToolBody {
        padding: 20px 19px 22px;
    }

    #journalToolOverlay .journal-export-context {
        padding: 13px;
        margin-bottom: 17px;
    }

    #journalToolOverlay .journal-export-grid {
        gap: 9px;
    }

    #journalToolOverlay .journal-export-action {
        min-height: 92px;
        padding: 14px 12px;
        border-radius: 12px;
    }

    #journalToolOverlay .journal-export-action strong {
        font-size: 13px;
    }

    #journalToolOverlay .journal-export-action small {
        font-size: 10px;
    }

    #journalToolOverlay .journal-export-action[data-export="share"] {
        min-height: 68px;
        padding: 14px;
    }
}

@media (max-width: 360px) {
    #journalToolOverlay .journal-tool-head {
        padding-right: 15px;
        padding-left: 15px;
    }

    #journalToolOverlay #journalToolBody {
        padding-right: 15px;
        padding-left: 15px;
    }

    #journalToolOverlay .journal-export-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    #journalToolOverlay .journal-export-action,
    #journalToolOverlay .journal-export-action[data-export="share"] {
        grid-column: auto;
        min-height: 72px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #journalToolOverlay,
    #journalToolOverlay .journal-tool-modal,
    #journalToolOverlay .journal-tool-close,
    #journalToolOverlay .journal-export-action {
        transition: none;
    }
}

/* Trading Journal light-theme fixes for the calendar, AI status, and share action. */
html[data-theme="light"] #calendarCard {
    background: #ffffff !important;
    background-image: none !important;
    color: #17243a !important;
    border-color: #dce5f0 !important;
    box-shadow: none !important;
}

html[data-theme="light"] #calendarCard .card-header :is(h3, span),
html[data-theme="light"] #calendarCard .calendar-navigation strong,
html[data-theme="light"] #calendarCard .calendar-legend,
html[data-theme="light"] #calendarCard .calendar-legend span {
    color: #334155 !important;
}

html[data-theme="light"] #calendarCard .calendar-navigation button,
html[data-theme="light"] #calendarCard .fullscreen-button {
    background: #f1f6ff !important;
    color: #216cff !important;
    border-color: #cbdcf5 !important;
    box-shadow: none !important;
}

html[data-theme="light"] #calendarCard .calendar-navigation button:hover:not(:disabled),
html[data-theme="light"] #calendarCard .fullscreen-button:hover {
    background: #e2edff !important;
    color: #1555bd !important;
    border-color: #9dbcf0 !important;
}

html[data-theme="light"] #calendarCard .calendar-day,
html[data-theme="light"] #calendarCard .calendar-day:not(.profitable):not(.losing):not(.breakeven) {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border-color: #e2e8f0 !important;
    box-shadow: none !important;
}

html[data-theme="light"] #calendarCard .calendar-day.profitable {
    background: #e8f7ef !important;
    color: #16804a !important;
    border-color: #b7e5c8 !important;
    box-shadow: none !important;
}

html[data-theme="light"] #calendarCard .calendar-day.losing {
    background: #fff0f1 !important;
    color: #c93646 !important;
    border-color: #f0c2c7 !important;
    box-shadow: none !important;
}

html[data-theme="light"] #calendarCard .calendar-day.breakeven {
    background: #eef2f7 !important;
    color: #475569 !important;
    border-color: #dce3ec !important;
    box-shadow: none !important;
}

html[data-theme="light"] #calendarCard .calendar-day:hover,
html[data-theme="light"] #calendarCard .calendar-day.profitable:hover {
    filter: brightness(.97) !important;
    box-shadow: none !important;
}

html[data-theme="light"] #calendarCard .calendar-day.today {
    outline-color: #216cff !important;
    color: #1555bd !important;
}

html[data-theme="light"] #calendarCard .calendar-legend {
    border-color: #e2e8f0 !important;
}

html[data-theme="light"] #calendarCard .calendar-legend .green-dot {
    background: #16804a !important;
    box-shadow: none !important;
}

html[data-theme="light"] #calendarCard .calendar-legend .red-dot {
    background: #c93646 !important;
}

html[data-theme="light"] #calendarCard .calendar-legend .gray-dot {
    background: #94a3b8 !important;
}

html[data-theme="light"] .journal-main .fxp-review-performance-snapshot {
    background: #ffffff !important;
    background-image: none !important;
    color: #17243a !important;
    border-color: #dce5f0 !important;
    box-shadow: none !important;
}

html[data-theme="light"] .journal-main .fxp-review-snapshot-status {
    background: transparent !important;
    color: #17243a !important;
    border: 0 !important;
    box-shadow: none !important;
}

html[data-theme="light"] .journal-main .fxp-review-snapshot-copy > strong {
    color: #16804a !important;
}

html[data-theme="light"] .journal-main .fxp-review-snapshot-copy > span {
    color: #334155 !important;
}

html[data-theme="light"] .journal-main .fxp-review-snapshot-separator {
    color: #64748b !important;
}

html[data-theme="light"] #journalToolOverlay .journal-export-action[data-export="share"],
html[data-theme="light"] #journalToolOverlay .journal-export-action[data-export="share"]:hover:not(:disabled) {
    background: #eaf1ff !important;
    background-image: none !important;
    color: #174ea6 !important;
    border-color: #9dbcf0 !important;
    box-shadow: none !important;
}

html[data-theme="light"] #journalToolOverlay .journal-export-action[data-export="share"] :is(strong, small) {
    color: #174ea6 !important;
}

html[data-theme="light"] #journalToolOverlay .journal-export-action[data-export="share"]::before {
    background: #ffffff !important;
    color: #216cff !important;
    border-color: #cbdcf5 !important;
}

html[data-theme="light"] #journalToolOverlay .journal-export-action[data-export="share"]::after,
html[data-theme="light"] #journalToolOverlay .journal-export-action[data-export="share"]:hover:not(:disabled)::after {
    background: transparent !important;
}

/* FXpossible History cards */
.history-gallery-grid {
    grid-template-columns: repeat(
        auto-fill,
        minmax(var(--fxp-history-card-width, 270px), 1fr)
    );
    gap: 18px;
}

.history-pro-card {
    overflow: hidden;
    border: 1px solid rgba(115, 156, 205, .2);
    border-radius: 17px;
    background: linear-gradient(145deg, #0b203a, #041329);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .2);
    animation: fxpHistoryCardIn .42s ease both;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.history-pro-card:hover {
    transform: translateY(-4px);
    border-color: rgba(58, 151, 255, .65);
    box-shadow: 0 20px 42px rgba(0, 0, 0, .3);
}

.history-gallery-visual {
    position: relative;
    display: grid;
    place-items: center;
    height: 170px;
    overflow: hidden;
    background: #06152a;
}

.history-gallery-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-gallery-visual::after {
    content: "";
    position: absolute;
    inset: -70% -40%;
    background: linear-gradient(
        115deg,
        transparent 42%,
        rgba(255, 255, 255, .14) 50%,
        transparent 58%
    );
    transform: translateX(-65%);
    animation: fxpHistoryReflection 5.5s ease-in-out infinite;
    pointer-events: none;
}

.history-gallery-placeholder {
    color: #6caeff;
    background:
        radial-gradient(ellipse at center, rgba(46, 126, 255, .24), transparent 68%),
        linear-gradient(145deg, #071a32, #020a16);
}

.history-gallery-placeholder svg {
    width: 170px;
    max-width: 90%;
    filter: blur(1.2px) drop-shadow(0 0 16px rgba(58, 142, 255, .28));
    opacity: .72;
}

.history-pro-card .history-gallery-card-body {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.history-pro-card-heading,
.history-pro-pair,
.history-pro-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
}

.history-pro-card-heading > strong {
    color: #edf5ff;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.history-pro-status {
    padding: 5px 8px;
    border: 1px solid rgba(143, 166, 198, .2);
    border-radius: 99px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.history-pro-status.is-win {
    color: #43e39b;
    background: rgba(36, 195, 122, .1);
}

.history-pro-status.is-loss {
    color: #ff7285;
    background: rgba(255, 75, 104, .1);
}

.history-pro-status.is-open {
    color: #72b7ff;
    background: rgba(69, 142, 255, .12);
}

.history-pro-pair {
    justify-content: flex-start;
    color: #dbeaff;
    font-size: 12px;
    font-weight: 700;
}

.history-pro-pair span {
    padding: 4px 7px;
    border-radius: 6px;
    color: #9fc8ff;
    background: rgba(58, 142, 255, .12);
    font-size: 10px;
}
.history-pro-pair .history-pro-inline-pl {
    padding: 0;
    background: transparent;
    border-radius: 0;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.history-pro-pair .history-pro-inline-pl.win {
    color: #42e39a;
}

.history-pro-pair .history-pro-inline-pl.loss {
    color: #ff6d82;
}
.history-pro-pl {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.history-pro-pl.win {
    color: #42e39a;
}

.history-pro-pl.loss {
    color: #ff6d82;
}

.history-pro-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.history-pro-metrics > div {
    display: grid;
    gap: 5px;
    padding: 9px;
    border: 1px solid rgba(119, 153, 195, .13);
    border-radius: 9px;
    background: rgba(2, 12, 27, .48);
    min-width: 0;
}

.history-pro-metrics span {
    color: #8fa6c2;
    font-size: 10px;
}

.history-pro-metrics strong {
    color: #e7f0ff;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.history-pro-actions {
    justify-content: stretch;
}

.history-pro-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    min-height: 36px;
    border-radius: 9px;
    cursor: pointer;
}

.history-pro-actions .history-delete-button {
    color: #ff8393;
    border-color: rgba(255, 100, 124, .28);
}

@keyframes fxpHistoryCardIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fxpHistoryReflection {
    0%, 20% { transform: translateX(-65%); }
    70%, 100% { transform: translateX(65%); }
}

@media (prefers-reduced-motion: reduce) {
    .history-pro-card,
    .history-gallery-visual::after {
        animation: none !important;
        transition: none !important;
    }
}

.history-card-size-control {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: auto;
    color: #9fb2cc;
    font-size: 12px;
}

.history-card-size-control input[type="range"] {
    width: min(180px, 35vw);
    accent-color: #438fff;
    cursor: pointer;
}

.history-card-size-control output {
    min-width: 45px;
    color: #e2edff;
    font-variant-numeric: tabular-nums;
}

.history-header-actions .history-add-trade-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
#historyMissedTradesButton[aria-pressed="true"] {
    border-color: rgba(77, 163, 255, 0.65);
    background: rgba(40, 120, 220, 0.18);
    color: #79baff;
}

#historyExitMissedTradesButton {
    border-color: rgba(255, 109, 130, 0.45);
    background: rgba(255, 109, 130, 0.10);
    color: #ff8b9d;
}

#historyExitMissedTradesButton:hover {
    background: rgba(255, 109, 130, 0.18);
}

#historyExitMissedTradesButton[hidden] {
    display: none !important;
}
.st-trade-news-panel {
    display: grid;
    align-content: start;
    gap: 15px;
}

.st-trade-news-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.st-trade-news-heading h2 {
    margin: 4px 0 0;
}

.st-trade-news-heading > svg {
    flex-shrink: 0;
    color: #73b8ff;
}

.st-trade-news-eyebrow {
    color: #77b7ff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
}

.st-trade-news-date {
    padding: 9px 11px;
    border: 1px solid rgba(105, 155, 210, .18);
    border-radius: 9px;
    color: #c5d9f1;
    background: rgba(5, 19, 36, .7);
    font-size: 11px;
}

.st-trade-news-content {
    min-width: 0;
}

.st-trade-news-empty {
    display: grid;
    justify-items: start;
    gap: 10px;
    padding: 16px 13px;
    border: 1px solid rgba(105, 155, 210, .15);
    border-radius: 12px;
    background:
        radial-gradient(circle at top left, rgba(48, 128, 238, .12), transparent 60%),
        rgba(4, 16, 32, .7);
}

.st-trade-news-empty-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    color: #79baff;
    background: rgba(52, 135, 255, .13);
}

.st-trade-news-empty strong {
    color: #e6f1ff;
    font-size: 12px;
}

.st-trade-news-empty p {
    margin: 0;
    color: #94abc6;
    font-size: 11px;
    line-height: 1.65;
}
/* Trading Journal History: multi-account filter */
.history-account-multi-filter {
    min-width: 180px;
}

.history-account-multi-filter select[multiple] {
    width: 100%;
    min-height: 40px;
    height: 40px;
    padding: 0 32px 0 12px;
    border-radius: 10px;
    background-color: #03142c;
    color: #e6efff;
    border: 1px solid rgba(120, 160, 210, 0.24);
    font: inherit;
    cursor: pointer;
}

.history-account-multi-filter select[multiple]:focus {
    outline: none;
    border-color: #438fff;
    box-shadow: 0 0 0 3px rgba(67, 143, 255, 0.14);
}

.history-account-filter-hint {
    display: block;
    margin-top: 5px;
    color: #91a8c7;
    font-size: 10px;
}

.history-account-multi-filter select[multiple]:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}


/* ============================================================
   FXPOSSIBLE — AI TRADE REVIEW MOBILE REDESIGN
   Cleaner header + natural mobile touch scrolling
============================================================ */

@media (max-width: 760px) {

    /* Main AI review card */
    body.fxp-trading-journal-page
    .journal-card.journal-ai-card.fxp-ai-panel {

        display: flex !important;
        flex-direction: column !important;

        width: 100% !important;
        height: auto !important;
        min-height: 300px !important;
        max-height: none !important;

        padding: 14px !important;

        overflow: visible !important;
        box-sizing: border-box !important;

        border-radius: 14px;
    }

    /* Professional two-row header */
    body.fxp-trading-journal-page .fxp-ai-header {

        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;

        align-items: center !important;
        justify-content: initial !important;

        gap: 12px !important;

        width: 100% !important;
        min-width: 0 !important;

        padding: 3px 0 13px !important;
        margin: 0 0 12px !important;

        overflow: visible !important;

        border-bottom: 1px solid rgba(91, 150, 255, .20);
    }

    /* Brand and logo */
    body.fxp-trading-journal-page .fxp-ai-brand {

        display: flex !important;
        align-items: center !important;

        gap: 11px !important;

        width: 100%;
        min-width: 0;
    }

    body.fxp-trading-journal-page .fxp-ai-logo {

        width: 43px !important;
        height: 43px !important;
        flex: 0 0 43px !important;

        padding: 4px !important;
        border-radius: 11px !important;
    }

    body.fxp-trading-journal-page .fxp-ai-brand h3 {

        margin: 0 0 4px !important;

        font-size: 15px !important;
        font-weight: 750 !important;
        line-height: 1.3 !important;
        letter-spacing: -.3px !important;

        color: #f0f6ff !important;
    }

    body.fxp-trading-journal-page .fxp-ai-brand span {

        font-size: 10px !important;
        line-height: 1.45 !important;

        color: #91a9c9 !important;
    }

    /* Refresh and last-generated information */
    body.fxp-trading-journal-page .fxp-ai-header-actions {

        display: flex !important;
        flex-direction: row !important;

        align-items: center !important;
        justify-content: space-between !important;

        flex-wrap: wrap !important;

        gap: 9px !important;

        width: 100% !important;
        min-width: 0 !important;
    }

    body.fxp-trading-journal-page .fxp-ai-refresh {

        display: inline-flex !important;

        align-items: center !important;
        justify-content: center !important;

        min-width: 92px !important;
        min-height: 35px !important;

        padding: 0 12px !important;

        border-radius: 8px !important;

        font-size: 11px !important;
        white-space: nowrap !important;
    }

    body.fxp-trading-journal-page .fxp-ai-updated {

        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;

        max-width: calc(100% - 105px) !important;

        font-size: 9px !important;
        line-height: 1.4 !important;

        white-space: normal !important;
        text-align: right !important;

        overflow-wrap: anywhere !important;
    }

    /* IMPORTANT:
       Remove the nested scrolling trap on mobile.
       Let the entire document scroll naturally. */

    body.fxp-trading-journal-page .fxp-ai-content {

        display: block !important;

        flex: 0 0 auto !important;

        width: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;

        height: auto !important;
        max-height: none !important;

        padding: 3px 1px 10px !important;

        overflow: visible !important;

        touch-action: pan-y !important;
        overscroll-behavior: auto !important;
        -webkit-overflow-scrolling: touch !important;

        scrollbar-width: none !important;
    }

    body.fxp-trading-journal-page .fxp-ai-content::-webkit-scrollbar {
        display: none !important;
    }

    body.fxp-trading-journal-page .fxp-ai-panel,
    body.fxp-trading-journal-page .fxp-ai-content {
        -webkit-user-select: text;
        user-select: text;
    }

    /* Keep review sections within the phone width */
    body.fxp-trading-journal-page .journal-ai-section,
    body.fxp-trading-journal-page .fxp-review-highlighted,
    body.fxp-trading-journal-page .fxp-review-performance {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
}

/* Small phones */
@media (max-width: 380px) {

    body.fxp-trading-journal-page .fxp-ai-panel {
        padding: 11px !important;
    }

    body.fxp-trading-journal-page .fxp-ai-brand h3 {
        font-size: 14px !important;
    }

    body.fxp-trading-journal-page .fxp-ai-header-actions {
        gap: 7px !important;
    }

    body.fxp-trading-journal-page .fxp-ai-updated {
        font-size: 8px !important;
    }
}
