﻿.dm-ai-fit, .dm-ai-fit * {
    box-sizing: border-box
}

.dm-ai-fit {
    margin: 0;
    background: #080e1b;
    color: #eaf1ff;
    font: 14px system-ui,Arial
}

    .dm-ai-fit .app {
        padding: 14px;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        gap: 12px
    }

    .dm-ai-fit header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 19px;
        font-weight: 800
    }

        .dm-ai-fit header span {
            color: #39b8ff
        }

    .dm-ai-fit small {
        color: #91a2be;
        font-size: 12px;
        font-weight: 400
    }

    .dm-ai-fit .layout {
        display: grid;
        grid-template-columns: minmax(310px,360px) minmax(0,1fr);
        gap: 12px;
        flex: 1;
        min-height: 0
    }

    .dm-ai-fit .panel {
        background: #111a2c;
        border: 1px solid #29364c;
        border-radius: 16px;
        overflow: hidden;
        display: flex;
        flex-direction: column
    }

    .dm-ai-fit .head {
        padding: 13px;
        border-bottom: 1px solid #29364c
    }

        .dm-ai-fit .head strong {
            display: block;
            font-size: 16px
        }

        .dm-ai-fit .head small {
            color: #39b8ff
        }

    .dm-ai-fit .context {
        padding: 10px 16px;
        background: #0c1627;
        color: #a4b6ce;
        font-size: 12px
    }

    .dm-ai-fit .messages {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 12px
    }

    .dm-ai-fit .bubble {
        background: #223049;
        padding: 12px;
        border-radius: 14px;
        max-width: 95%;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
        line-height: 1.55
    }

        .dm-ai-fit .bubble.user {
            align-self: flex-end;
            background: #12619c
        }

    .dm-ai-fit .quick {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        padding: 10px
    }

        .dm-ai-fit .quick button {
            border: 1px solid #34465d;
            border-radius: 30px;
            background: #19253b;
            color: #eaf1ff;
            padding: 8px;
            font-size: 12px
        }

    .dm-ai-fit .compose {
        display: flex;
        gap: 8px;
        padding: 12px;
        border-top: 1px solid #29364c
    }

    .dm-ai-fit textarea {
        background: #0c1627;
        border: 1px solid #34465d;
        color: white;
        border-radius: 10px;
        padding: 12px;
        resize: none;
        flex: 1;
        min-width: 0
    }

    .dm-ai-fit button {
        cursor: pointer
    }

        .dm-ai-fit button:focus-visible, .dm-ai-fit select:focus-visible, .dm-ai-fit textarea:focus-visible {
            outline: 2px solid #39b8ff
        }

    .dm-ai-fit .send {
        border: 0;
        background: #168fe5;
        color: #062522;
        border-radius: 10px;
        padding: 10px 14px;
        font-weight: 800
    }

        .dm-ai-fit .send:disabled {
            opacity: .5
        }

    .dm-ai-fit .toolbar {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        justify-content: space-between;
        padding: 14px;
        border-bottom: 1px solid #29364c
    }

        .dm-ai-fit .toolbar strong {
            font-size: 16px
        }

    .dm-ai-fit .controls {
        display: flex;
        flex-wrap: wrap;
        gap: 7px
    }

        .dm-ai-fit .controls input {
            background: #1a2940;
            color: white;
            border: 1px solid #34465d;
            border-radius: 9px;
            padding: 9px;
            width: 155px;
            min-width: 90px
        }

            .dm-ai-fit .controls input::placeholder {
                color: #91a2be
            }

        .dm-ai-fit .controls select, .dm-ai-fit .controls button {
            background: #1a2940;
            color: white;
            border: 1px solid #34465d;
            border-radius: 9px;
            padding: 9px
        }

    .dm-ai-fit .chart {
        flex: 1;
        min-height: 320px;
        background: #0c1423
    }

        .dm-ai-fit .chart iframe {
            border: 0;
            width: 100%;
            height: 100%
        }

    .dm-ai-fit .note {
        padding: 9px 14px;
        color: #9bacc5;
        font-size: 11px;
        border-top: 1px solid #29364c
    }

@media(max-width:850px) {
    .dm-ai-fit .app {
        height: auto;
        min-height: 100dvh
    }

    .dm-ai-fit .layout {
        grid-template-columns: 1fr
    }

    .dm-ai-fit .assistant {
        height: 480px
    }

    .dm-ai-fit .chartpanel {
        height: 600px
    }
}

@media(max-width:480px) {
    .dm-ai-fit .app {
        padding: 8px
    }

    .dm-ai-fit .chartpanel {
        height: 530px
    }

    .dm-ai-fit .controls select {
        max-width: 140px
    }
}

.dm-ai-fit header > div:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap
}

    .dm-ai-fit header > div:first-child > div {
        width: 100%;
        margin-top: -5px
    }

.dm-ai-fit .brand-logo {
    width: 220px;
    max-width: 55vw;
    height: auto;
    object-fit: contain
}

.dm-ai-fit .brand-ai {
    font-size: 22px;
    font-weight: 900;
    color: #39b8ff;
    border: 1px solid #296aa2;
    border-radius: 9px;
    padding: 4px 10px;
    background: #112743
}

@media(max-width:480px) {
    .dm-ai-fit .brand-logo {
        width: 155px
    }

    .dm-ai-fit .brand-ai {
        font-size: 17px
    }
}

.dm-ai-fit {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background: #080e1b;
    color: #eaf1ff;
    font: 14px/1.5 system-ui,Arial,sans-serif;
    border-radius: 22px;
    overflow: hidden;
    isolation: isolate
}

    .dm-ai-fit .app {
        height: auto;
        min-height: 690px;
        width: 100%;
        padding: 16px
    }

    .dm-ai-fit .layout {
        min-height: 610px;
        grid-template-columns: minmax(280px,350px) minmax(0,1fr)
    }

    .dm-ai-fit .panel, .dm-ai-fit .layout {
        min-width: 0
    }

    .dm-ai-fit .chartpanel {
        min-height: 610px
    }

    .dm-ai-fit .assistant {
        min-height: 610px
    }

    .dm-ai-fit .chart {
        min-height: 430px
    }

    .dm-ai-fit button, .dm-ai-fit input, .dm-ai-fit textarea, .dm-ai-fit select {
        font-family: inherit
    }

