* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #ebf1fd;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  min-height: 100vh;
  position: relative;
}

.header {
  display: flex;
  flex-direction: column;
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.header .title {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  color: #333;
}

.header .title span {
  font-weight: 600;
  font-size: 17px;
}

.main-content {
  position: relative;
  min-height: calc(100vh - 56px);
}

/* 加载状态样式 */
.loading-section {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3370ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  color: #666;
  font-size: 15px;
  font-weight: 500;
}

.img {
  width: 120px;
  height: 239px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  flex-direction: column;
}

.img_div {
  border-radius: 50%;
  overflow: hidden;
  width: 88px;
  height: 88px;
  border: 3px white solid;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f0f0f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.text_hello {
  font-size: 26px;
  font-weight: 600;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.text_hello_name {
  font-size: 20px;
  color: #3370ff;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 50%);
  text-align: center;
}

.text_hello_welcome {
  position: absolute;
  bottom: 0;
  size: 20px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

.icon {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translate(-50%, 0);
}

.admin-choice {
  width: min(320px, calc(100% - 40px));
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.admin-choice h1 {
  color: #1f2329;
  font-size: 22px;
  line-height: 30px;
}

.admin-choice p {
  margin-top: 4px;
  color: #646a73;
  font-size: 14px;
}

.admin-choice-actions {
  width: 100%;
  display: flex;
  gap: 10px;
}

.admin-choice-actions button {
  flex: 1;
  height: 40px;
  border: 1px solid #d0d3d6;
  border-radius: 6px;
  background: #fff;
  color: #1f2329;
  font-size: 14px;
  font-weight: 500;
}

.admin-choice-actions .primary {
  border-color: #3370ff;
  background: #3370ff;
  color: #fff;
}

.admin-content {
  min-height: calc(100vh - 56px);
  padding: 20px;
}

.admin-loading {
  min-height: calc(100vh - 96px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.admin-panel {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
}

/* 右上角按钮 */
.btn-corner {
  position: absolute;
  top: 0;
  right: 0;
  height: 30px;
  padding: 0 14px;
  border: 1px solid #3370ff;
  border-radius: 6px;
  background: #fff;
  color: #3370ff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-corner:hover {
  background: #3370ff;
  color: #fff;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.admin-toolbar h1 {
  font-size: 20px;
  line-height: 28px;
  color: #1f2329;
}

.admin-toolbar p {
  margin-top: 4px;
  font-size: 13px;
  color: #646a73;
  word-break: break-all;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.admin-actions button {
  height: 36px;
  padding: 0 14px;
  border: 1px solid #d0d3d6;
  border-radius: 6px;
  background: #fff;
  color: #1f2329;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-actions button:hover {
  background: #f2f3f5;
}

.admin-actions .primary {
  border-color: #3370ff;
  background: #3370ff;
  color: #fff;
}

.admin-actions .primary:hover {
  background: #2860e1;
  border-color: #2860e1;
}

/* 行操作按钮 */
.row-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.row-actions button {
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  vertical-align: middle;
}

.edit-row-btn {
  background: transparent;
  border-color: transparent;
  color: #3370ff;
}

.edit-row-btn:hover {
  background: #f0f5ff;
}

.delete-row-btn {
  background: #fff;
  border-color: #f1c1c1;
  color: #e64646;
}

.delete-row-btn:hover {
  background: #fff0f0;
  border-color: #e64646;
}

.save-row-btn {
  background: transparent;
  border-color: transparent;
  color: #3370ff;
  font-weight: 600;
}

.save-row-btn:hover {
  background: #f0f5ff;
}

.cancel-row-btn {
  background: #fff;
  border-color: #d0d3d6;
  color: #646a73;
}

.cancel-row-btn:hover {
  background: #f2f3f5;
  border-color: #b0b3b6;
  color: #1f2329;
}

/* 只读输入框样式 */
.admin-table input:disabled {
  background: #f7f8fa;
  color: #8f959e;
  border-color: #e4e6eb;
  cursor: default;
}

/* 搜索栏 */
.admin-search-bar {
  position: relative;
  margin-bottom: 12px;
}

.admin-search-bar .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.admin-search-bar input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 36px;
  border: 1px solid #e4e6eb;
  border-radius: 8px;
  font-size: 14px;
  color: #1f2329;
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease;
}

.admin-search-bar input::placeholder {
  color: #b0b3b6;
}

.admin-search-bar input:focus {
  border-color: #3370ff;
}

.admin-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 8px;
}

.admin-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
}

.admin-table tr {
  border-bottom: 1px solid #eff0f1;
}

.admin-table th:last-child,
.admin-table td:last-child {
  width: 1%;
  white-space: nowrap;
  padding-right: 12px;
}

.admin-table th:last-child {
  text-align: right;
}

.th-add-btn {
  height: 28px;
  padding: 0 12px;
  border: 1px solid #3370ff;
  border-radius: 6px;
  background: #3370ff;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.th-add-btn:hover {
  background: #2860e1;
  border-color: #2860e1;
}

.admin-table th {
  color: #646a73;
  font-weight: 600;
  background: #f7f8fa;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table .empty-row {
  text-align: center;
  color: #b0b3b6;
  padding: 32px 12px;
  font-size: 14px;
}

.admin-table input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #d0d3d6;
  border-radius: 6px;
  font-size: 14px;
}

.admin-table input:focus {
  border-color: #3370ff;
  outline: none;
}

/* 分页栏 */
.admin-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding: 10px 0;
  gap: 12px;
}

.pagination-info {
  font-size: 13px;
  color: #646a73;
  flex-shrink: 0;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pagination-controls button {
  height: 32px;
  padding: 0 14px;
  border: 1px solid #d0d3d6;
  border-radius: 6px;
  background: #fff;
  color: #1f2329;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pagination-controls button:hover:not(:disabled) {
  background: #f2f3f5;
  border-color: #b0b3b6;
}

.pagination-controls button:disabled {
  opacity: 0.4;
  cursor: default;
}

.pagination-current {
  font-size: 13px;
  color: #646a73;
  white-space: nowrap;
}

.pagination-size select {
  height: 32px;
  padding: 0 8px;
  border: 1px solid #d0d3d6;
  border-radius: 6px;
  font-size: 13px;
  color: #1f2329;
  background: #fff;
  cursor: pointer;
  outline: none;
}

.pagination-size select:focus {
  border-color: #3370ff;
}

@media (max-width: 640px) {
  .admin-pagination {
    flex-direction: column;
    gap: 8px;
  }

  .pagination-controls {
    width: 100%;
    justify-content: center;
  }

  .admin-content {
    padding: 16px 12px;
  }

  .admin-toolbar {
    flex-direction: column;
  }

  .admin-actions {
    width: 100%;
  }

  .admin-actions button {
    flex: 1;
  }
}