:root {
  --ink: #241f1b;
  --muted: #756960;
  --paper: #fffaf4;
  --bg: #f3efe8;
  --line: rgba(78, 55, 41, 0.14);
  --red: #bd2d1f;
  --gold: #d79a47;
  --green: #226b54;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

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

.shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 28px;
  color: #fffaf4;
  background: #8f251b;
}

.brand {
  font-size: 24px;
  font-weight: 900;
}

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

.sidebar .muted {
  margin-top: 8px;
  color: rgba(255, 250, 244, 0.72);
}

nav {
  display: grid;
  gap: 10px;
  margin-top: 42px;
}

.nav,
.topbar button,
.login-panel button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.nav {
  color: #fffaf4;
  background: rgba(255, 250, 244, 0.12);
}

.nav.active {
  color: #8f251b;
  background: #fffaf4;
}

.content {
  padding: 32px;
}

.login-panel {
  width: min(420px, 100%);
  margin: 80px auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 20px 48px rgba(66, 44, 31, 0.1);
}

.login-panel input {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 14px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.login-panel button,
.topbar button {
  padding: 0 18px;
  color: #fff;
  background: var(--red);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

h1 {
  margin: 0;
}

.hidden {
  display: none !important;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat,
.table-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 14px 34px rgba(66, 44, 31, 0.08);
}

.stat {
  padding: 22px;
}

.stat-value {
  margin-top: 10px;
  color: var(--red);
  font-size: 34px;
  font-weight: 900;
}

.table-panel {
  overflow: auto;
}

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

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

th {
  color: #5e4d42;
  background: #f4e9dc;
  font-size: 13px;
}

.pill {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 6px;
  color: #8f251b;
  background: #f5ddd3;
  font-size: 12px;
  font-weight: 800;
}

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

  .sidebar {
    position: static;
  }

  nav {
    grid-template-columns: repeat(2, 1fr);
  }

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