:root {
  --bg: #f4efe6;
  --bg-strong: #ede2d0;
  --ink: #1c1b1a;
  --muted: #5d5a55;
  --accent: #2f6f6d;
  --accent-strong: #1f4f4d;
  --card: #ffffff;
  --shadow: 0 24px 60px rgba(22, 32, 32, 0.15);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 20% 20%, #fff8ef 0%, var(--bg) 45%, var(--bg-strong) 100%);
  min-height: 100vh;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: stretch;
  margin-bottom: 32px;
}

.hero-content {
  padding: 12px 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 3vw, 3rem);
  margin: 12px 0 12px;
}

.lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 520px;
}

.hero-panel {
  display: flex;
  align-items: stretch;
}

.panel-card {
  background: linear-gradient(160deg, #ffffff 0%, #fef7ef 100%);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel-card h2 {
  font-family: 'Space Grotesk', sans-serif;
  margin-top: 0;
}

.panel-meta {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

.status {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--accent-strong);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.categories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 10px 30px rgba(28, 27, 26, 0.08);
  border: 1px solid rgba(32, 32, 32, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeUp 0.6s ease forwards;
  opacity: 0;
}

.category-card--transport {
  grid-column: 1 / -1;
}

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

.category-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  margin: 0;
}

.category-title-block {
  min-width: 0;
}

.category-description {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.35;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.85rem;
  color: var(--muted);
}

.field input,
.field select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 0.95rem;
  font-family: inherit;
}

.field input:disabled,
.field select:disabled {
  background: #f4f1ea;
  color: #9c9a96;
}

.item-entries {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.transport-entries {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-entry,
.transport-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.transport-entry {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
}

.item-entry .field,
.transport-entry .field {
  min-width: 0;
}

.item-entry .field input,
.item-entry .field select,
.transport-entry .field input,
.transport-entry .field select {
  width: 100%;
}

.entry-add,
.entry-remove {
  border: 1px solid rgba(47, 111, 109, 0.25);
  border-radius: 10px;
  padding: 8px 10px;
  background: #f7f1e8;
  color: var(--accent-strong);
  font-family: 'Source Sans 3', system-ui, sans-serif;
  cursor: pointer;
}

.entry-remove {
  white-space: nowrap;
}

.entry-add:disabled,
.entry-remove:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary,
.btn-secondary {
  border: none;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 1rem;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px rgba(47, 111, 109, 0.35);
}

.btn-secondary {
  background: #f3ebe0;
  color: var(--accent-strong);
  border: 1px solid rgba(47, 111, 109, 0.2);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.results {
  margin-top: 32px;
  background: #ffffff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.results.hidden {
  display: none;
}

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

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

.total {
  display: grid;
  gap: 4px;
  text-align: right;
  font-family: 'Space Grotesk', sans-serif;
}

.total strong {
  font-size: 1.8rem;
  color: var(--accent-strong);
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

thead {
  background: #f3efe8;
}

th,
 td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.footer {
  margin-top: 32px;
  text-align: center;
  color: var(--muted);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .categories {
    grid-template-columns: 1fr;
  }

  .total {
    text-align: left;
  }

  .item-entry {
    grid-template-columns: 1fr;
  }

  .transport-entry {
    grid-template-columns: 1fr;
  }
}
