:root {
  --ink-950: #0f172a;
  --ink-800: #1f2937;
  --ink-500: #64748b;
  --paper: #f8fafc;
  --card: rgba(255, 255, 255, 0.92);
  --line: rgba(148, 163, 184, 0.28);
  --brand: #0f766e;
  --brand-strong: #115e59;
  --accent: #f59e0b;
  --danger: #b91c1c;
  --success: #166534;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink-950);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.18), transparent 30%),
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 32%),
    linear-gradient(180deg, #eef6f5 0%, #f8fafc 46%, #f6f1e8 100%);
}

a {
  color: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.flash {
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.09);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.flash-message {
  flex: 1;
}

.flash-close {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink-800);
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 8px;
  padding: 0;
  line-height: 1;
  font-size: 18px;
}

.flash-close:hover {
  background: #fff;
}

.flash.is-closing {
  opacity: 0;
  transform: translateY(-6px);
}

.flash-notice {
  color: var(--success);
}

.flash-alert {
  color: var(--danger);
}

.hero,
.panel,
.card,
.metric {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.hero,
.panel {
  padding: 28px;
}

.hero {
  display: grid;
  gap: 18px;
}

.eyebrow {
  margin: 0;
  color: var(--brand-strong);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.panel h1,
.panel h2,
.metric strong {
  margin: 0;
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  line-height: 1.05;
}

.hero h1 {
  font-size: clamp(2.2rem, 8vw, 4.4rem);
  max-width: 10ch;
}

.lede {
  margin: 0;
  max-width: 64ch;
  color: var(--ink-800);
  line-height: 1.6;
}

.stack {
  display: grid;
  gap: 24px;
}

.split {
  display: grid;
  gap: 24px;
}

.grid {
  display: grid;
  gap: 18px;
}

.products-grid {
  display: grid;
  gap: 18px;
}

.card,
.metric {
  padding: 20px;
}

.metric {
  display: grid;
  gap: 8px;
}

.metric span {
  color: var(--ink-500);
  font-size: 0.9rem;
}

.toolbar,
.row,
.order-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.toolbar {
  justify-content: space-between;
}

.row.space {
  justify-content: space-between;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--brand-strong);
  font-size: 0.85rem;
  font-weight: 700;
}

.pill-alt {
  background: rgba(245, 158, 11, 0.16);
  color: #92400e;
}

.button,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: var(--brand);
  color: white;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button-secondary {
  background: rgba(15, 23, 42, 0.08);
  color: var(--ink-950);
}

form {
  margin: 0;
}

.search-form,
.inline-form,
.checkout-form,
.product-form {
  display: grid;
  gap: 12px;
}

.inline-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.field {
  display: grid;
  gap: 8px;
}

label {
  font-size: 0.92rem;
  font-weight: 600;
}

input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 14px;
  background: white;
  color: var(--ink-950);
  font: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.card h3,
.card h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.card p {
  margin: 0;
  color: var(--ink-800);
  line-height: 1.55;
}

.price {
  font-size: 1.3rem;
  font-weight: 700;
}

.list {
  display: grid;
  gap: 14px;
}

.list-item {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.footer-note {
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--ink-500);
}

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

.table th,
.table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.errors {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(185, 28, 28, 0.08);
  color: var(--danger);
}

@media (min-width: 768px) {
  .split {
    grid-template-columns: 1.35fr 1fr;
  }

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

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