@media(max-width:850px) {
    .dm-ai-fit .layout {
        grid-template-columns: minmax(0,1fr);
        min-height: 0
    }

    .dm-ai-fit .app {
        height: auto;
        min-height: 0
    }

    .dm-ai-fit .assistant {
        height: 480px;
        min-height: 0
    }

    .dm-ai-fit .chartpanel {
        height: 590px;
        min-height: 0
    }
}

@media(max-width:767px) {
    .dm-ai-fit {
        --dm-parent-left-offset: 50px;
        position: relative !important;
        width: calc(100% + var(--dm-parent-left-offset)) !important;
        max-width: none !important;
        margin-left: calc(-1 * var(--dm-parent-left-offset)) !important;
        margin-right: 0 !important;
        border-radius: 0
    }

        .dm-ai-fit .app {
            padding: 15px !important;
            max-width: 100% !important
        }

        .dm-ai-fit .layout, .dm-ai-fit .panel {
            max-width: 100%;
            min-width: 0
        }
}

@media(max-width:480px) {
    .dm-ai-fit .controls {
        display: grid;
        grid-template-columns: repeat(2,minmax(0,1fr));
        width: 100%
    }

        .dm-ai-fit .controls input, .dm-ai-fit .controls select, .dm-ai-fit .controls button {
            width: 100%;
            min-width: 0;
            max-width: 100%
        }

    .dm-ai-fit .chartpanel {
        height: 540px
    }

    .dm-ai-fit .toolbar {
        gap: 10px
    }
}


/* V3: isolated, logo-free, mobile-safe overrides */
.dm-ai-fit {
    display: block !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
    margin: 0 !important;
    position: relative !important;
    border-radius: 18px
}

    .dm-ai-fit .app {
        height: auto !important;
        min-height: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 16px !important;
        gap: 12px !important
    }

    .dm-ai-fit .dm-ai-topbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
        font-size: 18px;
        font-weight: 800;
        min-width: 0
    }

        .dm-ai-fit .dm-ai-topbar > div:first-child {
            display: flex;
            align-items: center;
            gap: 9px;
            flex-wrap: wrap;
            min-width: 0
        }

            .dm-ai-fit .dm-ai-topbar > div:first-child > div {
                width: 100%;
                margin: 0
            }

    .dm-ai-fit .layout {
        display: grid !important;
        grid-template-columns: minmax(270px,340px) minmax(0,1fr) !important;
        gap: 12px;
        min-width: 0 !important;
        min-height: 0 !important;
        width: 100% !important
    }

    .dm-ai-fit .panel {
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important
    }

    .dm-ai-fit .assistant, .dm-ai-fit .chartpanel {
        height: 650px !important;
        min-height: 0 !important
    }

    .dm-ai-fit .chart {
        min-width: 0 !important;
        min-height: 0 !important;
        flex: 1 1 auto !important;
        overflow: hidden !important
    }

        .dm-ai-fit .chart iframe, .dm-ai-fit .chart .tradingview-widget-container {
            max-width: 100% !important
        }

    .dm-ai-fit .controls {
        min-width: 0;
        max-width: 100%
    }

        .dm-ai-fit .controls input, .dm-ai-fit .controls select, .dm-ai-fit .controls button {
            min-width: 0;
            max-width: 100%;
            box-sizing: border-box
        }

    .dm-ai-fit .compose textarea {
        width: 100%;
        min-width: 0
    }

    .dm-ai-fit .toolbar {
        min-width: 0
    }

@media(max-width:900px) {
    .dm-ai-fit .layout {
        grid-template-columns: minmax(0,1fr) !important
    }

    .dm-ai-fit .assistant {
        height: 430px !important
    }

    .dm-ai-fit .chartpanel {
        height: 620px !important
    }
}

@media(max-width:767px) {
    .dm-ai-fit {
        --dm-parent-left-offset: 50px;
        width: calc(100% + var(--dm-parent-left-offset)) !important;
        max-width: none !important;
        margin-left: calc(-1 * var(--dm-parent-left-offset)) !important;
        margin-right: 0 !important;
        border-radius: 0 !important
    }

        .dm-ai-fit .app {
            padding: 12px 15px !important
        }

        .dm-ai-fit .dm-ai-topbar {
            font-size: 16px
        }

        .dm-ai-fit .layout {
            grid-template-columns: minmax(0,1fr) !important;
            gap: 12px
        }

        .dm-ai-fit .assistant {
            height: 425px !important
        }

        .dm-ai-fit .chartpanel {
            height: 550px !important
        }

        .dm-ai-fit .toolbar {
            padding: 12px !important;
            gap: 10px
        }

            .dm-ai-fit .toolbar > strong {
                width: 100%
            }

        .dm-ai-fit .controls {
            display: grid !important;
            grid-template-columns: repeat(2,minmax(0,1fr)) !important;
            gap: 8px !important;
            width: 100% !important
        }

            .dm-ai-fit .controls input, .dm-ai-fit .controls select, .dm-ai-fit .controls button {
                width: 100% !important;
                max-width: none !important;
                min-width: 0 !important;
                height: 39px;
                font-size: 12px;
                padding: 7px !important
            }

            .dm-ai-fit .controls #searchSymbol {
                grid-column: 1/-1
            }

            .dm-ai-fit .controls #full {
                grid-column: 1/-1
            }

        .dm-ai-fit .messages {
            padding: 12px !important
        }

        .dm-ai-fit .quick {
            gap: 6px !important;
            padding: 8px !important
        }

            .dm-ai-fit .quick button {
                font-size: 11px !important
            }

        .dm-ai-fit .compose {
            padding: 9px !important
        }

        .dm-ai-fit .note {
            font-size: 10px !important;
            line-height: 1.45
        }
}

@media(max-width:360px) {
    .dm-ai-fit .app {
        padding: 10px 12px !important
    }

    .dm-ai-fit .chartpanel {
        height: 560px !important
    }

    .dm-ai-fit .dm-ai-topbar > small {
        font-size: 10px
    }
}

/* V4 FIX: do not shift the entire dashboard outside the CMS content column.
   Unlike some legacy pages, this widget must not use the -50px mobile offset. */
.dm-ai-fit, .dm-ai-fit * {
    box-sizing: border-box !important
}

