:root {
  color-scheme: light;
  --bg: #f7f3ee;
  --ink: #2c2622;
  --muted: #706760;
  --line: #e2d8cf;
  --panel: #fffaf5;
  --panel-strong: #fff3e9;
  --accent: #d94f64;
  --accent-dark: #a83549;
  --green: #2f855a;
  --blue: #2b6cb0;
  --shadow: 0 16px 40px rgba(74, 52, 38, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 700;
  min-height: 40px;
  padding: 0 16px;
}

button:hover {
  background: var(--accent-dark);
}

button.secondary {
  background: #eee3da;
  color: var(--ink);
}

button.secondary:hover {
  background: #e3d5ca;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 28px clamp(20px, 5vw, 64px) 18px;
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 18px;
}

.auth {
  display: flex;
  gap: 8px;
  min-width: min(100%, 420px);
}

.auth input {
  flex: 1;
}

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 20px 40px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 10px 0 18px;
}

.tab {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.panel-head {
  align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 18px;
}

.panel-head p {
  color: var(--muted);
  margin-top: 6px;
}

input,
textarea,
select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 40px;
  padding: 9px 11px;
  width: 100%;
}

textarea {
  line-height: 1.5;
  resize: vertical;
}

.form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
  padding: 16px;
}

.form.single {
  max-width: 760px;
}

.form.hidden {
  display: none;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
}

.wide {
  grid-column: 1 / -1;
}

.check {
  align-items: center;
  display: flex;
  gap: 8px;
  min-height: 40px;
}

.check input {
  min-height: auto;
  width: auto;
}

.actions {
  display: flex;
  gap: 10px;
}

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

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

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.card.disabled {
  opacity: 0.56;
}

.card-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.product-card {
  display: grid;
  gap: 14px;
}

.product-thumb {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-dark);
  display: flex;
  font-size: 42px;
  font-weight: 800;
  justify-content: center;
  overflow: hidden;
  width: 100%;
}

.product-thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.badge {
  align-items: center;
  background: var(--panel-strong);
  border-radius: 999px;
  color: var(--accent-dark);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  min-height: 28px;
  padding: 0 10px;
}

.meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 10px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.status {
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  min-height: 26px;
  padding: 5px 10px;
}

.pending {
  background: #b7791f;
}

.accepted {
  background: var(--blue);
}

.done {
  background: var(--green);
}

.cancelled {
  background: #718096;
}

.toast {
  background: var(--ink);
  border-radius: 8px;
  bottom: 18px;
  color: white;
  left: 50%;
  opacity: 0;
  padding: 10px 14px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 12px);
  transition: 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 720px) {
  .topbar,
  .panel-head,
  .auth {
    align-items: stretch;
    flex-direction: column;
  }

  .form {
    grid-template-columns: 1fr;
  }

  .tabs {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .tab {
    flex: 0 0 auto;
  }
}
