:root {
    --bg0: #0b1220;
    --bg1: #0e1728;
    --card: #121c2f;
    --card2: #0f1a2b;
    --text: #e6edf7;
    --muted: #9fb0c7;
    --line: rgba(255, 255, 255, .07);
    --shadow: 0 12px 32px rgba(0, 0, 0, .35);
    --radius: 18px;

    --blue: #3b82f6;
    --blue2: #2563eb;
    --green: #22c55e;
    --red: #ef4444;
    --amber: #f59e0b;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%;
    background: var(--bg0);
}

body {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    /* 
    background:
        radial-gradient(1200px 800px at 10% 10%, rgba(59, 130, 246, .12), transparent 50%),
        radial-gradient(900px 700px at 90% 20%, rgba(34, 197, 94, .10), transparent 52%),
        linear-gradient(180deg, var(--bg0), #070c16); */

    /* background-repeat: no-repeat; */
    /* background-size: cover; */
    /* або 100% 100% */
}


body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
    color: var(--text);
    background: radial-gradient(1200px 800px at 10% 10%, rgba(59, 130, 246, .12), transparent 50%),
        radial-gradient(900px 700px at 90% 20%, rgba(34, 197, 94, .10), transparent 52%),
        linear-gradient(180deg, var(--bg0), #070c16);
}

/* Mobile Sidebar Backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 49;
    opacity: 0;
    transition: opacity 0.16s ease;
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 20px 16px;
    background: linear-gradient(180deg, rgb(5 7 13 / 98%) 0%, rgba(7, 12, 22, 0.98) 100%),
        linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
    border-right: 1px solid rgba(59, 130, 246, 0.15);
    backdrop-filter: blur(12px);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 16px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.12);
    margin-bottom: 8px;
}

.brand {
    display: flex;
    gap: 14px;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.brand:hover {
    transform: translateX(2px);
}

.brand:hover .brand-logo {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4),
        0 0 40px rgba(139, 92, 246, 0.2);
}

.brand-logo {
    width: 28px;
    height: 28px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%); */
    border: 1.5px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.brand-logo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
    border-radius: 7px;
}

.brand-logo-icon {
    position: relative;
    z-index: 1;
    font-size: 14px;
    font-weight: 900;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 1px 3px rgba(59, 130, 246, 0.3));
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.brand-name {
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-transform: uppercase;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    position: relative;
    line-height: 1.2;
}

.brand-name::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    transition: width 0.3s ease;
}

.brand:hover .brand-name::after {
    width: 100%;
}

.brand-sub {
    font-size: 7px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 3px;
    line-height: 1;
}

.brand-sub::before {
    content: '';
    width: 2px;
    height: 2px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(59, 130, 246, 0.5);
}

.brand-sub::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.3) 0%, transparent 100%);
}

.icon-btn {
    border: 1px solid rgba(59, 130, 246, 0.2);
    background: rgba(59, 130, 246, 0.08);
    color: #94a3b8;
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.35);
    color: #e2e8f0;
    transform: translateY(-1px);
}

.icon-btn:active {
    transform: translateY(0);
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 8px;
}

.nav-item {
    text-decoration: none;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.2px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #3b82f6 0%, #8b5cf6 100%);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.nav-item:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #e2e8f0;
    border-color: rgba(59, 130, 246, 0.15);
    transform: translateX(2px);
}

.nav-item:hover::before {
    transform: scaleY(1);
}

.nav-item.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.25) 0%, rgba(139, 92, 246, 0.12) 100%);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-ico {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0.9;
    transition: transform 0.2s ease;
}

.nav-item:hover .nav-ico {
    transform: scale(1.1);
}

.nav-item.active .nav-ico {
    opacity: 1;
}

.nav-text {
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.3px;
}

.sidebar-footer {
    position: absolute;
    bottom: 20px;
    left: 16px;
    right: 16px;
}

.pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.25);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(34, 197, 94, 0.03) 100%);
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.1);
}

.dot-live {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2),
        0 0 12px rgba(34, 197, 94, 0.4);
    animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2),
            0 0 12px rgba(34, 197, 94, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.15),
            0 0 16px rgba(34, 197, 94, 0.5);
    }
}

.main {
    padding: 18px 22px 40px
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 6px 18px;
}

/* Mobile Menu Button - Hidden by default, shown on mobile */
.mobile-menu-btn {
    display: none;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    border-radius: 12px;
    padding: 8px 10px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, .07);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

.page-title {
    margin: 0;
    font-size: 28px;
    letter-spacing: .2px
}

.page-sub {
    color: var(--muted);
    margin-top: 6px;
    font-size: 13px
}

.topbar-right {
    display: none;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    min-width: 340px;
}

.search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 14px;
}

.search svg {
    opacity: .8
}

.segmented {
    display: flex;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    border-radius: 14px;
    padding: 4px;
}

.seg-btn {
    border: 0;
    cursor: pointer;
    background: transparent;
    color: var(--muted);
    padding: 8px 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
}

.seg-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, .35), rgba(155, 92, 255, .18));
    color: var(--text);
}

.btn {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    border-radius: 14px;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 700;
}

.btn:hover {
    background: rgba(255, 255, 255, .07)
}

.btn-ico {
    margin-right: 8px;
    opacity: .9
}

.btn-primary {
    border-color: rgba(59, 130, 246, .45);
    background: linear-gradient(135deg, rgba(59, 130, 246, .85), rgba(37, 99, 235, .85));
    box-shadow: 0 10px 22px rgba(59, 130, 246, .18);
}

.btn-primary:hover {
    filter: brightness(1.05)
}

.btn-ghost {
    background: rgba(255, 255, 255, .03)
}

.btn-soft {
    background: rgba(255, 255, 255, .03);
    color: var(--text);
}

.section {
    display: none
}

.section.active {
    display: block
}

.grid-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 6px 16px;
}

.grid-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap
}

.meta-line {
    display: flex;
    gap: 8px;
    color: var(--muted);
    font-size: 13px
}

.meta-value {
    color: var(--text);
    font-weight: 700
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    gap: 16px;
    padding: 6px;
}

