/* ============================================================
 *  EXTENSION PANELS (all new VIP tools)
 * ============================================================ */
.td-vip-ext-panel {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 3vw, 28px);
    font-size: 13px;
}

.td-vip-ext-panel.is-hidden {
    display: none;
}

.td-vip-ext-panel-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(4px);
}

.td-vip-ext-panel-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(560px, calc(100vw - 32px));
    max-height: min(84vh, 860px);
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 18px;
    box-shadow: 0 28px 80px -28px rgba(15, 23, 42, 0.42);
}

.td-vip-ext-panel--wide .td-vip-ext-panel-dialog {
    width: min(840px, calc(100vw - 36px));
}

.td-vip-ext-panel--xl .td-vip-ext-panel-dialog {
    width: min(1120px, calc(100vw - 36px));
}

.td-vip-ext-panel--drawer {
    align-items: stretch;
    justify-content: flex-end;
    padding: 40px 8px 8px;
}

#tdVipPanel_aiSummary {
    align-items: stretch;
    justify-content: flex-end;
    padding: 40px 8px 8px;
}

.td-vip-ext-panel--drawer .td-vip-ext-panel-backdrop {
    background: rgba(15, 23, 42, 0.08);
    backdrop-filter: none;
}

#tdVipPanel_aiSummary .td-vip-ext-panel-backdrop {
    background: rgba(15, 23, 42, 0.08);
    backdrop-filter: none;
}

.td-vip-ext-panel--drawer .td-vip-ext-panel-dialog {
    width: min(440px, calc(100vw - 24px));
    max-height: calc(100vh - 48px);
    height: calc(100vh - 48px);
    margin-left: auto;
    border-radius: 22px 0 0 22px;
    border: 1px solid rgba(219, 227, 238, 0.72);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 251, 255, 0.86) 100%);
    box-shadow: -28px 0 60px -38px rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(22px) saturate(1.15);
    -webkit-backdrop-filter: blur(22px) saturate(1.15);
    transform: translateX(0);
    animation: td-vip-drawer-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

#tdVipPanel_aiSummary .td-vip-ext-panel-dialog {
    width: min(440px, calc(100vw - 24px));
    max-height: calc(100vh - 48px);
    height: calc(100vh - 48px);
    margin-left: auto;
    display: flex;
    flex-direction: column;
    border-radius: 22px 0 0 22px;
    border: 1px solid rgba(219, 227, 238, 0.72);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 251, 255, 0.86) 100%);
    box-shadow: -28px 0 60px -38px rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(22px) saturate(1.15);
    -webkit-backdrop-filter: blur(22px) saturate(1.15);
    transform: translateX(0);
    animation: td-vip-drawer-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.td-vip-ext-panel--drawer .td-vip-ext-panel-head {
    padding: 18px 20px 12px;
    border-bottom-color: rgba(226, 232, 240, 0.72);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.16) 100%);
}

#tdVipPanel_aiSummary .td-vip-ext-panel-head {
    padding: 18px 20px 12px;
    border-bottom-color: rgba(226, 232, 240, 0.72);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.16) 100%);
}

.td-vip-ext-panel--drawer .td-vip-ext-panel-body {
    padding: 16px 18px 20px;
}

#tdVipPanel_aiSummary .td-vip-ext-panel-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.td-vip-ext-panel--ai-drawer .td-vip-ext-panel-head strong {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

#tdVipPanel_aiSummary .td-vip-ext-panel-head strong {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.td-vip-ext-panel--ai-drawer .td-vip-ext-panel-close {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(226, 232, 240, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#tdVipPanel_aiSummary .td-vip-ext-panel-close {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(226, 232, 240, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.td-vip-ext-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px 14px;
    border-bottom: 1px solid #e8eef5;
}

