* { box-sizing: border-box; }
body.dbadmin-body {
  margin: 0;
  padding: 0;
  font: 14px/1.5 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #1a1410;
  color: #f5efe6;
  min-height: 100vh;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at top, #3d2a1c 0%, #1a1410 60%);
}
.login-card {
  width: 380px;
  padding: 36px 32px;
  background: #2a211a;
  border: 1px solid #6b4e35;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.login-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #f0d2a8;
}
.hint { margin: 0 0 12px; color: #a89078; font-size: 13px; }
.login-card label { display: block; margin-bottom: 8px; margin-top: 8px; color: #d4c0a8; }
.login-card input,
.modal input,
.modal textarea,
#keyword {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #6b4e35;
  border-radius: 8px;
  background: #1a1410;
  color: #f5efe6;
  outline: none;
}
.login-card input:focus,
.modal input:focus,
.modal textarea:focus,
#keyword:focus { border-color: #c4a574; }
.captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.captcha-row input { flex: 1; margin-bottom: 0; }
.captcha-img {
  height: 38px;
  border-radius: 8px;
  border: 1px solid #6b4e35;
  cursor: pointer;
  background: #fff;
}
#loginBtn,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #6b4e35;
  background: #3d2a1c;
  color: #f5efe6;
  cursor: pointer;
}
#loginBtn {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background: #8b4518;
  border-color: #a05a2c;
  font-weight: 600;
}
.btn.primary { background: #8b4518; border-color: #a05a2c; }
.btn.ghost { background: transparent; }
.btn.danger { background: #7a1f14; border-color: #a03a2b; }
.btn.link {
  background: transparent;
  border: none;
  color: #7eb6ff;
  padding: 0 8px 0 0;
}
.btn.link.danger-text { color: #ff8a7a; }
.err { color: #ff8a7a; margin-top: 12px; }

.console { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #241c16;
  border-bottom: 1px solid #6b4e35;
}
.brand { font-size: 18px; font-weight: 700; color: #f0d2a8; }
.layout { display: flex; flex: 1; min-height: 0; }
.sidebar {
  width: 240px;
  border-right: 1px solid #6b4e35;
  background: #201810;
  padding: 16px 12px;
}
.sidebar h2 { margin: 0 0 12px; font-size: 13px; color: #a89078; font-weight: 600; }
#collectionList { list-style: none; margin: 0; padding: 0; }
.nav-item {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #e8dcc8;
  cursor: pointer;
}
.nav-item:hover { background: #2a211a; }
.nav-item.active {
  background: #3d2a1c;
  border-color: #6b4e35;
  color: #f0d2a8;
}
.main { flex: 1; padding: 16px 20px; overflow: auto; }
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
#keyword { max-width: 280px; }
.meta { display: flex; gap: 16px; margin-bottom: 10px; color: #a89078; }
.table-wrap {
  border: 1px solid #6b4e35;
  border-radius: 10px;
  overflow: auto;
  background: #201810;
}
table#dataTable {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}
#dataTable th,
#dataTable td {
  padding: 10px 12px;
  border-bottom: 1px solid #3d2a1c;
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}
#dataTable th {
  background: #2a211a;
  color: #f0d2a8;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}
#dataTable td.empty { text-align: center; color: #a89078; padding: 28px; }
#dataTable .ops { white-space: nowrap; }
.pager {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal-card {
  width: min(720px, 100%);
  background: #2a211a;
  border: 1px solid #6b4e35;
  border-radius: 12px;
  padding: 20px;
}
.modal-card.sm { width: min(400px, 100%); }
.modal-card h3 { margin: 0 0 8px; color: #f0d2a8; }
.modal textarea {
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  resize: vertical;
  margin: 10px 0;
}
.modal-pwd { margin: 12px 0; }
.modal-pwd label { display: block; margin-bottom: 6px; color: #d4c0a8; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
