:root {
  --bg: #f4ede4;
  --paper: rgba(255, 252, 247, 0.8);
  --card: #fffaf2;
  --text: #2f241d;
  --muted: #6d5b4f;
  --line: rgba(86, 59, 39, 0.12);
  --accent: #b6603d;
  --accent-dark: #8d472b;
  --green: #516845;
  --shadow: 0 24px 60px rgba(78, 48, 29, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(227, 183, 150, 0.35), transparent 28%),
    radial-gradient(circle at top right, rgba(137, 167, 120, 0.2), transparent 18%),
    linear-gradient(180deg, #f7efe7 0%, var(--bg) 100%);
  min-height: 100vh;
}

main {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.site-header,
.site-footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
}

.brand,
.nav a,
.text-link,
.table-link,
.order-card {
  text-decoration: none;
  color: inherit;
}

.brand,
h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
}

.brand {
  font-size: 1.8rem;
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 1rem;
}

.nav a {
  color: var(--muted);
  font-weight: 600;
}

.hero,
.section-grid,
.stats-grid,
.detail-grid {
  display: grid;
  gap: 1.25rem;
}

.hero {
  grid-template-columns: 1.3fr 0.9fr;
  align-items: center;
  padding: 3rem 0 2rem;
}

.hero-copy h1,
.page-heading h1,
.empty-state h1 {
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  line-height: 0.95;
  margin: 0.5rem 0 1rem;
}

.hero-text,
.feature-card p,
.detail-card p,
.site-footer p,
label,
input,
textarea,
select,
table,
.stat-card p,
.hero-card p {
  color: var(--muted);
}

.hero-card,
.feature-card,
.stat-card,
.table-card,
.form-card,
.detail-card,
.order-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  padding: 1.5rem;
}

.hero-card-top,
.section-heading,
.order-card-top,
.material-row,
.page-heading,
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.metric-stack {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.metric-stack strong,
.stat-card strong {
  display: block;
  font-size: 2rem;
  margin-top: 0.35rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent);
}

.hero-actions,
.section-grid {
  margin-top: 1.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
  border: 1px solid var(--line);
}

.button.danger {
  background: #b44343;
  color: #fff;
}

.section-grid {
  grid-template-columns: repeat(3, 1fr);
}

.feature-card,
.stat-card,
.table-card,
.form-card,
.detail-card {
  padding: 1.4rem;
}

.page-heading {
  align-items: end;
  margin-bottom: 1.25rem;
}

.stats-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 1.25rem;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 1rem 0.5rem;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  text-transform: capitalize;
  background: rgba(81, 104, 69, 0.12);
  color: var(--green);
}

.status.new {
  background: rgba(182, 96, 61, 0.14);
  color: var(--accent-dark);
}

.status.buying-materials {
  background: rgba(126, 111, 66, 0.14);
  color: #7e6f42;
}

.status.in-progress {
  background: rgba(81, 104, 69, 0.12);
  color: var(--green);
}

.status.finished,
.status.delivered {
  background: rgba(59, 101, 164, 0.12);
  color: #3b65a4;
}

.order-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.order-card {
  padding: 1.2rem;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.order-card:hover {
  transform: translateY(-4px);
}

.form-grid,
.stack-form,
.materials-list {
  display: grid;
  gap: 1rem;
}

.form-grid {
  grid-template-columns: repeat(2, 1fr);
}

.full-width {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.95rem 1rem;
  font: inherit;
}

.detail-grid {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 1.25rem;
}

.danger-zone {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.material-row {
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.site-footer {
  padding: 1rem 0 2rem;
}

.empty-state {
  text-align: center;
  padding: 5rem 0;
}

@media (max-width: 900px) {
  .hero,
  .section-grid,
  .stats-grid,
  .order-grid,
  .detail-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .site-header,
  .page-heading,
  .section-heading,
  .hero-card-top,
  .order-card-top,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