.dm-ai-fit {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: auto !important;
    right: auto !important;
    transform: none !important
}

    .dm-ai-fit .app, .dm-ai-fit .layout, .dm-ai-fit .panel, .dm-ai-fit .toolbar, .dm-ai-fit .controls, .dm-ai-fit .dm-ai-topbar {
        min-width: 0 !important;
        max-width: 100% !important
    }

        .dm-ai-fit .dm-ai-topbar small, .dm-ai-fit .context, .dm-ai-fit .bubble, .dm-ai-fit .head {
            overflow-wrap: anywhere
        }

@media(max-width:900px) {
    .dm-ai-fit .layout {
        grid-template-columns: minmax(0,1fr) !important
    }
}

@media(max-width:767px) {
    .dm-ai-fit {
        --dm-parent-left-offset: 0px !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 14px !important;
        overflow: hidden !important
    }

        .dm-ai-fit .app {
            width: 100% !important;
            max-width: 100% !important;
            padding: 12px !important;
            margin: 0 !important
        }

        .dm-ai-fit .layout {
            width: 100% !important;
            grid-template-columns: minmax(0,1fr) !important
        }

        .dm-ai-fit .panel {
            width: 100% !important;
            min-width: 0 !important
        }

        .dm-ai-fit .controls {
            width: 100% !important;
            min-width: 0 !important
        }

            .dm-ai-fit .controls > * {
                min-width: 0 !important;
                max-width: 100% !important
            }

        .dm-ai-fit .compose {
            min-width: 0 !important
        }

            .dm-ai-fit .compose textarea {
                min-width: 0 !important;
                flex: 1 1 0 !important
            }

        .dm-ai-fit .send {
            flex: 0 0 auto !important
        }

        .dm-ai-fit .chart, .dm-ai-fit .chart iframe {
            width: 100% !important;
            max-width: 100% !important;
            min-width: 0 !important
        }
}

@media(max-width:360px) {
    .dm-ai-fit .app {
        padding: 9px !important
    }

    .dm-ai-fit .send {
        padding: 9px !important
    }
}

/* DIDIMAX TAB NAVIGATION - isolated from CMS */
.dm-ai-fit .dm-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    background: #f7f8fa;
    padding: 14px;
    border-bottom: 1px solid #dfe5ec
}

.dm-ai-fit .dm-tab {
    appearance: none;
    cursor: pointer;
    background: #fff;
    color: #16314d;
    border: 1px solid #d5dde7;
    border-radius: 9px;
    padding: 12px 18px;
    font: 600 13px system-ui,Arial;
    min-height: 44px;
    transition: background .2s,border-color .2s;
    white-space: normal;
    text-align: center
}

    .dm-ai-fit .dm-tab[aria-selected="true"] {
        background: #fff8e4;
        color: #17283c;
        border-color: #e7bb44;
        box-shadow: inset 0 -3px 0 #efbc3d
    }

    .dm-ai-fit .dm-tab:focus-visible {
        outline: 3px solid #288bea;
        outline-offset: 2px
    }

.dm-ai-fit .dm-tabpanel[hidden] {
    display: none !important
}

.dm-ai-fit .dm-calendar-pane {
    background: #fff;
    color: #15283d;
    padding: 16px;
    min-width: 0
}

.dm-ai-fit .dm-calendar-title {
    font-size: 21px;
    font-weight: 800;
    margin: 0 0 8px;
    color: #122d46
}

.dm-ai-fit .dm-calendar-desc {
    font-size: 13px;
    line-height: 1.7;
    color: #5c6d7f;
    margin: 0 0 18px
}

.dm-ai-fit .dm-calendar-frame {
    height: 750px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e1e8ef;
    border-radius: 16px;
    background: #121a28
}

    .dm-ai-fit .dm-calendar-frame .tradingview-widget-container, .dm-ai-fit .dm-calendar-frame .tradingview-widget-container__widget {
        width: 100%;
        height: 100%
    }

.dm-ai-fit .dm-calendar-credit {
    font-size: 11px;
    color: #64748b;
    padding-top: 10px
}

    .dm-ai-fit .dm-calendar-credit a {
        color: #236cbb
    }

