* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background: #f4f5f7;
  color: #1d1d1f;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 鉴权弹窗 */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.auth-card {
  background: #ffffff;
  padding: 32px;
  border-radius: 16px;
  width: 340px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  text-align: center;
}

.auth-subtitle {
  font-size: 12px;
  color: #6e6e73;
  margin: 8px 0 20px;
}

.auth-inputs input {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 12px;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.auth-inputs input:focus {
  border-color: #d90429;
}

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

.btn-primary {
  flex: 1;
  padding: 10px;
  background: #d90429;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.btn-secondary {
  flex: 1;
  padding: 10px;
  background: #e5e5ea;
  color: #1d1d1f;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.auth-msg {
  font-size: 12px;
  color: #d90429;
  margin-top: 12px;
  min-height: 16px;
}

/* 控制台主体布局 */
.admin-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-header {
  background: #ffffff;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e5e5ea;
}

.admin-header h1 {
  font-size: 20px;
  font-weight: 600;
  display: inline-block;
}

.badge-d1 {
  background: #f2f2f7;
  color: #6e6e73;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  margin-left: 10px;
}

.header-actions {
  display: flex;
  gap: 12px;
}

.btn-refresh, .btn-back {
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
  border: none;
}

.btn-refresh { background: #007aff; color: white; }
.btn-back { background: #e5e5ea; color: #1d1d1f; }

.admin-main {
  flex: 1;
  padding: 32px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.table-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  border: 1px solid #e5e5ea;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th, .admin-table td {
  padding: 14px 20px;
  border-bottom: 1px solid #f2f2f7;
  font-size: 14px;
}

.admin-table th {
  background: #fbfbfd;
  font-weight: 600;
  color: #6e6e73;
}

.tbl-input {
  border: 1px solid #d2d2d7;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.role-badge {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  background: #e5e5ea;
  color: #1d1d1f;
}

.role-badge.admin {
  background: #d90429;
  color: #ffffff;
}

.btn-sm {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  font-size: 12px;
  cursor: pointer;
}

.btn-edit { background: #007aff; color: #fff; }
.btn-del { background: #ff3b30; color: #fff; margin-left: 8px; }

.admin-footer {
  padding: 16px 32px;
  background: #ffffff;
  border-top: 1px solid #e5e5ea;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #8e8e93;
}