* {
    box-sizing: border-box;
}

:root {
    --background: #080f1c;
    --panel: #101a2a;
    --panel-dark: #0b1423;
    --panel-header: #141f31;
    --border: #26344a;
    --text: #e7edf7;
    --muted: #7f8da2;
    --accent: #4fc3f7;
    --online: #62ff7b;
}

html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

button {
    font: inherit;
}

.cockpit {
    height: 100vh;
    display: grid;
    grid-template-rows: 68px minmax(0, 1fr) 38px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand-name {
    color: var(--accent);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.tagline {
    color: #8795aa;
    font-size: 13px;
}

.top-status {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--online);
    font-size: 13px;
}

.status-light {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #30e95f;
    box-shadow: 0 0 10px rgba(48, 233, 95, 0.85);
}

.workspace {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns:
        minmax(320px, 3fr)
        6px
        minmax(260px, 1fr);
    gap: 0;
    padding: 10px;
}

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

.chart-panel {
    display: grid;
    grid-template-rows: 38px minmax(0, 1fr);
}

.panel-header {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 14px;
    background: var(--panel-header);
    border-bottom: 1px solid var(--border);
    color: #c8d2e1;
    font-size: 13px;
    font-weight: 600;
}

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

.panel-subtitle {
    color: #718097;
    font-size: 11px;
    font-weight: 400;
}

.chart-placeholder {
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #63738a;
    text-align: center;
    background:
        linear-gradient(
            rgba(49, 66, 91, 0.18) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(49, 66, 91, 0.18) 1px,
            transparent 1px
        ),
        var(--panel-dark);
    background-size: 60px 60px;
}

.chart-placeholder strong {
    display: block;
    margin-bottom: 8px;
    color: #9aa9bd;
    font-size: 20px;
}

.right-column {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows:
        minmax(90px, 1fr)
        6px
        minmax(90px, 1fr);
}

.analysis-panel {
    display: grid;
    grid-template-rows: 38px minmax(0, 1fr);
}

.empty-content {
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #63738a;
    text-align: center;
    background: #0c1524;
}

.vertical-resizer,
.horizontal-resizer {
    position: relative;
    background: transparent;
    z-index: 10;
}

.vertical-resizer {
    cursor: col-resize;
}

.horizontal-resizer {
    cursor: row-resize;
}

.vertical-resizer::after,
.horizontal-resizer::after {
    content: "";
    position: absolute;
    border-radius: 3px;
    background: #32445f;
    opacity: 0.5;
    transition:
        opacity 0.15s ease,
        background 0.15s ease;
}

.vertical-resizer::after {
    top: 8px;
    bottom: 8px;
    left: 2px;
    width: 2px;
}

.horizontal-resizer::after {
    left: 8px;
    right: 8px;
    top: 2px;
    height: 2px;
}

.vertical-resizer:hover::after,
.horizontal-resizer:hover::after,
body.is-resizing .vertical-resizer::after,
body.is-resizing .horizontal-resizer::after {
    opacity: 1;
    background: var(--accent);
}

.collapse-button {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid #344660;
    border-radius: 4px;
    background: #101a2a;
    color: #aab7c9;
    cursor: pointer;
}

.collapse-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.analysis-panel.collapsed {
    grid-template-rows: 38px 0;
}

.analysis-panel.collapsed .panel-content {
    display: none;
}

.statusbar {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 14px;
    overflow: hidden;
    background: var(--panel);
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
}

.status-group {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 18px;
    white-space: nowrap;
}

.online {
    color: var(--online);
}

.offline {
    color: #728096;
}

body.is-resizing {
    user-select: none;
}

body.is-resizing * {
    cursor: inherit !important;
}

@media (max-width: 900px) {
    .tagline {
        display: none;
    }

    .workspace {
        grid-template-columns:
            minmax(240px, 2fr)
            6px
            minmax(220px, 1fr);
    }

    .status-group {
        gap: 10px;
    }
}
.chart-container {
    width: 100%;
    height: 100%;
}