.td-vip-ext-panel-head strong {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.td-vip-ext-panel-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.td-vip-ext-panel-close:hover {
    color: #475569;
}

.td-vip-ext-panel-body {
    padding: 18px 20px 20px;
    overflow: auto;
}

.td-vip-ext-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.td-vip-ext-hint {
    color: #64748b;
    font-size: 12px;
    margin: 0;
    line-height: 1.5;
}

.td-vip-ext-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.td-vip-ext-field > span {
    font-size: 11px;
    font-weight: 500;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.td-vip-ext-field input,
.td-vip-ext-field select,
.td-vip-ext-field textarea {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    background: #f8fafc;
    color: #0f172a;
    outline: none;
    transition: border-color 0.15s;
}

.td-vip-ext-field input:focus,
.td-vip-ext-field select:focus,
.td-vip-ext-field textarea:focus {
    border-color: #3b82f6;
    background: #ffffff;
}

.td-vip-ext-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
}

.td-vip-ext-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

.td-vip-ext-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

/* Alerts */
.td-vip-alerts-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.td-vip-alerts-topline {
    padding: 14px 16px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.96) 52%, rgba(239, 246, 255, 0.94) 100%);
    box-shadow: 0 18px 36px -30px rgba(15, 23, 42, 0.24);
}

.td-vip-alerts-topline-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.td-vip-alerts-topline-main strong {
    font-size: 20px;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.td-vip-alerts-topline-main p {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #526176;
}

.td-vip-alerts-form,
.td-vip-alerts-list-shell {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.td-vip-alerts-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.td-vip-alerts-list-shell {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    padding-top: 14px;
    border-top: 1px solid rgba(226, 232, 240, 0.92);
}

.td-vip-alerts-list-head,
.td-vip-alert-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.td-vip-alerts-list-head strong,
.td-vip-alert-group-head strong {
    font-size: 13px;
    color: #0f172a;
}

.td-vip-alerts-list-head span,
.td-vip-alert-group-head span {
    font-size: 11px;
    color: #64748b;
}

.td-vip-alerts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    max-height: min(52vh, 560px);
    overflow-y: auto;
}

.td-vip-alert-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(226, 232, 240, 0.84);
}

.td-vip-alert-group:first-child {
    padding-top: 0;
    border-top: 0;
}

.td-vip-alert-group-body {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.td-vip-alert-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 0 11px 10px;
    border-radius: 0;
    font-size: 12px;
    background: transparent;
    border: 0;
    border-top: 1px solid rgba(226, 232, 240, 0.88);
    box-shadow: none;
}

.td-vip-alert-group-body > .td-vip-alert-item:first-child {
    border-top: 0;
}

.td-vip-alert-triggered {
    background: linear-gradient(90deg, rgba(254, 242, 242, 0.88), rgba(255, 255, 255, 0) 48%);
    box-shadow: inset 3px 0 0 rgba(248, 113, 113, 0.68);
}

.td-vip-alert-active {
    background: linear-gradient(90deg, rgba(240, 253, 244, 0.92), rgba(255, 255, 255, 0) 48%);
    box-shadow: inset 3px 0 0 rgba(52, 211, 153, 0.68);
}

.td-vip-alert-disabled { opacity: 0.5; }

.td-vip-alert-main {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    flex: 1 1 auto;
}

.td-vip-alert-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.td-vip-alert-type {
    font-weight: 600;
    color: #475569;
    font-size: 11px;
}

.td-vip-alert-price {
    font-weight: 600;
    color: #0f172a;
}

.td-vip-alert-msg {
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.55;
}

.td-vip-alert-item small {
    color: #94a3b8;
}

.td-vip-alert-remove {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
    padding: 0 2px;
}

.td-vip-ext-panel--alerts-drawer .td-vip-ext-panel-dialog {
    width: min(460px, calc(100vw - 24px));
}

.td-vip-ext-panel--alerts-drawer .td-vip-ext-panel-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.td-vip-side-panel--alerts .td-vip-right-panel-body {
    padding: 8px 12px 14px;
}

.td-vip-side-panel--alerts .td-vip-ext-hint {
    color: #5f6f82;
    line-height: 1.6;
}