.card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 42%),
        linear-gradient(180deg, var(--card), var(--card2));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    transition: transform .12s ease, border-color .12s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, .22)
}

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px
}

.pair-title {
    font-weight: 900;
    letter-spacing: .3px;
    font-size: 16px
}

.pair-sub {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted)
}

.pill-change {
    font-weight: 900;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    color: var(--muted);
}

.price-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px
}

.price {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: .2px
}

.meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 140px
}

.meta-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px
}

.meta-item .k {
    color: var(--muted)
}

.meta-item .v {
    font-weight: 800
}

.bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--line);
    margin-top: 12px;
    overflow: hidden
}

.bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(59, 130, 246, .95), rgba(155, 92, 255, .95));
}

.sparkline {
    margin-top: 12px
}

.spark-placeholder {
    height: 38px;
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, .10);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .06) 0%, rgba(255, 255, 255, .02) 40%, rgba(255, 255, 255, .06) 80%);
    opacity: .85;
}

.card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.placeholder {
    padding: 40px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .03);
    color: var(--muted);
    margin: 6px;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
}

.modal.show {
    display: block
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}

.modal-panel {
    position: relative;
    margin: 6vh auto 0;
    width: min(1100px, 92vw);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), transparent 46%),
        linear-gradient(180deg, #000000cc, var(--card2));
    box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
    overflow: hidden;
}

.modal-small {
    width: min(520px, 92vw)
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.modal-title {
    font-weight: 900
}

.modal-body {
    padding: 14px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.tv-box {
    height: 560px;
    border-radius: 14px;
    overflow: hidden
}

.overview-box {
    display: flex;
    gap: 12px;
    align-items: flex-start
}

.overview-icon {
    font-size: 20px;
    opacity: .9
}

.overview-h {
    font-weight: 900;
    margin-bottom: 6px
}

.overview-p {
    color: var(--text)
}

.overview-sub {
    color: var(--muted);
    margin-top: 6px;
    font-size: 13px
}

@media (max-width: 1180px) {
    .cards-grid {
        grid-template-columns: repeat(2, minmax(260px, 1fr))
    }

    .search {
        min-width: 260px
    }
}

@media (max-width: 820px) {
    .app-shell {
        grid-template-columns: 1fr
    }

    .sidebar {
        position: fixed;
        z-index: 50;
        left: -320px;
        width: 280px;
        transition: left .16s ease;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
    }

    .sidebar.open {
        left: 0
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    /* Show mobile menu button */
    .mobile-menu-btn {
        display: flex;
    }

    /* Hide desktop sidebar toggle button on mobile */
    .sidebar-header .icon-btn {
        display: none;
    }

    /* Adjust brand for mobile */
    .sidebar-header {
        padding: 10px 12px 14px;
    }

    .brand {
        gap: 10px;
    }

    .brand-logo {
        width: 32px;
        height: 32px;
    }

    .brand-logo-icon {
        font-size: 16px;
    }

    .brand-name {
        font-size: 14px;
    }

    .brand-sub {
        font-size: 7px;
    }

    .topbar {
        flex-wrap: wrap;
        gap: 12px;
    }

    .topbar-left {
        flex: 1;
        min-width: 0;
    }

    .page-title {
        font-size: 20px;
    }

    .topbar-right {
        width: 100%;
        order: 3;
    }

    .search {
        min-width: 100%;
    }

    /* Hide segmented mode buttons on mobile */
    .segmented {
        display: none;
    }

    /* Hide refresh button on mobile to save space */
    #refreshBtn {
        display: none;
    }

    /* Mobile styles for Macro Desk section */
    #macroDeskContainer {
        padding: 0;
    }

    .macro-desk-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
        padding: 0;
    }

    .macro-card {
        margin: 0;
        padding: 0px !important;
    }

    /* Ensure all card sizes are single column on mobile */
    .card-large,
    .card-medium,
    .card-small {
        grid-column: span 1 !important;
        max-width: 370px;
    }

    .macro-card-body-ts {
        display: inline !important;
    }

    /* Mobile styles for News Sentiment section */
    #newsSentimentContainer {
        padding: 0;
    }

    /* Mobile styles for Institutional Bias Widget */
    #institutional-bias-container {
        /* width: 86%; */
        margin-bottom: 16px;
    }

    /* Mobile styles for Institutional Outlook - remove grid display */
    #institutional-outlook-content {
        display: block !important;
        padding: 0;
    }

    #institutional-outlook-content>* {
        display: block !important;
        margin-bottom: 12px;
    }

    /* Override any inline grid styles */
    #institutional-outlook-content div[style*="display: grid"],
    #institutional-outlook-content div[style*="display:grid"] {
        display: block !important;
    }

    #institutional-outlook-content div[style*="grid-template"] {
        grid-template-columns: 1fr !important;
    }

    /* Make nested grids stack vertically */
    #institutional-outlook-content div[style*="display: grid"]>div {
        margin-bottom: 12px;
    }

    /* Mobile styles for USDJPY Fundamental Analysis */
    #usdjpy-fundamental-content {
        display: block !important;
        padding: 0;
    }

    #usdjpy-fundamental-content>* {
        display: block !important;
        margin-bottom: 12px;
    }

    /* Override inline grid styles for USDJPY */
    #usdjpy-fundamental-content div[style*="display: grid"],
    #usdjpy-fundamental-content div[style*="display:grid"] {
        display: block !important;
    }

    #usdjpy-fundamental-content div[style*="grid-template"] {
        grid-template-columns: 1fr !important;
    }

    /* Make nested grids stack vertically */
    #usdjpy-fundamental-content div[style*="display: grid"]>div {
        margin-bottom: 12px;
    }

    /* Ensure cards within these sections are full width */
    #institutional-outlook-content div[style*="background:"],
    #institutional-outlook-content div[style*="background :"],
    #usdjpy-fundamental-content div[style*="background:"],
    #usdjpy-fundamental-content div[style*="background :"] {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Adjust any cards/panels for mobile */
    .panel,
    .cal-panel {
        padding: 12px;
    }

    /* Make tables/grids scrollable on mobile */
    .macro-card table,
    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Adjust font sizes for mobile readability */
    .macro-card-title {
        font-size: 16px;
    }

    .macro-card-subtitle {
        font-size: 12px;
    }

    .main {
        padding: 14px
    }

    .cards-grid {
        grid-template-columns: 1fr
    }

    .tv-box {
        height: 460px
    }
}

