/* RHFX / ATLAS — shared visual system. Loaded after legacy styles. */
:root, html[data-theme="dark"], body.rhfx-ui {
    --rx-bg: #0b101b;
    --rx-panel: #141c2b;
    --rx-raised: #1a2537;
    --rx-field: #0f1725;
    --rx-ink: #f5f7fc;
    --rx-muted: #a4b2c9;
    --rx-muted-strong: #c3cee0;
    --rx-line: #2a384e;
    --rx-orange: #ff8a3d;
    --rx-orange-soft: #33251f;
    --rx-blue: #76a4ff;
    --rx-blue-soft: #192d4e;
    --rx-green: #34dba0;
    --rx-red: #ff738a;
    --rx-shadow: 0 8px 28px #00000020;
    --bg-main: var(--rx-bg);
    --bg-dark: var(--rx-bg);
    --bg-surface: var(--rx-panel);
    --bg-card: var(--rx-panel);
    --bg-card-hover: var(--rx-raised);
    --secondary: var(--rx-field);
    --primary: var(--rx-orange);
    --primary-hover: #ffa66a;
    --primary-light: var(--rx-orange);
    --primary-glow: #ff8a3d24;
    --text-main: var(--rx-ink);
    --text-muted: var(--rx-muted);
    --text-dim: var(--rx-muted);
    --border-color: var(--rx-line);
    --border-glow: #ff8a3d55;
    --success: var(--rx-green);
    --danger: var(--rx-red);
    --error: var(--rx-red);
    --accent-blue: var(--rx-blue);
    --accent-cyan: #44d5e7;
    --card-radius: 18px;
    --sidebar-width: 244px;
    --font-body: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    --font-display: 'Outfit', 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', Consolas, monospace;
    color-scheme: dark;
}
html[data-theme="light"], html[data-theme="light"] body.rhfx-ui {
    --rx-bg: #f1f3f8;
    --rx-panel: #ffffff;
    --rx-raised: #eaf0fa;
    --rx-field: #f7f9fc;
    --rx-ink: #17253b;
    --rx-muted: #53647e;
    --rx-muted-strong: #3b4c63;
    --rx-line: #d4deec;
    --rx-orange: #b9470b;
    --rx-orange-soft: #fff0e5;
    --rx-blue: #245adb;
    --rx-blue-soft: #e8efff;
    --rx-green: #087c55;
    --rx-red: #c92e4b;
    --rx-shadow: 0 8px 30px #22385609;
    --primary-hover: #923707;
    color-scheme: light;
}
html { scroll-padding-top: 96px; }
body.rhfx-ui {
    background: var(--rx-bg) !important;
    color: var(--rx-ink) !important;
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}
body.rhfx-ui :is(h1,h2,h3,h4,h5,h6) { font-family: var(--font-display) !important; line-height: 1.2; }
body.rhfx-ui :is(button,input,select,textarea) { font-family: inherit; }
body.rhfx-ui button, body.rhfx-ui a { -webkit-tap-highlight-color: transparent; }
body.rhfx-ui :is(button,a,input,select,textarea,[tabindex]):focus-visible {
    outline: 3px solid var(--rx-blue) !important; outline-offset: 4px;
}
body.rhfx-ui ::selection { background: #ff8a3d; color: #142034; }
body.rhfx-ui :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),select,textarea) {
    background: var(--rx-field) !important;
    color: var(--rx-ink) !important;
    border: 1px solid var(--rx-line) !important;
    border-radius: 10px !important;
    min-height: 46px;
    padding: 12px 14px;
    box-shadow: none !important;
    max-width: 100%;
}
body.rhfx-ui input::placeholder, body.rhfx-ui textarea::placeholder { color: var(--rx-muted); opacity: .85; }
body.rhfx-ui input:focus, body.rhfx-ui select:focus, body.rhfx-ui textarea:focus { border-color: var(--rx-blue) !important; }
body.rhfx-ui :is(input[type="checkbox"],input[type="radio"],input[type="range"]) { accent-color: var(--rx-orange); }
body.rhfx-ui :is(.form-group label,.input-group label) { color: var(--rx-ink) !important; font-size: 12px; font-weight: 700; letter-spacing: .01em; }
body.rhfx-ui :is(.btn-primary,.btn-save) {
    background: #ff8a3d !important; color: #171e2c !important;
    border: 1px solid #ff8a3d !important; border-radius: 10px !important;
    font-weight: 800; min-height: 48px; box-shadow: none !important;
    transition: background .18s, transform .18s;
}
body.rhfx-ui :is(.btn-primary,.btn-save):hover { background: #ffa261 !important; transform: translateY(-1px); }
body.rhfx-ui [data-rhfx-surface="neutral"] { background: var(--rx-field) !important; border-color: var(--rx-line) !important; }
body.rhfx-ui [data-rhfx-ink="strong"] { color: var(--rx-ink) !important; }
body.rhfx-ui [data-rhfx-ink="muted"] { color: var(--rx-muted) !important; }
body.rhfx-ui [data-rhfx-tone="blue"] { color: var(--rx-blue) !important; }
body.rhfx-ui [data-rhfx-tone="green"] { color: var(--rx-green) !important; }
body.rhfx-ui [data-rhfx-tone="orange"] { color: var(--rx-orange) !important; }
body.rhfx-ui [data-rhfx-tone="red"] { color: var(--rx-red) !important; }
body.rhfx-ui :is(.card,.glass-card,.calc-card,.tool-selector-card,.admin-section,.login-box) {
    background: var(--rx-panel) !important;
    border: 1px solid var(--rx-line) !important;
    border-radius: 18px !important;
    box-shadow: var(--rx-shadow) !important;
    backdrop-filter: none;
}
body.rhfx-ui :is(.card,.home-market-card,.home-signal-card,.home-brief-card,.tool-selector-card)::before { display: none !important; }
body.rhfx-ui :is(.card,.calc-card) { padding: 24px; }
body.rhfx-ui :is(.card,.glass-card) :is(h2,h3) { color: var(--rx-ink); }
body.rhfx-ui :is(.card,.glass-card):hover { box-shadow: var(--rx-shadow); }
body.rhfx-ui :is(.modal-content,.modal-box,.user-profile-dropdown,.dropdown-header-card) {
    background: var(--rx-panel) !important; color: var(--rx-ink) !important;
    border-color: var(--rx-line) !important; border-radius: 16px; box-shadow: 0 20px 70px #0005 !important;
}
body.rhfx-ui :is(.dropdown-item,.dropdown-title,.dropdown-label) { color: var(--rx-ink) !important; }
body.rhfx-ui .dropdown-item:hover { background: var(--rx-raised) !important; }
body.rhfx-ui .dropdown-item-logout { color: var(--rx-red) !important; }
body.rhfx-ui :is(.table-wrapper,.table-responsive) { overflow-x: auto; max-width: 100%; border-radius: 12px; }
body.rhfx-ui table { border-collapse: collapse; color: var(--rx-ink); }
body.rhfx-ui :is(th,td) { border-color: var(--rx-line) !important; padding: 14px 16px; }
body.rhfx-ui th { background: var(--rx-raised) !important; color: var(--rx-muted) !important; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
body.rhfx-ui td { font-size: 13px; }
body.rhfx-ui tbody tr:hover { background: var(--rx-raised) !important; }
body.rhfx-ui .table-striped tbody tr:nth-of-type(odd) { background: var(--rx-field); }

/* Branded chrome */
.rx-eyebrow { display: flex; align-items: center; gap: 9px; color: var(--rx-orange); font: 700 10px/1.4 var(--font-mono); letter-spacing: .15em; text-transform: uppercase; }
.rx-eyebrow::before { content: ''; width: 7px; height: 7px; flex: 0 0 7px; background: currentColor; }
.rx-theme { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 9px 14px; background: var(--rx-panel); border: 1px solid var(--rx-line); border-radius: 9px; color: var(--rx-ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.rx-theme svg { width: 17px; height: 17px; }
.rx-sitebar { display: flex; align-items: center; justify-content: space-between; width: min(1240px,calc(100% - 80px)); margin: 26px auto 0; gap: 16px; }
.rx-wordmark { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--rx-ink); font: 700 21px var(--font-display); letter-spacing: -.5px; }
.rx-wordmark img { width: 40px; height: 40px; object-fit: contain; border-radius: 50%; background: #fff; }
.rx-wordmark small { display: block; font: 600 9px var(--font-mono); letter-spacing: 2px; color: var(--rx-muted); margin-top: 2px; }
.rx-sitebar-end { display: flex; align-items: center; gap: 20px; }
.rx-sitebar-note { color: var(--rx-muted); font: 500 10px var(--font-mono); letter-spacing: .07em; }

/* Portal: editorial entrance with the original forms and enrollment flows. */
body[data-rhfx-page="portal"] { background-image: radial-gradient(var(--rx-line) .7px, transparent .7px) !important; background-size: 24px 24px !important; }
[data-rhfx-page="portal"] .bg-shape { display: none; }
[data-rhfx-page="portal"] > .container {
    width: min(1240px,calc(100% - 80px)); max-width: 1240px; margin: 68px auto 48px;
    padding: 0; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(360px,.9fr); gap: 80px; align-items: center;
}
[data-rhfx-page="portal"] .main-content { min-width: 0; }
[data-rhfx-page="portal"] .header { grid-column: 1; text-align: left; margin: 0; }
[data-rhfx-page="portal"] .header::after { display: none; }
[data-rhfx-page="portal"] .portal-title { color: var(--rx-muted); font: 700 11px var(--font-mono); letter-spacing: .14em; margin: 0 0 22px; }
.rx-portal-title { font: 600 clamp(40px,5vw,70px)/1.04 var(--font-display) !important; letter-spacing: -.045em; margin: 0 0 24px; color: var(--rx-ink); }
.rx-portal-title em { font-style: normal; color: var(--rx-orange); }
.rx-portal-description { max-width: 440px; color: var(--rx-muted); font-size: 15px; line-height: 1.85; }
.rx-portal-features { display: grid; gap: 0; margin-top: 36px; max-width: 450px; }
.rx-portal-feature { display: flex; gap: 17px; align-items: center; padding: 16px 0; border-top: 1px solid var(--rx-line); }
.rx-portal-feature > span { color: var(--rx-orange); font: 600 12px var(--font-mono); }
.rx-portal-feature strong { display: block; font-size: 13px; color: var(--rx-ink); }
.rx-portal-feature small { color: var(--rx-muted); font-size: 11px; }
.rx-portal-bottom { color: var(--rx-muted); font: 500 10px var(--font-mono); margin-top: 30px; letter-spacing: .04em; }
body[data-rhfx-page="portal"] .glass-card { padding: 32px; border-top: 3px solid #ff8a3d !important; }
.rx-form-intro { margin-bottom: 28px; }
.rx-form-intro h2 { margin: 13px 0 10px; font-size: 29px; letter-spacing: -.03em; }
.rx-form-intro p { color: var(--rx-muted); font-size: 12px; line-height: 1.75; }
[data-rhfx-page="portal"] .input-group label { text-align: left; margin-bottom: 9px; }
[data-rhfx-page="portal"] .input-group input { min-height: 52px; font-size: 14px; }
[data-rhfx-page="portal"] .btn-primary { min-height: 52px; font-size: 14px; }
[data-rhfx-page="portal"] .join-options { margin-top: 8px; padding-top: 0; }
[data-rhfx-page="portal"] .join-divider { margin: 8px 0 14px; }
[data-rhfx-page="portal"] .join-divider span { color: var(--rx-muted); font-size: 9px; letter-spacing: .12em; background: var(--rx-panel); }
[data-rhfx-page="portal"] .join-action-card { min-width: 0; min-height: 76px; gap: 8px; background: var(--rx-field) !important; border: 1px solid var(--rx-line) !important; border-radius: 10px; box-shadow: none; text-align: left; padding: 10px 8px; }
[data-rhfx-page="portal"] .join-action-card:hover { border-color: var(--rx-orange) !important; transform: translateY(-2px); }
[data-rhfx-page="portal"] .card-info { flex: 1 1 0; min-width: 0; }
[data-rhfx-page="portal"] .card-headline,
[data-rhfx-page="portal"] .card-subtext {
    max-width: 100%;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.35;
}
[data-rhfx-page="portal"] .card-headline { color: var(--rx-ink) !important; font-size: 12px; }
[data-rhfx-page="portal"] .card-subtext { color: var(--rx-muted) !important; font-size: 10px; }
[data-rhfx-page="portal"] .card-icon-wrap { color: var(--rx-orange); background: var(--rx-orange-soft); }
[data-rhfx-page="portal"] .support-footer { margin-top: 24px; padding-top: 18px; border-color: var(--rx-line); }
[data-rhfx-page="portal"] .support-footer p { color: var(--rx-muted); font-size: 11px; }
[data-rhfx-page="portal"] .support-link { color: var(--rx-green); }
[data-rhfx-page="portal"] .social-contact { border-color: var(--rx-line); margin-top: 20px; padding-top: 18px; }
[data-rhfx-page="portal"] .social-heading { color: var(--rx-ink); font-size: 13px; }
[data-rhfx-page="portal"] .social-subheading { color: var(--rx-muted); font-size: 10px; }
[data-rhfx-page="portal"] .social-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
[data-rhfx-page="portal"] .social-card {
    min-width: 0;
    min-height: 76px;
    padding: 10px 6px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    color: var(--rx-ink);
    background: var(--rx-field);
    border: 1px solid var(--rx-line);
    border-radius: 12px;
    text-align: center;
}
[data-rhfx-page="portal"] .social-card span {
    width: 100%;
    align-items: center;
    overflow: visible;
}
[data-rhfx-page="portal"] .social-card strong,
[data-rhfx-page="portal"] .social-card small {
    max-width: 100%;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.35;
}
[data-rhfx-page="portal"] .social-card strong { font-size: 11px; }
[data-rhfx-page="portal"] .social-card small { font-size: 9px; }
[data-rhfx-page="portal"] .social-card:hover { background: var(--rx-raised); border-color: var(--rx-blue); }
[data-rhfx-page="portal"] .social-whatsapp { color: #25d366; }
[data-rhfx-page="portal"] .social-telegram { color: #2aabee; }
[data-rhfx-page="portal"] .social-tiktok { color: var(--rx-ink); }
html[data-theme="light"] [data-rhfx-page="portal"] .social-whatsapp { color: #14834b; }
html[data-theme="light"] [data-rhfx-page="portal"] .social-telegram { color: #087db4; }
[data-rhfx-page="portal"] .container:has(#mt5-referral-section.active-section) { display: block; max-width: 720px; }
body[data-rhfx-page="portal"] > .container:has(.active-section:not(#login-section)) { display: block; max-width: 800px; margin-top: 34px; }
body[data-rhfx-page="portal"] > .container:has(.active-section:not(#login-section)) > .header { display: none; }
body.rhfx-ui :is(.btn-back-home,.btn-secondary) { color: var(--rx-ink) !important; background: var(--rx-field) !important; border: 1px solid var(--rx-line) !important; border-radius: 9px; min-height: 44px; }
body.rhfx-ui .tabs { background: var(--rx-field) !important; border: 1px solid var(--rx-line); border-radius: 10px; padding: 5px; }
body.rhfx-ui .tab-btn { color: var(--rx-muted) !important; min-height: 42px; border-radius: 7px; }
body.rhfx-ui .tab-btn.active { background: var(--rx-blue) !important; color: var(--rx-bg) !important; }

/* Workspace navigation */
body.rhfx-ui .sidebar {
    width: var(--sidebar-width); background: #101a2a !important; border-right: 1px solid #29364c !important;
    box-shadow: none !important; backdrop-filter: none !important;
}
body.rhfx-ui .sidebar-header { height: 88px; padding: 0 22px; border-color: #29364c !important; }
body.rhfx-ui .sidebar-logo { width: 36px; height: 36px; border: 0 !important; box-shadow: none !important; }
body.rhfx-ui .sidebar-brand-title { color: #f6f8ff !important; font-size: 18px; letter-spacing: -.4px; }
body.rhfx-ui .sidebar-brand-sub { color: #96a8c3 !important; font-size: 9px; letter-spacing: 1.8px; }
body.rhfx-ui .vip-badge-pill { background: #ff8a3d !important; color: #131d2b !important; box-shadow: none; border-radius: 4px; font-size: 9px; }
body.rhfx-ui .sidebar-nav { padding: 24px 14px; overflow-y: auto; }
.rx-nav-label { color: #8195b2; font: 500 9px var(--font-mono); letter-spacing: .16em; padding: 0 12px 14px; }
body.rhfx-ui .sidebar .nav-item { min-height: 46px; margin: 0 0 5px; padding: 11px 13px; border: 1px solid transparent; border-radius: 9px; color: #b9c7dc !important; font-size: 12px; font-weight: 500; gap: 12px; background: transparent !important; box-shadow: none !important; }
body.rhfx-ui .sidebar .nav-item svg { width: 18px; height: 18px; color: #93a7c4 !important; opacity: 1; }
body.rhfx-ui .sidebar .nav-item:hover { color: #fff !important; background: #1c2b42 !important; border-color: #344762 !important; transform: none; }
body.rhfx-ui .sidebar .nav-item.active { color: #ffac75 !important; background: #332a26 !important; border-color: #795039 !important; font-weight: 700; }
body.rhfx-ui .sidebar .nav-item.active svg { color: #ff954f !important; }
body.rhfx-ui .sidebar .nav-item.active::before { display: none; }
body.rhfx-ui .sidebar-footer { padding: 18px 14px; border-color: #29364c !important; }
body.rhfx-ui .sidebar-footer .nav-item { border-color: #354760 !important; background: #1c2a40 !important; color: #f5f7fc !important; }
.rx-sidebar-signature { padding: 16px 12px 0; color: #8295b2; font: 500 9px/1.8 var(--font-mono); letter-spacing: .08em; }
.rx-sidebar-signature b { display: block; color: #becce0; font-weight: 500; }
body.rhfx-ui .topbar { height: 88px; padding: 0 32px; background: var(--rx-bg) !important; border-bottom: 1px solid var(--rx-line) !important; box-shadow: none !important; backdrop-filter: blur(16px); justify-content: space-between; }
.rx-breadcrumb { display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--rx-muted); }
.rx-breadcrumb b { font-weight: 600; color: var(--rx-ink); }
.rx-breadcrumb span:first-child { font: 500 9px var(--font-mono); letter-spacing: .08em; }
body.rhfx-ui .btn-theme-toggle { min-height: 40px; padding: 8px 12px; background: var(--rx-panel) !important; color: var(--rx-ink) !important; border: 1px solid var(--rx-line) !important; border-radius: 9px; box-shadow: none !important; }
body.rhfx-ui .theme-toggle-label { font-size: 11px; }
body.rhfx-ui .user-profile { background: var(--rx-panel) !important; border: 1px solid var(--rx-line) !important; border-radius: 10px; padding: 7px 12px; }
body.rhfx-ui .user-name { color: var(--rx-ink) !important; font-size: 11px; }
body.rhfx-ui .user-status { color: var(--rx-muted) !important; font-size: 9px; }
body.rhfx-ui .avatar-img { width: 30px; height: 30px; border: 0; box-shadow: none; }
body.rhfx-ui .pages-wrapper { padding: 30px 32px 56px; width: 100%; max-width: 1700px; margin: 0 auto; }
body.rhfx-ui .page-section.active { animation: none; }
.rx-workspace-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin: 0 0 28px; }
.rx-workspace-heading h1 { font-size: clamp(27px,3vw,39px); font-weight: 600; letter-spacing: -.04em; margin: 10px 0 9px; }
.rx-workspace-heading p { font-size: 12px; color: var(--rx-muted); }
.rx-workspace-date { color: var(--rx-muted); font: 500 10px var(--font-mono); white-space: nowrap; padding-bottom: 5px; }
body.rhfx-ui .page-header { margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1px solid var(--rx-line); }
body.rhfx-ui .page-header h1 { font-size: clamp(27px,3vw,38px); color: var(--rx-ink); font-weight: 600; letter-spacing: -.035em; }
body.rhfx-ui .page-header p { color: var(--rx-muted); font-size: 13px; margin-top: 10px; }

/* Overview and signal telemetry */
body.rhfx-ui .home-intel-grid { grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); gap: 22px; align-items: start; }
body.rhfx-ui :is(.home-signal-card,.home-market-card,.home-brief-card) { padding: 23px !important; border-radius: 18px !important; background: var(--rx-panel) !important; border-color: var(--rx-line) !important; box-shadow: var(--rx-shadow) !important; }
body.rhfx-ui .home-signal-card { border-top: 3px solid #ff8a3d !important; }
body.rhfx-ui .home-market-card { border-top: 3px solid #5388ff !important; gap: 15px; }
body.rhfx-ui :is(.home-card-heading h3,.home-market-title) { color: var(--rx-ink) !important; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
body.rhfx-ui .heading-gold-accent { color: var(--rx-orange); font-size: 15px; text-shadow: none; }
body.rhfx-ui .home-market-subtitle { font-size: 11px; color: var(--rx-muted); }
body.rhfx-ui :is(.home-card-heading,.home-market-card-head) { margin-bottom: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--rx-line); }
body.rhfx-ui :is(.signal-card-modern,.signal-card-professional,.signal-hero,.signal-main) { background: var(--rx-field) !important; border-color: var(--rx-line) !important; box-shadow: none !important; border-radius: 13px !important; }
body.rhfx-ui .signal-pair-name { color: var(--rx-ink) !important; font-size: 27px; font-weight: 600; letter-spacing: -.035em; }
body.rhfx-ui :is(.signal-hero-live-strip,.signal-level-card,.signal-last-result) { background: var(--rx-field) !important; border-color: var(--rx-line) !important; box-shadow: none !important; border-radius: 10px; }
body.rhfx-ui .signal-level-entry { border-top: 2px solid var(--rx-orange) !important; }
body.rhfx-ui .signal-level-sl { border-top: 2px solid var(--rx-red) !important; }
body.rhfx-ui :is(.signal-level-tp1,.signal-level-tp2,.signal-level-tp3) { border-top: 2px solid var(--rx-green) !important; }
body.rhfx-ui :is(.level-price,.status-value) { color: var(--rx-ink) !important; text-shadow: none !important; }
body.rhfx-ui .level-price { font-size: 18px; }
body.rhfx-ui .signal-levels-targets .level-price { font-size: 17px; }
body.rhfx-ui .signal-level-card { padding: 13px 11px; min-width: 0; }
body.rhfx-ui .signal-level-card:hover { border-color: var(--rx-blue) !important; }
body.rhfx-ui .signal-be-banner { background: var(--rx-orange-soft) !important; border-color: var(--rx-orange) !important; color: var(--rx-ink) !important; box-shadow: none; }
body.rhfx-ui .signal-be-banner strong { color: var(--rx-orange) !important; }
body.rhfx-ui .signal-recap { gap: 6px; }
body.rhfx-ui .signal-recap > div { background: var(--rx-field) !important; border: 1px solid var(--rx-line) !important; box-shadow: none; border-radius: 9px; min-width: 0; padding: 12px 4px; }
body.rhfx-ui .signal-recap strong { color: var(--rx-ink); text-shadow: none !important; font-size: 14px; }
body.rhfx-ui .signal-recap small { color: var(--rx-muted) !important; font-size: 9px; letter-spacing: .02em; }
body.rhfx-ui .signal-recap-title { color: var(--rx-muted); font-size: 10px; margin-bottom: 3px; }
body.rhfx-ui .signal-recap-title::before { background: var(--rx-orange); box-shadow: none; }
body.rhfx-ui :is(.session-box,.session-telemetry-tile,.home-session-item,.home-world-clocks > div,.home-market-stats > div) { background: var(--rx-field) !important; border: 1px solid var(--rx-line) !important; border-radius: 10px; box-shadow: none !important; }
body.rhfx-ui .session-box { min-height: 86px; padding: 14px; }
body.rhfx-ui .session-city { color: var(--rx-ink) !important; font-size: 12px; }
body.rhfx-ui .session-time { color: var(--rx-muted); font-size: 10px; line-height: 1.6; }
body.rhfx-ui .session-active-box { border-color: var(--rx-green) !important; background: color-mix(in srgb,var(--rx-green) 7%,var(--rx-panel)) !important; }
body.rhfx-ui :is(.session-badge,.market-status-badge) { font-size: 9px; letter-spacing: .04em; border-radius: 5px; box-shadow: none; }
body.rhfx-ui :is(.badge-closed) { color: var(--rx-muted) !important; background: var(--rx-raised) !important; }
body.rhfx-ui .home-session-stats-grid strong { color: var(--rx-ink) !important; font-size: 12px; }
body.rhfx-ui .home-session-stats-grid small { font-size: 9px; color: var(--rx-muted); }
body.rhfx-ui .home-market-card .home-market-subtitle,
body.rhfx-ui #home-session-grid .session-time,
body.rhfx-ui .home-market-card .home-session-stats-grid small,
body.rhfx-ui .home-market-card .session-telemetry-tile small {
    color: var(--rx-muted-strong) !important;
    opacity: 1 !important;
}
body.rhfx-ui #home-session-grid .badge-closed { color: var(--rx-muted-strong) !important; }
body.rhfx-ui .home-countdown-bar { background: var(--rx-blue-soft) !important; color: var(--rx-blue) !important; border: 1px solid color-mix(in srgb,var(--rx-blue) 35%,transparent) !important; box-shadow: none !important; border-radius: 9px; font-size: 12px; }
body.rhfx-ui .home-session-insight-card { background: var(--rx-field) !important; border: 1px solid var(--rx-line) !important; border-left: 3px solid var(--rx-blue) !important; border-radius: 10px; box-shadow: none !important; }
body.rhfx-ui .home-session-tip-title { color: var(--rx-blue) !important; font-size: 12px; }
body.rhfx-ui .home-session-primetime { color: var(--rx-orange) !important; background: var(--rx-orange-soft) !important; font-size: 9px; }
body.rhfx-ui .home-session-tip { color: var(--rx-muted) !important; font-size: 12px; line-height: 1.8; }
body.rhfx-ui :is(.brief-direction-panel,.brief-market-panel,.brief-metrics > div) { background: var(--rx-field) !important; border-color: var(--rx-line) !important; box-shadow: none; }
body.rhfx-ui .brief-panel-bearish { border-left: 3px solid var(--rx-red) !important; }
body.rhfx-ui .brief-panel-bullish { border-left: 3px solid var(--rx-green) !important; }
body.rhfx-ui :is(.brief-current-price,.brief-metrics strong) { color: var(--rx-ink) !important; }
body.rhfx-ui .brief-direction-icon { animation: none; }
body.rhfx-ui .home-market-widgets { padding: 22px !important; background: var(--rx-panel) !important; border: 1px solid var(--rx-line) !important; border-radius: 18px !important; }
/* TradingView declares its own scheme; matching it preserves transparency. */
body.rhfx-ui iframe[src*="tradingview-widget.com"] { color-scheme: normal; }
body.rhfx-ui .sentiment-tf-bar { background: var(--rx-field) !important; border-color: var(--rx-line) !important; box-shadow: none !important; flex-wrap: wrap; border-radius: 10px; padding: 5px; }
body.rhfx-ui .sentiment-tf-bar button { color: var(--rx-muted) !important; border-radius: 6px; min-height: 34px; }
body.rhfx-ui .sentiment-tf-bar button.active { background: var(--rx-blue-soft) !important; color: var(--rx-blue) !important; box-shadow: none !important; }
body.rhfx-ui .sentiment-tf-bar-container { margin: 8px 0 12px !important; }
body.rhfx-ui .sentiment-tf-bar { gap: 6px !important; padding: 6px !important; }
body.rhfx-ui .sentiment-tf-bar button { min-height: 36px; padding: 0 13px !important; border: 1px solid transparent !important; font-size: 11px !important; font-weight: 700 !important; letter-spacing: .01em; transition: color .16s ease, background .16s ease, border-color .16s ease; }
body.rhfx-ui .sentiment-tf-bar button:hover { color: var(--rx-ink) !important; background: var(--rx-panel) !important; border-color: var(--rx-line) !important; }
body.rhfx-ui .sentiment-tf-bar button.active { border-color: color-mix(in srgb, var(--rx-blue) 28%, transparent) !important; }
body.rhfx-ui #home-xau-brief .brief-btc-icon { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; border-radius: 50%; background: #f7931a !important; color: #fff !important; font: 800 12px/1 Arial, sans-serif !important; }

/* Tools, education, library, news and journal */
.rx-section-intro { margin-bottom: 26px; }
.rx-section-intro h1 { color: var(--rx-ink); font: 600 clamp(28px,3vw,38px)/1.15 var(--font-display) !important; letter-spacing: -.035em; margin: 11px 0; }
.rx-section-intro p { color: var(--rx-muted); font-size: 13px; max-width: 620px; }
body.rhfx-ui #edu-class-list:not([style*="display: none"]):not([style*="display:none"]) { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px !important; }
body.rhfx-ui #edu-class-list .card { flex-direction: column !important; text-align: left !important; align-items: flex-start !important; gap: 24px !important; padding: 28px !important; }
body.rhfx-ui #edu-class-list .card > div:first-child { width: 54px !important; height: 54px !important; border-radius: 12px !important; box-shadow: none !important; background: var(--rx-blue-soft) !important; }
body.rhfx-ui #edu-class-list .card > div:first-child svg { width: 27px; height: 27px; stroke: var(--rx-blue); }
body.rhfx-ui #edu-class-list .card > div:last-child { display: flex; flex-direction: column; flex: 1; width: 100%; }
body.rhfx-ui #edu-class-list .card h2 { font-size: 26px !important; font-weight: 600; }
body.rhfx-ui #edu-class-list .card p { color: var(--rx-muted) !important; font-size: 13px; line-height: 1.85 !important; margin-bottom: 25px !important; flex: 1; }
body.rhfx-ui #edu-class-list .card button { background: var(--rx-blue-soft) !important; border-color: var(--rx-blue) !important; color: var(--rx-blue) !important; text-align: left; padding: 12px 16px !important; }
body.rhfx-ui #edu-class-list .card button::after { content: '↗'; float: right; font-size: 18px; }
body.rhfx-ui #trading-tool-selector { background: var(--rx-panel) !important; border: 1px solid var(--rx-line) !important; padding: 32px !important; border-radius: 18px !important; box-shadow: var(--rx-shadow) !important; margin-top: 0 !important; }
body.rhfx-ui #trading-tool-selector > div[style*="radial-gradient"] { display: none; }
body.rhfx-ui .tool-selector-grid { gap: 16px !important; }
body.rhfx-ui .tool-selector-card { padding: 24px !important; text-align: left; transform: none !important; transition: border-color .2s,background .2s !important; }
body.rhfx-ui .tool-selector-card:hover { border-color: var(--rx-orange) !important; background: var(--rx-raised) !important; }
body.rhfx-ui .tool-selector-card > div:nth-child(2) { color: var(--rx-ink) !important; }
body.rhfx-ui .tool-selector-card > div:last-child { color: var(--rx-muted); }
body.rhfx-ui :is(.resource-card-icon,.support-card-icon,.section-icon) { background: var(--rx-blue-soft) !important; color: var(--rx-blue) !important; border: 0 !important; box-shadow: none !important; border-radius: 12px; }
body.rhfx-ui :is(#edu-class-list,.edu-modules-grid) .card { border-top: 3px solid var(--rx-blue) !important; }
body.rhfx-ui :is(.edu-module-title,.module-content h1,.module-content h2,.module-content h3) { color: var(--rx-ink) !important; }
body.rhfx-ui .module-content { color: var(--rx-muted); line-height: 1.85; }
body.rhfx-ui .module-content img { max-width: 100%; height: auto; border-radius: 10px; }
body.rhfx-ui :is(.news-filter-dashboard-bar,.calendar-filter-bar,.journal-filter-bar) { background: var(--rx-panel) !important; border-color: var(--rx-line) !important; border-radius: 12px; flex-wrap: wrap; gap: 10px; }
body.rhfx-ui :is(.news-card,.news-item,.news-list-item) { background: var(--rx-panel) !important; border-color: var(--rx-line) !important; box-shadow: var(--rx-shadow) !important; border-radius: 12px; }
body.rhfx-ui :is(.news-title,.news-card h3,.news-item h3) { color: var(--rx-ink) !important; }
body.rhfx-ui .journal-form-card h3 { font-size: 23px; margin-bottom: 22px; }
body.rhfx-ui .journal-table { min-width: 560px; }
body.rhfx-ui .journal-container { display: flex; flex-direction: column; gap: 18px !important; }
body.rhfx-ui .journal-entry-card,
body.rhfx-ui .journal-history-card { padding: 22px !important; border: 1px solid var(--rx-line) !important; border-radius: 16px !important; background: var(--rx-panel) !important; box-shadow: var(--rx-shadow) !important; }
body.rhfx-ui .journal-card-heading,
body.rhfx-ui .journal-history-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:20px; }
body.rhfx-ui .journal-card-heading h3,
body.rhfx-ui .journal-history-heading h3 { margin:5px 0 4px; color:var(--rx-ink); font-size:20px; font-weight:650; }
body.rhfx-ui .journal-card-heading p,
body.rhfx-ui .journal-history-heading p { margin:0; color:var(--rx-muted); font-size:12px; }
body.rhfx-ui .journal-eyebrow { color:var(--rx-orange); font:600 9px var(--font-mono); letter-spacing:.14em; }
body.rhfx-ui .journal-form-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
body.rhfx-ui .journal-form-grid .form-group { min-width:0; margin:0; }
body.rhfx-ui .journal-form-grid .journal-note-field { grid-column:span 2; }
body.rhfx-ui .journal-form-grid label { display:flex; gap:6px; align-items:center; margin-bottom:7px; color:var(--rx-ink); font-size:11px; font-weight:600; }
body.rhfx-ui .journal-form-grid label span { color:var(--rx-muted); font-size:10px; font-weight:400; }
body.rhfx-ui .journal-form-grid :is(input,select) { box-sizing:border-box; width:100%; min-height:42px; padding:9px 11px; border:1px solid var(--rx-line); border-radius:9px; background:var(--rx-raised); color:var(--rx-ink); font-size:12px; }
body.rhfx-ui .journal-form-grid :is(input,select):focus { outline:2px solid color-mix(in srgb,var(--rx-blue) 28%,transparent); border-color:var(--rx-blue); }
body.rhfx-ui .journal-form-footer { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-top:17px; padding-top:15px; border-top:1px solid var(--rx-line); }
body.rhfx-ui .journal-form-footer > span { color:var(--rx-muted); font-size:11px; }
body.rhfx-ui .journal-form-footer .btn-primary { width:auto; min-height:40px; padding:9px 17px; border-radius:9px; }
body.rhfx-ui .journal-summary-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
body.rhfx-ui .journal-summary-card { display:flex; flex-direction:column; gap:5px; padding:16px 18px; border:1px solid var(--rx-line); border-radius:13px; background:var(--rx-panel); }
body.rhfx-ui .journal-summary-card > span { color:var(--rx-muted); font-size:11px; }
body.rhfx-ui .journal-summary-card > strong { color:var(--rx-ink); font-size:23px; font-weight:700; font-variant-numeric:tabular-nums; }
body.rhfx-ui .journal-summary-card > strong.is-positive { color:var(--rx-green); }
body.rhfx-ui .journal-summary-card > strong.is-negative { color:var(--rx-red); }
body.rhfx-ui .journal-summary-card > small { color:var(--rx-muted); font-size:10px; }
body.rhfx-ui .journal-history-heading { align-items:stretch; flex-direction:column; gap:15px; margin-bottom:20px; }
body.rhfx-ui .journal-history-actions { display:flex; align-items:center; justify-content:flex-start; flex-wrap:wrap; gap:11px; width:100%; padding-top:16px; border-top:1px solid var(--rx-line); }
body.rhfx-ui .journal-history-actions :is(input,select) { box-sizing:border-box; min-height:44px; padding:10px 13px; border:1px solid var(--rx-line); border-radius:11px; background:var(--rx-raised); color:var(--rx-ink); font-size:12px; transition:border-color .18s,box-shadow .18s,background .18s; }
body.rhfx-ui .journal-history-actions :is(input,select):focus { outline:0; border-color:var(--rx-blue); box-shadow:0 0 0 3px color-mix(in srgb,var(--rx-blue) 14%,transparent); }
body.rhfx-ui .journal-history-actions .journal-search { flex:1 1 260px; min-width:220px; max-width:420px; }
body.rhfx-ui .journal-history-actions .journal-search input { width:100%; }
body.rhfx-ui .journal-history-actions select { min-width:145px; }
body.rhfx-ui .journal-history-actions .btn-primary { display:flex; align-items:center; justify-content:center; gap:8px; width:auto; min-height:44px; padding:10px 17px; border:1px solid color-mix(in srgb,var(--rx-orange) 78%,#fff); border-radius:11px; background:linear-gradient(135deg,color-mix(in srgb,var(--rx-orange) 86%,#fff),var(--rx-orange)); color:#172033; box-shadow:0 5px 14px color-mix(in srgb,var(--rx-orange) 20%,transparent); font-size:12px; font-weight:700; transition:transform .18s,box-shadow .18s,filter .18s; }
body.rhfx-ui .journal-history-actions .btn-primary:hover { transform:translateY(-1px); box-shadow:0 8px 18px color-mix(in srgb,var(--rx-orange) 28%,transparent); filter:saturate(1.05); }
body.rhfx-ui .journal-history-actions .journal-clear-all { min-height:44px; padding:10px 16px; border:1px solid var(--rx-line); border-radius:11px; background:transparent; color:var(--rx-muted); font-size:12px; font-weight:600; transition:border-color .18s,color .18s,background .18s; }
body.rhfx-ui .journal-history-actions .journal-clear-all:hover { border-color:color-mix(in srgb,var(--rx-red) 48%,var(--rx-line)); background:color-mix(in srgb,var(--rx-red) 8%,transparent); color:var(--rx-red); }
body.rhfx-ui .journal-history-list { display:flex; flex-direction:column; gap:9px; }
body.rhfx-ui .journal-history-item { display:grid; grid-template-columns:minmax(130px,.8fr) minmax(220px,1fr) minmax(180px,1.2fr); align-items:center; gap:14px; padding:13px 15px; border:1px solid var(--rx-line); border-radius:12px; background:var(--rx-raised); transition:border-color .18s,transform .18s; }
body.rhfx-ui .journal-history-item:hover { border-color:var(--rx-blue); transform:translateY(-1px); }
body.rhfx-ui .journal-history-top { display:flex; flex-direction:column; gap:4px; min-width:0; }
body.rhfx-ui .journal-instrument { color:var(--rx-ink); font-size:13px; }
body.rhfx-ui :is(.journal-trade-date,.journal-trade-note) { color:var(--rx-muted); font-size:10px; }
body.rhfx-ui .journal-history-details { display:flex; align-items:center; gap:12px; }
body.rhfx-ui .journal-direction { padding:4px 7px; border-radius:6px; font-size:9px; font-weight:700; }
body.rhfx-ui .journal-direction.is-buy { background:color-mix(in srgb,var(--rx-green) 12%,transparent); color:var(--rx-green); }
body.rhfx-ui .journal-direction.is-sell { background:color-mix(in srgb,var(--rx-red) 12%,transparent); color:var(--rx-red); }
body.rhfx-ui .journal-lot { color:var(--rx-muted); font-size:11px; }
body.rhfx-ui .journal-result { margin-left:auto; font-size:13px; font-variant-numeric:tabular-nums; }
body.rhfx-ui .journal-result.is-positive { color:var(--rx-green); }
body.rhfx-ui .journal-result.is-negative { color:var(--rx-red); }
body.rhfx-ui .journal-result.is-flat { color:var(--rx-muted); }
body.rhfx-ui .journal-history-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:0; }
body.rhfx-ui .journal-trade-note { overflow:hidden; margin:0; text-overflow:ellipsis; white-space:nowrap; }
body.rhfx-ui .journal-delete { box-sizing:border-box; display:inline-flex; flex:none; align-items:center; justify-content:center; gap:7px; width:auto; min-width:84px; height:auto; min-height:36px; padding:7px 11px; border:1px solid color-mix(in srgb,var(--rx-red) 34%,var(--rx-line)); border-radius:10px; background:color-mix(in srgb,var(--rx-red) 8%,var(--rx-panel)); color:var(--rx-red); font-size:11px; font-weight:650; white-space:nowrap; transition:transform .18s,border-color .18s,color .18s,background .18s,box-shadow .18s; }
body.rhfx-ui .journal-delete svg { width:14px; height:14px; flex:none; }
body.rhfx-ui .journal-delete:hover { transform:translateY(-1px); border-color:var(--rx-red); background:var(--rx-red); color:#fff; box-shadow:0 4px 12px color-mix(in srgb,var(--rx-red) 22%,transparent); }
body.rhfx-ui .journal-delete:focus-visible { outline:2px solid color-mix(in srgb,var(--rx-red) 45%,transparent); outline-offset:2px; }
body.rhfx-ui .journal-history-empty { padding:30px 18px; border:1px dashed var(--rx-line); border-radius:11px; color:var(--rx-muted); text-align:center; font-size:12px; }
body.rhfx-ui #menu-support .card { text-align: left !important; padding: 30px !important; border-top-color: var(--rx-green) !important; }
body.rhfx-ui #menu-support .support-card-icon { margin-left: 0; }
body.rhfx-ui #menu-support .card p { line-height: 1.85; font-size: 13px; }
body.rhfx-ui #menu-resources .card { border-top: 3px solid var(--rx-blue) !important; }
body.rhfx-ui :is(.rhfx-engine-tier1-bar,.rhfx-engine-actions-group,.rhfx-pair-btn-group,.rhfx-zoom-btn-group) { border-color: var(--rx-line) !important; }

/* Admin shares the same palette and forms; accordion behavior is untouched. */
[data-rhfx-page="admin"] .admin-container { width: min(1180px,calc(100% - 80px)); max-width: 1180px; margin: 42px auto 60px; padding: 0; background: transparent; border: 0; backdrop-filter: none; }
[data-rhfx-page="admin"] .admin-header { text-align: left; padding-bottom: 26px; margin-bottom: 26px; border-bottom: 1px solid var(--rx-line); }
[data-rhfx-page="admin"] .admin-header::before { content: 'RHFX / ADMINISTRATION'; display: block; color: var(--rx-orange); font: 600 10px var(--font-mono); letter-spacing: .14em; margin-bottom: 14px; }
[data-rhfx-page="admin"] .admin-header h1 { color: var(--rx-ink); font-size: 42px; font-weight: 600; letter-spacing: -.035em; }
[data-rhfx-page="admin"] .admin-header p { font-size: 13px; margin-top: 12px; }
[data-rhfx-page="admin"] .admin-section { border-left: 3px solid var(--rx-orange) !important; margin-bottom: 18px; }
[data-rhfx-page="admin"] .admin-section-header { background: var(--rx-panel); padding: 22px 24px; }
[data-rhfx-page="admin"] .admin-section-header:hover { background: var(--rx-raised); }
[data-rhfx-page="admin"] .admin-section-header h2 { color: var(--rx-ink) !important; font-size: 19px; }
[data-rhfx-page="admin"] .admin-section-body { border-color: var(--rx-line); }
[data-rhfx-page="admin"] .control-grid { gap: 18px; }
[data-rhfx-page="admin"] .switch-row { background: var(--rx-field) !important; color: var(--rx-ink) !important; border-color: var(--rx-line) !important; padding: 12px; border-radius: 8px; min-height: 45px; }
[data-rhfx-page="admin"] #login-overlay { background: var(--rx-bg); padding: 24px; }
[data-rhfx-page="admin"] .login-box { width: min(420px,100%); padding: 36px; border-top: 3px solid #ff8a3d !important; }
[data-rhfx-page="admin"] .login-box h2 { color: var(--rx-ink) !important; font-size: 30px; }
[data-rhfx-page="admin"] .login-box button { background: #ff8a3d !important; color: #171e2c !important; min-height: 48px; }
[data-rhfx-page="admin"] button { cursor: pointer; }
[data-rhfx-page="admin"] .admin-container > .btn-save { margin-top: 16px; }

/* Semantic state colors are deliberately stronger in light mode. */
body.rhfx-ui .active-signal-card {
    background: var(--rx-panel) !important; border: 0 !important;
    padding: 0 !important; box-shadow: none !important; border-radius: 0 !important;
}
body.rhfx-ui .active-signal-card::before { display: none; }
body.rhfx-ui .active-signal-head { margin-bottom: 16px; }
body.rhfx-ui .active-signal-live-price { color: var(--rx-ink) !important; font-size: 26px !important; font-weight: 600; }
body.rhfx-ui :is(.label-entry,.badge-be-pill) { color: var(--rx-orange) !important; }
body.rhfx-ui :is(.label-sl,.pips-red) { color: var(--rx-red) !important; }
body.rhfx-ui :is(.label-tp,.pips-green,.pips-positive .pips-badge-label,.pips-positive .active-signal-live-pips) { color: var(--rx-green) !important; }
body.rhfx-ui :is(.pips-negative .pips-badge-label,.pips-negative .active-signal-live-pips) { color: var(--rx-red) !important; }
body.rhfx-ui :is(.live-indicator-tag,.level-subtext,.status-title,.be-banner-text small,.copy-tap-hint) { color: var(--rx-muted) !important; }
body.rhfx-ui .badge-be-pill { background: var(--rx-orange-soft) !important; border-color: var(--rx-orange) !important; border-radius: 5px; font-size: 9px; }
body.rhfx-ui .badge-direction { border-radius: 5px; padding: 6px 12px; font-size: 10px; box-shadow: none !important; }
body.rhfx-ui .badge-direction.signal-sell { background: #d72c50 !important; color: white !important; }
body.rhfx-ui .badge-direction.signal-buy { background: #087c55 !important; color: white !important; }
body.rhfx-ui .active-signal-pips-container { box-shadow: none !important; border-color: var(--rx-line) !important; }
body.rhfx-ui .btn-copy-broadcast-modern { background: var(--rx-blue-soft) !important; color: var(--rx-blue) !important; border: 1px solid var(--rx-blue) !important; box-shadow: none !important; min-height: 44px; border-radius: 8px; font-size: 12px; }
body.rhfx-ui #home-session-tip { color: var(--rx-muted) !important; font-size: 12px !important; line-height: 1.8 !important; }
body.rhfx-ui #home-session-tip strong { color: var(--rx-ink) !important; }
body.rhfx-ui #home-session-tip-title { color: var(--rx-blue) !important; }
body.rhfx-ui #home-session-primetime { color: var(--rx-orange) !important; background: var(--rx-orange-soft) !important; border-color: var(--rx-line) !important; }
body.rhfx-ui #home-session-countdown { box-shadow: none !important; color: var(--rx-blue) !important; background: var(--rx-blue-soft) !important; border-color: var(--rx-line) !important; }
body.rhfx-ui #home-market-status-badge { color: var(--rx-green) !important; background: color-mix(in srgb,var(--rx-green) 9%,var(--rx-panel)) !important; border-color: var(--rx-green) !important; box-shadow: none !important; }
body.rhfx-ui .session-badge.badge-open { color: var(--rx-green) !important; background: color-mix(in srgb,var(--rx-green) 10%,var(--rx-panel)) !important; box-shadow: none !important; }
body.rhfx-ui .home-signal-card .signal-recap .recap-tp strong,
body.rhfx-ui .home-signal-card .signal-recap .pips-positive strong { color: var(--rx-green) !important; }
body.rhfx-ui .home-signal-card .signal-recap .recap-sl strong,
body.rhfx-ui .home-signal-card .signal-recap .pips-negative strong { color: var(--rx-red) !important; }
body.rhfx-ui .home-signal-card .signal-recap .recap-rate strong { color: var(--rx-orange) !important; }

/* Give mobile page titles a consistent inset from the content edge. */
@media (max-width: 768px) {
    body.rhfx-ui .pages-wrapper .page-section > :is(.page-header, .rx-section-intro) {
        padding-left: 8px !important;
        padding-right: 8px !important;
        box-sizing: border-box;
    }

    body.rhfx-ui .pages-wrapper .page-section > .page-header h1 {
        padding: 0 !important;
    }
}

/* Tablet and mobile: preserve functional visibility rules and drawer state. */
@media (min-width: 1201px) {
    body.rhfx-ui #menu-overview.active { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); gap: 22px; align-items: start; }
    body.rhfx-ui #menu-overview > .home-intel-grid { display: contents; }
    body.rhfx-ui #home-signal-card { grid-column: 1; grid-row: 1; }
    body.rhfx-ui #home-market-card { grid-column: 2; grid-row: 1; }
    body.rhfx-ui #menu-overview > .home-trading-detail-grid { grid-column: 1 / -1; grid-row: 2; margin-top: 0 !important; }
    body.rhfx-ui #menu-overview > .home-market-widgets { grid-column: 1 / -1; margin-top: 0 !important; }
    body.rhfx-ui #menu-overview .brief-widget-grid { grid-template-columns: minmax(230px,.72fr) minmax(0,1.28fr); }
}
@media (max-width: 1200px) {
    body.rhfx-ui { --sidebar-width: 224px; }
    body.rhfx-ui .pages-wrapper { padding: 26px 24px 48px; }
    body.rhfx-ui .topbar { padding: 0 24px; }
    .rx-workspace-heading { align-items: start; flex-direction: column; gap: 10px; }
    body.rhfx-ui :is(.home-signal-card,.home-market-card) { padding: 18px !important; }
    [data-rhfx-page="portal"] > .container { gap: 44px; }
    body.rhfx-ui .home-session-insight-head { flex-wrap: wrap; gap: 8px; }
}
@media (min-width: 769px) and (max-width: 1050px) {
    body.rhfx-ui .home-intel-grid { grid-template-columns: 1fr; }
    body.rhfx-ui .home-session-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
    body.rhfx-ui .session-box { display: flex; flex-direction: column; align-items: start; gap: 10px; }
    body.rhfx-ui .tool-selector-grid { grid-template-columns: 1fr !important; }
    .rx-breadcrumb span:first-child, .rx-breadcrumb span:nth-child(2) { display: none; }
}
@media (max-width: 900px) {
    [data-rhfx-page="portal"] > .container { gap: 30px; width: calc(100% - 48px); grid-template-columns: minmax(0,1fr) minmax(320px,1fr); }
    .rx-portal-title { font-size: 44px !important; }
    [data-rhfx-page="portal"] .glass-card { padding: 24px; }
    .rx-sitebar { width: calc(100% - 48px); }
    .rx-sitebar-note { display: none; }
}
@media (max-width: 768px) {
    body.rhfx-ui .sidebar { width: min(290px,85vw); height: 100dvh; z-index: 1001; }
    body.rhfx-ui .sidebar-backdrop { z-index: 1000; }
    body.rhfx-ui .sidebar-header { height: 76px; }
    body.rhfx-ui .sidebar-close-btn { color: #c7d4e8 !important; }
    body.rhfx-ui .sidebar .nav-item { min-height: 48px; font-size: 13px; }
    body.rhfx-ui .main-content { margin-left: 0; width: 100%; }
    body.rhfx-ui .topbar { height: 70px; padding: 0 16px; gap: 10px; }
    body.rhfx-ui .topbar-left { gap: 9px; min-width: 0; }
    body.rhfx-ui .topbar-right { gap: 8px; }
    body.rhfx-ui .btn-icon { color: var(--rx-ink) !important; min-width: 40px; min-height: 40px; background: var(--rx-panel) !important; border: 1px solid var(--rx-line) !important; border-radius: 9px; }
    body.rhfx-ui .mobile-brand-title { color: var(--rx-ink) !important; font-size: 15px; }
    body.rhfx-ui .mobile-brand img { display: none; }
    body.rhfx-ui .mobile-brand .vip-badge-pill { display: none; }
    .rx-breadcrumb { display: none; }
    body.rhfx-ui .btn-theme-toggle { display: inline-flex !important; width: 40px; min-width: 40px; height: 40px; padding: 0; justify-content: center; }
    body.rhfx-ui .theme-toggle-label { display: none; }
    body.rhfx-ui .user-profile { width: 40px; height: 40px; justify-content: center; padding: 5px; }
    body.rhfx-ui .user-profile :is(.user-info,.profile-dropdown-arrow) { display: none; }
    body.rhfx-ui .user-profile-dropdown { position: fixed; top: 76px; right: 12px; width: min(310px,calc(100vw - 24px)); }
    body.rhfx-ui .pages-wrapper { padding: 24px 16px 40px; }
    .rx-workspace-heading { margin-bottom: 23px; gap: 13px; }
    .rx-workspace-heading h1 { font-size: 32px; margin: 10px 0 8px; }
    .rx-workspace-heading p { font-size: 12px; max-width: 310px; }
    .rx-eyebrow { font-size: 9px; }
    .rx-workspace-date { font-size: 9px; }
    body.rhfx-ui .home-intel-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
    body.rhfx-ui :is(.card,.calc-card,.home-signal-card,.home-market-card,.home-brief-card) { padding: 18px !important; border-radius: 14px !important; }
    body.rhfx-ui :is(.home-card-heading h3,.home-market-title) { font-size: 18px; }
    body.rhfx-ui #home-session-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 9px; }
    body.rhfx-ui .session-box { padding: 12px; min-width: 0; flex-wrap: wrap; gap: 9px; }
    body.rhfx-ui .session-box > div { min-width: 0; }
    body.rhfx-ui .session-city { white-space: normal; overflow-wrap: break-word; }
    body.rhfx-ui .session-time { white-space: normal; }
    body.rhfx-ui .home-session-stats-grid { gap: 6px; }
    body.rhfx-ui .home-session-stats-grid strong { font-size: 11px; }
    body.rhfx-ui .home-session-stats-grid small { font-size: 8px; }
    body.rhfx-ui .signal-level-card { padding: 12px 10px; }
    body.rhfx-ui .signal-levels-targets .level-price { font-size: clamp(14px,4.1vw,18px); }
    body.rhfx-ui .signal-recap { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
    body.rhfx-ui .signal-recap strong { font-size: 14px; }
    body.rhfx-ui .signal-recap small { font-size: 9px; }
    body.rhfx-ui .signal-recap > div { min-height: 64px; padding: 9px 5px; }
    body.rhfx-ui .signal-recap .recap-rate { grid-column: auto; }
    body.rhfx-ui .signal-recap > div:last-child { grid-column: span 2; }
    body.rhfx-ui .brief-widget-grid { grid-template-columns: minmax(0,1fr); }
    body.rhfx-ui :is(.grid-2-col,.grid-3-col,.journal-container,.tool-selector-grid,.calc-primary-grid,.calc-advanced-grid) { grid-template-columns: minmax(0,1fr) !important; }
    body.rhfx-ui .layer-item { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; }
    body.rhfx-ui .layer-item input { min-width: 0; width: 100% !important; }
    body.rhfx-ui #edu-class-list { grid-template-columns: minmax(0,1fr) !important; }
    body.rhfx-ui #edu-class-list .card { padding: 24px !important; }
    .rx-section-intro h1 { font-size: 30px !important; }
    body.rhfx-ui :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) { font-size: 16px !important; }
    body.rhfx-ui .page-header { padding-bottom: 20px; }
    body.rhfx-ui .page-header h1 { font-size: 30px; }
    body.rhfx-ui #trading-tool-selector { padding: 22px 16px !important; }
    body.rhfx-ui .tool-selector-card { padding: 22px !important; }
    body.rhfx-ui :is(.module-content,.education-content) { overflow-wrap: anywhere; }
    body.rhfx-ui .module-content :is(table,pre) { display: block; overflow-x: auto; max-width: 100%; }
    .rx-sitebar { width: calc(100% - 32px); margin-top: 18px; }
    .rx-wordmark { font-size: 18px; gap: 9px; }
    .rx-wordmark img { width: 34px; height: 34px; }
    .rx-wordmark small { font-size: 8px; }
    .rx-theme { width: 40px; min-width: 40px; padding: 9px; }
    .rx-theme span { display: none; }
    [data-rhfx-page="portal"] > .container { display: flex; flex-direction: column; align-items: stretch; width: calc(100% - 32px); margin: 42px auto 30px; gap: 30px; }
    .rx-portal-title { font-size: clamp(34px,8.4vw,48px) !important; line-height: 1 !important; margin-bottom: 10px; }
    .rx-portal-description { font-size: 13px; line-height: 1.6; max-width: 440px; }
    .rx-portal-features { display: none; }
    .rx-portal-bottom { margin-top: 20px; font-size: 8px; }
    [data-rhfx-page="portal"] .glass-card { padding: 25px 22px; }
    .rx-form-intro h2 { font-size: 27px; }
    [data-rhfx-page="portal"] .join-cards-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
    [data-rhfx-page="portal"] .join-action-card { min-height: 64px; gap: 8px; padding: 10px 8px; }
    [data-rhfx-page="portal"] .card-icon-wrap { width: 28px; min-width: 28px; height: 28px; }
    [data-rhfx-page="portal"] .card-headline { font-size: 11px; }
    [data-rhfx-page="portal"] .card-subtext { font-size: 9px; }
    [data-rhfx-page="admin"] .admin-container { width: calc(100% - 32px); margin: 30px auto; }
    [data-rhfx-page="admin"] .admin-header h1 { font-size: 34px; }
    [data-rhfx-page="admin"] .admin-section-header { padding: 18px 16px; }
    [data-rhfx-page="admin"] .admin-section-header h2 { font-size: 17px; }
    [data-rhfx-page="admin"] .admin-section-body { padding: 18px 16px; }
    [data-rhfx-page="admin"] .control-grid { grid-template-columns: minmax(0,1fr) !important; }
    [data-rhfx-page="admin"] .login-box { padding: 28px 22px; }
}
@media (prefers-reduced-motion: reduce) {
    body.rhfx-ui *, body.rhfx-ui *::before, body.rhfx-ui *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Finishing pass from the responsive dashboard review. */
body.rhfx-ui .heading-gold-accent { width: 7px; height: 7px; flex: 0 0 7px; display: inline-block; margin-right: 7px; border-radius: 50%; background: var(--rx-orange); font-size: 0; box-shadow: 0 0 0 4px var(--rx-orange-soft); }
body.rhfx-ui .brief-direction-panel { isolation: isolate; }
body.rhfx-ui .brief-market-visual { display: none !important; }
body.rhfx-ui #home-xau-brief .brief-pair-tabs { background: var(--rx-raised) !important; border: 1px solid var(--rx-line) !important; padding: 4px !important; gap: 5px !important; }
body.rhfx-ui #home-xau-brief .btn-brief-tab { min-width: 0; color: var(--rx-muted) !important; background: transparent !important; border: 1px solid transparent !important; box-shadow: none !important; }
body.rhfx-ui #home-xau-brief .btn-brief-tab:hover { color: var(--rx-ink) !important; background: var(--rx-panel) !important; border-color: var(--rx-line) !important; }
body.rhfx-ui #home-xau-brief .btn-brief-tab.active { color: #fff !important; background: #a84612 !important; border-color: #a84612 !important; box-shadow: 0 3px 9px #a8461230 !important; }
html[data-theme="light"] body.rhfx-ui #home-xau-brief .btn-brief-tab.active { color: #fff !important; background: #b9470b !important; border-color: #b9470b !important; }
body.rhfx-ui #home-xau-brief .btn-brief-tab.active span { color: inherit !important; }

@media (max-width: 768px) {
    body.rhfx-ui .topbar { padding-inline: 12px; gap: 8px; }
    body.rhfx-ui .topbar-left { flex: 1 1 auto; min-width: 0; overflow: visible; }
    body.rhfx-ui .mobile-brand { display: flex !important; align-items: center; flex: 0 0 auto; gap: 0; width: max-content; min-width: max-content; max-width: none; overflow: visible; padding: 0; border: 0; border-radius: 0; background: transparent !important; box-shadow: none !important; }
    body.rhfx-ui .mobile-brand img, body.rhfx-ui .mobile-brand-sub, body.rhfx-ui .mobile-brand-info { display: none !important; }
    body.rhfx-ui .mobile-brand-title { display: flex; align-items: center; gap: 6px; color: var(--rx-ink) !important; font-size: 15px; font-weight: 750; white-space: nowrap; }
    body.rhfx-ui .mobile-brand .vip-badge-pill { display: inline-flex !important; align-items: center; padding: 2px 5px; border-radius: 4px; background: #ff8a3d !important; color: #21140d !important; font-size: 8px; line-height: 1.2; }
    body.rhfx-ui .user-profile { width: 44px; min-width: 44px; height: 44px; min-height: 44px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; padding: 5px; overflow: hidden; border-radius: 50% !important; }
    body.rhfx-ui .avatar-img { display: block; width: 32px !important; height: 32px !important; min-width: 32px; flex: 0 0 32px; box-sizing: border-box; object-fit: contain; border-radius: 50%; padding: 0; background: #fff; border: 0 !important; outline: none !important; outline-offset: 0 !important; box-shadow: none !important; }
    body.rhfx-ui #home-signal-card .home-card-heading h3 { line-height: 1.35; }
}
@media (max-width: 380px) {
    body.rhfx-ui .topbar { padding-inline: 9px; gap: 6px; }
    body.rhfx-ui .topbar-left { gap: 7px; }
    body.rhfx-ui .mobile-brand-title { font-size: 13px; gap: 4px; }
    body.rhfx-ui .btn-theme-toggle { width: 38px; min-width: 38px; }
    body.rhfx-ui .user-profile { width: 42px; min-width: 42px; height: 42px; min-height: 42px; }
}

body.rhfx-ui #menu-overview .sentiment-wrapper { height: 900px !important; min-height: 900px !important; overflow: hidden; border-radius: 12px; background: var(--rx-panel); }
body.rhfx-ui #menu-overview .sentiment-wrapper .tradingview-widget-container { height: 900px !important; min-height: 900px !important; margin: 0 !important; }
body.rhfx-ui #menu-overview .sentiment-wrapper iframe { height: 900px !important; min-height: 900px !important; }
body.rhfx-ui #menu-overview .sentiment-wrapper::after { display: none !important; }
@media (min-width: 1201px) {
    body.rhfx-ui #menu-overview .sentiment-wrapper,
    body.rhfx-ui #menu-overview .sentiment-wrapper .tradingview-widget-container,
    body.rhfx-ui #menu-overview .sentiment-wrapper iframe { height: 390px !important; min-height: 390px !important; }
}
@media (min-width: 361px) and (max-width: 420px) {
    body.rhfx-ui #menu-overview .sentiment-wrapper { height: 846px !important; min-height: 846px !important; position: relative; }
    body.rhfx-ui #menu-overview .sentiment-wrapper .tradingview-widget-container { width: 300px !important; height: 900px !important; min-height: 900px !important; transform: scale(.94); transform-origin: top left; }
    body.rhfx-ui #menu-overview .sentiment-wrapper iframe { width: 300px !important; height: 900px !important; min-height: 900px !important; max-width: none !important; }
}
@media (max-width: 360px) {
    body.rhfx-ui #menu-overview .sentiment-wrapper { height: 630px !important; min-height: 630px !important; position: relative; }
    body.rhfx-ui #menu-overview .sentiment-wrapper .tradingview-widget-container { width: 300px !important; height: 900px !important; min-height: 900px !important; transform: scale(.7); transform-origin: top left; }
    body.rhfx-ui #menu-overview .sentiment-wrapper iframe { width: 300px !important; height: 900px !important; min-height: 900px !important; max-width: none !important; }
}

/* Page titles share one editorial hierarchy across every workspace menu. */
body.rhfx-ui .page-header h1[id^="heading-menu-"]::before {
    display: block;
    margin-bottom: 9px;
    color: var(--rx-orange);
    font: 700 9px/1.3 var(--font-mono);
    letter-spacing: .14em;
}
body.rhfx-ui #heading-menu-mt5-analysis::before { content: "GRAFIK & INDIKATOR"; }
body.rhfx-ui #heading-menu-journal::before { content: "JURNAL TRADING"; }
body.rhfx-ui #heading-menu-news::before { content: "BERITA & RISET PASAR"; }
body.rhfx-ui #heading-menu-calendar::before { content: "AGENDA EKONOMI"; }
body.rhfx-ui #heading-menu-resources::before { content: "MATERI MEMBER"; }
body.rhfx-ui #heading-menu-support::before { content: "LAYANAN MEMBER"; }
body.rhfx-ui :is(#menu-trading-tools,#menu-education,#menu-xauusd-engine) > .rx-section-intro {
    padding-bottom: 22px;
    border-bottom: 1px solid var(--rx-line);
}
body.rhfx-ui :is(#menu-trading-tools,#menu-education,#menu-xauusd-engine) > .rx-section-intro .rx-eyebrow {
    color: var(--rx-orange);
    font: 700 9px/1.4 var(--font-mono);
    letter-spacing: .14em;
}
body.rhfx-ui :is(#menu-trading-tools,#menu-education,#menu-xauusd-engine) > .rx-section-intro .rx-eyebrow::before {
    display: none;
    content: none;
}

/* Keep the signal content on the same surface as its dashboard panel. */
body.rhfx-ui #home-signal-card .active-signal-card,
body.rhfx-ui #home-signal-card .active-signal-card.signal-card-buy,
body.rhfx-ui #home-signal-card .active-signal-card.signal-card-sell {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

body.rhfx-ui #home-signal-card .active-signal-card::before {
    display: none !important;
}

/* A compact, live agenda brief uses the open space under the calendar. */
body.rhfx-ui .ff-agenda-insights {
    margin-top: 16px;
    padding: 18px 20px;
    border: 1px solid var(--rx-line);
    border-radius: 16px;
    background: var(--rx-panel);
    color: var(--rx-ink);
}
body.rhfx-ui .ff-agenda-insights-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}
body.rhfx-ui .ff-agenda-kicker {
    color: var(--rx-orange);
    font: 700 9px/1.4 var(--font-mono);
    letter-spacing: .14em;
}
body.rhfx-ui .ff-agenda-insights h2 {
    margin: 3px 0 0;
    color: var(--rx-ink);
    font: 600 18px/1.2 var(--font-display) !important;
}
body.rhfx-ui .ff-agenda-zone {
    color: var(--rx-muted);
    font-size: 10px;
}
body.rhfx-ui .ff-agenda-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-block: 1px solid var(--rx-line);
}
body.rhfx-ui .ff-agenda-metric {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
    padding: 11px 14px;
}
body.rhfx-ui .ff-agenda-metric + .ff-agenda-metric { border-left: 1px solid var(--rx-line); }
body.rhfx-ui .ff-agenda-metric span,
body.rhfx-ui .ff-agenda-metric small { color: var(--rx-muted); font-size: 10px; }
body.rhfx-ui .ff-agenda-metric strong { color: var(--rx-ink); font: 700 20px/1.25 var(--font-mono); }
body.rhfx-ui .ff-agenda-metric:nth-child(2) strong { color: var(--rx-orange); }
body.rhfx-ui .ff-agenda-impact {
    display: flex;
    height: 5px;
    gap: 3px;
    margin: 12px 0;
    overflow: hidden;
    border-radius: 999px;
    background: var(--rx-raised);
}
body.rhfx-ui .ff-agenda-impact span { display: block; min-width: 0; transition: width .25s ease; }
body.rhfx-ui .ff-agenda-impact-high { background: #ef4444; }
body.rhfx-ui .ff-agenda-impact-medium { background: #f59e0b; }
body.rhfx-ui .ff-agenda-impact-low { background: #eab308; }
body.rhfx-ui .ff-agenda-next {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border-radius: 10px;
    background: var(--rx-raised);
}
body.rhfx-ui .ff-agenda-next-label { color: var(--rx-muted); font-size: 10px; font-weight: 700; }
body.rhfx-ui .ff-agenda-next strong { overflow: hidden; color: var(--rx-ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
body.rhfx-ui .ff-agenda-next > span:last-child { color: var(--rx-blue); font: 700 11px/1.4 var(--font-mono); }
@media (max-width: 600px) {
    body.rhfx-ui .ff-agenda-insights { margin-top: 12px; padding: 14px 12px; border-radius: 13px; }
    body.rhfx-ui .ff-agenda-insights-head { align-items: flex-start; margin-bottom: 10px; }
    body.rhfx-ui .ff-agenda-zone { max-width: 42%; text-align: right; }
    body.rhfx-ui .ff-agenda-metric { padding: 9px 8px; }
    body.rhfx-ui .ff-agenda-metric span,
    body.rhfx-ui .ff-agenda-metric small { font-size: 9px; }
    body.rhfx-ui .ff-agenda-metric strong { font-size: 18px; }
    body.rhfx-ui .ff-agenda-next { grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; }
    body.rhfx-ui .ff-agenda-next-label { grid-column: 1 / -1; }
    body.rhfx-ui .ff-agenda-next strong { font-size: 11px; }
}

@media (max-width: 768px) {
    body.rhfx-ui .ff-mobile-agenda-summary {
        display: block;
        min-width: 0;
        flex: 1 1 auto;
        margin: 0 8px;
        padding: 0;
        overflow: hidden;
        border: 0;
        background: transparent;
        color: #40516a !important;
        font-size: 8px;
        font-weight: 650;
        line-height: 1.15;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    body.rhfx-ui .ff-mobile-agenda-summary[data-session-state="transition"] {
        color: #8b641e !important;
    }
    body.rhfx-ui .ff-mobile-agenda-summary[data-session-state="closed"] {
        color: #586a80 !important;
    }
}
@media (max-width: 380px) {
    body.rhfx-ui .ff-mobile-agenda-summary { margin-inline: 4px; font-size: 7px; }
}
@media (max-width: 768px) {
    html[data-theme="dark"] body.rhfx-ui .ff-mobile-agenda-summary[data-session-state="active"],
    body.rhfx-ui #ff-calendar-box.ff-dark-theme .ff-mobile-agenda-summary[data-session-state="active"] {
        color: #d0d9e7 !important;
    }
    html[data-theme="dark"] body.rhfx-ui .ff-mobile-agenda-summary[data-session-state="transition"],
    body.rhfx-ui #ff-calendar-box.ff-dark-theme .ff-mobile-agenda-summary[data-session-state="transition"] {
        color: #e7c987 !important;
    }
    html[data-theme="dark"] body.rhfx-ui .ff-mobile-agenda-summary[data-session-state="closed"],
    body.rhfx-ui #ff-calendar-box.ff-dark-theme .ff-mobile-agenda-summary[data-session-state="closed"] {
        color: #c3d0e2 !important;
    }
}
body.rhfx-ui :is(#menu-trading-tools,#menu-education,#menu-xauusd-engine) > .rx-section-intro h1 {
    margin: 10px 0 8px;
    font-size: clamp(27px, 3vw, 36px) !important;
    font-weight: 650 !important;
    letter-spacing: -.035em;
}
body.rhfx-ui :is(#menu-trading-tools,#menu-education,#menu-xauusd-engine) > .rx-section-intro p {
    margin: 0;
    max-width: 680px;
    font-size: 13px;
    line-height: 1.7;
}
body.rhfx-ui .page-header:has(#heading-menu-calendar) { margin-bottom: 24px !important; padding: 0 0 20px; border-bottom: 1px solid var(--rx-line); }

/* Keep the mobile pair mark compact and recognizable at every width. */
body.rhfx-ui #home-xau-brief .brief-gold-icon { display: inline-flex; width: 16px; height: 16px; flex: 0 0 16px; align-items: center; justify-content: center; vertical-align: -3px; }
body.rhfx-ui #home-xau-brief .brief-gold-icon svg { display: block; width: 16px; height: 16px; overflow: visible; }
body.rhfx-ui .avatar-img { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: var(--rx-orange-soft); color: var(--rx-orange); font: 800 13px/1 var(--font-display); }

/* The workspace navigation follows the selected light palette too. */
html[data-theme="light"] body.rhfx-ui .sidebar { color: var(--rx-ink) !important; background: var(--rx-panel) !important; border-right-color: var(--rx-line) !important; box-shadow: 12px 0 30px #24344c0a !important; }
html[data-theme="light"] body.rhfx-ui .sidebar-header { background: var(--rx-panel) !important; border-color: var(--rx-line) !important; }
html[data-theme="light"] body.rhfx-ui .sidebar-brand-title { color: var(--rx-ink) !important; }
html[data-theme="light"] body.rhfx-ui .sidebar-brand-sub,
html[data-theme="light"] body.rhfx-ui .rx-nav-label,
html[data-theme="light"] body.rhfx-ui .rx-sidebar-signature { color: var(--rx-muted) !important; }
html[data-theme="light"] body.rhfx-ui .rx-sidebar-signature b { color: var(--rx-ink) !important; }
html[data-theme="light"] body.rhfx-ui .sidebar .nav-item { color: var(--rx-muted) !important; background: transparent !important; border-color: transparent !important; }
html[data-theme="light"] body.rhfx-ui .sidebar .nav-item svg { color: #71819a !important; }
html[data-theme="light"] body.rhfx-ui .sidebar .nav-item:hover { color: var(--rx-ink) !important; background: var(--rx-raised) !important; border-color: var(--rx-line) !important; }
html[data-theme="light"] body.rhfx-ui .sidebar .nav-item.active { color: var(--rx-orange) !important; background: var(--rx-orange-soft) !important; border-color: #edc4a8 !important; }
html[data-theme="light"] body.rhfx-ui .sidebar .nav-item.active svg { color: var(--rx-orange) !important; }
html[data-theme="light"] body.rhfx-ui .sidebar-footer { border-color: var(--rx-line) !important; }
html[data-theme="light"] body.rhfx-ui .sidebar-footer .nav-item { color: var(--rx-ink) !important; background: var(--rx-raised) !important; border-color: var(--rx-line) !important; }
html[data-theme="light"] body.rhfx-ui .sidebar-close-btn { color: var(--rx-muted) !important; background: var(--rx-raised) !important; }

/* Compact, legible economic calendar on phones: event plus three labeled values. */
.ff-mobile-event-meta { display: none; }
.ff-actual-pending { color: var(--ff-text-muted); font-size: .9em; white-space: nowrap; }
.rx-floating-back-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 46px; padding: 0 18px; border: 1px solid var(--rx-line); border-radius: 999px;
    background: var(--rx-panel); color: var(--rx-ink); font: 700 12px/1.2 var(--font-body);
    box-shadow: 0 10px 28px #10213c26; cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.rx-floating-back-btn svg { width: 17px; height: 17px; flex: 0 0 17px; color: var(--rx-orange); }
.rx-floating-back-btn:hover { transform: translateY(-2px); border-color: var(--rx-orange); background: var(--rx-orange-soft); box-shadow: 0 14px 30px #10213c2e; }
html[data-theme="dark"] .rx-floating-back-btn { background: #172236; border-color: #35445e; color: #f5f7fc; box-shadow: 0 12px 32px #0008; }

@media (max-width: 768px) {
    body.news-reading-mobile #news-article-content p,
    body.news-reading-mobile .news-article-body { text-align: left !important; }
    body.news-reading-mobile #news-article-content p { overflow-wrap: anywhere; }
}

@media (max-width: 768px) {
    body.rhfx-ui .user-profile { overflow: hidden; }
    body.rhfx-ui .avatar-img { background: var(--rx-orange-soft) !important; color: var(--rx-orange) !important; font: 800 13px/1 var(--font-display) !important; transform: none; }
    .ff-table-wrapper { width: 100% !important; max-width: 100% !important; overflow-x: hidden !important; }
    .ff-authentic-table { width: 100% !important; max-width: 100% !important; min-width: 0 !important; table-layout: auto !important; }
    .ff-mobile-subheader { padding-inline: 7px !important; background: #e7edf7 !important; border-bottom-color: #cfdaea !important; color: #34445d !important; }
    .ff-mobile-clock { color: #34445d !important; font-size: 10px !important; }
    .ff-mobile-data-headers { flex: 0 0 auto; }
    .ff-hdr-act, .ff-hdr-for, .ff-hdr-prev { width: clamp(42px,14vw,56px) !important; min-width: clamp(42px,14vw,56px) !important; max-width: clamp(42px,14vw,56px) !important; padding-inline: 2px !important; font-size: 9px !important; color: #34445d !important; }
    .ff-authentic-table .col-date, .ff-authentic-table .col-currency, .ff-authentic-table .col-impact,
    .ff-authentic-table .col-alerts, .ff-authentic-table .col-spec, .ff-authentic-table .col-graph { display: none !important; width: 0 !important; min-width: 0 !important; max-width: 0 !important; padding: 0 !important; border: 0 !important; }
    .ff-date-banner-cell { color: #26364c !important; background: #edf2f9 !important; border-color: #d8e1ee !important; }
    .ff-authentic-table tbody td.col-time { width: 50px !important; min-width: 50px !important; max-width: 50px !important; padding: 7px 3px 7px 7px !important; font-size: 9px !important; white-space: normal !important; line-height: 1.25 !important; vertical-align: top !important; }
    .ff-authentic-table tbody td.col-detail-title { width: auto !important; min-width: 0 !important; padding: 7px 5px !important; font-size: 10px !important; line-height: 1.3 !important; white-space: normal !important; overflow-wrap: anywhere !important; vertical-align: top !important; }
    .ff-mobile-event-meta { display: inline-flex; align-items: center; gap: 4px; margin: 0 4px 0 0; color: #52647f; font: 700 8px/1 var(--font-mono); vertical-align: middle; }
    .ff-mobile-event-meta b { color: #33445e; font-weight: 800; }
    .ff-mobile-event-meta svg { width: 10px; height: 10px; }
    .ff-event-name { display: inline; }
    .ff-authentic-table tbody td.col-actual, .ff-authentic-table tbody td.col-forecast, .ff-authentic-table tbody td.col-previous {
        display: table-cell !important; width: clamp(42px,14vw,56px) !important; min-width: clamp(42px,14vw,56px) !important; max-width: clamp(42px,14vw,56px) !important;
        padding: 7px 2px !important; font-size: 9px !important; line-height: 1.2 !important; white-space: normal !important; overflow-wrap: anywhere !important;
        text-align: right !important; vertical-align: top !important; font-variant-numeric: tabular-nums;
    }
    .ff-authentic-table tbody td.col-actual { color: var(--ff-green) !important; }
    .ff-authentic-table tbody td.col-actual .ff-actual-pending { color: #7b8aa0; }
    .ff-authentic-table tbody td.col-forecast, .ff-authentic-table tbody td.col-previous { color: #62728a !important; }
    .ff-date-banner-cell { padding: 6px 8px !important; }
    .rx-floating-back-btn { right: 12px !important; bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important; max-width: calc(100vw - 24px); min-height: 42px; padding: 0 14px; font-size: 11px; gap: 8px; }
}
@media (max-width: 380px) {
    .ff-authentic-table tbody td.col-time { width: 46px !important; min-width: 46px !important; max-width: 46px !important; padding-left: 5px !important; }
    .ff-mobile-clock { font-size: 9px !important; }
    .rx-floating-back-btn { right: 10px !important; max-width: calc(100vw - 20px); }
}
@media (min-width: 769px) and (max-width: 1360px) {
    .ff-table-wrapper { width: 100% !important; max-width: 100% !important; overflow-x: hidden !important; }
    .ff-authentic-table { width: 100% !important; max-width: 100% !important; min-width: 0 !important; table-layout: auto !important; }
    .ff-authentic-table .col-date, .ff-authentic-table .col-currency, .ff-authentic-table .col-impact,
    .ff-authentic-table .col-alerts, .ff-authentic-table .col-spec, .ff-authentic-table .col-graph { display: none !important; width: 0 !important; min-width: 0 !important; max-width: 0 !important; padding: 0 !important; border: 0 !important; }
    .ff-authentic-table tbody td.col-time { width: 58px !important; min-width: 58px !important; max-width: 58px !important; }
    .ff-authentic-table tbody td.col-detail-title { width: auto !important; min-width: 0 !important; overflow-wrap: anywhere !important; }
    .ff-mobile-event-meta { display: inline-flex; align-items: center; gap: 4px; margin-right: 4px; color: #52647f; font: 700 8px/1 var(--font-mono); }
    .ff-mobile-event-meta b { color: #33445e; font-weight: 800; }
    .ff-mobile-event-meta svg { width: 10px; height: 10px; }
    .ff-authentic-table tbody td.col-actual, .ff-authentic-table tbody td.col-forecast, .ff-authentic-table tbody td.col-previous { width: 56px !important; min-width: 56px !important; max-width: 56px !important; font-size: 10px !important; }
}

/* Long statistics always wrap inside their recap cells on narrow screens. */
body.rhfx-ui .signal-recap > div { min-width: 0; max-width: 100%; overflow: hidden; }
body.rhfx-ui .signal-recap > div strong { display: block; max-width: 100%; white-space: normal; overflow-wrap: anywhere; word-break: normal; font-size: clamp(10px, 1.1vw, 14px); line-height: 1.45; }
body.rhfx-ui .brief-metrics > div { min-width: 0; padding: 10px 7px; }
body.rhfx-ui .brief-metrics > div strong { display: block; min-width: 0; max-width: 100%; color: var(--rx-ink) !important; font-size: clamp(9px, 1.05vw, 13px) !important; line-height: 1.4; white-space: normal !important; overflow: visible !important; overflow-wrap: anywhere; text-overflow: clip !important; }

/* The XAU/BTC live chart host follows the same theme as the workspace. */
body.rhfx-ui #rhfx-engine-wrapper { background: var(--rx-panel) !important; border-color: var(--rx-line) !important; box-shadow: var(--rx-shadow) !important; }
body.rhfx-ui #rhfx_webchart_container { background: var(--rx-field) !important; }

/* Keep the mobile theme and account controls truly circular and center the avatar. */
@media (max-width: 768px) {
    body.rhfx-ui #theme-toggle-btn {
        width: 42px !important; min-width: 42px !important; max-width: 42px !important;
        height: 42px !important; min-height: 42px !important; max-height: 42px !important;
        flex: 0 0 42px !important; box-sizing: border-box !important; padding: 0 !important;
        aspect-ratio: 1 / 1; border-radius: 50% !important; align-items: center !important; justify-content: center !important;
    }
    body.rhfx-ui #user-profile-trigger {
        width: 44px !important; min-width: 44px !important; max-width: 44px !important;
        height: 44px !important; min-height: 44px !important; max-height: 44px !important;
        flex: 0 0 44px !important; box-sizing: border-box !important; padding: 0 !important; gap: 0 !important;
        align-items: center !important; justify-content: center !important; overflow: hidden !important;
        border-radius: 50% !important; aspect-ratio: 1 / 1;
    }
    body.rhfx-ui #user-profile-trigger :is(.user-info, .profile-dropdown-arrow) { display: none !important; }
    body.rhfx-ui #user-profile-trigger .avatar-img {
        display: inline-flex !important; align-items: center !important; justify-content: center !important;
        width: 32px !important; min-width: 32px !important; max-width: 32px !important;
        height: 32px !important; min-height: 32px !important; max-height: 32px !important;
        flex: 0 0 32px !important; box-sizing: border-box !important; margin: 0 !important;
        padding: 0 !important; border: 0 !important; border-radius: 50% !important; line-height: 1 !important;
    }
}

/* Identify the nearest release with a restrained accent, keeping the calendar row itself calm. */
.ff-authentic-table tbody tr[data-upnext="true"] { background: transparent !important; }

/* Reuse the sidebar brand mark as the profile avatar. */
body.rhfx-ui #user-profile-trigger img.avatar-img {
    display: block !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    flex: 0 0 32px !important;
    box-sizing: border-box !important;
    object-fit: contain !important;
    object-position: center !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    transform: none !important;
}

/* Keep the full account identity visible in the compact header too. */
@media (max-width: 768px) {
    body.rhfx-ui .topbar-right { flex: 0 1 auto; min-width: 0; }
    body.rhfx-ui .user-profile-wrapper { flex: 0 1 auto; min-width: 0; }
    body.rhfx-ui #user-profile-trigger {
        width: auto !important;
        min-width: 0 !important;
        max-width: min(178px, calc(100vw - 220px)) !important;
        height: 44px !important;
        min-height: 44px !important;
        padding: 5px 9px !important;
        gap: 7px !important;
        justify-content: flex-start !important;
        overflow: hidden !important;
        border-radius: 999px !important;
        aspect-ratio: auto !important;
    }
    body.rhfx-ui #user-profile-trigger .user-info {
        display: flex !important;
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
    }
    body.rhfx-ui #user-profile-trigger .user-name {
        overflow: hidden;
        color: var(--rx-ink) !important;
        font-size: 10px !important;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    body.rhfx-ui #user-profile-trigger .user-status {
        display: block !important;
        overflow: hidden;
        font-size: 8px !important;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    body.rhfx-ui #user-profile-trigger .profile-dropdown-arrow {
        display: block !important;
        flex: 0 0 12px;
        width: 12px !important;
        height: 12px !important;
    }
}
@media (max-width: 380px) {
    body.rhfx-ui #user-profile-trigger {
        max-width: calc(100vw - 220px) !important;
        padding-inline: 7px !important;
        gap: 5px !important;
    }
    body.rhfx-ui #user-profile-trigger img.avatar-img {
        width: 30px !important;
        min-width: 30px !important;
        max-width: 30px !important;
        height: 30px !important;
        min-height: 30px !important;
        max-height: 30px !important;
        flex-basis: 30px !important;
    }
    body.rhfx-ui #user-profile-trigger .user-name { font-size: 9px !important; }
}

@media (max-width: 768px) {
    body.rhfx-ui #rhfx-btn-fullscreen #rhfx-fs-text {
        display: inline !important;
        white-space: nowrap;
    }
    body.rhfx-ui #rhfx-btn-fullscreen { padding-inline: 8px !important; }
    body[data-rhfx-page="portal"] .join-options { margin-top: 8px !important; padding-top: 0 !important; }
    body[data-rhfx-page="portal"] .join-divider { margin: 8px 0 14px !important; }
}
@media (max-width: 600px) {
    body[data-rhfx-page="portal"] .portal-title { display: none; }
}
.ff-authentic-table tbody tr[data-upnext="true"] td {
    background: transparent !important; border-top-color: transparent !important; border-bottom-color: transparent !important;
}
.ff-authentic-table tbody tr[data-upnext="true"] td.col-detail-title { border-left: 0 !important; }
.ff-next-event-badge {
    display: inline-flex; align-items: center; gap: 3px; width: max-content; margin: 0 0 0 4px; padding: 1px 4px;
    border: 1px solid #f2d1b6; border-radius: 3px; background: #fff5ec; color: #a84f17;
    font: 750 6px/1.1 var(--font-body); letter-spacing: .04em; vertical-align: middle; white-space: nowrap;
}
.ff-next-event-badge::before {
    content: ""; width: 4px; height: 4px; flex: 0 0 4px; border-radius: 50%; background: #e2762b;
}
.ff-classic-theme.ff-dark-theme .ff-authentic-table tbody tr[data-upnext="true"],
.ff-dark-theme .ff-authentic-table tbody tr[data-upnext="true"] { background: transparent !important; }
.ff-classic-theme.ff-dark-theme .ff-authentic-table tbody tr[data-upnext="true"] td,
.ff-dark-theme .ff-authentic-table tbody tr[data-upnext="true"] td { border-top-color: transparent !important; border-bottom-color: transparent !important; }
.ff-classic-theme.ff-dark-theme .ff-authentic-table tbody tr[data-upnext="true"] td.col-detail-title,
.ff-dark-theme .ff-authentic-table tbody tr[data-upnext="true"] td.col-detail-title { border-left: 0 !important; }
.ff-classic-theme.ff-dark-theme .ff-next-event-badge,
.ff-dark-theme .ff-next-event-badge { border-color: #68432d; background: #30241e; color: #f2b887; }
.ff-classic-theme.ff-dark-theme .ff-next-event-badge::before,
.ff-dark-theme .ff-next-event-badge::before { background: #f09556; }
.ff-classic-theme.ff-dark-theme .ff-mobile-event-meta,
.ff-dark-theme .ff-mobile-event-meta { color: #c3d0e2 !important; }
.ff-classic-theme.ff-dark-theme .ff-mobile-event-meta b,
.ff-dark-theme .ff-mobile-event-meta b { color: #f4f7fc !important; font-weight: 800 !important; }

/* A calmer, sharper account menu that matches the portal in both themes. */
body.rhfx-ui #user-profile-dropdown {
    width: min(300px, calc(100vw - 24px)) !important;
    padding: 10px !important;
    border: 1px solid var(--rx-line) !important;
    border-radius: 18px !important;
    background: var(--rx-panel) !important;
    box-shadow: 0 24px 60px rgba(14, 27, 48, .2), 0 4px 14px rgba(14, 27, 48, .08) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
body.rhfx-ui #user-profile-dropdown .dropdown-header-card {
    gap: 12px;
    min-height: 64px;
    padding: 10px 11px !important;
    border: 1px solid var(--rx-line) !important;
    border-radius: 14px !important;
    background: var(--rx-field) !important;
}
body.rhfx-ui #user-profile-dropdown .dropdown-avatar {
    width: 40px;
    height: 40px;
    padding: 3px;
    border: 1px solid #e5a13a;
    box-shadow: 0 0 0 3px var(--rx-orange-soft);
}
body.rhfx-ui #user-profile-dropdown .dropdown-meta { min-width: 0; gap: 3px; }
body.rhfx-ui #user-profile-dropdown .dropdown-title { color: var(--rx-ink) !important; font: 750 14px/1.2 var(--font-display); }
body.rhfx-ui #user-profile-dropdown .dropdown-badge {
    width: max-content;
    max-width: 100%;
    margin-top: 0;
    padding: 3px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--rx-green) 13%, transparent);
    color: var(--rx-green) !important;
    font: 700 10px/1.2 var(--font-body);
    letter-spacing: .01em;
}
body.rhfx-ui #user-profile-dropdown > .dropdown-divider {
    height: 1px;
    margin: 10px 2px !important;
    background: var(--rx-line) !important;
}
body.rhfx-ui #user-profile-dropdown .dropdown-menu-list { gap: 7px; }
body.rhfx-ui #user-profile-dropdown .dropdown-menu-list > .dropdown-divider {
    width: 100%;
    height: 1px;
    margin: 4px 2px !important;
    background: var(--rx-line) !important;
}
body.rhfx-ui #user-profile-dropdown .dropdown-item {
    min-height: 46px;
    gap: 11px !important;
    padding: 7px 9px !important;
    border: 1px solid var(--rx-line) !important;
    border-radius: 12px !important;
    background: var(--rx-raised) !important;
    color: var(--rx-ink) !important;
    font: 650 12px/1.3 var(--font-body) !important;
    box-shadow: none !important;
    transform: none !important;
}
body.rhfx-ui #user-profile-dropdown .dropdown-item:hover {
    border-color: #e4a15b !important;
    background: var(--rx-orange-soft) !important;
    color: var(--rx-ink) !important;
    transform: translateY(-1px) !important;
}
body.rhfx-ui #user-profile-dropdown .dropdown-icon {
    width: 30px !important;
    height: 30px !important;
    border-radius: 9px;
    background: var(--rx-field);
    color: var(--rx-muted) !important;
}
body.rhfx-ui #user-profile-dropdown .btn-install-app .dropdown-icon {
    background: var(--rx-orange-soft);
    color: var(--rx-orange) !important;
}
body.rhfx-ui #user-profile-dropdown .btn-notifications .dropdown-icon {
    padding: 6px;
    background: var(--rx-blue-soft);
    color: var(--rx-blue) !important;
}
body.rhfx-ui #user-profile-dropdown .dropdown-item-logout {
    border-color: color-mix(in srgb, var(--rx-red) 28%, var(--rx-line)) !important;
    background: color-mix(in srgb, var(--rx-red) 8%, var(--rx-raised)) !important;
    color: var(--rx-red) !important;
}
body.rhfx-ui #user-profile-dropdown .dropdown-item-logout .dropdown-icon { color: var(--rx-red) !important; }
body.rhfx-ui #user-profile-dropdown .dropdown-item-logout:hover {
    border-color: var(--rx-red) !important;
    background: color-mix(in srgb, var(--rx-red) 15%, var(--rx-raised)) !important;
    color: var(--rx-red) !important;
}
body.rhfx-ui #user-profile-dropdown .dropdown-item:focus-visible { outline: 2px solid var(--rx-blue) !important; outline-offset: 2px; }
@media (max-width: 768px) {
    body.rhfx-ui #user-profile-dropdown {
        top: 76px !important;
        right: 12px !important;
        width: min(320px, calc(100vw - 24px)) !important;
        max-height: calc(100dvh - 88px);
        overflow-y: auto;
    }
}

/* Keep profile-menu symbols on one restrained slate palette. */
body.rhfx-ui #user-profile-dropdown .dropdown-avatar {
    border: 1px solid var(--rx-line) !important;
    box-shadow: none !important;
}
body.rhfx-ui #user-profile-dropdown .dropdown-badge {
    background: var(--rx-raised) !important;
    color: var(--rx-muted) !important;
}
body.rhfx-ui #user-profile-dropdown .dropdown-icon,
body.rhfx-ui #user-profile-dropdown :is(.btn-install-app,.btn-notifications,.dropdown-item-logout) .dropdown-icon {
    padding: 0 !important;
    background: var(--rx-field) !important;
    color: var(--rx-muted) !important;
}
body.rhfx-ui #user-profile-dropdown .dropdown-item:hover {
    border-color: var(--rx-line) !important;
    background: var(--rx-field) !important;
}
body.rhfx-ui #user-profile-dropdown .dropdown-item-logout,
body.rhfx-ui #user-profile-dropdown .dropdown-item-logout:hover {
    border-color: var(--rx-line) !important;
    background: var(--rx-raised) !important;
    color: var(--rx-ink) !important;
}

/* Profile actions stay as clean text rows; only the account panel has a surface. */
body.rhfx-ui #user-profile-dropdown .dropdown-menu-list .dropdown-item,
body.rhfx-ui #user-profile-dropdown .dropdown-menu-list .dropdown-item:hover,
body.rhfx-ui #user-profile-dropdown .dropdown-menu-list .dropdown-item-logout,
body.rhfx-ui #user-profile-dropdown .dropdown-menu-list .dropdown-item-logout:hover {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}
body.rhfx-ui #user-profile-dropdown .dropdown-menu-list .dropdown-item:hover {
    color: var(--rx-orange) !important;
}
body.rhfx-ui #user-profile-dropdown .dropdown-menu-list .dropdown-icon,
body.rhfx-ui #user-profile-dropdown .dropdown-menu-list :is(.btn-install-app,.btn-notifications,.dropdown-item-logout) .dropdown-icon {
    width: 20px !important;
    height: 20px !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--rx-muted) !important;
}
body.rhfx-ui #user-profile-dropdown .dropdown-menu-list .dropdown-item:hover .dropdown-icon {
    color: var(--rx-orange) !important;
}
body.rhfx-ui #user-profile-dropdown .dropdown-menu-list .dropdown-item-logout,
body.rhfx-ui #user-profile-dropdown .dropdown-menu-list .dropdown-item-logout:hover {
    color: var(--rx-muted) !important;
}

body.rhfx-ui #user-profile-dropdown .dropdown-header-card {
    box-shadow: none !important;
}

/* Signal recap: one quiet row panel with metric dividers, not nested mini-cards. */
body.rhfx-ui #home-signal-card .signal-recap {
    gap: 0 !important;
    overflow: hidden;
    border: 1px solid var(--rx-line) !important;
    border-radius: 10px !important;
    background: var(--rx-field) !important;
}
body.rhfx-ui #home-signal-card .signal-recap > div {
    min-width: 0;
    padding: 10px 7px !important;
    border: 0 !important;
    border-right: 1px solid var(--rx-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}
body.rhfx-ui #home-signal-card .signal-recap > div:last-child { border-right: 0 !important; }
body.rhfx-ui #home-signal-card .signal-recap > div:hover {
    background: color-mix(in srgb, var(--rx-raised) 65%, transparent) !important;
    box-shadow: none !important;
    transform: none !important;
}
body.rhfx-ui #home-signal-card .signal-recap small { color: var(--rx-muted) !important; }
body.rhfx-ui #home-signal-card .signal-recap strong { color: var(--rx-ink) !important; text-shadow: none !important; }
body.rhfx-ui #home-signal-card .signal-recap .recap-tp strong,
body.rhfx-ui #home-signal-card .signal-recap .pips-positive strong { color: var(--rx-green) !important; }
body.rhfx-ui #home-signal-card .signal-recap .recap-sl strong,
body.rhfx-ui #home-signal-card .signal-recap .pips-negative strong { color: var(--rx-red) !important; }
body.rhfx-ui #home-signal-card .signal-recap .recap-rate strong { color: var(--rx-orange) !important; }
@media (max-width: 800px) {
    body.rhfx-ui #home-signal-card .signal-recap > div { padding: 9px 5px !important; }
    body.rhfx-ui #home-signal-card .signal-recap > div:nth-child(3) { border-right: 0 !important; }
    body.rhfx-ui #home-signal-card .signal-recap > div:nth-child(-n+3) { border-bottom: 1px solid var(--rx-line) !important; }
    body.rhfx-ui #home-signal-card .signal-recap > div:nth-child(4) { border-right: 1px solid var(--rx-line) !important; }
}

@media (max-width: 900px) {
    body.rhfx-ui .journal-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    body.rhfx-ui .journal-form-grid .journal-pl-field { grid-column:span 2; }
    body.rhfx-ui .journal-form-grid .journal-note-field { grid-column:span 2; }
    body.rhfx-ui .journal-history-heading { align-items:stretch; flex-direction:column; }
    body.rhfx-ui .journal-history-actions { width:100%; justify-content:flex-start; }
    body.rhfx-ui .journal-history-actions .journal-search { flex:1 1 190px; }
    body.rhfx-ui .journal-history-actions .journal-search input { width:100%; }
    body.rhfx-ui .journal-history-item { grid-template-columns:minmax(110px,.8fr) minmax(190px,1fr); }
    body.rhfx-ui .journal-history-footer { grid-column:1 / -1; padding-top:9px; border-top:1px solid var(--rx-line); }
}

@media (max-width: 560px) {
    body.rhfx-ui .journal-entry-card,
    body.rhfx-ui .journal-history-card { padding:16px !important; }
    body.rhfx-ui .journal-form-grid { gap:11px; }
    body.rhfx-ui .journal-form-grid .journal-note-field { grid-column:1 / -1; }
    body.rhfx-ui .journal-form-footer { align-items:stretch; flex-direction:column; }
    body.rhfx-ui .journal-form-footer .btn-primary { width:100%; }
    body.rhfx-ui .journal-summary-grid { gap:8px; }
    body.rhfx-ui .journal-summary-card { padding:12px 10px; }
    body.rhfx-ui .journal-summary-card > span { font-size:10px; }
    body.rhfx-ui .journal-summary-card > strong { font-size:18px; }
    body.rhfx-ui .journal-summary-card > small { font-size:9px; }
    body.rhfx-ui .journal-history-actions { display:grid; grid-template-columns:minmax(0,1fr) auto; }
    body.rhfx-ui .journal-history-actions .journal-search { grid-column:1 / -1; }
    body.rhfx-ui .journal-history-actions .journal-search input { width:100%; }
    body.rhfx-ui .journal-history-actions :is(select,.btn-primary,.journal-clear-all) { width:100%; }
    body.rhfx-ui .journal-history-item { grid-template-columns:1fr; gap:9px; padding:12px; }
    body.rhfx-ui .journal-history-footer { grid-column:auto; }
    body.rhfx-ui .journal-history-details { gap:9px; }
    body.rhfx-ui .journal-trade-note { white-space:normal; }
}