@media(max-width:767px) {
    .dm-ai-fit .dm-tabs {
        padding: 10px;
        gap: 8px;
        display: grid;
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .dm-ai-fit .dm-tab {
        font-size: 12px;
        padding: 11px 6px;
        min-width: 0
    }

    .dm-ai-fit .dm-calendar-pane {
        padding: 12px
    }

    .dm-ai-fit .dm-calendar-frame {
        height: 660px;
        border-radius: 12px
    }

    .dm-ai-fit .dm-calendar-title {
        font-size: 18px
    }
}

@media(max-width:380px) {
    .dm-ai-fit .dm-tab {
        font-size: 11px
    }
}

/* V6 PREMIUM HEADING & GLOW TABS — scoped to DIDIMAX module */
.dm-ai-fit .dm-market-hero {
    background: #fff;
    color: #072b59;
    padding: clamp(24px,4vw,52px) clamp(16px,3.4vw,44px) 24px;
    overflow: hidden
}

.dm-ai-fit .dm-market-hero-inner {
    max-width: 1250px;
    margin: 0 auto
}

.dm-ai-fit .dm-market-kicker {
    margin: 0 0 12px;
    color: #0874d2;
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 800;
    text-transform: uppercase
}

.dm-ai-fit .dm-market-hero h1 {
    font-family: Arial,Helvetica,sans-serif !important;
    font-size: clamp(29px,4.1vw,58px) !important;
    line-height: 1.13 !important;
    font-weight: 900 !important;
    letter-spacing: -1.8px !important;
    color: #073b7c !important;
    margin: 0 0 15px !important;
    max-width: 1150px
}

    .dm-ai-fit .dm-market-hero h1 span {
        background: linear-gradient(100deg,#0861c9,#168bed,#83d8e7);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent
    }

.dm-ai-fit .dm-market-lead {
    font-family: Arial,Helvetica,sans-serif !important;
    font-size: clamp(14px,1.35vw,17px) !important;
    line-height: 1.65 !important;
    color: #244665 !important;
    margin: 0 !important;
    max-width: 1040px
}

.dm-ai-fit .dm-tabs {
    background: #fff !important;
    padding: 12px clamp(16px,3.4vw,44px) 24px !important;
    border-bottom: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important
}

.dm-ai-fit .dm-tab {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    min-height: 50px !important;
    padding: 13px 22px !important;
    border-radius: 13px !important;
    border: 1px solid #d7e4f2 !important;
    background: linear-gradient(135deg,#fff,#f3f8ff) !important;
    color: #154375 !important;
    font: 800 14px Arial,Helvetica,sans-serif !important;
    box-shadow: 0 3px 10px rgba(15,69,136,.07) !important;
    transition: transform .2s,box-shadow .2s,background .2s !important;
    cursor: pointer !important
}

    .dm-ai-fit .dm-tab .dm-tab-symbol {
        font-size: 19px;
        line-height: 1
    }

    .dm-ai-fit .dm-tab[aria-selected="true"] {
        color: #fff !important;
        background: linear-gradient(115deg,#25b8ff,#0873e4 55%,#064db5) !important;
        border-color: #1685ef !important;
        box-shadow: 0 8px 22px rgba(6,105,229,.34),0 0 0 1px rgba(83,190,255,.15) !important
    }

@media(hover:hover) {
    .dm-ai-fit .dm-tab:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 10px 25px rgba(5,92,190,.20) !important
    }

    .dm-ai-fit .dm-tab[aria-selected="true"]:hover {
        box-shadow: 0 12px 28px rgba(6,105,229,.45) !important
    }
}

.dm-ai-fit .dm-tab:focus-visible {
    outline: 3px solid #ffc94d !important;
    outline-offset: 3px !important
}

@media(max-width:767px) {
    .dm-ai-fit .dm-market-hero {
        padding: 26px 15px 18px !important
    }

        .dm-ai-fit .dm-market-hero h1 {
            font-size: clamp(27px,7vw,38px) !important;
            letter-spacing: -.8px !important
        }

    .dm-ai-fit .dm-market-lead {
        font-size: 14px !important
    }

    .dm-ai-fit .dm-tabs {
        display: grid !important;
        grid-template-columns: repeat(2,minmax(0,1fr)) !important;
        gap: 9px !important;
        padding: 8px 15px 18px !important
    }

    .dm-ai-fit .dm-tab {
        min-width: 0 !important;
        min-height: 50px !important;
        padding: 10px 7px !important;
        font-size: 12px !important;
        white-space: normal !important
    }

        .dm-ai-fit .dm-tab .dm-tab-symbol {
            font-size: 15px
        }
}

@media(max-width:360px) {
    .dm-ai-fit .dm-tab {
        font-size: 11px !important;
        gap: 5px !important
    }
}

@media(prefers-reduced-motion:reduce) {
    .dm-ai-fit .dm-tab {
        transition: none !important
    }

        .dm-ai-fit .dm-tab:hover {
            transform: none !important
        }
}

/* V7 — konsistensi alignment: hero, tab, dan dashboard satu garis */
.dm-ai-fit {
    --dm-edge: 24px;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
    box-sizing: border-box !important
}

    .dm-ai-fit .dm-market-hero {
        padding: 42px var(--dm-edge) 18px !important
    }

    .dm-ai-fit .dm-market-hero-inner {
        max-width: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important
    }

    .dm-ai-fit .dm-tabs {
        padding: 12px var(--dm-edge) 22px !important;
        margin: 0 !important
    }

    .dm-ai-fit .app {
        padding: 18px var(--dm-edge) 22px !important
    }

    .dm-ai-fit .dm-market-hero h1 {
        max-width: 1200px !important
    }

@media(max-width:767px) {
    .dm-ai-fit {
        --dm-edge: 12px;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        border-radius: 0 !important
    }

        .dm-ai-fit .dm-market-hero {
            padding: 26px var(--dm-edge) 14px !important
        }

        .dm-ai-fit .dm-tabs {
            padding: 10px var(--dm-edge) 18px !important;
            grid-template-columns: repeat(2,minmax(0,1fr)) !important
        }

        .dm-ai-fit .app {
            padding: 12px var(--dm-edge) 18px !important
        }

        .dm-ai-fit .dm-market-hero-inner, .dm-ai-fit .layout, .dm-ai-fit .panel, .dm-ai-fit .controls {
            min-width: 0 !important;
            max-width: 100% !important
        }
}

/* V8 HIGH-TECH HERO: one cohesive surface with tabs and dashboard */
.dm-ai-fit {
    background: #080e1b !important;
    overflow: hidden !important;
    border-radius: 22px !important;
    border: 1px solid #1c3654 !important;
    box-shadow: 0 18px 50px rgba(8,25,53,.12) !important
}

    .dm-ai-fit .dm-market-hero {
        position: relative !important;
        isolation: isolate;
        background: radial-gradient(ellipse at 92% 0%,rgba(22,143,242,.28),transparent 42%),linear-gradient(115deg,#07172e 0%,#0b2c52 55%,#0b182b 100%) !important;
        color: #fff !important;
        padding: 48px var(--dm-edge) 24px !important;
        overflow: hidden !important
    }

        .dm-ai-fit .dm-market-hero:before {
            content: "";
            position: absolute;
            inset: 0;
            z-index: -1;
            pointer-events: none;
            background-image: linear-gradient(rgba(90,174,255,.065) 1px,transparent 1px),linear-gradient(90deg,rgba(90,174,255,.065) 1px,transparent 1px);
            background-size: 36px 36px;
            mask-image: linear-gradient(90deg,transparent 18%,#000 100%)
        }

        .dm-ai-fit .dm-market-hero:after {
            content: "";
            position: absolute;
            width: 340px;
            height: 340px;
            right: -135px;
            top: -190px;
            border-radius: 50%;
            background: #12a4ff;
            filter: blur(110px);
            opacity: .18;
            pointer-events: none
        }

    .dm-ai-fit .dm-market-kicker {
        color: #6bdbff !important;
        letter-spacing: 2.2px !important;
        margin-bottom: 17px !important
    }

    .dm-ai-fit .dm-market-hero h1 {
        color: #fff !important;
        font-size: clamp(30px,3.9vw,54px) !important;
        line-height: 1.13 !important;
        letter-spacing: -1.45px !important;
        max-width: 1000px !important;
        text-wrap: balance
    }

        .dm-ai-fit .dm-market-hero h1 span {
            background: linear-gradient(90deg,#64bbff,#2de0f4 55%,#a0eafa) !important;
            background-clip: text !important;
            -webkit-background-clip: text !important;
            -webkit-text-fill-color: transparent !important
        }

    .dm-ai-fit .dm-market-lead {
        color: #bcd5ed !important;
        max-width: 840px !important;
        font-size: clamp(14px,1.2vw,16px) !important
    }

    .dm-ai-fit .dm-tabs {
        background: linear-gradient(180deg,#0b2039,#080e1b) !important;
        padding: 10px var(--dm-edge) 23px !important;
        border: 0 !important;
        gap: 12px !important
    }

    .dm-ai-fit .dm-tab {
        background: #152a43 !important;
        border: 1px solid #2c4b6b !important;
        color: #e0efff !important;
        box-shadow: none !important
    }

        .dm-ai-fit .dm-tab[aria-selected="true"] {
            background: linear-gradient(110deg,#26b7ff,#0876e8 60%,#0555bc) !important;
            border-color: #55baff !important;
            box-shadow: 0 7px 24px rgba(7,124,239,.38),inset 0 1px 0 rgba(255,255,255,.25) !important;
            color: #fff !important
        }

    .dm-ai-fit .dm-tabpanel {
        background: #080e1b !important
    }

@media(max-width:767px) {
    .dm-ai-fit {
        border-radius: 14px !important
    }

        .dm-ai-fit .dm-market-hero {
            padding: 28px var(--dm-edge) 20px !important
        }

            .dm-ai-fit .dm-market-hero h1 {
                font-size: clamp(27px,7.2vw,38px) !important;
                letter-spacing: -.7px !important
            }

        .dm-ai-fit .dm-tabs {
            padding: 8px var(--dm-edge) 16px !important;
            gap: 8px !important
        }

        .dm-ai-fit .dm-market-lead {
            font-size: 13px !important;
            line-height: 1.65 !important
        }
}

/* V10 — rounded outer shell while preserving V9 alignment. */
/* V9 — CMS DIDIMAX MOBILE: compensate asymmetric 50px left inset.
   Expand the outer component, not its inner panels. */
@media screen and (max-width:767px) {
    .dm-ai-fit {
        --dm-cms-left-inset: 50px;
        position: relative !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        width: calc(100% + var(--dm-cms-left-inset)) !important;
        max-width: none !important;
        min-width: 0 !important;
        margin-left: calc(-1 * var(--dm-cms-left-inset)) !important;
        margin-right: 0 !important;
        padding: 0 !important;
        border-radius: 20px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

        .dm-ai-fit .dm-market-hero,
        .dm-ai-fit .dm-tabs,
        .dm-ai-fit .app {
            width: 100% !important;
            max-width: 100% !important;
            min-width: 0 !important;
            box-sizing: border-box !important
        }

        .dm-ai-fit .dm-market-hero {
            padding: 24px 12px 18px !important
        }

        .dm-ai-fit .dm-tabs {
            padding: 8px 12px 16px !important
        }

        .dm-ai-fit .app {
            padding: 12px !important
        }

        .dm-ai-fit .dm-market-hero-inner,
        .dm-ai-fit .layout,
        .dm-ai-fit .panel,
        .dm-ai-fit .chartpanel,
        .dm-ai-fit .toolbar,
        .dm-ai-fit .controls {
            max-width: 100% !important;
            min-width: 0 !important
        }

        .dm-ai-fit .dm-market-hero h1 {
            overflow-wrap: break-word !important
        }
}
/* Rounded corners on desktop and mobile, without changing the V9 width. */
.dm-ai-fit {
    border-radius: 24px !important;
    overflow: hidden !important;
    isolation: isolate
}

    .dm-ai-fit .dm-market-hero {
        border-radius: 24px 24px 0 0 !important
    }

@media(max-width:767px) {
    .dm-ai-fit {
        border-radius: 20px !important;
        overflow: hidden !important
    }

        .dm-ai-fit .dm-market-hero {
            border-radius: 20px 20px 0 0 !important
        }
}

/* V12 — Technical Sentiment: match the existing high-tech dashboard */
.dm-ai-fit .dm-sentiment-pane {
    background: #080e1b !important;
    color: #eaf1ff !important;
    padding: 24px !important;
    min-width: 0
}

.dm-ai-fit .dm-sentiment-top {
    margin-bottom: 18px
}

.dm-ai-fit .dm-sentiment-kicker {
    font-size: 11px !important;
    letter-spacing: 1.8px;
    font-weight: 800;
    color: #5ecbff !important;
    margin: 0 0 8px !important
}

.dm-ai-fit .dm-sentiment-top h2 {
    font-size: clamp(22px,3vw,30px) !important;
    font-weight: 850;
    color: #fff !important;
    margin: 0 0 9px !important;
    line-height: 1.2 !important
}

.dm-ai-fit .dm-sentiment-top p:not(.dm-sentiment-kicker) {
    color: #b7cde5;
    font-size: 13px;
    line-height: 1.7;
    margin: 0
}

.dm-ai-fit .dm-sentiment-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background: #111a2c;
    border: 1px solid #29364c;
    border-radius: 15px;
    padding: 14px;
    margin-bottom: 14px
}

    .dm-ai-fit .dm-sentiment-controls label {
        color: #a9c5e0;
        font-size: 12px;
        font-weight: 700
    }

    .dm-ai-fit .dm-sentiment-controls select {
        max-width: 100%;
        min-width: 0;
        background: #1a2940;
        color: #fff;
        border: 1px solid #3a5574;
        border-radius: 10px;
        padding: 11px 12px;
        font-size: 13px
    }

.dm-ai-fit .dm-sentiment-credit {
    color: #94aac3;
    font-size: 11px;
    line-height: 1.65;
    margin: 12px 0 0
}

    .dm-ai-fit .dm-sentiment-credit a {
        color: #6dcfff
    }

@media(max-width:767px) {
    .dm-ai-fit .dm-tabs {
        grid-template-columns: repeat(3,minmax(0,1fr)) !important;
        gap: 6px !important
    }

    .dm-ai-fit .dm-tab {
        padding: 9px 4px !important;
        font-size: 10px !important;
        line-height: 1.25 !important;
        gap: 4px !important;
        overflow-wrap: anywhere !important
    }

        .dm-ai-fit .dm-tab .dm-tab-symbol {
            font-size: 13px !important
        }

    .dm-ai-fit .dm-sentiment-pane {
        padding: 12px !important
    }

    .dm-ai-fit .dm-sentiment-controls {
        display: grid;
        grid-template-columns: minmax(0,1fr);
        gap: 7px;
        padding: 12px
    }

        .dm-ai-fit .dm-sentiment-controls select {
            width: 100% !important
        }
}

@media(max-width:360px) {
    .dm-ai-fit .dm-tab {
        font-size: 9px !important;
        padding: 9px 2px !important
    }
}

/* Technical Sentiment V13: pair explorer */
.dm-ai-fit .dm-sentiment-compare-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
    margin: 28px 0 14px
}

    .dm-ai-fit .dm-sentiment-compare-head h3 {
        color: #fff;
        font-size: 21px;
        line-height: 1.3;
        margin: 0 0 5px
    }

    .dm-ai-fit .dm-sentiment-compare-head p {
        color: #a9bfd7;
        font-size: 12px;
        line-height: 1.6;
        margin: 0
    }

.dm-ai-fit #dm-sentiment-count {
    color: #72caff;
    font-size: 12px;
    white-space: nowrap
}

.dm-ai-fit .dm-sentiment-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 14px
}

.dm-ai-fit .dm-sentiment-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #2b415d;
    border-radius: 16px;
    background: #111a2c
}

    .dm-ai-fit .dm-sentiment-card h4 {
        color: #9edaff;
        margin: 0;
        padding: 14px 12px;
        font-size: 13px;
        text-align: center;
        overflow-wrap: anywhere
    }

.dm-ai-fit .dm-sentiment-mini {
    height: 330px;
    overflow: hidden
}

    .dm-ai-fit .dm-sentiment-mini .tradingview-widget-container, .dm-ai-fit .dm-sentiment-mini .tradingview-widget-container__widget {
        height: 330px;
        width: 100%
    }

.dm-ai-fit .dm-sentiment-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 20px 0 4px
}

    .dm-ai-fit .dm-sentiment-pager button {
        padding: 10px 16px;
        background: #176bd3;
        color: #fff;
        border: 1px solid #4597f2;
        border-radius: 11px;
        font-weight: 700;
        cursor: pointer
    }

        .dm-ai-fit .dm-sentiment-pager button:disabled {
            opacity: .35;
            cursor: default
        }

    .dm-ai-fit .dm-sentiment-pager span {
        color: #b6cbe0;
        font-size: 12px
    }

@media(max-width:1050px) {
    .dm-ai-fit .dm-sentiment-grid {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }
}

@media(max-width:640px) {
    .dm-ai-fit .dm-sentiment-grid {
        grid-template-columns: minmax(0,1fr)
    }

    .dm-ai-fit .dm-sentiment-compare-head {
        align-items: start;
        flex-direction: column
    }

    .dm-ai-fit .dm-sentiment-pager {
        gap: 7px
    }

        .dm-ai-fit .dm-sentiment-pager button {
            padding: 9px 11px;
            font-size: 12px
        }
}
/* V19 - Auto-refresh Market News */
.dm-ai-fit .dm-news-sync {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 16px
}

.dm-ai-fit #dm-news-sync-status {
    font-size: 12px;
    color: #a8c6df
}

.dm-ai-fit #dm-news-refresh {
    border: 1px solid #3d89d8;
    border-radius: 11px;
    padding: 10px 16px;
    background: linear-gradient(120deg,#26b5ff,#0866d7);
    color: #fff;
    font-weight: 700;
    cursor: pointer
}

    .dm-ai-fit #dm-news-refresh:disabled {
        opacity: .6;
        cursor: wait
    }
/* V16 - Market News bilingual */
.dm-ai-fit .dm-news-pane {
    background: #080e1b !important;
    color: #eaf1ff !important;
    padding: 24px !important;
    min-width: 0
}

.dm-ai-fit .dm-news-header h2 {
    color: #fff !important;
    font-size: clamp(23px,3vw,30px) !important;
    margin: 0 0 8px !important;
    font-weight: 850
}

.dm-ai-fit .dm-news-header p {
    color: #adc6df !important;
    font-size: 13px;
    line-height: 1.7;
    margin: 0 0 18px
}

.dm-ai-fit .dm-news-langs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px
}

