:root {
  color-scheme: light;
  --ink: #18211f;
  --muted: #63706b;
  --line: #d7ded9;
  --paper: #f8faf8;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --warn: #9f4a18;
  --danger: #9d2235;
  --shadow: 0 12px 32px rgba(26, 39, 35, 0.12);
}

* {
  box-sizing: border-box;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
}

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

button.secondary {
  background: #eef4f1;
  color: var(--ink);
  border: 1px solid var(--line);
}

button.secondary:hover {
  background: #e1ebe7;
}

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

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  background: white;
  color: var(--ink);
}

textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.45;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.login-panel h1 {
  margin: 0 0 8px;
  font-size: 1.55rem;
}

.login-panel p {
  color: var(--muted);
  margin: 0 0 18px;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 292px 1fr;
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #eef4f1;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 18px;
}

.brand h1 {
  font-size: 1.05rem;
  margin: 0;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button {
  text-align: left;
  background: transparent;
  color: var(--ink);
  border: 1px solid transparent;
}

.nav button.active,
.nav button:hover {
  background: white;
  border-color: var(--line);
}

.content {
  padding: 24px;
  display: grid;
  gap: 18px;
  align-content: start;
}

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

.topbar h2 {
  margin: 0;
  font-size: 1.35rem;
}

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

.two-col {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.65fr);
}

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

.panel {
  padding: 16px;
}

.card {
  padding: 14px;
}

.card h3,
.panel h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

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

.inspection-list {
  display: grid;
  gap: 10px;
}

.inspection-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e7f2ef;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 750;
  white-space: nowrap;
}

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

.tabs button {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}

.tabs button.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

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

.error {
  color: var(--danger);
  font-weight: 700;
}

.warning {
  color: var(--warn);
}

.outcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.prewrap {
  white-space: pre-wrap;
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .two-col {
    grid-template-columns: 1fr;
  }

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