/* Collapsed sidebar desktop */
.app-shell.collapsed {
    grid-template-columns: 84px 1fr
}

.app-shell.collapsed .nav-text {
    display: none
}

.app-shell.collapsed .brand-text {
    display: none
}

.app-shell.collapsed .sidebar {
    padding: 16px 10px
}

/* =========================
   CALENDAR SECTION (FlowScope)
   Add to dashboard2.css
   ========================= */

.cal-layout {
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    gap: 16px;
    padding: 6px;
}

.cal-left,
.cal-main,
.cal-right {
    min-width: 0;
}

/* Panels */
.panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 42%),
        linear-gradient(180deg, var(--card), var(--card2));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
}

.panel+.panel {
    margin-top: 16px;
}

.panel-title {
    font-weight: 900;
    letter-spacing: .2px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.muted {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

/* Watchlist mini rows */
.mini-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .06);
    background: rgba(255, 255, 255, .03);
    margin-top: 10px;
}

.mini-row span:first-child {
    font-weight: 800;
    letter-spacing: .2px;
}

.mini-row:hover {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(59, 130, 246, .18);
}

/* Chips */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chip {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .03);
    color: var(--muted);
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 800;
    font-size: 13px;
    transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

.chip:hover {
    background: rgba(255, 255, 255, .06);
    color: var(--text);
    transform: translateY(-1px);
}

.chip.active {
    color: var(--text);
    border-color: rgba(59, 130, 246, .35);
    background: linear-gradient(135deg, rgba(59, 130, 246, .30), rgba(155, 92, 255, .14));
}

/* Calendar main header */
.cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.cal-title {
    font-weight: 900;
    letter-spacing: .2px;
    font-size: 16px;
}

/* Event list */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event {
    display: grid;
    grid-template-columns: 92px 1fr 110px;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, .07);
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), transparent 45%),
        rgba(255, 255, 255, .02);
    transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.event:hover {
    transform: translateY(-1px);
    border-color: rgba(59, 130, 246, .22);
    background: linear-gradient(180deg, rgba(59, 130, 246, .08), transparent 55%),
        rgba(255, 255, 255, .03);
}

.event-time {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .07);
    background: rgba(0, 0, 0, .18);
    padding: 10px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.event-time .t {
    font-weight: 1000;
    font-size: 16px;
    letter-spacing: .2px;
}

.event-time .u {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.event-body {
    min-width: 0;
}

.event-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.flag {
    font-weight: 900;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
    color: var(--text);
    letter-spacing: .3px;
}

.name {
    font-weight: 1000;
    letter-spacing: .2px;
    font-size: 14px;
}

.event-meta {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    font-size: 12px;
    color: var(--muted);
}

.event-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .06);
    background: rgba(255, 255, 255, .02);
}

.event-hint {
    margin-top: 8px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.45;
    opacity: .92;
}

/* Right side actions */
.event-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Tags for impact */
.tag {
    font-weight: 1000;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
    color: var(--muted);
    letter-spacing: .3px;
    white-space: nowrap;
}

.tag.high {
    color: var(--red);
    border-color: rgba(239, 68, 68, .25);
    background: rgba(239, 68, 68, .08);
}

.tag.med {
    color: var(--amber);
    border-color: rgba(245, 158, 11, .25);
    background: rgba(245, 158, 11, .08);
}

.tag.low {
    color: var(--green);
    border-color: rgba(34, 197, 94, .25);
    background: rgba(34, 197, 94, .08);
}

/* Right details column placeholder look */
.cal-right .panel {
    position: sticky;
    top: 16px;
}

/* Responsive */
@media (max-width: 1180px) {
    .cal-layout {
        grid-template-columns: 300px 1fr;
    }

    .cal-right {
        display: none;
    }
}

@media (max-width: 820px) {
    .cal-layout {
        grid-template-columns: 1fr;
    }

    .cal-left {
        order: 2;
    }

    .cal-main {
        order: 1;
    }

    .cal-right {
        display: block;
        order: 3;
    }

    .cal-right .panel {
        position: static;
    }

    .event {
        grid-template-columns: 1fr;
    }

    .event-actions {
        justify-content: flex-start;
    }

    .event-time {
        flex-direction: row;
        gap: 10px;
        align-items: center;
    }

    .event-time .u {
        margin-top: 0;
    }
}


/* ============================================================================
   Trading Context Styles
   ============================================================================ */

/* Placeholder Cards (Coming Soon) */
.card-placeholder {
    opacity: 0.7;
    position: relative;
}

.card-placeholder:hover {
    transform: none;
    border-color: var(--line);
}

.pill-coming-soon {
    font-weight: 900;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, .25);
    background: rgba(245, 158, 11, .08);
    color: var(--amber);
    white-space: nowrap;
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    margin-top: 12px;
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.placeholder-text {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    max-width: 240px;
}

.trading-context-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.context-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.context-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
}

.context-signal {
    font-size: 11px;
    font-weight: 700;
}

.context-summary {
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted);
    margin-bottom: 12px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-left: 2px solid var(--blue);
}

/* Progress Bars */
.progress-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.progress-bar-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.progress-bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
}

.progress-bar-label span:first-child {
    color: var(--muted);
}

.progress-bar-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Context Sections */
.context-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.context-block {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
}

.context-block-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    margin-bottom: 8px;
}

.context-block-empty {
    font-size: 11px;
    color: var(--muted);
    text-align: center;
    padding: 8px 0;
}

