:root {
  --bg-0: #0c1118;
  --bg-1: #131b25;
  --bg-2: #1b2633;
  --text: #d9e2ef;
  --muted: #9aacbf;
  --accent: #6fb8ff;
  --border: #2d3f53;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 0%, #1c2736 0%, var(--bg-0) 45%, #06090f 100%);
}

.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  width: 100%;
  min-height: 100dvh;
}

.connect-panel {
  padding: 16px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(19, 27, 37, 0.95) 0%, rgba(14, 20, 28, 0.95) 100%);
}

h1 {
  margin: 0 0 12px;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
}

.connect-form {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
}

input:focus {
  outline: 2px solid rgba(111, 184, 255, 0.25);
  border-color: var(--accent);
}

.actions {
  display: flex;
  gap: 8px;
}

button {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 600;
  cursor: pointer;
  color: #071424;
  background: var(--accent);
}

button.secondary {
  color: var(--text);
  background: transparent;
  border-color: var(--border);
}

button:hover {
  filter: brightness(1.05);
}

.status {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.terminal-panel {
  padding: 10px;
  min-width: 0;
  min-height: 0;
}

.terminal {
  width: 100%;
  height: calc(100dvh - 20px);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #04070d;
}

.xterm,
.xterm-viewport,
.xterm-screen,
.xterm-helper-textarea {
  height: 100%;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .connect-panel {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .terminal {
    height: calc(100dvh - 360px);
    min-height: 320px;
  }
}

