#admin-main {
  flex: 1;
  min-width: 0;
  padding: 20px;
  color: #333;
}
.admin-card {
  background: white;
  padding: 24px;
  margin-bottom: 16px;
}
.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.admin-list-toolbar {
  justify-content: flex-end;
}
.admin-heading h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.admin-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.admin-filters input,
.admin-filters select {
  height: 36px;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  padding: 0 12px;
  background: white;
}
.admin-filters input {
  width: 230px;
}
.admin-table-wrap {
  overflow: auto;
}
.admin-table {
  width: 100%;
  min-width: 900px;
  table-layout: auto;
  border-collapse: collapse;
  text-align: left;
}
.admin-table th {
  background: #f8f8f8;
  font-weight: 400;
  color: #777;
  white-space: nowrap;
}
.admin-table td,
.admin-table th {
  padding: 18px 14px;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.admin-table .person {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-table .person small {
  display: block;
  color: #888;
  margin-top: 4px;
}
.admin-table .actions {
  display: flex;
  gap: 16px;
  white-space: nowrap;
}
.admin-table .actions a.text-button {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  text-decoration: none;
}
.status-pill {
  display: inline-block;
  border-radius: 4px;
  background: #edf5ec;
  color: #4b7843;
  padding: 4px 8px;
  font-size: 12px;
}
.status-pill.disabled {
  background: #f2f2f2;
  color: #888;
}
.admin-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  color: #777;
}
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  line-height: 1.6;
}
.admin-dialog .admin-form label {
  align-items: stretch;
  text-align: left;
}
/* 账号编辑表单自行控制间距，避免叠加公共弹窗的标签、段落和页脚留白。 */
.admin-dialog .admin-editor-form {
  gap: 20px;
}
.admin-dialog .admin-editor-form label {
  gap: 8px;
  margin: 0;
}
.admin-dialog .admin-editor-form > p {
  margin: 0;
}
.admin-dialog .admin-editor-form > footer {
  padding-top: 4px;
}
.admin-form input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  font: inherit;
  color: #333;
}
.admin-form input:read-only {
  background: #f7f7f7;
  color: #888;
}
.admin-form input[aria-invalid="true"] {
  --control-border-color: #cf4438;
  border-color: #cf4438;
}
.admin-form small {
  font-size: 12px;
}
.muted {
  color: #888;
  line-height: 1.7;
}
.form-error,
[data-error] {
  color: #c64636;
  font-size: 13px;
  margin: 0;
  line-height: 1.6;
}
.form-error:empty,
[data-error]:empty {
  display: none;
}
.success-message {
  color: #568149;
  line-height: 1.6;
}
.password-card {
  max-width: 760px;
}
.password-card .admin-form {
  max-width: 430px;
}
.password-control {
  display: flex;
  position: relative;
}
.password-control input {
  padding-right: 44px;
}
.password-control button {
  position: absolute;
  right: 1px;
  top: 3px;
  border: 0;
  background: transparent;
  color: #888;
}
.password-card .primary {
  align-self: flex-start;
  padding: 0 28px;
  height: 36px;
}
.initial-password {
  display: block;
  font-family: monospace;
  font-size: 25px;
  letter-spacing: 2px;
  background: #fcf7ee;
  border: 1px solid #f1e1c9;
  border-radius: 4px;
  padding: 18px;
  text-align: center;
  user-select: all;
}
.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(150deg, #fff8e3, #f8f7f3 65%);
}
.login-card {
  width: 400px;
  max-width: 100%;
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 12px 60px #6c4a2010;
}
.login-card > img {
  width: 120px;
  margin-bottom: 20px;
}
.login-card h1 {
  font-size: 22px;
  margin: 0;
}
.login-card .admin-form {
  margin-top: 28px;
}
.login-card .primary {
  height: 40px;
}
.admin-toast {
  position: fixed;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  z-index: 100;
  background: #eff7e9;
  color: #567b40;
  padding: 12px 20px;
  border-radius: 4px;
  box-shadow: 0 3px 16px #0001;
}
.admin-toast.error {
  background: #fff0ed;
  color: #be483b;
}
@media (max-width: 600px) {
  #admin-main {
    padding: 12px;
  }
  .admin-card {
    padding: 16px;
  }
  .admin-filters {
    gap: 10px;
  }
  .admin-pagination {
    gap: 8px;
  }
}

.admin-table .actions button:disabled {
  color: #aaa;
  cursor: not-allowed;
}

/* 登录与修改密码共用显隐图标，保留可访问名称与键盘焦点。 */
.password-control .password-visibility {
  width: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.password-visibility svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.password-visibility[aria-pressed="true"] .password-eye-slash {
  display: none;
}
