.container-fluid {
    background: #0f1012;
}

body {
    background: #0f1012;
}

.main-content {
    background: #0f1012;
}

.ta-page {
    --ta-bg: #0f1012;
    --ta-panel: #111214;
    --ta-panel-2: #16181b;
    --ta-border: rgba(255, 255, 255, 0.09);
    --ta-text: #f2f4f7;
    --ta-muted: rgba(242, 244, 247, 0.56);
    --ta-green: #00b89c;
    --ta-red: #ef4056;
    --ta-yellow: #f2c84b;

    min-height: calc(100vh - 40px);
    color: var(--ta-text);
    overflow-x: hidden;
}

.ta-page-embed {
    min-height: 100vh;
    height: 100vh;
    padding: 12px;
    overflow: hidden;
}

.ta-page-embed .ta-header {
    padding: 0 0 8px;
}

.ta-page-embed .ta-header h1 {
    font-size: 18px;
}

.ta-page-embed .ta-toolbar {
    padding-bottom: 8px;
}

.ta-page-embed .ta-forecast-bar {
    margin-bottom: 8px;
}

.ta-page-embed .ta-decision-panel,
.ta-page-embed .ta-volume-panel,
.ta-page-embed .ta-micro-panel,
.ta-page-embed .ta-entry-bar {
    display: none;
}

.ta-page-embed .ta-chart-panel {
    height: calc(100vh - 150px);
    min-height: 420px;
    margin-bottom: 0;
}

.ta-page-embed .ta-chart-wrap {
    height: 100%;
}

.ta-page *,
.ta-page *::before,
.ta-page *::after {
    box-sizing: border-box;
}

.ta-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0 12px;
}

.ta-header h1 {
    margin: 0;
    color: var(--ta-text);
    font-size: 22px;
    line-height: 1.15;
    font-weight: 800;
}

.ta-live-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    color: var(--ta-muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.ta-live-status::before {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(242, 244, 247, 0.32);
    content: "";
}

.ta-live-status.is-live {
    color: var(--ta-green);
}

.ta-live-status.is-live::before {
    background: var(--ta-green);
    box-shadow: 0 0 0 4px rgba(0, 184, 156, 0.12);
}

.ta-live-status.is-error {
    color: var(--ta-red);
}

.ta-live-status.is-error::before {
    background: var(--ta-red);
}

.ta-symbol-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 8px;
    width: min(250px, 100%);
    min-width: 0;
}

.ta-symbol-form input {
    width: 100%;
    height: 34px;
    min-width: 0;
    border-color: var(--ta-border);
    background: var(--ta-panel-2);
    color: var(--ta-text);
    text-transform: uppercase;
}

.ta-symbol-form button {
    width: 34px;
}

.ta-symbol-form input:focus {
    border-color: rgba(242, 200, 75, 0.72);
    background: var(--ta-panel-2);
    color: var(--ta-text);
    box-shadow: 0 0 0 0.15rem rgba(242, 200, 75, 0.16);
}

.ta-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 12px;
}