.dm-ai-fit .dm-news-lang {
    border: 1px solid #355474;
    background: #172b43;
    color: #e6f3ff;
    padding: 12px 19px;
    border-radius: 12px;
    font-weight: 750;
    min-height: 44px;
    cursor: pointer
}

    .dm-ai-fit .dm-news-lang[aria-pressed="true"] {
        background: linear-gradient(110deg,#25b8ff,#0764d3);
        border-color: #60c5ff;
        color: #fff;
        box-shadow: 0 7px 20px #0879e944
    }

.dm-ai-fit .dm-news-frame {
    width: 100%;
    height: 700px;
    min-width: 0;
    overflow: hidden;
    background: #111a2c;
    border: 1px solid #2b415d;
    border-radius: 17px
}

    .dm-ai-fit .dm-news-frame .tradingview-widget-container, .dm-ai-fit .dm-news-frame .tradingview-widget-container__widget {
        height: 100%;
        width: 100%
    }

.dm-ai-fit .dm-news-credit {
    margin: 12px 0 0;
    color: #9bb4ce;
    font-size: 12px
}

    .dm-ai-fit .dm-news-credit a {
        color: #72cbff
    }

@media(max-width:767px) {
    .dm-ai-fit .dm-tabs {
        grid-template-columns: repeat(2,minmax(0,1fr)) !important
    }

    .dm-ai-fit .dm-news-pane {
        padding: 12px !important
    }

    .dm-ai-fit .dm-news-frame {
        height: 650px;
        border-radius: 13px
    }

    .dm-ai-fit .dm-news-langs {
        display: grid;
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 8px
    }

    .dm-ai-fit .dm-news-lang {
        padding: 10px 6px;
        font-size: 12px
    }
}

/* DIDIMAX Market News reader — V18 */
.dm-ai-fit .dm-didimax-news-layout {
    display: grid;
    grid-template-columns: minmax(230px,34%) minmax(0,1fr);
    gap: 14px;
    min-width: 0
}

.dm-ai-fit .dm-didimax-news-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-height: 900px;
    overflow: auto;
    min-width: 0
}

