:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #eef4ff;
  --text: #162033;
  --muted: #667085;
  --line: #d9e2ef;
  --brand: #275efe;
  --brand-dark: #1747c8;
  --success: #107c41;
  --warning: #b45309;
  --danger: #b42318;
  --shadow: 0 14px 40px rgba(22, 32, 51, 0.08);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(39, 94, 254, 0.18), transparent 28rem),
    linear-gradient(180deg, #f9fbff 0%, var(--bg) 42%);
}

button,
input,
select {
  font: inherit;
}

.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-copy {
  max-width: 780px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-button,
.file-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-button {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 12px 24px rgba(39, 94, 254, 0.22);
}

.primary-button:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.file-button,
.ghost-button {
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
}

.file-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.file-button input {
  display: none;
}

.layout {
  max-width: 1280px;
  margin: 0 auto 64px;
  padding: 0 24px;
  display: grid;
  gap: 18px;
}

.panel,
.card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(217, 226, 239, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.status-panel {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.status-panel > div {
  min-width: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--panel-soft);
}

.label,
.card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.status-panel strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.card {
  padding: 18px;
}

.card strong {
  display: block;
  margin: 8px 0 4px;
  font-size: clamp(1.4rem, 2vw, 2rem);
  letter-spacing: -0.04em;
}

.card small {
  color: var(--muted);
}

.filters {
  padding: 18px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(39, 94, 254, 0.12);
}

.filter-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.table-panel {
  overflow: hidden;
}

.table-header {
  padding: 20px 20px 14px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.table-header h2,
.guide-panel h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.table-header p,
.guide-panel p,
.hint {
  margin: 6px 0 0;
  color: var(--muted);
}

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

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

th,
td {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #f8fbff;
}

td {
  font-size: 0.92rem;
}

.product-summary {
  display: grid;
  gap: 4px;
  max-width: 280px;
}

.product-summary strong {
  line-height: 1.3;
}

.product-summary small,
.muted {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 800;
  font-size: 0.78rem;
  background: #eef4ff;
  color: var(--brand-dark);
}

.badge.shipped,
.badge.completed {
  background: #e7f8ef;
  color: var(--success);
}

.badge.to-ship,
.badge.to-pickup,
.badge.unpaid {
  background: #fff4e5;
  color: var(--warning);
}

.badge.canceled,
.badge.voided {
  background: #ffeceb;
  color: var(--danger);
}

.details-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.details-row td {
  background: #f8fbff;
  padding: 0 16px 18px;
}

.details-card {
  margin-top: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.details-topline {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.items-table th,
.items-table td {
  padding: 10px 12px;
}

.guide-panel {
  padding: 22px;
}

.guide-panel ol {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.7;
}

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--brand-dark);
}

.empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    justify-content: flex-start;
  }

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

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

@media (max-width: 720px) {
  .hero,
  .layout {
    padding-left: 16px;
    padding-right: 16px;
  }

  .status-panel,
  .cards,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .table-header {
    display: block;
  }
}
