/* static/css/retro.css */

:root {
    --tv-bg: #000055;          /* Глубокий темно-синий (не бьет по глазам) */
    --tv-panel: #AAAAAA;       /* Серый фон окон/панелей */
    --tv-text-light: #FFFFFF;  /* Белый текст */
    --tv-text-dark: #000000;   /* Черный текст */
    --tv-highlight: #FFFF55;   /* Желтый для акцентов/заголовков */
    --tv-btn-ok: #00AA00;      /* Зеленый для кнопок подтверждения */
    --tv-border: 4px double #000000; /* Двойная рамка */
    --tv-shadow: 10px 10px 0 rgba(0,0,0,0.5); /* Грубая тень */
}

body, html {
    height: 100%;
    margin: 0;
    background-color: var(--tv-bg);
    color: var(--tv-text-light);
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden;
}

a { text-decoration: none; color: inherit; }

/* --- ОБЩИЕ ЭЛЕМЕНТЫ TURBO VISION --- */
.tv-window {
    background-color: var(--tv-panel);
    color: var(--tv-text-dark);
    border: var(--tv-border);
    box-shadow: var(--tv-shadow);
}

.tv-header {
    background-color: #000;
    color: var(--tv-highlight);
    text-align: center;
    padding: 5px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Кнопки */
.btn {
    background-color: var(--tv-btn-ok);
    color: var(--tv-text-dark);
    border: 2px solid #000;
    padding: 5px 20px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 3px 3px 0 #000;
    text-transform: uppercase;
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }

.btn-outline {
    background-color: var(--tv-panel); /* Серая кнопка */
}
.btn-outline:active { background-color: #888; }

/* Ввод */
input, select {
    background-color: var(--tv-bg);
    color: var(--tv-highlight);
    border: none;
    padding: 5px;
    font-family: inherit;
    font-size: 16px;
    outline: 2px solid #000;
}
input:focus, select:focus { background-color: #000; color: #FFF; }

/* --- СОВРЕМЕННАЯ СТРУКТУРА (Дашборд и Билдер) --- */

/* Сетка конструктора */
.builder-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    grid-template-rows: 60px 1fr 40px;
    height: 100vh;
    overflow: hidden; /* ВАЖНО */
}

/* Верхняя навигация */
.top-bar {
    grid-column: 1 / -1;
    background: var(--tv-panel);
    color: var(--tv-text-dark);
    border-bottom: var(--tv-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 20px;
    box-shadow: 0 5px 0 rgba(0,0,0,0.3);
    z-index: 10;
}

.logo { font-weight: bold; color: var(--tv-text-dark); }
.logo span { color: var(--tv-bg); }

/* Сайдбар слева */
.sidebar {
    background: var(--tv-panel);
    color: var(--tv-text-dark);
    border-right: var(--tv-border);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}

.section-title {
    color: var(--tv-text-dark);
    font-weight: bold;
    text-align: center;
    border-bottom: 2px solid #000;
    margin-bottom: 10px;
    padding-bottom: 5px;
    text-transform: uppercase;
}

/* Элементы меню (Индикаторы) */
.indicator-item {
    background: var(--tv-panel);
    color: var(--tv-text-dark);
    padding: 5px 10px;
    cursor: pointer;
    border: 1px dashed #000;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}
.indicator-item:hover {
    background: var(--tv-bg);
    color: var(--tv-highlight);
    border: 1px solid #000;
}

/* Область графика */
.main-area {
    background-color: var(--tv-panel);
    border: var(--tv-border);
    margin: 10px 10px 10px 0;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* ВАЖНО: не дает окну расти */
}

/* Карточки ботов в дашборде */
.dashboard-wrapper {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
}

.bot-card {
    background: var(--tv-panel);
    color: var(--tv-text-dark);
    border: var(--tv-border);
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--tv-shadow);
}

.bot-info h3 { margin: 0 0 10px 0; background: #000; color: var(--tv-highlight); display: inline-block; padding: 2px 10px; }
.bot-status { font-weight: bold; padding: 2px 8px; border: 2px solid #000; }
.status-run { background: var(--tv-btn-ok); color: #000; }
.status-stop { background: #FF5555; color: #000; }

/* Статус бар внизу */
.status-bar {
    grid-column: 1 / -1;
    background: var(--tv-panel);
    color: var(--tv-text-dark);
    border-top: var(--tv-border);
    padding: 5px 20px;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}
.terminal-box {
    background-color: #000;
    color: #00FF00;
    padding: 10px;
    font-family: 'Courier New', monospace;
    border: 2px inset #555;
    margin-bottom: 15px;
    text-align: left;
    height: 80px;
    overflow: hidden;
    font-size: 14px;
}