.ta-segmented,
.ta-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ta-timeframe,
.ta-icon-toggle {
    min-width: 44px;
    height: 32px;
    border: 1px solid var(--ta-border);
    border-radius: 6px;
    background: var(--ta-panel-2);
    color: var(--ta-muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.ta-timeframe.is-active,
.ta-icon-toggle.is-active {
    border-color: rgba(242, 200, 75, 0.78);
    background: rgba(242, 200, 75, 0.12);
    color: var(--ta-yellow);
}

.ta-entry-pill {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(242, 244, 247, 0.58);
    cursor: pointer;
    opacity: 1;
}

.ta-entry-pill-ready {
    border-color: rgba(0, 184, 156, 0.5);
    background: rgba(0, 184, 156, 0.1);
    color: var(--ta-green);
}

.ta-entry-pill-watch {
    border-color: rgba(242, 200, 75, 0.5);
    background: rgba(242, 200, 75, 0.1);
    color: var(--ta-yellow);
}

.ta-entry-pill-wait,
.ta-entry-pill-avoid {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(242, 244, 247, 0.58);
}

.ta-entry-pill.is-active {
    border-color: rgba(242, 200, 75, 0.78);
    background: rgba(242, 200, 75, 0.12);
    color: var(--ta-yellow);
}

.ta-actions .btn,
.ta-symbol-form .btn {
    height: 32px;
    border-color: rgba(242, 200, 75, 0.48);
    background: rgba(242, 200, 75, 0.08);
    color: var(--ta-yellow);
}

.ta-actions .btn:hover,
.ta-symbol-form .btn:hover {
    background: rgba(242, 200, 75, 0.16);
    color: var(--ta-yellow);
}

.ta-forecast-bar {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid var(--ta-border);
    border-radius: 8px;
    background: var(--ta-border);
    min-width: 0;
}

.ta-forecast-bar > div {
    min-width: 0;
    padding: 10px 12px;
    background: var(--ta-panel);
}

.ta-muted {
    display: block;
    color: var(--ta-muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.ta-forecast-bar strong {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    color: var(--ta-text);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ta-scenario-up,
.ta-up {
    color: var(--ta-green) !important;
}

.ta-scenario-down,
.ta-down {
    color: var(--ta-red) !important;
}

.ta-chart-panel {
    overflow: hidden;
    border: 1px solid var(--ta-border);
    border-radius: 8px;
    background: var(--ta-panel);
    min-width: 0;
}

.ta-decision-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 1px;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid var(--ta-border);
    border-radius: 8px;
    background: var(--ta-border);
    min-width: 0;
}

.ta-decision-panel > div {
    min-width: 0;
    padding: 10px 12px;
    background: var(--ta-panel);
}

.ta-decision-main strong {
    display: block;
    margin-top: 3px;
    color: var(--ta-text);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.25;
}

.ta-decision-main p {
    margin: 5px 0 0;
    color: var(--ta-muted);
    font-size: 12px;
    line-height: 1.3;
    white-space: normal;
}

.ta-fact-list {
    display: grid;
    gap: 4px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

.ta-fact-list li {
    color: var(--ta-muted);
    font-size: 12px;
    line-height: 1.25;
    white-space: normal;
}

.ta-volume-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.ta-micro-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.ta-volume-card,
.ta-micro-card {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--ta-border);
    border-radius: 8px;
    background: var(--ta-panel);
}

.ta-volume-card strong,
.ta-micro-card strong {
    display: block;
    margin-top: 3px;
    color: var(--ta-text);
    font-size: 14px;
    font-weight: 850;
    line-height: 1.2;
}

.ta-volume-card.is-spike strong {
    color: var(--ta-yellow);
}

.ta-volume-card.is-recent strong {
    color: var(--ta-green);
}

.ta-micro-card.is-long strong {
    color: var(--ta-green);
}

.ta-micro-card.is-short strong {
    color: var(--ta-red);
}

.ta-micro-card.is-neutral strong {
    color: var(--ta-muted);
}

.ta-volume-summary,
.ta-volume-spikes,
.ta-micro-summary {
    overflow: hidden;
    margin-top: 4px;
    color: var(--ta-muted);
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ta-entry-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.ta-entry-card {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--ta-border);
    border-radius: 8px;
    background: var(--ta-panel);
}

.ta-entry-status {
    display: block;
    margin-top: 3px;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.2;
}

.ta-entry-ready {
    color: var(--ta-green);
}

.ta-entry-watch {
    color: var(--ta-yellow);
}

.ta-entry-wait,
.ta-entry-avoid {
    color: var(--ta-muted);
}

.ta-entry-price {
    margin-top: 4px;
    color: var(--ta-text);
    font-size: 13px;
    font-weight: 800;
}

.ta-entry-reason {
    overflow: hidden;
    margin-top: 3px;
    color: var(--ta-muted);
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ta-chart-wrap {
    position: relative;
    height: min(74vh, 760px);
    min-height: 560px;
    overflow: hidden;
}

.ta-chart,
.ta-levels-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.ta-chart {
    z-index: 1;
}

.ta-levels-canvas {
    z-index: 2;
    pointer-events: none;
}

.ta-loading {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    background: rgba(17, 18, 20, 0.78);
    color: var(--ta-text);
    font-weight: 800;
}

.ta-loading.is-hidden {
    display: none;
}

.ta-error {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(239, 64, 86, 0.35);
    border-radius: 8px;
    background: rgba(239, 64, 86, 0.1);
    color: #ffb3bd;
}

@media (max-width: 920px) {
    .ta-forecast-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ta-decision-panel {
        grid-template-columns: 1fr;
    }

    .ta-volume-panel {
        grid-template-columns: 1fr;
    }

    .ta-micro-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 560px) {
    .ta-forecast-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .ta-page {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .ta-header,
    .ta-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .ta-header {
        padding-top: 4px;
    }

    .ta-header h1 {
        font-size: 20px;
    }

    .ta-symbol-form {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    .ta-symbol-form button {
        display: none;
    }

    .ta-actions .btn,
    .ta-symbol-form .btn,
    .ta-timeframe,
    .ta-icon-toggle {
        flex: 0 0 44px;
    }

    .ta-segmented,
    .ta-actions {
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .ta-actions {
        grid-template-columns: repeat(2, minmax(0, 44px));
        justify-content: end;
    }

    .ta-timeframe,
    .ta-icon-toggle,
    .ta-actions .btn {
        width: 100%;
        min-width: 0;
        height: 38px;
        padding: 0 6px;
        font-size: 12px;
    }

    .ta-forecast-bar > div,
    .ta-decision-panel > div,
    .ta-volume-card,
    .ta-micro-card,
    .ta-entry-card {
        padding: 9px 10px;
    }

    .ta-decision-main p,
    .ta-fact-list li,
    .ta-volume-summary,
    .ta-volume-spikes,
    .ta-micro-summary,
    .ta-entry-reason {
        white-space: normal;
        text-overflow: clip;
    }

    .ta-chart-wrap {
        height: min(68vh, 620px);
        min-height: 430px;
    }

    .ta-entry-bar {
        grid-template-columns: 1fr;
    }

    .ta-micro-panel {
        grid-template-columns: 1fr;
    }

    .ta-page-embed {
        padding: 8px;
    }

    .ta-page-embed .ta-header h1 {
        font-size: 18px;
    }

    .ta-page-embed .ta-chart-panel {
        height: calc(100vh - 132px);
        min-height: 360px;
    }
}

@media (max-width: 420px) {
    .ta-forecast-bar {
        grid-template-columns: 1fr;
    }

    .ta-segmented {
        grid-template-columns: 1fr;
    }

    .ta-actions {
        justify-content: stretch;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
