@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=Syne:wght@600;700&display=swap');

:root {
  --bg: #0f1410;
  --panel: #171d18;
  --line: #2a342b;
  --text: #d8e0d4;
  --muted: #8a9688;
  --accent: #c4a35a;
  --good: #6fbf7a;
  --bad: #d16b5b;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, #243024 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #2a2214 0%, transparent 50%),
    var(--bg);
}

.hidden { display: none !important; }

.login-wrap {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(380px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}
.brand {
  font-family: Syne, sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.login-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }
input[type="password"], #cmd {
  width: 100%;
  border: 1px solid var(--line);
  background: #0c100d;
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
}
button, .btn {
  border: 1px solid var(--line);
  background: #222a23;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
}
.btn:hover, button:hover { border-color: var(--accent); }
.btn.good { border-color: #355a3a; color: var(--good); }
.btn.bad { border-color: #5a3530; color: var(--bad); }
.btn.ghost { background: transparent; }
.btn.tiny { padding: 4px 8px; font-size: 0.75rem; }
.error { color: var(--bad); min-height: 1.2em; font-size: 0.85rem; }

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  gap: 16px;
  min-height: 100%;
  grid-template-rows: auto auto 1fr;
}
.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.sub { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}
.stat span { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.stat strong { font-size: 1rem; word-break: break-word; }

.console-wrap {
  background: #0b0f0c;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 420px;
  box-shadow: var(--shadow);
}
.console-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}
.console {
  margin: 0;
  padding: 14px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #c7d2c4;
  min-height: 320px;
  max-height: calc(100vh - 320px);
}
.cmd-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: #101511;
}
.prompt { color: var(--accent); padding-left: 6px; }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
