body {
  font-family: Arial, sans-serif;
  background: #f3f6fa;
  margin: 0;
  padding: 0;
}
.admin-layout {
  display: flex;
  min-height: 100vh;
  margin-top: 54px;
}
.sidebar {
  width: 210px;
  background: #fff;
  color: #1a2746;
  padding-top: 32px;
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 54px;
  bottom: 0;
  z-index: 10;
  border-right: 1px solid #e5e6eb;
  display: flex;
  flex-direction: column;
  /* border-top-right-radius: 18px; */
  box-shadow: none;
}
.sidebar-title {
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 32px;
  letter-spacing: 2px;
  color: #1a2746;
}
.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}
.sidebar li {
  padding: 13px 28px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-size: 15px;
  border-radius: 8px;
  margin: 2px 8px;
  color: #1a2746;
  font-weight: 500;
}
.sidebar li:hover,
.sidebar li.active {
  background: #f0f2f5;
  color: #2251a4;
  font-weight: 700;
}
.main-content {
  flex: 1;
  background: #f3f6fa;
  padding: 0 24px;
  min-height: 100vh;
  margin-left: 210px;
  position: relative;
  overflow-x: auto;
}
h1 {
  margin-bottom: 24px;
}
h2 {
  margin-top: 32px;
}
table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(34, 81, 164, 0.06);
  border: 1px solid #e5e6eb;
}
th,
td {
  padding: 12px 16px;
  text-align: left;
}
th {
  background: #f3f6fa;
  color: #1a2746;
  font-weight: 700;
}
tr:nth-child(even) {
  background: #fafbfc;
}
tr:hover {
  background: #e6f7ff;
}
.form-row {
  margin-bottom: 12px;
}
label {
  display: inline-block;
  width: 120px;
  color: #1a2746;
  font-weight: 500;
}
input[type='text'],
input[type='number'],
select {
  padding: 8px 12px;
  width: 200px;
  background: #f7f9fc;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  font-size: 16px;
  color: #1a2746;
  transition: border 0.18s;
}
input[type='text']:focus,
input[type='number']:focus,
select:focus {
  border: 1.5px solid #2251a4;
  outline: none;
}
button {
  padding: 6px 16px;
  margin-left: 8px;
}
.section {
  margin-bottom: 48px;
}
.action-btn {
  background: #409eff;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 12px;
  cursor: pointer;
  margin-right: 8px;
  transition: background 0.2s;
}
.action-btn:hover {
  background: #66b1ff;
}
.edit-row {
  background: #fffbe6 !important;
}

/* 固定顶部表单 */
form {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(34, 81, 164, 0.06);
  padding: 32px 32px 16px 32px;
  width: 100%;
  margin: 32px 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border: 1px solid #e5e6eb;
  box-sizing: border-box;
}

.form-row {
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

input[type='text'],
input[type='number'] {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 16px;
  box-shadow: 0 1px 2px #0001;
  transition: border 0.2s;
}

input[type='text']:focus,
input[type='number']:focus {
  border: 1.5px solid #409eff;
  outline: none;
}

button[type='submit'],
button[type='button'] {
  background: #2251a4;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 0;
  font-size: 17px;
  font-weight: 600;
  box-shadow: none;
  transition: background 0.18s, transform 0.15s;
}

button[type='submit']:hover,
button[type='button']:hover {
  background: #003580;
  transform: translateY(-1px) scale(1.03);
}

button[type='button'] {
  background: #f0f2f5;
  color: #333;
  margin-right: 0;
  margin-left: 0;
}

button[type='button']:hover {
  background: #e0e0e0;
}

h2 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 24px;
  text-align: center;
  letter-spacing: 2px;
}

@media (max-width: 600px) {
  .main-content {
    padding: 0 2px;
    margin-left: 120px;
  }
  .sidebar {
    width: 120px;
    font-size: 13px;
    top: 40px;
    /* border-top-right-radius: 10px; */
  }
  .sidebar-title {
    font-size: 15px;
    margin-bottom: 18px;
  }
  .sidebar li {
    padding: 9px 10px;
    font-size: 13px;
    margin: 2px 4px;
    border-radius: 6px;
  }
  form {
    padding: 8px 2px 2px 2px;
    width: 100%;
    margin: 6px 0 10px 0;
    max-width: 100vw;
  }
  .form-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  label {
    width: auto;
    text-align: left;
    margin-bottom: 2px;
  }
}

/* 右下角刷新按钮和回到顶部按钮（美化统一宽高和间距） */
.fixed-bottom-btn,
#back-to-top-btn {
  position: fixed;
  right: 36px;
  z-index: 120;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px #409eff33, 0 1.5px 4px #0001;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.18s;
  filter: drop-shadow(0 2px 8px #409eff22);
  border: none;
}
.fixed-bottom-btn {
  bottom: 36px;
  background: linear-gradient(135deg, #409eff 60%, #66b1ff 100%);
  color: #fff;
  margin-bottom: 18px;
}
.fixed-bottom-btn:hover {
  background: linear-gradient(135deg, #66b1ff 60%, #409eff 100%);
  box-shadow: 0 6px 24px #409eff55, 0 2px 8px #0002;
  transform: translateY(-4px) scale(1.08);
  filter: drop-shadow(0 4px 16px #409eff44);
}
.fixed-bottom-btn:active {
  animation: rotate360 0.5s linear;
}
@keyframes rotate360 {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
#back-to-top-btn {
  bottom: 128px;
  background: linear-gradient(135deg, #f0f2f5 60%, #e0e0e0 100%);
  color: #409eff;
}
#back-to-top-btn:hover {
  background: linear-gradient(135deg, #e0e0e0 60%, #f0f2f5 100%);
  color: #1976d2;
  box-shadow: 0 6px 24px #409eff33, 0 2px 8px #0002;
  transform: translateY(-4px) scale(1.1);
  filter: drop-shadow(0 4px 16px #409eff22);
}
#back-to-top-btn:active {
  background: #409eff;
  color: #fff;
}
@media (max-width: 600px) {
  .fixed-bottom-btn,
  #back-to-top-btn {
    right: 12px;
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  .fixed-bottom-btn {
    bottom: 12px;
  }
  #back-to-top-btn {
    bottom: 80px;
  }
}

/* 顶部栏美化（更和谐） */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  background: #fff;
  color: #1a2746;
  display: flex;
  align-items: center;
  padding: 0 36px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1.5px;
  z-index: 1000;
  border-bottom: 1px solid #e5e6eb;
  user-select: none;
  box-shadow: none;
}
.topbar .topbar-logo {
  width: 32px;
  height: 32px;
  margin-right: 18px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px #409eff22;
  font-size: 22px;
  color: #409eff;
}
#admin-username {
  font-weight: 600;
  font-size: 18px;
  margin-left: 6px;
  color: #1a2746;
  display: flex;
  align-items: center;
}
#admin-username .user-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  vertical-align: middle;
  background: url('https://cdn.jsdelivr.net/gh/feathericons/feather@4.28.0/icons/user.svg')
    no-repeat center/contain;
  filter: drop-shadow(0 1px 2px #409eff33);
}

@media (max-width: 600px) {
  .topbar {
    height: 40px;
    font-size: 15px;
    padding: 0 8px;
  }
  #admin-username {
    font-size: 15px;
  }
  .topbar .topbar-logo {
    width: 22px;
    height: 22px;
    font-size: 15px;
    margin-right: 8px;
  }
  .admin-layout {
    margin-top: 40px;
  }
}