.td-vip-side-panel--alerts .td-vip-alerts-panel > .td-vip-ext-hint:first-child {
    font-size: 11px;
    line-height: 1.45;
}

.td-vip-side-panel--alerts #tdVipAlertPermissionHint {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(241, 245, 249, 0.92);
    color: #6b7c90;
    font-size: 10px;
    line-height: 1.2;
}

.td-vip-alerts-form .td-vip-ext-field {
    gap: 5px;
}

.td-vip-alerts-form .td-vip-ext-field > span {
    font-size: 12px;
    font-weight: 600;
    color: #526176;
    text-transform: none;
    letter-spacing: 0;
}

.td-vip-alerts-form .td-vip-ext-field input,
.td-vip-alerts-form .td-vip-ext-field select,
.td-vip-alerts-form .td-vip-ext-field textarea {
    min-height: 40px;
    padding: 8px 11px;
    border-radius: 10px;
    border-color: #d9e2ec;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: none;
}

.td-vip-alerts-form .td-vip-ext-field input:focus,
.td-vip-alerts-form .td-vip-ext-field select:focus,
.td-vip-alerts-form .td-vip-ext-field textarea:focus {
    border-color: #93c5fd;
    background: #ffffff;
}

.td-vip-alerts-form .td-vip-ext-check {
    margin-top: -2px;
    color: #334155;
}

.td-vip-alerts-form #tdVipAlertAdd {
    min-height: 40px;
    margin-top: 2px;
    border-radius: 10px;
}

/* Journal */
.td-vip-journal-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 6px;
    font-size: 12px;
}

.td-vip-journal-item strong {
    color: #0f172a;
}

.td-vip-journal-item small {
    color: #64748b;
}

/* Correlation Matrix */
.td-vip-corr-matrix {
    margin-top: 4px;
    max-height: min(60vh, 620px);
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
}

.td-vip-corr-panel {
    gap: 12px;
}

.td-vip-corr-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.td-vip-corr-toolbar .td-vip-ext-field {
    min-width: 168px;
}

.td-vip-corr-note {
    margin-top: -2px;
}

.td-vip-corr-meta {
    position: sticky;
    top: 0;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid #e2e8f0;
    backdrop-filter: blur(8px);
}

.td-vip-corr-meta span {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
}

.td-vip-corr-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
}

.td-vip-corr-table th,
.td-vip-corr-table td {
    min-width: 92px;
    padding: 10px 12px;
    text-align: center;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.td-vip-corr-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    font-weight: 600;
    font-size: 11px;
}

.td-vip-corr-table tr > th:first-child {
    left: 0;
    z-index: 2;
}

.td-vip-corr-table td:first-child,
.td-vip-corr-table th:first-child {
    position: sticky;
    left: 0;
    background: #ffffff;
    font-weight: 600;
}

.td-vip-corr-table tr:first-child th:first-child {
    z-index: 3;
    background: #f8fafc;
}

/* Session Markers */
.td-vip-session-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 11px;
    color: #64748b;
}

.td-vip-session-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.td-vip-session-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.td-vip-session-band {
    position: absolute;
    top: 0;
    bottom: 0;
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
}

.td-vip-session-band--asia {
    background: rgba(129, 140, 248, 0.055);
    border-left-color: rgba(129, 140, 248, 0.08);
    border-right-color: rgba(129, 140, 248, 0.05);
}

.td-vip-session-band--london {
    background: rgba(52, 211, 153, 0.048);
    border-left-color: rgba(52, 211, 153, 0.075);
    border-right-color: rgba(52, 211, 153, 0.04);
}

.td-vip-session-band--ny {
    background: rgba(251, 146, 60, 0.05);
    border-left-color: rgba(251, 146, 60, 0.08);
    border-right-color: rgba(251, 146, 60, 0.045);
}

/* Fibonacci levels */
.td-vip-fib-levels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ============================================================
 *  MOBILE RESPONSIVE
 * ============================================================ */
