:root {
    --gp-bg: #0b0e11;
    --gp-panel: #131722;
    --gp-border: #2a2e39;
    --gp-text: #d1d4dc;
    --gp-muted: #787b86;
    --gp-accent: #2962ff;
    --gp-up: #26a69a;
    --gp-down: #ef5350;
    --gp-topbar-h: 48px;
    --gp-footer-h: 28px;
    --gp-toolbar-h: 44px;
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body.gp-body {
    margin: 0 !important;
    padding: 0 !important;
    background: var(--gp-bg);
    color: var(--gp-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    height: 100%;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body.gp-body #page,
body.gp-body .site {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    margin: 0;
    padding: 0;
}

.gp-topbar {
    flex: 0 0 var(--gp-topbar-h);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    background: var(--gp-panel);
    border-bottom: 1px solid var(--gp-border);
}

.gp-logo {
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #f0f3fa;
}

.gp-tag {
    font-size: 12px;
    color: var(--gp-muted);
    text-transform: uppercase;
}

.gp-spacer {
    flex: 1;
}

.gp-live {
    font-variant-numeric: tabular-nums;
    font-size: 18px;
    font-weight: 600;
}

.gp-change.up {
    color: var(--gp-up);
}

.gp-change.down {
    color: var(--gp-down);
}

.gp-layout {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    height: calc(100vh - var(--gp-topbar-h) - var(--gp-footer-h));
}

.gp-sidebar {
    flex: 0 0 220px;
    background: var(--gp-panel);
    border-right: 1px solid var(--gp-border);
    padding: 12px;
    overflow-y: auto;
}

.gp-sidebar h2 {
    font-size: 13px;
    color: var(--gp-muted);
    margin: 0 0 8px;
    text-transform: uppercase;
}

.gp-watch {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gp-watch li {
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.gp-watch li:hover,
.gp-watch li.active {
    background: #1e222d;
    color: #fff;
}

.gp-sidebar-note {
    margin-top: 16px;
    font-size: 11px;
    color: var(--gp-muted);
    line-height: 1.4;
}

.gp-technicals {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--gp-border);
}

.gp-technicals h2 {
    font-size: 13px;
    color: var(--gp-muted);
    margin: 0 0 6px;
    text-transform: uppercase;
}

.gp-gauge-wrap {
    text-align: center;
}

.gp-tech-verdict {
    margin: 4px 0 0;
    font-size: 18px;
    font-weight: 700;
    color: #d1d4dc;
}

.gp-tech-verdict.sell {
    color: #ef5350;
}

.gp-tech-verdict.buy {
    color: #26a69a;
}

.gp-tech-verdict.neu {
    color: #787b86;
}

#gp-tech-gauge {
    display: block;
    margin: 0 auto;
    max-width: 100%;
}

.gp-chart-wrap {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--gp-bg);
}

.gp-toolbar {
    flex: 0 0 var(--gp-toolbar-h);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    background: var(--gp-panel);
    border-bottom: 1px solid var(--gp-border);
}

.gp-toolbar button {
    background: #1e222d;
    border: 1px solid var(--gp-border);
    color: var(--gp-text);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.gp-toolbar button.active,
.gp-toolbar button:hover {
    border-color: var(--gp-accent);
    background: #252a37;
    color: #fff;
}

.gp-chart {
    flex: 1 1 auto;
    min-height: 400px;
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

#gp-tv-chart {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    height: 100% !important;
}

#gp-tv-chart iframe {
    width: 100% !important;
    height: 100% !important;
}

.gp-status {
    position: absolute;
    pointer-events: none;
    opacity: 0;
}

.gp-footer {
    flex: 0 0 var(--gp-footer-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 11px;
    color: var(--gp-muted);
    border-top: 1px solid var(--gp-border);
    background: var(--gp-panel);
}

@media (max-width: 900px) {
    .gp-layout {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - var(--gp-topbar-h) - var(--gp-footer-h));
    }

    .gp-sidebar {
        flex: 0 0 auto;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--gp-border);
    }

    .gp-chart {
        min-height: 65vh;
    }
}