:root {
  --blue: #244fa9;
  --blue-2: #1f41b0;
  --red: #df4355;
  --pink: #f27c92;
  --ink: #16214d;
  --muted: #667792;
  --line: #e3e9f3;
  --bg: #f4f5f8;
  --card: #ffffff;
  --green: #25a065;
  --amber: #f5a623;
  --shadow: 0 14px 36px rgba(26, 50, 111, 0.08);
}

* {
  box-sizing: border-box;
}

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

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

button {
  border: 0;
  cursor: pointer;
}

.admin-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  width: 260px;
  height: 100vh;
  padding: 22px 18px;
  color: #fff;
  background: linear-gradient(180deg, #19398d 0%, #244fa9 100%);
  overflow: auto;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-weight: 900;
}

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

.brand-sub {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

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

.nav button {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.76);
  background: transparent;
  text-align: left;
  font-weight: 800;
}

.nav button.active,
.nav button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.sidebar-note {
  margin-top: 28px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-note strong,
.sidebar-note span {
  display: block;
}

.sidebar-note span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  line-height: 1.6;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 26px;
}

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

.page-kicker {
  color: var(--pink);
  font-size: 12px;
  font-weight: 900;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 6px;
  color: var(--blue);
  font-size: 30px;
  line-height: 1.2;
}

h2 {
  color: var(--blue);
  font-size: 18px;
}

.panel p,
.topbar p {
  color: var(--muted);
}

.top-actions {
  display: flex;
  gap: 10px;
}

.primary-btn,
.ghost-btn,
.small,
.table-action,
.calendar-toolbar button,
.icon-btn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 900;
}

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

.ghost-btn,
.calendar-toolbar button {
  color: var(--blue);
  background: #fff;
  border: 1px solid var(--line);
}

.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

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

.kpi-card,
.panel {
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.kpi-card {
  padding: 18px;
}

.kpi-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.kpi-value {
  margin-top: 10px;
  color: var(--blue);
  font-size: 28px;
  font-weight: 900;
}

.kpi-change {
  margin-top: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.two-col,
.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
  gap: 16px;
}

.panel {
  margin-bottom: 16px;
  padding: 20px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-head p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
}

select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

select,
input {
  height: 40px;
  padding: 0 12px;
}

textarea {
  min-height: 96px;
  padding: 12px;
  resize: vertical;
}

.chart-item {
  margin-bottom: 14px;
}

.chart-top {
  display: flex;
  justify-content: space-between;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.bar {
  height: 10px;
  margin-top: 8px;
  border-radius: 8px;
  background: #eef3f9;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #8bb8ea);
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  padding: 12px;
  border-radius: 8px;
  background: #f4f7fb;
}

.timeline-item strong {
  color: var(--blue);
}

.timeline-item p {
  margin-top: 4px;
  font-size: 13px;
}

.table-wrap {
  overflow: auto;
}

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

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

th {
  color: var(--muted);
  background: #f8fafc;
  font-weight: 900;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--blue);
  background: #edf3fb;
  font-size: 12px;
  font-weight: 800;
}

.score {
  color: var(--red);
  font-weight: 900;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.weekday,
.day-cell {
  min-height: 44px;
  border-radius: 8px;
}

.weekday {
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #f7f9fc;
  font-size: 12px;
  font-weight: 900;
}

.day-cell {
  padding: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.day-cell.muted {
  opacity: 0.42;
}

.day-num {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.day-event {
  margin-top: 6px;
  color: var(--blue);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 900;
}

.recommend-list,
.activity-list,
.review-grid,
.lead-board,
.content-grid,
.banner-list {
  display: grid;
  gap: 12px;
}

.recommend-card,
.activity-card,
.review-card,
.lead-card,
.content-card,
.banner-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.card-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  color: var(--ink);
  font-weight: 900;
}

.card-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.pill.red {
  background: var(--red);
}

.pill.green {
  background: var(--green);
}

.pill.amber {
  background: var(--amber);
}

.table-action {
  min-height: 30px;
  padding: 0 10px;
  color: var(--blue);
  background: #edf3fb;
  font-size: 12px;
}

.review-actions,
.content-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.review-actions button,
.content-actions button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.approve {
  background: var(--green);
}

.reject {
  background: var(--red);
}

.upload-box {
  display: grid;
  place-items: center;
  min-height: 156px;
  border: 2px dashed #b8c6dc;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
}

.upload-box input {
  display: none;
}

.upload-box span {
  color: var(--blue);
  font-weight: 900;
}

.upload-box small {
  margin-top: 6px;
  color: var(--muted);
}

.banner-preview {
  height: 88px;
  border-radius: 8px;
  background: linear-gradient(135deg, #244fa9, #8bb8ea);
  overflow: hidden;
}

.banner-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-form,
.drawer-form {
  display: grid;
  gap: 12px;
}

.drawer {
  position: fixed;
  top: 0;
  right: -420px;
  z-index: 50;
  width: 420px;
  max-width: 92vw;
  height: 100vh;
  padding: 22px;
  background: #fff;
  box-shadow: -18px 0 46px rgba(11, 29, 70, 0.18);
  transition: right 0.2s ease;
}

.drawer.open {
  right: 0;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.drawer-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.icon-btn {
  width: 40px;
  padding: 0;
  color: var(--muted);
  background: #f0f3f8;
  font-size: 22px;
}

.drawer-form label {
  display: grid;
  gap: 7px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  background: rgba(10, 26, 62, 0.38);
}

.overlay.show {
  display: block;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: 0.18s ease;
  font-weight: 900;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 980px) {
  .admin-shell {
    display: block;
  }

  .sidebar {
    position: relative;
    width: auto;
    height: auto;
  }

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

  .kpi-grid,
  .kpi-grid.compact,
  .two-col,
  .split-layout {
    grid-template-columns: 1fr;
  }
}