@media screen and (max-width: 900px) {
    .td-vip-rightbar {
        display: none;
    }

    .td-vip-right-tools {
        display: none;
    }

    .td-vip-terminal-body {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .td-vip-topbar {
        padding: 0 10px;
        gap: 8px;
    }

    .td-vip-topbar-left,
    .td-vip-topbar-right {
        gap: 6px;
    }
}

@media screen and (max-width: 768px) {
    .td-vip-terminal {
        grid-template-rows: 48px minmax(0, 1fr);
    }

    .td-vip-topbar {
        flex-wrap: nowrap;
        padding: 4px 8px;
        gap: 6px;
        height: auto;
        min-height: 48px;
    }

    .td-vip-topbar-left {
        flex-wrap: nowrap;
        gap: 4px;
        overflow: visible;
    }

    .td-vip-timeframes-scroll {
        max-width: min(280px, 38vw);
    }

    .td-vip-topbar-right {
        flex-wrap: nowrap;
        gap: 4px;
        justify-content: flex-end;
    }

    .td-vip-topbar-refresh-cluster {
        gap: 4px;
    }

    .td-vip-left-rail {
        display: none;
    }

    .td-vip-terminal-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .td-vip-rightbar {
        display: none;
    }

    .td-vip-right-tools {
        display: none;
    }

    .td-vip-back-link {
        font-size: 11px;
        padding: 2px 6px;
    }

    .td-vip-timeframe-btn {
        font-size: 11px;
        padding: 2px 8px;
    }

    .td-vip-secondary-btn {
        font-size: 11px;
        padding: 3px 8px;
    }

    .td-vip-primary-btn {
        font-size: 12px;
        padding: 5px 12px;
    }

    .td-vip-menu-btn-label {
        font-size: 11px;
    }

    .td-vip-top-meta {
        display: none;
    }

    .td-vip-display-toggle {
        font-size: 11px;
        padding: 2px 6px;
    }

    .td-vip-chart-bar {
        padding: 4px 8px;
        flex-wrap: wrap;
    }

    .td-vip-chart-bar h1 {
        font-size: 13px;
    }

    .td-vip-ohlc {
        font-size: 11px;
        gap: 6px;
    }

    .td-vip-bottom-bar {
        flex-wrap: wrap;
        padding: 4px 8px;
        gap: 6px;
    }

    .td-vip-action-bar {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
        padding: 8px 0 0;
    }

    .td-vip-action-card {
        min-height: 26px;
        padding: 0 12px;
    }

    .td-vip-action-card + .td-vip-action-card::before {
        height: 14px;
    }

    .td-vip-ext-panel {
        padding: 10px;
    }

    .td-vip-ext-panel-dialog,
    .td-vip-ext-panel--wide .td-vip-ext-panel-dialog,
    .td-vip-ext-panel--xl .td-vip-ext-panel-dialog {
        width: min(100%, calc(100vw - 20px));
        max-height: calc(100vh - 20px);
        border-radius: 14px;
    }

    .td-vip-ext-panel--drawer {
        padding: 8px;
    }

    #tdVipPanel_aiSummary {
        padding: 8px;
    }

    .td-vip-ext-panel--drawer .td-vip-ext-panel-dialog {
        width: min(100%, calc(100vw - 16px));
        max-height: calc(100vh - 16px);
        height: calc(100vh - 16px);
        border-radius: 18px;
    }

    #tdVipPanel_aiSummary .td-vip-ext-panel-dialog {
        width: min(100%, calc(100vw - 16px));
        max-height: calc(100vh - 16px);
        height: calc(100vh - 16px);
        border-radius: 18px;
    }

    .td-vip-ext-panel-head {
        padding: 14px 16px 12px;
    }

    .td-vip-ext-panel-body {
        padding: 14px 16px 16px;
    }

    .td-vip-ai-topline,
    .td-vip-corr-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .td-vip-ai-context {
        align-self: flex-start;
    }

    .td-vip-corr-toolbar .td-vip-ext-field {
        min-width: 0;
    }

    .td-vip-ext-more-toggle {
        font-size: 11px;
        padding: 0 8px;
    }

    .td-vip-ext-more-item {
        font-size: 11px;
        padding: 6px 8px;
    }

    .td-vip-tool-dialog,
    .td-vip-tool-dialog--plan {
        width: calc(100vw - 32px);
        max-width: 100%;
        margin: 16px;
    }

    .td-vip-plan-layout {
        flex-direction: column;
    }

    .td-vip-replay-toolbar-actions {
        flex-wrap: wrap;
    }

    .td-vip-replay-toolbar-main {
        flex-wrap: wrap;
    }

    .td-vip-indicator-popover {
        width: calc(100vw - 32px);
        max-width: 100%;
    }

    .td-vip-appearance-popover {
        width: calc(100vw - 32px);
        max-width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .td-vip-topbar {
        padding: 2px 6px;
    }

    .td-vip-back-link {
        display: none;
    }

    .td-vip-market-pill {
        font-size: 12px;
    }

    .td-vip-timeframes {
        gap: 2px;
    }

    .td-vip-timeframe-btn {
        padding: 2px 6px;
        font-size: 10px;
    }

    .td-vip-menu-btn {
        padding: 2px 6px;
    }

    .td-vip-chart-heading h1 {
        font-size: 12px;
    }

    .td-vip-connection-badge {
        font-size: 10px;
    }
}

