:root {
    --bg: #0b0e14;
    --panel: #12161f;
    --panel-hi: #1b2130;
    --ink: #d0d7e2;
    --ink-dim: #8994a6;
    --accent: #4dd0e1;
    --warn: #ffb74d;
    --danger: #ef5350;
    --grid: #1c2434;
    --radar-bg: #030a06;
    --radar-ink: #6fe0a6;
    --radar-ink-dim: #2c6b47;
    --border: #232a38;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--bg);
    color: var(--ink);
    font-family: "Menlo", "Consolas", "SF Mono", monospace;
    font-size: 13px;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 8px;
    gap: 8px;
}

#hud {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 8px 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 4px;
}

#hud span { white-space: nowrap; }
#hud #status { color: var(--accent); margin-left: auto; }

button {
    background: var(--panel-hi);
    color: var(--ink);
    border: 1px solid var(--border);
    padding: 6px 12px;
    cursor: pointer;
    font-family: inherit;
    border-radius: 3px;
}
button:hover { background: #263048; }

main {
    flex: 1;
    display: grid;
    grid-template-columns: 240px 700px 1fr;
    gap: 8px;
    min-height: 0;
}

section {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

h2 {
    margin: 0;
    padding: 8px 10px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-dim);
    border-bottom: 1px solid var(--border);
}

/* Flight list */
#flight-list {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
#flight-list th, #flight-list td {
    padding: 4px 6px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
#flight-list th {
    color: var(--ink-dim);
    font-weight: normal;
    text-transform: uppercase;
    font-size: 10px;
}
#flight-list tr.selected { background: #22314a; }
#flight-list tr.approach td { color: var(--accent); }
#flight-list tr.requesting td { color: var(--warn); }
#flight-list tr.lost td { color: var(--danger); text-decoration: line-through; }

/* Radar */
#radar-panel {
    position: relative;
    padding: 0;
    align-items: center;
    justify-content: center;
    background: var(--radar-bg);
    width: 700px;
    flex: 0 0 700px;
}
#radar {
    display: block;
    cursor: crosshair;
}
#chat-flash {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #333;
    box-shadow: 0 0 0 1px #444;
    transition: background 100ms;
    pointer-events: none;
}
#chat-flash.active {
    background: var(--warn);
    box-shadow: 0 0 12px var(--warn);
}

/* Chat */
#chat-panel { min-width: 260px; }
#chat-log {
    flex: 1;
    overflow-y: auto;
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.4;
}
#chat-log .msg { margin: 2px 0; }
#chat-log .from-atc { color: var(--accent); }
#chat-log .from-plane { color: var(--ink); }
#chat-log .system { color: var(--ink-dim); font-style: italic; }
#chat-log .warn { color: var(--warn); }
#chat-log .danger { color: var(--danger); font-weight: bold; }

#command-form {
    display: flex;
    border-top: 1px solid var(--border);
}
#command-input {
    flex: 1;
    background: var(--radar-bg);
    color: var(--ink);
    border: none;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}
#command-form button {
    border-radius: 0;
    border: none;
    border-left: 1px solid var(--border);
}
#command-help {
    padding: 6px 10px;
    font-size: 10px;
    color: var(--ink-dim);
    border-top: 1px solid var(--border);
}
