:root { color-scheme: dark; background: #15111c; color: #f2edf5; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
header { display: flex; align-items: center; gap: 16px; min-height: 48px; padding: 8px 16px; background: linear-gradient(#302a36, #251e2d); border-bottom: 1px solid #46344a; font-size: 14px; }
header strong { font: 600 16px ui-monospace, monospace; }
[hidden] { display: none !important; }
#connection { flex: 1; min-width: 0; color: #c8b8d0; font-variant-numeric: tabular-nums; line-height: 1.35; }
#loading { max-width: 300px; }
progress { display: block; width: 100%; height: 6px; accent-color: #d787b3; }
.progress-metrics { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 3px; font-size: 11px; }
button { flex-shrink: 0; white-space: nowrap; font: inherit; color: inherit; background: #35273e; border: 1px solid #614567; border-radius: 6px; padding: 6px 10px; cursor: pointer; }
button:hover { background: #503157; }
button:focus-visible { outline: 2px solid #db9ac1; outline-offset: 2px; }
/* xterm's fit addon measures its parent box, so spacing belongs outside it. */
#terminal { flex: 1; min-height: 0; margin: 16px; }
.xterm { height: 100%; }
@media (max-width: 600px) { header { gap: 8px; padding: 8px; } #terminal { margin: 8px; } }

.window-controls { display: flex; gap: 8px; flex-shrink: 0; }
.window-controls i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 1px #0002; }
.window-controls i:nth-child(2) { background: #febc2e; }
.window-controls i:nth-child(3) { background: #28c840; }
#error { margin: 0; padding: 10px 16px; color: #ffb4af; background: #37202a; overflow-wrap: anywhere; font-size: 13px; }
@media (max-width: 600px) { .window-controls { gap: 5px; } .window-controls i { width: 9px; height: 9px; } header strong { font-size: 13px; } button { padding: 5px 6px; font-size: 12px; } }