/* ============================================================
 *  NIGHT MODE for extension panels
 * ============================================================ */
body.td-vip-body.is-night-mode .td-vip-ext-more-popover {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 18px 48px -16px rgba(0, 0, 0, 0.55);
}

body.td-vip-body.is-night-mode .td-vip-ext-more-item {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.td-vip-body.is-night-mode .td-vip-ext-more-item:hover,
body.td-vip-body.is-night-mode .td-vip-ext-more-item:focus-visible {
    background: #1e3a5f;
    border-color: #38bdf8;
}

body.td-vip-body.is-night-mode .td-vip-ext-panel {
    color: #e2e8f0;
}

body.td-vip-body.is-night-mode .td-vip-ext-panel-backdrop {
    background: rgba(2, 6, 23, 0.68);
}

body.td-vip-body.is-night-mode .td-vip-ext-panel--drawer .td-vip-ext-panel-backdrop {
    background: rgba(2, 6, 23, 0.18);
}

body.td-vip-body.is-night-mode #tdVipPanel_aiSummary .td-vip-ext-panel-backdrop {
    background: rgba(2, 6, 23, 0.18);
}

body.td-vip-body.is-night-mode .td-vip-ext-panel-dialog {
    background: #0f172a;
    border-color: #334155;
}

body.td-vip-body.is-night-mode .td-vip-ext-panel--drawer .td-vip-ext-panel-dialog {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(17, 28, 49, 0.94) 100%);
    border-color: rgba(51, 65, 85, 0.9);
    box-shadow: -28px 0 60px -38px rgba(0, 0, 0, 0.62);
}

body.td-vip-body.is-night-mode #tdVipPanel_aiSummary .td-vip-ext-panel-dialog {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(17, 28, 49, 0.94) 100%);
    border-color: rgba(51, 65, 85, 0.9);
    box-shadow: -28px 0 60px -38px rgba(0, 0, 0, 0.62);
}

body.td-vip-body.is-night-mode .td-vip-ext-panel-head {
    border-bottom-color: #334155;
}

body.td-vip-body.is-night-mode .td-vip-ext-panel--drawer .td-vip-ext-panel-head {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.46) 0%, rgba(15, 23, 42, 0.16) 100%);
    border-bottom-color: rgba(51, 65, 85, 0.84);
}

