/* 管理端样式 */
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f4f2ee; color: #2b2b2b;
}
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.card {
  background: #fff; border: 1px solid #e6e1d8; border-radius: 14px;
  padding: 22px; width: 100%; max-width: 560px; margin: 16px auto;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.center .card { max-width: 380px; margin: 0; }
h2 { margin: 0 0 16px; font-size: 20px; }
h3 { margin: 0 0 12px; font-size: 16px; }
h4 { margin: 18px 0 8px; font-size: 14px; color: #666; }
input[type="text"], input[type="password"], input[type="file"], select, textarea {
  width: 100%; padding: 10px 12px; font-size: 15px; margin: 6px 0 12px;
  border: 1px solid #ddd5c6; border-radius: 8px; background: #fff; color: inherit; font-family: inherit;
}
button { font-size: 15px; border-radius: 8px; padding: 10px 18px; cursor: pointer; border: 1px solid #ddd5c6; background: #fff; }
button.primary { background: #b3541e; border-color: #b3541e; color: #fff; width: 100%; margin-top: 4px; }
button.primary:active, button.ghost:active { opacity: .75; }
button.ghost { background: #fff; }
button.danger { background: #fff; color: #c0392b; border-color: #e5b3ad; }
.hint { font-size: 13px; color: #8a8a8a; line-height: 1.6; }
.hint code { background: #f0ede8; padding: 1px 6px; border-radius: 4px; }

.topbar {
  position: sticky; top: 0; z-index: 10; background: #fff;
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid #e6e1d8;
}
.topbar h1 { font-size: 18px; margin: 0; flex: 1; }
.topbar .link { color: #b3541e; text-decoration: none; font-size: 14px; }
.tabs { display: flex; gap: 8px; padding: 14px 16px 0; max-width: 592px; margin: 0 auto; }
.tabs button.on { background: #2b2b2b; color: #fff; border-color: #2b2b2b; }
.tab { padding-bottom: 40px; }
.field { display: block; font-size: 14px; color: #555; }
.row { display: flex; gap: 10px; }
.row.between { align-items: center; justify-content: space-between; }
.row .primary, .row .ghost { width: auto; flex: 1; margin-top: 0; }
.kv { font-size: 14px; color: #555; line-height: 1.9; margin-bottom: 12px; }
.kv b { color: #b3541e; }
.preview-list { font-size: 14px; color: #555; max-height: 260px; overflow-y: auto; padding-left: 24px; margin: 0; }
.preview-list li { padding: 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 批量导入 */
.batch-item {
  border: 1px solid #f0ede8; border-radius: 10px; padding: 14px; margin-bottom: 12px;
  background: #fbfaf8;
}
.batch-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.batch-head .info { flex: 1; min-width: 0; }
.batch-head .t { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.batch-head .s { font-size: 12px; color: #8a8a8a; margin-top: 2px; }
.batch-status { font-size: 12px; color: #8a8a8a; white-space: nowrap; }
.batch-status[data-st="ing"] { color: #b3541e; }
.batch-status[data-st="done"] { color: #2e7d32; }
.batch-status[data-st="fail"] { color: #c0392b; }
.batch-item .b-del { padding: 6px 12px; font-size: 13px; }
.batch-item .b-reparse { padding: 6px 12px; font-size: 13px; white-space: nowrap; margin-bottom: 12px; }
#import-all-btn { width: auto; margin-top: 0; white-space: nowrap; }

.book-row {
  display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #f0ede8;
}
.book-row:last-child { border-bottom: none; }
.book-row .info { flex: 1; min-width: 0; }
.book-row .t { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-row .s { font-size: 13px; color: #8a8a8a; margin-top: 2px; }

.toast {
  position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%); z-index: 99;
  background: rgba(0,0,0,.82); color: #fff; font-size: 14px;
  padding: 10px 18px; border-radius: 20px; white-space: nowrap;
}
