:root {
  color-scheme: light;
  --bg: #f4f6f4;
  --surface: #ffffff;
  --surface-strong: #edf2ee;
  --ink: #17211c;
  --muted: #66746d;
  --border: #dbe3de;
  --green: #177245;
  --green-dark: #105938;
  --red: #b42318;
  --red-dark: #8f1d14;
  --amber: #8a5a00;
  --shadow: 0 16px 40px rgba(24, 36, 30, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(23, 114, 69, 0.07), transparent 340px),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(100% - 32px, 980px);
  margin: 0 auto;
  padding: 40px 0;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1;
}

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

p {
  color: var(--muted);
  line-height: 1.55;
}

.panel,
.metric,
.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.panel p:last-child {
  margin-bottom: 0;
}

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

.metric {
  min-width: 0;
  padding: 18px;
}

.metric span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    opacity 120ms ease;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button-primary {
  background: var(--green);
  color: #ffffff;
}

.button-primary:hover:not(:disabled) {
  background: var(--green-dark);
}

.button-secondary {
  background: var(--surface-strong);
  border-color: var(--border);
  color: var(--ink);
}

.button-secondary:hover:not(:disabled) {
  background: #e4ece6;
}

.button-danger {
  background: var(--red);
  color: #ffffff;
}

.button-danger:hover:not(:disabled) {
  background: var(--red-dark);
}

.warning {
  width: 100%;
  color: var(--amber);
  font-size: 13px;
}

.notice {
  margin-bottom: 16px;
  padding: 14px 16px;
  color: var(--ink);
}

.notice-error {
  border-color: rgba(180, 35, 24, 0.3);
  background: #fff4f2;
  color: var(--red-dark);
}

.hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 980px);
    padding: 24px 0;
  }

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

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

  .actions {
    justify-content: stretch;
  }

  .button,
  .actions {
    width: 100%;
  }
}
