:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #667085;
  --line: #e4ded3;
  --paper: #fffdf8;
  --page: #f4f1e9;
  --panel: #fbf8f0;
  --yellow: #ffd83d;
  --teal: #0e9488;
  --green: #2f8b57;
  --rose: #d8486f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 216, 61, 0.28), rgba(244, 241, 233, 0) 220px),
    var(--page);
}

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

.sales-shell {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 18px 18px 32px;
}

.topbar,
.panel-head,
.metrics,
.layout,
.form-grid {
  display: grid;
  gap: 12px;
}

.topbar {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1;
}

h2 {
  font-size: 18px;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.top-actions a,
.top-actions button,
.panel-head button,
.primary {
  min-height: 38px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper);
  padding: 0 12px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.primary {
  width: 100%;
  min-height: 46px;
  border: 0;
  background: var(--yellow);
}

.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.metric,
.panel {
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.07);
}

.metric {
  min-height: 78px;
  padding: 12px;
}

.metric span,
.panel-head span,
label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metric strong {
  display: block;
  margin-top: 7px;
  font-size: 22px;
  line-height: 1;
}

.money {
  color: var(--teal);
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--rose);
}

.layout {
  grid-template-columns: 420px 1fr;
  align-items: start;
}

.panel {
  padding: 14px;
}

.panel-head {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 12px;
}

.sale-form {
  position: sticky;
  top: 14px;
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

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

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  min-width: 0;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper);
  padding: 0 10px;
  outline: 0;
}

textarea {
  min-height: 84px;
  padding: 10px;
  resize: vertical;
}

.preview {
  min-height: 54px;
  margin: 4px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
  line-height: 1.55;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: var(--paper);
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 9px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  color: #344054;
  background: #f7f0df;
  font-size: 12px;
}

td strong {
  display: block;
  margin-bottom: 2px;
}

.empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed rgba(17, 24, 39, 0.18);
  border-radius: 8px;
  font-weight: 900;
}

@media (max-width: 900px) {
  .topbar,
  .metrics,
  .layout,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .sale-form {
    position: static;
  }
}