/* Historical Stats */
.stats-grid {
    /* display: grid; */
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.stat-item {
    text-align: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 9px;
    color: var(--muted);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Matching Patterns */
.patterns-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pattern-item {
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 2px solid var(--blue);
}

.pattern-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.pattern-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
}

.pattern-direction {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pattern-strength {
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 4px;
}

.pattern-notes {
    font-size: 10px;
    color: var(--muted);
    line-height: 1.4;
}

/* Historical Context */
.context-bullets {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.context-bullets li {
    font-size: 11px;
    line-height: 1.5;
    color: var(--muted);
    margin-bottom: 6px;
    position: relative;
}

.context-bullets li:before {
    content: "•";
    position: absolute;
    left: -14px;
    color: var(--blue);
    font-weight: 700;
}

.context-bullets li:last-child {
    margin-bottom: 0;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
    font-size: 14px;
}

.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.error-text {
    max-width: 400px;
}

.error-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.error-msg {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .context-summary {
        font-size: 11px;
    }

    .progress-bar-label {
        font-size: 10px;
    }
}


/* ============================================================================
   Reports Section Styles
   ============================================================================ */

.reports-container {
    padding: 20px 6px;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.report-card {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 42%),
        linear-gradient(180deg, var(--card), var(--card2));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    /* min-height: 280px; */
    display: flex;
    flex-direction: column;
}

.report-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, .35);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .4);
}

.report-card-disabled {
    opacity: 0.7;
}

.report-card-disabled:hover {
    transform: translateY(-2px);
    border-color: var(--line);
}

.report-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.report-card:hover .report-card-bg {
    opacity: 0.8;
}

.report-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    /* height: 100%; */
}

.report-card-icon {
    font-size: 48px;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.report-card-header {
    margin-bottom: 12px;
}

.report-card-title {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.3px;
    color: var(--text);
    margin-bottom: 4px;
}

.report-card-subtitle {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-card-date {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 20px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: inline-block;
    align-self: flex-start;
}

.report-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.9));
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 12px;
    color: var(--text);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: auto;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.report-card-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 1), rgba(37, 99, 235, 1));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

.report-card-btn svg {
    transition: transform 0.2s ease;
}

.report-card-btn:hover svg {
    transform: translateX(4px);
}

.report-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    color: var(--amber);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
    align-self: flex-start;
}

/* Responsive */
@media (max-width: 1180px) {
    .reports-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 820px) {
    .reports-grid {
        grid-template-columns: 1fr;
    }

    .report-card {
        /* min-height: 240px; */
    }
}


/* ===== Reports Section (FlowScope style) ===== */
:root {
    --bg0: #070b14;
    --bg1: #0a1020;
    --card: #0b1224cc;
    --stroke: rgba(255, 255, 255, .08);
    --stroke2: rgba(255, 255, 255, .12);
    --text: rgba(255, 255, 255, .92);
    --muted: rgba(255, 255, 255, .62);
    --muted2: rgba(255, 255, 255, .48);

    --shadow: 0 18px 60px rgba(0, 0, 0, .45);
    --shadow2: 0 10px 30px rgba(0, 0, 0, .38);

    --r: 18px;
    --r2: 22px;
    --pad: 18px;

    --blue: 59, 130, 246;
    --green: 34, 197, 94;
    --amber: 245, 158, 11;
    --violet: 147, 51, 234;
}

.section-reports {
    /* padding: 46px 0; */
}

.reports-container {
    /* max-width: 1120px; */
    margin: 0 auto;
    padding: 0 16px;
}

.reports-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.reports-title {
    margin: 0;
    font-size: 20px;
    letter-spacing: .2px;
    color: var(--text);
}

.reports-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.reports-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.reports-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, .03);
    color: var(--muted);
    font-size: 12px;
    cursor: default;
}

.reports-chip .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(var(--green), .9);
    box-shadow: 0 0 0 4px rgba(var(--green), .12);
}

.reports-link {
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, .02);
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.reports-link:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .04);
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
}

.report-card {
    position: relative;
    grid-column: span 4;
    border-radius: var(--r2);
    border: 1px solid var(--stroke);
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
    box-shadow: var(--shadow2);
    overflow: hidden;
    isolation: isolate;
    transform: translateZ(0);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.report-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, .14);
    box-shadow: var(--shadow);
}

.report-card-bg {
    position: absolute;
    inset: -1px;
    opacity: .9;
    filter: blur(0px);
    transform: translateZ(0);
}

.report-card-noise {
    position: absolute;
    /* inset: 0; */
    opacity: .35;
    mix-blend-mode: overlay;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .10), transparent 42%),
        radial-gradient(circle at 80% 35%, rgba(255, 255, 255, .08), transparent 44%),
        linear-gradient(0deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.report-card-content {
    position: relative;
    /* padding: var(--pad); */
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* min-height: 210px; */
}

.report-card-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.report-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(10, 16, 32, .55);
    display: grid;
    place-items: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
}

.report-card-icon svg {
    width: 22px;
    height: 22px;
    color: rgba(255, 255, 255, .86);
}

.report-card-market {
    flex: 1;
    min-width: 0;
}

.report-card-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--text);
}

.report-card-subtitle {
    margin-top: 2px;
    font-size: 12px;
    color: var(--muted);
}

.report-card-status {
    display: flex;
    justify-content: flex-end;
}

.pill {
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, .03);
    color: rgba(255, 255, 255, .78);
    white-space: nowrap;
}

.pill-live {
    border-color: rgba(var(--green), .22);
    background: rgba(var(--green), .10);
    color: rgba(230, 255, 240, .92);
}

.pill-soon {
    border-color: rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .04);
    color: rgba(255, 255, 255, .72);
}

.report-card-meta {
    /* display: grid; */
    grid-template-columns: 1fr 1fr;
    /* gap: 10px; */
    /* margin-top: 2px; */
}

.meta-item {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(10, 16, 32, .38);
}

.meta-label {
    font-size: 11px;
    color: var(--muted2);
}

.meta-value {
    /* margin-top: 4px; */
    font-size: 12px;
    color: rgba(255, 255, 255, .88);
    font-weight: 600;
}

.report-card-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .14), transparent);
    opacity: .75;
    margin-top: 2px;
}

.report-card-bottom {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.report-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .04);
    color: rgba(255, 255, 255, .92);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2px;
    transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.report-card-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .18);
}

.report-card-btn svg {
    opacity: .9;
}

.report-card-btn.is-muted {
    opacity: .65;
    cursor: not-allowed;
}

.report-card-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, .55);
    font-size: 12px;
    user-select: none;
}

.kbd {
    font-size: 11px;
    padding: 4px 7px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(0, 0, 0, .24);
    color: rgba(255, 255, 255, .72);
}

