.admin-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin: 0 0 18px;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--muted);
  font-size: .92rem;
}
.admin-bar a,
.admin-bar button,
.admin-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}
.login-panel {
  max-width: 420px;
  margin: 80px auto;
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.account-panel {
  max-width: 560px;
}
.login-panel label,
.annotation-edit-form label {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .9rem;
}
.login-panel input,
.annotation-edit-form input,
.annotation-edit-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
}
.annotation-edit-form textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.65;
}
.login-panel button,
.annotation-edit-form button {
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--accent);
  color: #fffdf8;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.annotation-edit-form {
  display: grid;
  gap: 8px;
  margin: 10px 0 18px;
  padding: 12px;
  border: 1px dashed rgba(122, 47, 37, .38);
  border-radius: 8px;
  background: rgba(122, 47, 37, .04);
}
.annotation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.annotation-actions button {
  border-radius: 999px;
}
.annotation-actions .replace-anchor-button {
  background: #fffdf8;
  color: var(--accent);
}
.annotation-actions .delete-annotation-button {
  border-color: #9f3429;
  background: #9f3429;
  color: #fffdf8;
}
.selection-toolbar {
  position: absolute;
  z-index: 120;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 10px 28px rgba(50, 38, 25, .22);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.selection-toolbar button {
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--accent);
  color: #fffdf8;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.new-annotation-dialog {
  position: fixed;
  z-index: 130;
  right: min(24px, 4vw);
  bottom: min(24px, 4vw);
  width: min(420px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 16px 40px rgba(50, 38, 25, .28);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.new-annotation-dialog[hidden],
.selection-toolbar[hidden] {
  display: none;
}
.new-annotation-dialog label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .9rem;
}
.new-annotation-dialog input,
.new-annotation-dialog textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
}
.new-annotation-dialog textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.65;
}
.range-replace-mode .text-body {
  outline: 2px dashed rgba(122, 47, 37, .45);
  outline-offset: 8px;
}
.range-replace-mode .block-text {
  cursor: text;
}
.save-status {
  min-height: 1.4em;
  color: var(--accent-2);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: .86rem;
}
.error-message {
  color: #a02920;
  margin: 0 0 14px;
}
.success-message {
  color: var(--accent-2);
  margin: 0 0 14px;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.account-meta {
  color: var(--muted);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.admin-page {
  width: min(100%, 1280px);
}
.user-create-panel {
  margin: 0 0 24px;
}
.user-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.user-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: .92rem;
  line-height: 1.45;
}
.user-table th,
.user-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.user-table th {
  color: var(--muted);
  background: #fbfaf5;
  font-weight: 700;
}
.inline-password-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(100px, 1fr) auto;
  gap: 6px;
  align-items: center;
}
.inline-password-form input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
}
.inline-password-form button {
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--accent);
  color: #fffdf8;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
@media print {
  .admin-bar,
  .annotation-edit-form,
  .selection-toolbar,
  .new-annotation-dialog,
  .save-status {
    display: none !important;
  }
}
