:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #20242a;
  --muted: #667085;
  --line: #d8dee8;
  --primary: #ffe600;
  --primary-text: #1f2937;
  --accent: #3483fa;
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --notice: #fff8d8;
  --radius: 8px;
  --shadow: 0 10px 24px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.sidebar {
  min-height: 100vh;
  padding: 24px 18px;
  background: #1f2937;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 92px;
  height: 34px;
  border-radius: 4px;
  object-fit: contain;
  object-position: left center;
  background: #fff;
}

.brand small,
.account-box small,
.label {
  color: #cbd5e1;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 11px 12px;
  color: #e5e7eb;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
}

.account-box {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  display: grid;
  gap: 6px;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 18px;
}

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

.actions,
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

button,
.primary,
.secondary {
  min-height: 38px;
  border-radius: 6px;
  border: 1px solid var(--line);
  padding: 0 14px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary {
  border-color: #d6c400;
  background: var(--primary);
  color: var(--primary-text);
  font-weight: 700;
}

.secondary,
button {
  background: #fff;
  color: var(--text);
}

.link-button {
  min-height: auto;
  border: 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
}

select,
input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 10px;
  font: inherit;
}

.notice,
.error {
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.notice {
  background: var(--notice);
  border: 1px solid #efd45b;
}

.error {
  background: var(--danger-bg);
  border: 1px solid #f4b3ad;
  color: var(--danger);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.metrics article,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metrics article {
  padding: 18px;
  display: grid;
  gap: 8px;
}

.metrics span {
  color: var(--muted);
  font-size: 13px;
}

.metrics strong {
  font-size: 24px;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel {
  overflow: hidden;
}

.panel-head {
  min-height: 64px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.list {
  padding: 10px 18px 18px;
}

.list-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
}

.list-item:last-child {
  border-bottom: 0;
}

.list-item span,
.empty {
  color: var(--muted);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
}

.product-cell img {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: #eef4ff;
  color: #175cd3;
  font-size: 12px;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

  .metrics,
  .split {
    grid-template-columns: 1fr;
  }

  .topbar,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }
}