/* Background gradients per card */
.gradient-eurusd {
    background:
        radial-gradient(900px 420px at 20% 15%, rgba(var(--blue), .28), transparent 55%),
        radial-gradient(760px 360px at 85% 25%, rgba(var(--violet), .24), transparent 56%),
        linear-gradient(180deg, rgba(10, 16, 32, .65), rgba(10, 16, 32, .25));
}

.gradient-gbpusd {
    background:
        radial-gradient(900px 420px at 20% 15%, rgba(var(--green), .24), transparent 55%),
        radial-gradient(760px 360px at 85% 25%, rgba(16, 185, 129, .20), transparent 56%),
        linear-gradient(180deg, rgba(10, 16, 32, .65), rgba(10, 16, 32, .25));
}

.gradient-usdjpy {
    background:
        radial-gradient(900px 420px at 20% 15%, rgba(var(--amber), .22), transparent 55%),
        radial-gradient(760px 360px at 85% 25%, rgba(251, 146, 60, .20), transparent 56%),
        linear-gradient(180deg, rgba(10, 16, 32, .65), rgba(10, 16, 32, .25));
}

/* Disabled state */
.report-card.is-disabled {
    filter: saturate(.9);
}

.report-card.is-disabled:hover {
    transform: none;
    box-shadow: var(--shadow2);
}

.report-card.is-disabled .report-card-content {
    opacity: .78;
}

.report-card-badge {
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px dashed rgba(255, 255, 255, .18);
    color: rgba(255, 255, 255, .68);
    background: rgba(255, 255, 255, .03);
}

/* Responsive */
@media (max-width: 980px) {
    .report-card {
        grid-column: span 6;
    }
}

@media (max-width: 640px) {
    .reports-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .report-card {
        grid-column: span 12;
    }

    .report-card-meta {
        grid-template-columns: 1fr;
    }
}

/* Pair icon (TradingView-like) */
.pair-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(10, 16, 32, .55);
    display: grid;
    place-items: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
}

.pair-icon__badge {
    position: relative;
    width: 30px;
    height: 22px;
}

.pair-icon__img {
    position: absolute;
    top: 0;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    object-fit: cover;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .35);
}

.pair-icon__img.a {
    left: 0;
}

.pair-icon__img.b {
    left: 12px;
}

/* subtle inner ring for premium look */
.pair-icon__badge::after {
    content: "";
    position: absolute;
    inset: -6px -6px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    pointer-events: none;
    opacity: .7;
}

/* Disabled cards look muted */
.report-card.is-disabled .pair-icon {
    opacity: .75;
}

.report-card.is-disabled .pair-icon__img {
    filter: grayscale(.35) saturate(.8);
}

/* Event movements display */
.event-movements {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 11px;
}

.event-movements>div:first-child {
    color: #94a3b8;
    font-size: 10px;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.event-movements>div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}


/* ========================
   Calendar Card-Based Layout
   ========================= */

/* Card grid container */
.calendar-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
    padding: 4px;
}

/* Individual calendar card */
.calendar-card {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 42%),
        linear-gradient(180deg, var(--card), var(--card2));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
    cursor: pointer;
}

.calendar-card:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, .25);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(59, 130, 246, .15);
}

/* Card header with time and importance */
.calendar-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 12px;
}

.calendar-card-time {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calendar-card-time-local {
    font-weight: 1000;
    font-size: 18px;
    letter-spacing: .2px;
    color: var(--text);
}

.calendar-card-time-utc {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}

.calendar-card-importance {
    font-weight: 1000;
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
    color: var(--muted);
    letter-spacing: .3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.calendar-card-importance.high {
    color: var(--red);
    border-color: rgba(239, 68, 68, .30);
    background: rgba(239, 68, 68, .12);
}

.calendar-card-importance.medium {
    color: var(--amber);
    border-color: rgba(245, 158, 11, .30);
    background: rgba(245, 158, 11, .12);
}

.calendar-card-importance.low {
    color: var(--green);
    border-color: rgba(34, 197, 94, .30);
    background: rgba(34, 197, 94, .12);
}

/* Card body with event info */
.calendar-card-body {
    margin-bottom: 12px;
}

.calendar-card-country {
    display: inline-block;
    font-weight: 900;
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    letter-spacing: .3px;
    margin-bottom: 10px;
}

.calendar-card-title {
    font-weight: 900;
    font-size: 15px;
    letter-spacing: .2px;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 10px;
}

.calendar-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: var(--muted);
}

.calendar-card-meta-item {
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .06);
    background: rgba(255, 255, 255, .02);
    font-weight: 600;
}

/* Reaction indicators */
.calendar-card-reactions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.calendar-card-reactions-title {
    font-size: 10px;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.calendar-card-reactions-data {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.calendar-card-reaction-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
    font-size: 12px;
    font-weight: 700;
}

.calendar-card-reaction-label {
    color: var(--muted);
    font-size: 11px;
}

.calendar-card-reaction-value {
    color: var(--text);
    font-weight: 900;
}

.calendar-card-reaction-arrow {
    font-size: 14px;
    line-height: 1;
}

/* Direction-based colors */
.calendar-card-reaction-item.bullish {
    border-color: rgba(34, 197, 94, .25);
    background: rgba(34, 197, 94, .08);
}

.calendar-card-reaction-item.bullish .calendar-card-reaction-value {
    color: var(--green);
}

.calendar-card-reaction-item.bullish .calendar-card-reaction-arrow {
    color: var(--green);
}

.calendar-card-reaction-item.bearish {
    border-color: rgba(239, 68, 68, .25);
    background: rgba(239, 68, 68, .08);
}

.calendar-card-reaction-item.bearish .calendar-card-reaction-value {
    color: var(--red);
}

.calendar-card-reaction-item.bearish .calendar-card-reaction-arrow {
    color: var(--red);
}

.calendar-card-reaction-item.neutral {
    border-color: rgba(107, 114, 128, .25);
    background: rgba(107, 114, 128, .08);
}

.calendar-card-reaction-item.neutral .calendar-card-reaction-value {
    color: var(--muted);
}

.calendar-card-reaction-item.neutral .calendar-card-reaction-arrow {
    color: var(--muted);
}

/* Sample size badge */
.calendar-card-sample-size {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
    font-size: 10px;
    color: var(--muted);
    font-weight: 700;
}

/* Loading state for reactions */
.calendar-card-reactions-loading {
    font-size: 11px;
    color: var(--muted);
    font-style: italic;
}

/* Responsive grid adjustments */
@media (max-width: 1024px) {
    .calendar-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .calendar-cards-grid {
        grid-template-columns: 1fr;
    }

    .calendar-card {
        padding: 14px;
    }

    .calendar-card-header {
        flex-direction: row;
        align-items: center;
    }
}

/* Touch targets for mobile */
@media (max-width: 768px) {
    .calendar-card {
        min-height: 44px;
    }

    .calendar-card-importance {
        padding: 8px 12px;
        font-size: 12px;
    }
}


/* ========================
   New Calendar Structure Styles
   ========================= */

/* Calendar Layout */
.cal-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    padding: 8px;
}