body.td-vip-body.is-night-mode #tdVipPanel_aiSummary .td-vip-ext-panel-head {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.46) 0%, rgba(15, 23, 42, 0.16) 100%);
    border-bottom-color: rgba(51, 65, 85, 0.84);
}

body.td-vip-body.is-night-mode .td-vip-ext-panel-head strong {
    color: #f1f5f9;
}

body.td-vip-body.is-night-mode .td-vip-ext-field input,
body.td-vip-body.is-night-mode .td-vip-ext-field select,
body.td-vip-body.is-night-mode .td-vip-ext-field textarea {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.td-vip-body.is-night-mode .td-vip-ext-hint {
    color: #8ea2b8;
}

body.td-vip-body.is-night-mode .td-vip-ai-content,
body.td-vip-body.is-night-mode .td-vip-corr-matrix {
    background: #111c31;
    border-color: #334155;
}

body.td-vip-body.is-night-mode .td-vip-ext-panel--ai-drawer .td-vip-ai-content {
    background: linear-gradient(180deg, rgba(17, 28, 49, 0.9) 0%, rgba(15, 23, 42, 0.94) 100%);
    border-color: rgba(51, 65, 85, 0.92);
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.04);
}

body.td-vip-body.is-night-mode #tdVipPanel_aiSummary .td-vip-ai-content {
    background: linear-gradient(180deg, rgba(17, 28, 49, 0.9) 0%, rgba(15, 23, 42, 0.94) 100%);
    border-color: rgba(51, 65, 85, 0.92);
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.04);
}

body.td-vip-body.is-night-mode .td-vip-ai-kicker {
    color: #8ea2b8;
}

body.td-vip-body.is-night-mode .td-vip-ai-topline-main strong,
body.td-vip-body.is-night-mode .td-vip-ai-markdown h2,
body.td-vip-body.is-night-mode .td-vip-ai-markdown h3,
body.td-vip-body.is-night-mode .td-vip-ai-markdown strong {
    color: #f8fafc;
}

body.td-vip-body.is-night-mode .td-vip-ai-context,
body.td-vip-body.is-night-mode .td-vip-ai-meta span,
body.td-vip-body.is-night-mode .td-vip-corr-meta span {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}

body.td-vip-body.is-night-mode .td-vip-ext-panel--ai-drawer .td-vip-ai-context,
body.td-vip-body.is-night-mode .td-vip-ext-panel--ai-drawer .td-vip-ai-meta span {
    background: rgba(15, 23, 42, 0.76);
    border-color: rgba(51, 65, 85, 0.9);
    color: #cbd5e1;
}

body.td-vip-body.is-night-mode #tdVipPanel_aiSummary .td-vip-ai-context,
body.td-vip-body.is-night-mode #tdVipPanel_aiSummary .td-vip-ai-meta span {
    background: rgba(15, 23, 42, 0.76);
    border-color: rgba(51, 65, 85, 0.9);
    color: #cbd5e1;
}

body.td-vip-body.is-night-mode .td-vip-ai-markdown em,
body.td-vip-body.is-night-mode .td-vip-ai-markdown h4 {
    color: #8ea2b8;
}

body.td-vip-body.is-night-mode .td-vip-ai-meta {
    border-top-color: #334155;
}

body.td-vip-body.is-night-mode .td-vip-corr-meta {
    background: rgba(15, 23, 42, 0.92);
    border-bottom-color: #334155;
}

body.td-vip-body.is-night-mode .td-vip-harmonic-card,
body.td-vip-body.is-night-mode .td-vip-alert-item,
body.td-vip-body.is-night-mode .td-vip-journal-item {
    background: #0f172a;
    border-color: #334155;
}

body.td-vip-body.is-night-mode .td-vip-side-panel--alerts .td-vip-ext-hint,
body.td-vip-body.is-night-mode .td-vip-alerts-list-head span,
body.td-vip-body.is-night-mode .td-vip-alert-group-head span,
body.td-vip-body.is-night-mode .td-vip-alert-type,
body.td-vip-body.is-night-mode .td-vip-alert-msg,
body.td-vip-body.is-night-mode .td-vip-alert-item small {
    color: #8ea2b8;
}

