:root {
  color-scheme: light;
  --bg: #f7faf8;
  --text: #12201b;
  --muted: #66756f;
  --line: #dce7e2;
  --panel: #ffffff;
  --accent: #0d7a5f;
  --accent-strong: #075f49;
  --warn: #a15c0a;
  --ok: #197343;
  --shadow: 0 10px 30px rgba(20, 40, 32, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 2px 12px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
}

.badge {
  flex: 0 0 auto;
  min-width: 76px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  text-align: center;
  font-size: 13px;
  background: #fff;
}

.badge-idle {
  color: var(--muted);
}

.badge-ok {
  color: var(--ok);
  border-color: rgba(25, 115, 67, 0.3);
  background: #eef8f2;
}

.badge-warn {
  color: var(--warn);
  border-color: rgba(161, 92, 10, 0.3);
  background: #fff7eb;
}

.panel {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

label {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 13px;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: #fbfdfc;
  color: var(--text);
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 122, 95, 0.12);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
  margin-top: 12px;
}

.actions,
.quick,
.send-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.send-row input {
  flex: 1;
}

button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 12px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

button:active {
  transform: translateY(1px);
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.command {
  overflow-x: auto;
  min-height: 48px;
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 7px;
  background: #0f1916;
  color: #d7fff1;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-all;
}

.log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 160px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.log li {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #fbfdfc;
}

.log time {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.log code {
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 680px) {
  .shell {
    padding: 12px;
  }

  .topbar {
    align-items: flex-start;
  }

  h1 {
    font-size: 24px;
  }

  .grid,
  .actions,
  .quick,
  .send-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
