:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #dfe3e8;
  --text: #1d232b;
  --muted: #687381;
  --accent: #147c72;
  --accent-strong: #0f625a;
  --danger: #b42318;
  --soft: #edf6f5;
}

* {
  box-sizing: border-box;
}

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

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.auth-panel {
  width: min(420px, 100%);
  margin: 12vh auto 0;
}

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

h1,
h2 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 18px;
}

p {
  margin: 8px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: minmax(360px, 520px) 1fr;
  gap: 18px;
  align-items: start;
}

.stack {
  display: grid;
  gap: 14px;
}

.row {
  display: flex;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: #3b4652;
  font-size: 14px;
  flex: 1;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

textarea {
  resize: vertical;
}

button,
.button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

button:hover,
.button:hover {
  background: var(--accent-strong);
}

.ghost,
.nav-link {
  background: white;
  color: var(--text);
  border: 1px solid var(--line);
  text-decoration: none;
}

.ghost:hover,
.nav-link:hover {
  background: var(--soft);
}

nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.jobs,
.users {
  display: grid;
  gap: 12px;
}

.job,
.user-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.pill {
  background: var(--soft);
  color: var(--accent-strong);
  border-radius: 999px;
  padding: 3px 9px;
}

.progress {
  height: 8px;
  background: #eef1f4;
  border-radius: 999px;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.log {
  max-height: 190px;
  overflow: auto;
  padding: 10px;
  border-radius: 6px;
  background: #101418;
  color: #dbe3ea;
  font-size: 12px;
  white-space: pre-wrap;
}

.error {
  min-height: 18px;
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.user-form {
  align-items: end;
}

@media (max-width: 820px) {
  .grid,
  .row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

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

  nav {
    flex-wrap: wrap;
  }
}