/* Sidebar */
.cal-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cal-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 42%),
        linear-gradient(180deg, var(--card), var(--card2));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.cal-panel-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.cal-panel-title {
    margin: 0;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
}

.cal-panel-body {
    padding: 14px 16px;
}

/* Tomorrow High Impacts */
.tomorrow-impacts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tomorrow-impact-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, .25);
    background: rgba(239, 68, 68, .08);
    transition: all .15s ease;
    cursor: pointer;
}

.tomorrow-impact-item:hover {
    background: rgba(239, 68, 68, .12);
    border-color: rgba(239, 68, 68, .35);
    transform: translateY(-1px);
}

.tomorrow-impact-time {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.3px;
}

.tomorrow-impact-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}

.tomorrow-impact-country {
    font-size: 10px;
    font-weight: 700;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filter Chips */
.cal-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cal-filter-chip {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .03);
    color: var(--muted);
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    transition: all .15s ease;
}

.cal-filter-chip:hover {
    background: rgba(255, 255, 255, .06);
    color: var(--text);
    transform: translateY(-1px);
}

.cal-filter-chip.active {
    color: var(--text);
    border-color: rgba(59, 130, 246, .35);
    background: linear-gradient(135deg, rgba(59, 130, 246, .30), rgba(155, 92, 255, .14));
}

/* Watchlist Items */
.watchlist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .06);
    background: rgba(255, 255, 255, .03);
    margin-bottom: 8px;
    transition: all .15s ease;
}

.watchlist-item:last-child {
    margin-bottom: 0;
}

.watchlist-item:hover {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(59, 130, 246, .18);
}

.watchlist-pair {
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.3px;
    color: var(--text);
}

.watchlist-impact {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.watchlist-impact.high {
    color: var(--red);
    border-color: rgba(239, 68, 68, .25);
    background: rgba(239, 68, 68, .08);
}

.watchlist-impact.medium {
    color: var(--amber);
    border-color: rgba(245, 158, 11, .25);
    background: rgba(245, 158, 11, .08);
}

.watchlist-impact.low {
    color: var(--green);
    border-color: rgba(34, 197, 94, .25);
    background: rgba(34, 197, 94, .08);
}

/* Main Calendar Area */
.cal-main {
    min-width: 0;
}

.cal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.cal-header-left {
    flex: 1;
}

.cal-title {
    margin: 0 0 4px 0;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.3px;
    color: var(--text);
}

.cal-subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.cal-header-right {
    display: flex;
    gap: 10px;
}

/* Loading State */
.cal-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.cal-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, .1);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.cal-loading-state p {
    color: var(--muted);
    font-size: 14px;
}

.cal-loading {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    padding: 12px;
}

/* Responsive */
@media (max-width: 820px) {
    .cal-layout {
        grid-template-columns: 1fr;
    }

    .cal-sidebar {
        order: 2;
    }

    .cal-main {
        order: 1;
    }

    .cal-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================================
   CALENDAR LIST LAYOUT (NEW)
   ======================================== */

/* Calendar list container */
.calendar-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: rgba(255, 255, 255, .03);
    border-radius: 16px;
    overflow: hidden;
}

/* Day header for grouped calendar view */
.calendar-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(59, 130, 246, 0.08);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
    margin-top: 8px;
}

.calendar-day-header:first-child {
    margin-top: 0;
}

.calendar-day-name {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: -0.01em;
}

.calendar-day-date {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
}

/* Individual calendar row */
.calendar-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--bg);
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    transition: all .15s ease;
}

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

.calendar-row:hover {
    background: rgba(255, 255, 255, .03);
}

/* Time column */
.calendar-row-time {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 80px;
}

.calendar-row-time-local {
    font-weight: 900;
    font-size: 14px;
    color: var(--text);
    letter-spacing: -.01em;
}

.calendar-row-time-utc {
    font-size: 10px;
    color: var(--muted);
    font-weight: 600;
}

/* Title column */
.calendar-row-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-row-country {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .05);
    color: var(--muted);
    letter-spacing: .05em;
    min-width: 32px;
}

.calendar-row-event-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    letter-spacing: -.01em;
}

/* Importance badge */
.calendar-row-importance {
    padding: 5px 12px;
    font-weight: 900;
    font-size: 10px;
    border-radius: 999px;
    border: 1px solid;
    letter-spacing: .03em;
    background: rgba(255, 255, 255, .02);
    white-space: nowrap;
    min-width: 60px;
    text-align: center;
}

.calendar-row-importance.high {
    background: rgba(239, 68, 68, .12);
    color: var(--red);
    border-color: rgba(239, 68, 68, .30);
}

.calendar-row-importance.medium {
    background: rgba(245, 158, 11, .12);
    color: var(--amber);
    border-color: rgba(245, 158, 11, .30);
}

.calendar-row-importance.low {
    background: rgba(34, 197, 94, .12);
    color: var(--green);
    border-color: rgba(34, 197, 94, .30);
}

/* Reactions summary (inline) */
.calendar-row-reactions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .05);
    font-size: 11px;
    min-width: 140px;
}

.calendar-row-reaction-value {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 800;
}

.calendar-row-reaction-value.bullish {
    color: var(--green);
}

