:root {
  --bg: #0a1016;
  --bg-accent: #131f29;
  --panel: rgba(16, 27, 37, 0.78);
  --line: rgba(135, 177, 207, 0.22);
  --text: #eff7fb;
  --muted: #9db3c1;
  --accent: #76e4c3;
  --accent-2: #f0b56a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(118, 228, 195, 0.2), transparent 30%),
    radial-gradient(circle at top right, rgba(240, 181, 106, 0.14), transparent 32%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-accent) 55%, #091017 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent);
  pointer-events: none;
}

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 6rem 0 4rem;
}

.hero {
  padding: 2rem 0 3rem;
}

.eyebrow,
.panel-kicker,
.status-label {
  margin: 0 0 0.75rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(3rem, 10vw, 6.75rem);
  line-height: 0.95;
  max-width: 10ch;
}

.lead {
  max-width: 42rem;
  margin-top: 1.5rem;
  font-size: clamp(1.1rem, 2.1vw, 1.4rem);
  line-height: 1.7;
  color: var(--muted);
}

.status-card {
  display: inline-flex;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(9, 16, 23, 0.72);
  box-shadow: var(--shadow);
}

.status-dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), #3bb79a);
  box-shadow: 0 0 0 0.4rem rgba(118, 228, 195, 0.12);
}

.status-label {
  color: var(--muted);
}

.status-value {
  font-size: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.terminal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  gap: 1rem;
  align-items: start;
}

.panel {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.panel h2 {
  margin-bottom: 0.8rem;
  font-size: 1.35rem;
}

.panel p:last-child {
  color: var(--muted);
  line-height: 1.65;
}

.auth-panel h2 {
  margin-bottom: 0.8rem;
}

.auth-form,
.logout-form {
  display: grid;
  gap: 0.9rem;
}

.auth-form label {
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-form input {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(157, 179, 193, 0.26);
  border-radius: 14px;
  background: rgba(6, 12, 18, 0.72);
  color: var(--text);
  font: inherit;
}

.auth-form input:focus {
  outline: 2px solid rgba(118, 228, 195, 0.42);
  outline-offset: 2px;
}

.terminal-form textarea {
  width: 100%;
  min-height: 7rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(157, 179, 193, 0.26);
  border-radius: 14px;
  background: rgba(6, 12, 18, 0.9);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.terminal-form textarea:focus {
  outline: 2px solid rgba(118, 228, 195, 0.42);
  outline-offset: 2px;
}

button {
  width: fit-content;
  padding: 0.95rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #4bc9db);
  color: #081117;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

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

.secondary-button {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border: 1px solid rgba(157, 179, 193, 0.2);
}

.alert {
  margin-bottom: 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(240, 181, 106, 0.35);
  border-radius: 14px;
  background: rgba(240, 181, 106, 0.12);
  color: #ffd7ab;
}

.meta,
.meta code {
  color: var(--muted);
}

.text-link {
  color: var(--accent);
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.terminal-toolbar {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.terminal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.terminal-output {
  min-height: 26rem;
  max-height: 60vh;
  overflow: auto;
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid rgba(157, 179, 193, 0.18);
  border-radius: 18px;
  background: #050a0f;
  color: #d6f4e8;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.terminal-canvas {
  padding: 0;
  white-space: normal;
}

.terminal-canvas .xterm {
  padding: 1rem;
}

.terminal-submit {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
}

@media (max-width: 860px) {
  .shell {
    padding-top: 4rem;
  }

  .terminal-layout,
  .auth-layout,
  .grid {
    grid-template-columns: 1fr;
  }

  .terminal-toolbar,
  .terminal-submit {
    flex-direction: column;
    align-items: stretch;
  }
}
