:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #6d38ff;
  --primary-dark: #5428d9;
  --green: #10b981;
  --shadow: 0 18px 45px rgba(28, 35, 56, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

button,
select,
input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 9px 14px;
  color: var(--primary);
  background: #f1edff;
  cursor: pointer;
}

button:hover {
  background: #e7ddff;
}

.primary {
  color: #fff;
  background: var(--primary);
}

.primary:hover {
  background: var(--primary-dark);
}

.ghost {
  color: var(--muted);
  background: #f3f4f6;
}

.icon {
  padding: 4px 10px;
  color: var(--muted);
  background: transparent;
  font-size: 24px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  padding: 24px 18px;
  background: #fff;
  border-right: 1px solid var(--line);
}

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

.logo {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, #6d38ff, #18b6ff);
  font-weight: 800;
}

.brand span,
.sidebar-note span,
small,
.muted-line {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

nav {
  display: grid;
  gap: 8px;
}

nav button {
  width: 100%;
  color: var(--text);
  background: transparent;
  text-align: left;
}

nav button.active {
  color: var(--primary);
  background: #f1edff;
  font-weight: 700;
}

.sidebar-note {
  position: absolute;
  right: 18px;
  bottom: 24px;
  left: 18px;
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
}

.app {
  margin-left: 248px;
  padding: 28px;
}

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

.eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

h1,
h2 {
  margin: 0;
}

h1 {
  margin-top: 4px;
  font-size: 28px;
}

h2 {
  font-size: 18px;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.topbar label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

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

.chip,
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 700;
}

.chip.muted {
  color: #5b21b6;
  background: #ede9fe;
}

.notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  color: #1e40af;
  background: #eff6ff;
}

.cards,
.grid {
  display: grid;
  gap: 16px;
}

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

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

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

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

.card {
  padding: 18px;
}

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

.card strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 24px;
}

.panel {
  margin-bottom: 16px;
  padding: 18px;
  overflow: auto;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

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

.mini-card {
  padding: 16px;
  box-shadow: none;
}

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

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

th {
  color: var(--muted);
  background: #f9fafb;
  font-size: 13px;
  font-weight: 700;
}

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

.empty {
  color: var(--muted);
  text-align: center;
}

.dialog {
  width: min(520px, 92vw);
  border: 0;
  border-radius: 18px;
  padding: 0;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
}

.dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

.dialog form {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.dialog label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.dialog-actions,
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.dialog-head {
  justify-content: space-between;
}

.dialog.wide {
  width: min(840px, 94vw);
}

video {
  width: 100%;
  max-height: 70vh;
  border-radius: 14px;
  background: #111827;
}

@media (max-width: 1080px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .sidebar-note {
    position: static;
    margin-top: 14px;
  }

  .app {
    margin-left: 0;
  }

  .cards,
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }
}