.calendar-row-reaction-value.bearish {
    color: var(--red);
}

.calendar-row-reaction-value.neutral {
    color: var(--muted);
}

/* Details button */
.calendar-row-details-btn {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 8px;
    background: rgba(59, 130, 246, .12);
    color: rgba(59, 130, 246, 1);
    border: 1px solid rgba(59, 130, 246, .25);
    cursor: pointer;
    transition: all .15s ease;
    white-space: nowrap;
}

.calendar-row-details-btn:hover {
    background: rgba(59, 130, 246, .18);
    border-color: rgba(59, 130, 246, .35);
    transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .calendar-row {
        flex-wrap: wrap;
        gap: 12px;
    }

    .calendar-row-reactions {
        order: 10;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .calendar-row {
        padding: 12px 14px;
        gap: 10px;
    }

    .calendar-row-time {
        min-width: 70px;
    }

    .calendar-row-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* gap: 16px; */
    /* padding: 18px 16px 14px; */
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    min-width: 0;
    /* щоб текст нормально обрізався, якщо треба */
}

.brand-mark {
    width: 48px;
    /* було ~24-32 -> стає 48 */
    height: 48px;
    flex: 0 0 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.brand-mark svg {
    width: 32px;
    /* сам знак більший */
    height: 32px;
    display: block;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    line-height: 1;
    min-width: 0;
}

.brand-name {
    font-size: 18px;
    /* було десь 16-18 -> стає 22 */
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #707070, #ffffff, #000000);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.brand-sub {
    font-size: 12px;
    /* було 10-11 -> 12 */
    font-weight: 700;
    letter-spacing: 0.28em;
    color: rgba(203, 213, 225, 0.92);
    /* background: linear-gradient(135deg, #9000004f, #3b9f1f6b, #000000); */
}

.brand-tag {
    margin-top: 4px;
    font-size: 10px;
    /* дрібно, але читабельно */
    font-weight: 650;
    letter-spacing: 0.12em;
    color: rgba(148, 163, 184, 0.78);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
    /* під sidebar */
}

/* кнопка меню — теж зробимо “преміум” */
.icon-btn {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    display: grid;
    place-items: center;
    color: rgba(226, 232, 240, 0.92);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}


/* ============================================================================
   Macro Desk Styles
   ============================================================================ */

/* Grid Layout */
.macro-desk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    /* padding: 20px; */
    max-width: 1800px;
    margin: 0 auto;
}

/* Responsive breakpoints */
@media (min-width: 1400px) {
    .macro-desk-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1000px) and (max-width: 1399px) {
    .macro-desk-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 999px) {
    .macro-desk-grid {
        grid-template-columns: 1fr;
    }
}

/* Card size classes */
.card-large {
    grid-column: span 1;
}

.card-medium {
    grid-column: span 1;
}

.card-small {
    grid-column: span 1;
}

@media (min-width: 1400px) {
    .card-large {
        grid-column: span 2;
    }
}

/* Base card styles */
.macro-card {
    /* background: linear-gradient(135deg, #1a1f2e 0%, #252b3d 100%); */
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
    /* border-radius: 12px; */
    padding: 20px;
    /* transition: all 0.3s ease; */
    /* box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); */
}

.macro-card:hover {
    border-color: rgba(74, 144, 226, 0.5);
    box-shadow: 0 8px 16px rgba(74, 144, 226, 0.2);
    transform: translateY(-2px);
}

.macro-card-header {
    /* margin-bottom: 16px; */
    /* padding-bottom: 12px; */
    /* border-bottom: 1px solid rgba(255, 255, 255, 0.1); */
}

.macro-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.macro-card-body {
    color: #e0e0e0;
}

/* Error card styles */
.macro-card-error {
    background: linear-gradient(135deg, #2e1a1a 0%, #3d2525 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

.error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.error-content p {
    color: #ef4444;
    margin: 0;
}

/* Empty card styles */
.macro-card-empty {
    background: linear-gradient(135deg, #1a1f2e 0%, #252b3d 100%);
    border-color: rgba(255, 255, 255, 0.05);
}

.empty-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-content p {
    color: #9ca3af;
    margin: 0;
}

/* Visual indicator styles */
:root {
    --color-positive: #10b981;
    --color-negative: #ef4444;
    --color-neutral: #6b7280;
}

.value-positive {
    color: var(--color-positive);
}

.value-negative {
    color: var(--color-negative);
}

.value-neutral {
    color: var(--color-neutral);
}

.badge-positive {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--color-positive);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-negative {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--color-negative);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-neutral {
    background-color: rgba(107, 114, 128, 0.2);
    color: var(--color-neutral);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Data section specific styles */
.indicators-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.indicator-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.indicator-label {
    font-size: 14px;
    color: #9ca3af;
}

.indicator-value {
    font-size: 16px;
    font-weight: 600;
}

/* Macro Pulse styles */
.macro-pulse-score {
    font-size: 64px;
    font-weight: 700;
    text-align: center;
    margin: 20px 0;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.macro-pulse-direction {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 16px;
}

.macro-pulse-description {
    text-align: center;
    color: #9ca3af;
    line-height: 1.6;
}

/* Yield Spread styles */
.yield-spread-chart {
    display: flex;
    flex-direction: column;
    padding-top: 15px;
    align-items: center;
    margin-bottom: 16px;
}

.spread-value {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
}

.spread-trend {
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
}

.yield-details {
    display: flex;
    justify-content: space-around;
    padding-top: 16px;
    /* border-top: 1px solid rgba(255, 255, 255, 0.1); */
}

.yield-details div {
    font-size: 14px;
    color: #9ca3af;
}

/* Sentiment Gauge styles */
.sentiment-gauge {
    font-size: 56px;
    font-weight: 700;
    text-align: center;
    margin: 20px 0;
}

.sentiment-label {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.sentiment-sources {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.source-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

/* News Feed styles */
.news-feed {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-feed::-webkit-scrollbar {
    width: 6px;
}

.news-feed::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.news-feed::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.news-item {
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border-left: 3px solid #4a90e2;
}

.news-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #9ca3af;
}

.news-date {
    color: #6b7280;
}

.news-impact {
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-high {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.badge-medium {
    background-color: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.badge-low {
    background-color: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

/* Risk Level styles */
.risk-level {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.05);
}

.factors-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.factor-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.factor-name {
    font-size: 14px;
}

.factor-impact {
    font-size: 16px;
    font-weight: 600;
}

/* Signals List styles */
.signals-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.signal-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

/* Confidence styles */
.confidence-level {
    text-align: center;
    font-size: 14px;
    color: #9ca3af;
    margin-top: 12px;
}

.confidence-bar {
    position: relative;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    margin: 16px 0;
}

.confidence-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #4a90e2 0%, #357abd 100%);
    transition: width 0.3s ease;
}

.confidence-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    z-index: 1;
}

/* Institutional Bias styles */
.bias-score {
    font-size: 72px;
    font-weight: 700;
    text-align: center;
    margin: 20px 0;
}

.bias-direction {
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
}

.components-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.component-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.component-name {
    font-size: 14px;
}

.component-contribution {
    font-size: 16px;
    font-weight: 600;
}

/* Macro Snapshot styles */
.health-score {
    font-size: 64px;
    font-weight: 700;
    text-align: center;
    margin: 20px 0;
}

.health-label {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.indicators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.indicator-box {
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    text-align: center;
}

.indicator-name {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.indicator-box .indicator-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.indicator-trend {
    font-size: 14px;
    font-weight: 600;
}

/* Cross-Market Confirmation styles */
.risk-signal {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.risk-score {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
}

.correlations-matrix {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.correlation-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.confirmation-strength {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    text-transform: uppercase;
}

/* Loading state styles */
.macro-desk-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.macro-desk-loading p {
    color: #9ca3af;
    font-size: 16px;
}

/* Error state styles */
.macro-desk-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px;
    text-align: center;
}

.macro-desk-error-state .error-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.macro-desk-error-state h3 {
    color: #ef4444;
    margin-bottom: 12px;
}

.macro-desk-error-state p {
    color: #9ca3af;
    margin-bottom: 24px;
}

.retry-button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.retry-button:hover {
    background: linear-gradient(135deg, #357abd 0%, #2a5f8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.retry-button:active {
    transform: translateY(0);
}

/* Typography styles */
.macro-card h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #ffffff;
}

.macro-card h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #ffffff;
}

.macro-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #ffffff;
}

.text-sm {
    font-size: 14px;
}

.text-xs {
    font-size: 12px;
}

.text-muted {
    color: #9ca3af;
}

.text-bold {
    font-weight: 600;
}

/* Additional Macro Desk styles */
.factors-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.factor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.factor-name {
    font-size: 14px;
    color: #9ca3af;
}

.factor-impact {
    font-size: 14px;
    font-weight: 600;
}

.relevant-articles {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: #9ca3af;
    text-align: center;
}

.badge-positive {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-negative {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-neutral {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}


/* ============================================================================
   Macro Pulse & Market Indicators Tooltip Styles
   ============================================================================ */

/* Tooltip container */
.tooltip {
    position: relative;
    display: inline-block;
}

/* Tooltip text */
.tooltip .tooltiptext {
    visibility: hidden;
    width: 300px;
    background-color: rgba(17, 24, 39, 0.98);
    color: #e2e8f0;
    text-align: left;
    border-radius: 8px;
    padding: 12px 16px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -150px;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    font-size: 12px;
    line-height: 1.6;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Tooltip arrow */
.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: rgba(17, 24, 39, 0.98) transparent transparent transparent;
}

/* Show tooltip on hover */
.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Wider tooltips for detailed content */
.tooltip .tooltiptext[style*="width: 350px"],
.tooltip .tooltiptext[style*="width: 400px"] {
    width: var(--tooltip-width, 350px);
    margin-left: calc(var(--tooltip-width, 350px) / -2);
}

/* Macro Pulse specific styles */
.macro-pulse-score {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.macro-pulse-direction {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.confidence-level {
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 12px;
}

.macro-pulse-description {
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.5;
    margin-top: 12px;
}

/* Market Indicators specific styles */
.indicators-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.indicator-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    transition: background 0.2s;
}

.indicator-item:hover {
    background: rgba(0, 0, 0, 0.3);
}

.indicator-label {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
}

.indicator-value {
    font-size: 15px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* Color classes for values */
.value-positive {
    color: #10b981;
}

.value-negative {
    color: #ef4444;
}

.value-neutral {
    color: #f59e0b;
}

/* Component breakdown styles */
.component-breakdown {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
}

.component-item {
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-size: 11px;
}

.component-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.component-name {
    font-weight: 600;
    color: #e2e8f0;
}

.component-weight {
    color: #94a3b8;
    font-size: 10px;
}

.component-value {
    color: #cbd5e1;
    line-height: 1.4;
}

/* Enhanced card styles for inline styling support */
.macro-card[style*="border-left"] {
    border-left-width: 4px !important;
    border-left-style: solid !important;
}

/* Responsive tooltip positioning */
@media (max-width: 768px) {
    .tooltip .tooltiptext {
        width: 280px;
        margin-left: -140px;
        font-size: 11px;
    }

    .tooltip .tooltiptext[style*="width: 350px"],
    .tooltip .tooltiptext[style*="width: 400px"] {
        width: 280px;
        margin-left: -140px;
    }
}

/* Ensure tooltips don't overflow viewport */
@media (max-width: 480px) {
    .tooltip .tooltiptext {
        width: calc(100vw - 40px);
        left: 50%;
        transform: translateX(-50%);
        margin-left: 0;
    }

    .tooltip .tooltiptext[style*="width: 350px"],
    .tooltip .tooltiptext[style*="width: 400px"] {
        width: calc(100vw - 40px);
        margin-left: 0;
    }
}

/* Animation for tooltip appearance */
@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tooltip:hover .tooltiptext {
    animation: tooltipFadeIn 0.2s ease-out;
}

/* Scrollable content within tooltips */
.tooltip .tooltiptext {
    max-height: 400px;
    overflow-y: auto;
}

.tooltip .tooltiptext::-webkit-scrollbar {
    width: 6px;
}

.tooltip .tooltiptext::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.tooltip .tooltiptext::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 3px;
}

.tooltip .tooltiptext::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}