.dm-ai-fit .dm-didimax-news-item {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 7px;
    border: 1px solid #294561;
    background: #13253e;
    color: #e8f3ff;
    padding: 15px;
    border-radius: 15px;
    cursor: pointer;
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.5
}

    .dm-ai-fit .dm-didimax-news-item small {
        color: #81bce9;
        font-size: 11px
    }

    .dm-ai-fit .dm-didimax-news-item strong {
        font-size: 13px
    }

    .dm-ai-fit .dm-didimax-news-item:hover, .dm-ai-fit .dm-didimax-news-item.selected {
        border-color: #49b8ff;
        background: #193a5a;
        box-shadow: inset 3px 0 #49b8ff
    }

.dm-ai-fit .dm-didimax-news-reader {
    background: #101d30;
    border: 1px solid #294561;
    border-radius: 18px;
    padding: 22px;
    min-width: 0;
    max-height: 900px;
    overflow: auto;
    color: #dbe7f7;
    line-height: 1.85;
    overflow-wrap: anywhere
}

    .dm-ai-fit .dm-didimax-news-reader h3 {
        color: #fff;
        font-size: clamp(18px,2.2vw,25px);
        line-height: 1.3;
        margin: 0 0 15px
    }

.dm-ai-fit .dm-news-article-body p {
    margin: 0 0 15px
}