body.td-vip-body.is-night-mode .td-vip-alerts-list-shell,
body.td-vip-body.is-night-mode .td-vip-alert-group {
    border-top-color: rgba(51, 65, 85, 0.88);
}

body.td-vip-body.is-night-mode .td-vip-alerts-form .td-vip-ext-field > span {
    color: #9db0c5;
}

body.td-vip-body.is-night-mode .td-vip-side-panel--alerts #tdVipAlertPermissionHint {
    background: rgba(15, 23, 42, 0.82);
    color: #94a3b8;
}

body.td-vip-body.is-night-mode .td-vip-alerts-form .td-vip-ext-field input,
body.td-vip-body.is-night-mode .td-vip-alerts-form .td-vip-ext-field select,
body.td-vip-body.is-night-mode .td-vip-alerts-form .td-vip-ext-field textarea {
    background: rgba(10, 20, 34, 0.9);
    border-color: #334155;
    color: #e2e8f0;
}

body.td-vip-body.is-night-mode .td-vip-alerts-form .td-vip-ext-field input:focus,
body.td-vip-body.is-night-mode .td-vip-alerts-form .td-vip-ext-field select:focus,
body.td-vip-body.is-night-mode .td-vip-alerts-form .td-vip-ext-field textarea:focus {
    background: rgba(11, 23, 38, 0.96);
    border-color: rgba(56, 189, 248, 0.72);
}

body.td-vip-body.is-night-mode .td-vip-alert-item {
    padding-left: 10px;
    background: transparent;
    border: 0;
    border-top: 1px solid rgba(51, 65, 85, 0.88);
    box-shadow: none;
}

body.td-vip-body.is-night-mode .td-vip-alert-group-body > .td-vip-alert-item:first-child {
    border-top: 0;
}

body.td-vip-body.is-night-mode .td-vip-alert-triggered {
    background: linear-gradient(90deg, rgba(127, 29, 29, 0.2), rgba(15, 23, 42, 0) 52%);
    box-shadow: inset 3px 0 0 rgba(248, 113, 113, 0.72);
}

body.td-vip-body.is-night-mode .td-vip-alert-active {
    background: linear-gradient(90deg, rgba(6, 95, 70, 0.24), rgba(15, 23, 42, 0) 52%);
    box-shadow: inset 3px 0 0 rgba(52, 211, 153, 0.76);
}

body.td-vip-body.is-night-mode .td-vip-risk-result {
    background: transparent;
    border-top-color: rgba(51, 65, 85, 0.92);
    border-bottom-color: rgba(51, 65, 85, 0.92);
}

body.td-vip-body.is-night-mode .td-vip-risk-info-strip {
    background: rgba(15, 23, 42, 0.84);
    color: #94a3b8;
}

body.td-vip-body.is-night-mode .td-vip-risk-row {
    border-top-color: rgba(51, 65, 85, 0.82);
}

body.td-vip-body.is-night-mode .td-vip-risk-row strong,
body.td-vip-body.is-night-mode .td-vip-harmonic-head strong {
    color: #f1f5f9;
}

body.td-vip-body.is-night-mode .td-vip-corr-table th {
    background: #0f172a;
    color: #e2e8f0;
}

body.td-vip-body.is-night-mode .td-vip-corr-table td {
    border-color: #334155;
}

body.td-vip-body.is-night-mode .td-vip-corr-table td:first-child,
body.td-vip-body.is-night-mode .td-vip-corr-table th:first-child {
    background: #111c31;
}

body.td-vip-body.is-night-mode .td-vip-corr-table tr:first-child th:first-child {
    background: #0f172a;
}

body.td-vip-body.is-night-mode .td-vip-ai-markdown {
    color: #e2e8f0;
}

body.td-vip-body.td-vip-ext-panel-open {
    overflow: hidden;
}

