:root {
  --primary-color: #000000;
  --secondary-color: #1a1a1a;
  --accent-color: #8c734b;
  --accent-strong: #6f5a39;
  --text-light: #ffffff;
  --text-dark: #242424;
  --muted-text: #686868;
  --background-soft: #f2efe9;
  --background-card: #ffffff;
  --border-color: #dfd6c8;
  --success: #2f7d44;
  --danger: #9d2b2b;

  --font-heading: 'Anton', sans-serif;
  --font-body: 'Signika', sans-serif;

  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-dark);
  background:
    radial-gradient(circle at 20% 0%, #f7f3ec 0, #f7f3ec 30%, #ece3d5 85%),
    linear-gradient(180deg, #f5efe6 0%, #ebe2d3 100%);
  min-height: 100vh;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  background: linear-gradient(120deg, #000 0%, #1f1f1f 65%, #2d251b 100%);
  color: var(--text-light);
  border-bottom: 3px solid var(--accent-color);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.topbar-inner {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  align-items: end;
  padding: 1rem 0 1.2rem;
}

.brand-kicker {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
  color: #ddd3c3;
}

.brand-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: 0.03em;
}

.layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.2rem;
  padding: 1.4rem 0 2rem;
}

.card {
  background: var(--background-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}

h2 {
  margin: 0 0 0.8rem;
  font-family: var(--font-heading);
  font-size: 1.7rem;
  letter-spacing: 0.02em;
}

label {
  display: block;
  margin-bottom: 0.65rem;
  font-weight: 600;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 0.25rem;
  border: 1px solid #c9bca8;
  background: #fff;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
}

textarea {
  resize: vertical;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.item-form .btn {
  width: 100%;
}

.btn {
  border: none;
  cursor: pointer;
  border-radius: 8px;
  padding: 0.56rem 0.9rem;
  color: #fff;
  font-weight: 600;
  background: linear-gradient(140deg, var(--accent-color), var(--accent-strong));
}

.btn:hover {
  filter: brightness(1.05);
}

.btn:focus-visible,
.chip:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #f8f3ea;
}

.list-card .btn-ghost {
  color: var(--text-dark);
  border-color: #b8a996;
}

.btn-danger {
  background: #f4e7e7;
  color: var(--danger);
  border: 1px solid #dfc0c0;
}

.btn-small {
  font-size: 0.78rem;
  padding: 0.34rem 0.5rem;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.filters {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid #c8baa8;
  background: #f8f4ee;
  color: #3a3022;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  cursor: pointer;
  font-weight: 600;
}

.chip-active {
  border-color: #4e3f29;
  background: #2d2418;
  color: #fff;
}

.status-text {
  color: var(--muted-text);
  margin: 0.3rem 0 0.8rem;
}

.email-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  margin: 0.4rem 0 0.9rem;
}

.email-row .btn {
  width: 140px;
}

.onhand-controls {
  display: inline-flex;
  gap: 0.18rem;
}

.onhand-controls .btn {
  min-width: 28px;
  padding: 0.26rem 0.38rem;
  line-height: 1;
}

.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.item-row {
  border: 1px solid #dccfbf;
  border-radius: 8px;
  padding: 0.52rem 0.58rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  background: #fffefc;
}

.item-name {
  margin: 0;
  font-size: 1.02rem;
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
  line-height: 1.08;
}

.item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.item-meta,
.item-notes {
  margin: 0.14rem 0 0;
  font-size: 0.92rem;
  line-height: 1.22;
}

.onhand-inline-btn {
  margin-top: 0.16rem;
  border: 1px solid #d6c7b2;
  background: #fbf7f1;
  color: #4a3a25;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.onhand-inline-btn:hover {
  background: #f2e8d9;
}

.item-notes {
  color: #746553;
}

.item-actions {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  font-size: 0.72rem;
  padding: 0.14rem 0.45rem;
  text-align: center;
  font-weight: 700;
}

.vendor-badge {
  background: #f0e5d4;
  color: #46351e;
}

.badge-due {
  background: #fde2b5;
  color: #7e4d00;
}

.badge-ready {
  background: #dcefdc;
  color: #275f35;
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .item-row {
    grid-template-columns: 1fr;
  }

  .item-actions {
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
  }

  .email-row {
    grid-template-columns: 1fr;
  }

  .email-row .btn {
    width: 100%;
  }
}
