:root {
  color-scheme: dark;
  --bg: #161815;
  --surface: #20231f;
  --surface-2: #292d27;
  --line: #3d443a;
  --text: #f2f4ed;
  --muted: #aeb7a8;
  --accent: #d96c3b;
  --accent-2: #f0b35a;
  --danger: #ff7668;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(140deg, rgba(217, 108, 59, 0.14), transparent 34%),
    radial-gradient(circle at 80% 10%, rgba(240, 179, 90, 0.12), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1040px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.tile,
.panel,
.log-wrap,
.login-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(32, 35, 31, 0.92);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.tile {
  min-height: 112px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.label {
  color: var(--muted);
  font-size: 0.9rem;
}

.tile strong {
  font-size: 1.45rem;
}

.panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  margin-bottom: 16px;
}

.panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.log-wrap {
  overflow: hidden;
}

.log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.log-head h2 {
  margin: 0;
}

pre {
  min-height: 260px;
  max-height: 52vh;
  margin: 0;
  padding: 20px;
  overflow: auto;
  background: #10120f;
  color: #d7dfcf;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  color: var(--text);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.primary {
  background: var(--accent);
  font-weight: 800;
}

.ghost {
  background: var(--surface-2);
  border-color: var(--line);
}

.full {
  width: 100%;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-box {
  width: min(420px, 100%);
  padding: 28px;
}

.login-box h1 {
  margin-bottom: 24px;
  font-size: 2.4rem;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #11140f;
  color: var(--text);
}

.error {
  margin-bottom: 16px;
  color: var(--danger);
}

@media (max-width: 760px) {
  .topbar,
  .panel {
    align-items: stretch;
    flex-direction: column;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }
}
