:root {
  color-scheme: light dark;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  font-weight: 400;
  --bg: #f6f6f8;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0ea5e9;
  --border: #e2e8f0;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

header,
footer {
  background: #020617;
  color: #e2e8f0;
  padding: 2.5rem 1rem;
}

header h1 {
  margin-bottom: 0.75rem;
}

footer a {
  color: #38bdf8;
}

.wrap {
  width: min(1100px, 100%);
  margin: 0 auto;
}

main.wrap {
  padding: 2rem 1rem 3rem;
}

.panel {
  background: var(--panel);
  border-radius: 20px;
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
}

.inline-form,
.stack-form {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

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

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

input,
select,
button {
  font: inherit;
}

input,
select {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  min-width: 220px;
}

button {
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.25rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.chart-container {
  margin-top: 1.5rem;
}

.status {
  min-height: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.category-card {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 18px;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-card .label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  color: #cbd5f5;
  margin: 0;
}

.category-card .value {
  margin: 0.25rem 0 0;
  font-size: 2.5rem;
  font-weight: 600;
}

@media (max-width: 640px) {
  .panel {
    padding: 1.5rem;
  }

  .inline-form,
  .stack-form {
    width: 100%;
  }

  input,
  select {
    min-width: unset;
    width: 100%;
  }

  button {
    width: 100%;
  }

  .category-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