.dm-ai-fit .dm-news-article-body h2, .dm-ai-fit .dm-news-article-body h3 {
    color: #8bd6ff;
    margin: 22px 0 12px
}

.dm-ai-fit .dm-news-article-body img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 18px auto;
    border-radius: 12px
}

.dm-ai-fit .dm-news-source-iframe {
    width: 100%;
    height: 580px;
    border: 1px solid #294561;
    border-radius: 12px;
    background: white
}

.dm-ai-fit .dm-didimax-news-reader > a {
    color: #8bd6ff;
    display: inline-block;
    margin-top: 12px
}

@media(max-width:767px) {
    .dm-ai-fit .dm-didimax-news-layout {
        grid-template-columns: minmax(0,1fr)
    }

    .dm-ai-fit .dm-didimax-news-list {
        max-height: 285px
    }

    .dm-ai-fit .dm-didimax-news-reader {
        max-height: none;
        padding: 15px
    }

    .dm-ai-fit .dm-news-source-iframe {
        height: 540px
    }
}

/* V21 - original article charts and disclaimer boundary */
.dm-ai-fit .dm-news-article-body img {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    margin: 18px auto;
    border-radius: 10px;
    object-fit: contain
}

.dm-ai-fit .dm-news-article-body figure {
    max-width: 100%;
    margin: 18px 0;
    text-align: center
}

.dm-ai-fit .dm-news-article-body figcaption {
    font-size: 12px;
    color: #a9bdd3;
    margin-top: 8px
}

.dm-ai-fit .dm-news-article-body table {
    max-width: 100%;
    display: block;
    overflow-x: auto
}

.dm-ai-fit .dm-news-disclaimer {
    font-weight: 700;
    color: #a9c8e8;
    border-top: 1px solid #334b68;
    margin-top: 20px;
    padding-top: 14px
}

/* V22 Trading Central — Trading Signal (licensed embed only) */
.dm-ai-fit .dm-tc-pane {
    padding: clamp(16px,2.5vw,32px);
    background: #080e1b;
    color: #eaf1ff;
    min-width: 0
}

.dm-ai-fit .dm-tc-kicker {
    color: #63cbff;
    letter-spacing: 1.6px;
    font-weight: 800;
    font-size: 11px;
    margin: 0 0 9px
}

.dm-ai-fit .dm-tc-head h2 {
    font-size: clamp(22px,2.7vw,30px);
    margin: 0 0 8px;
    color: #fff;
    font-weight: 800
}

.dm-ai-fit .dm-tc-head p:last-child {
    color: #abc4df;
    font-size: 13px;
    line-height: 1.7;
    margin: 0 0 22px
}

.dm-ai-fit .dm-tc-layout {
    display: grid;
    gap: 16px;
    min-width: 0
}

.dm-ai-fit .dm-tc-card {
    border: 1px solid #304c69;
    border-radius: 18px;
    background: linear-gradient(140deg,#122a47,#101a2e);
    padding: clamp(20px,3vw,32px);
    min-width: 0
}

.dm-ai-fit .dm-tc-status {
    font-size: 10px;
    letter-spacing: 1.5px;
    font-weight: 800;
    color: #70d1ff
}

.dm-ai-fit .dm-tc-card h3 {
    color: #fff;
    font-size: 20px;
    margin: 12px 0
}

.dm-ai-fit .dm-tc-card p {
    color: #b8cde2;
    font-size: 13px;
    line-height: 1.75;
    max-width: 780px
}

.dm-ai-fit .dm-tc-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px
}

.dm-ai-fit #dm-tc-open {
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    background: linear-gradient(120deg,#27b8ff,#075ed3);
    color: white;
    font-weight: 800
}

    .dm-ai-fit #dm-tc-open:disabled {
        opacity: .48;
        cursor: not-allowed
    }

.dm-ai-fit #dm-tc-message {
    color: #a5bfd9;
    font-size: 12px
}

.dm-ai-fit .dm-tc-embed {
    border: 1px solid #35536f;
    border-radius: 16px;
    overflow: hidden;
    height: 760px;
    min-width: 0
}

    .dm-ai-fit .dm-tc-embed[hidden] {
        display: none !important
    }

    .dm-ai-fit .dm-tc-embed iframe {
        display: block;
        width: 100%;
        height: 100%;
        border: 0;
        background: #fff
    }

@media(max-width:767px) {
    .dm-ai-fit .dm-tc-pane {
        padding: 12px
    }

    .dm-ai-fit .dm-tc-embed {
        height: 640px
    }
}

/* V31 — TradingView Economic Calendar: full-height mobile layout */
.dm-ai-fit .dm-calendar-frame {
    height: 900px !important;
    min-height: 900px !important;
    overflow: hidden !important
}

.dm-ai-fit #dm-economic-calendar .tradingview-widget-container,
.dm-ai-fit #dm-economic-calendar .tradingview-widget-container__widget,
.dm-ai-fit #dm-economic-calendar iframe {
    height: 900px !important;
    min-height: 900px !important;
    width: 100% !important;
    max-width: 100% !important
}

@media(max-width:767px) {
    .dm-ai-fit .dm-calendar-pane {
        padding: 12px !important;
        overflow: visible !important
    }

    .dm-ai-fit .dm-calendar-frame {
        height: 1150px !important;
        min-height: 1150px !important;
        border-radius: 14px !important
    }

    .dm-ai-fit #dm-economic-calendar .tradingview-widget-container,
    .dm-ai-fit #dm-economic-calendar .tradingview-widget-container__widget,
    .dm-ai-fit #dm-economic-calendar iframe {
        height: 1150px !important;
        min-height: 1150px !important
    }
}

@media(max-width:380px) {
    .dm-ai-fit .dm-calendar-frame {
        height: 1250px !important;
        min-height: 1250px !important
    }

    .dm-ai-fit #dm-economic-calendar .tradingview-widget-container,
    .dm-ai-fit #dm-economic-calendar .tradingview-widget-container__widget,
    .dm-ai-fit #dm-economic-calendar iframe {
        height: 1250px !important;
        min-height: 1250px !important
    }
}

/* V32: official TradingView Trading Signal — responsive, isolated */
.dm-ai-fit .dm-signal-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    background: #111a2c;
    border: 1px solid #304c69;
    border-radius: 15px;
    padding: 14px;
    margin: 0 0 16px
}

    .dm-ai-fit .dm-signal-controls label {
        color: #b7cde5;
        font-size: 12px;
        font-weight: 700
    }

    .dm-ai-fit .dm-signal-controls select {
        background: #1a2940;
        border: 1px solid #3a5574;
        border-radius: 10px;
        padding: 10px 12px;
        color: #fff;
        max-width: 100%;
        min-width: 0
    }

.dm-ai-fit .dm-signal-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1.2fr);
    gap: 14px
}

.dm-ai-fit .dm-signal-widget-card {
    background: #111a2c;
    border: 1px solid #304c69;
    border-radius: 16px;
    overflow: hidden;
    min-width: 0;
    padding: 12px
}

    .dm-ai-fit .dm-signal-widget-card h3 {
        color: #fff;
        font-size: 15px;
        margin: 2px 0 12px
    }

.dm-ai-fit .dm-signal-widget {
    height: 490px;
    min-width: 0;
    overflow: hidden
}

.dm-ai-fit .dm-signal-disclaimer {
    color: #9bb4ce;
    font-size: 12px;
    line-height: 1.7;
    margin: 15px 0 0
}

    .dm-ai-fit .dm-signal-disclaimer a {
        color: #7bd0ff
    }

@media(max-width:850px) {
    .dm-ai-fit .dm-signal-grid {
        grid-template-columns: minmax(0,1fr)
    }

    .dm-ai-fit .dm-signal-widget {
        height: 440px
    }
}

@media(max-width:480px) {
    .dm-ai-fit .dm-signal-controls {
        display: grid;
        grid-template-columns: 1fr;
        gap: 7px
    }

        .dm-ai-fit .dm-signal-controls select {
            width: 100%
        }

    .dm-ai-fit .dm-signal-widget-card {
        padding: 9px
    }

    .dm-ai-fit .dm-signal-widget {
        height: 440px
    }
}

/* V33: verified entry / TP / SL cards */
.dm-ai-fit .dm-signal-pro-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px
}

    .dm-ai-fit .dm-signal-pro-top strong {
        font-size: 20px;
        color: #fff
    }

    .dm-ai-fit .dm-signal-pro-top p {
        font-size: 12px;
        color: #a9c8e4;
        max-width: 750px;
        line-height: 1.6
    }

.dm-ai-fit #dm-signal-refresh {
    background: linear-gradient(120deg,#27b8ff,#0764d6);
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 800
}

.dm-ai-fit .dm-signal-pro-status {
    color: #8cbfe8;
    font-size: 12px;
    margin-bottom: 16px
}

.dm-ai-fit .dm-signal-pro-cards {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 15px
}

.dm-ai-fit .dm-signal-pro-card {
    background: #13243b;
    border: 1px solid #345575;
    border-radius: 17px;
    padding: 16px;
    min-width: 0;
    overflow: hidden
}

.dm-ai-fit .dm-signal-pro-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #fff;
    font-size: 17px
}

.dm-ai-fit .dm-signal-pro-side {
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 900
}

    .dm-ai-fit .dm-signal-pro-side.buy {
        background: #146dba;
        color: #fff
    }

    .dm-ai-fit .dm-signal-pro-side.sell {
        background: #ae294a;
        color: #fff
    }

.dm-ai-fit .dm-signal-pro-meta {
    font-size: 11px;
    color: #a4c4df;
    line-height: 1.6;
    margin: 10px 0
}

.dm-ai-fit .dm-signal-pro-card img {
    width: 100%;
    height: 175px;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
    margin: 10px 0
}

.dm-ai-fit .dm-signal-pro-values {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 7px;
    margin: 15px 0
}

    .dm-ai-fit .dm-signal-pro-values > div {
        background: #0a182c;
        border-radius: 10px;
        padding: 10px 7px;
        min-width: 0
    }

    .dm-ai-fit .dm-signal-pro-values small {
        display: block;
        color: #a9c0d9;
        font-size: 10px
    }

    .dm-ai-fit .dm-signal-pro-values strong {
        display: block;
        color: #fff;
        font-size: 14px;
        overflow-wrap: anywhere;
        margin-top: 5px
    }

.dm-ai-fit .dm-signal-pro-footer {
    font-size: 11px;
    color: #a8c1d9;
    border-top: 1px solid #344a62;
    padding-top: 12px
}

.dm-ai-fit .dm-signal-pro-empty {
    grid-column: 1/-1;
    background: #12263f;
    border: 1px dashed #3c6b98;
    border-radius: 15px;
    padding: 28px;
    color: #fff
}

    .dm-ai-fit .dm-signal-pro-empty p {
        color: #a7c4e1;
        font-size: 13px;
        line-height: 1.7
    }

@media(max-width:1000px) {
    .dm-ai-fit .dm-signal-pro-cards {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }
}

@media(max-width:650px) {
    .dm-ai-fit .dm-signal-pro-cards {
        grid-template-columns: minmax(0,1fr)
    }

    .dm-ai-fit .dm-signal-pro-card {
        padding: 13px
    }
}

/* DIDIMAX Daily AI Signal — mobile height extension */
@media(max-width:767px) {
    .dm-ai-fit #dm-panel-ai .assistant {
        height: 680px !important;
        min-height: 680px !important
    }

    .dm-ai-fit #dm-panel-ai .chartpanel {
        height: 790px !important;
        min-height: 790px !important
    }

    .dm-ai-fit #dm-panel-ai .chart {
        min-height: 540px !important
    }

    .dm-ai-fit #dm-panel-ai .messages {
        min-height: 250px !important;
        flex: 1 1 auto !important
    }
}
