.stat-blue .stat-num { color: #1890ff; }
.vol-submitted { border-color: #1890ff; background: #e6f7ff; }

/* ====== 角色标识 ====== */
.role-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; margin-right: 8px; }
.role-editor { background: #e6f7ff; color: #1890ff; }
.role-reviewer { background: #fff7e6; color: #fa8c16; }

/* ====== 基础 ====== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-size: 14px; color: #333; background: #f0f2f5; }
a { color: #1890ff; text-decoration: none; }
a:hover { color: #40a9ff; }

/* ====== 头部 ====== */
.header { display: flex; justify-content: space-between; align-items: center; background: #001529; color: #fff; padding: 0 24px; height: 50px; }
.header-left { display: flex; align-items: center; }
.logo { color: #fff; font-size: 18px; font-weight: bold; }
.header-right { display: flex; align-items: center; gap: 12px; }
.user-info { color: #a0d0ff; }

/* ====== 按钮 ====== */
.btn { display: inline-block; padding: 6px 16px; border: 1px solid #d9d9d9; border-radius: 4px; background: #fff; cursor: pointer; font-size: 14px; color: #333; }
.btn:hover { border-color: #1890ff; color: #1890ff; }
.btn-primary { background: #1890ff; color: #fff; border-color: #1890ff; }
.btn-primary:hover { background: #40a9ff; }
.btn-success { background: #52c41a; color: #fff; border-color: #52c41a; }
.btn-success:hover { background: #73d13d; }
.btn-danger { background: #ff4d4f; color: #fff; border-color: #ff4d4f; }
.btn-danger:hover { background: #ff7875; }
.btn-secondary { background: #f5f5f5; color: #666; }
.btn-sm { padding: 3px 10px; font-size: 12px; }
.btn-xs { padding: 2px 6px; font-size: 11px; }
.btn-warning { background: #faad14; color: #fff; border-color: #faad14; }
.btn-warning:hover { background: #ffc53d; }
.btn-block { display: block; width: 100%; }

/* ====== 登录页 ====== */
.login-body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #001529, #003a70); }
.login-box { background: #fff; padding: 40px; border-radius: 8px; width: 380px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.login-box h1 { text-align: center; margin-bottom: 24px; font-size: 22px; color: #001529; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 4px; font-weight: 500; }
.form-group input { width: 100%; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; }
.form-group input:focus { border-color: #1890ff; outline: none; box-shadow: 0 0 0 2px rgba(24,144,255,0.2); }
.alert { padding: 10px; border-radius: 4px; margin-bottom: 16px; }
.alert-error { background: #fff2f0; border: 1px solid #ffccc7; color: #ff4d4f; }

/* ====== 主内容 ====== */
.main { padding: 20px 24px; max-width: 1400px; margin: 0 auto; }

/* ====== 仪表盘 ====== */
.stats-overview { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card { background: #fff; padding: 16px 20px; border-radius: 6px; flex: 1; min-width: 120px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.stat-num { font-size: 28px; font-weight: bold; }
.stat-label { font-size: 12px; color: #999; margin-top: 4px; }
.stat-green .stat-num { color: #52c41a; }
.stat-yellow .stat-num { color: #faad14; }
.stat-gray .stat-num { color: #999; }
.stat-red .stat-num { color: #ff4d4f; }

.rank-section { display: flex; gap: 16px; margin-bottom: 20px; }
.rank-box { background: #fff; padding: 16px; border-radius: 6px; flex: 1; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.rank-box h3 { margin-bottom: 10px; font-size: 15px; }
.rank-table { width: 100%; border-collapse: collapse; }
.rank-table th, .rank-table td { padding: 6px 8px; text-align: left; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.rank-table th { background: #fafafa; font-weight: 500; }

.detail-section { background: #fff; padding: 16px; border-radius: 6px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.detail-section h3 { margin-bottom: 10px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid #f0f0f0; }
.data-table th { background: #fafafa; font-weight: 500; white-space: nowrap; }
.data-table tr:hover { background: #f5f5f5; }

.volume-section { background: #fff; padding: 16px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.volume-section h3 { margin-bottom: 10px; }
.filter-bar { display: flex; gap: 10px; margin-bottom: 12px; align-items: center; }
.filter-bar select, .filter-bar input { padding: 6px 10px; border: 1px solid #d9d9d9; border-radius: 4px; }
.zh-hint {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    color: #1890ff;
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 10px;
    cursor: help;
    font-weight: 500;
}

.volume-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.volume-card { width: 100px; padding: 10px; border-radius: 6px; text-align: center; cursor: pointer; border: 2px solid #d9d9d9; background: #fff; transition: all 0.2s; }
.volume-card:hover { border-color: #1890ff; transform: translateY(-2px); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.vol-num { font-weight: bold; font-size: 14px; }
.vol-status { font-size: 11px; margin-top: 4px; }
.vol-info { font-size: 11px; color: #999; }
.vol-count { font-size: 11px; color: #666; margin-top: 2px; }
.vol-in-progress { border-color: #faad14; background: #fffbe6; }
.vol-completed { border-color: #52c41a; background: #f6ffed; }

/* ====== 册详情 ====== */
.page-header { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-header h2 { flex: 1; }
.back-link { color: #666; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; }
.badge-pending { background: #f0f0f0; color: #666; }
.badge-in_progress { background: #fff7e6; color: #fa8c16; }
.badge-submitted { background: #e6f7ff; color: #1890ff; }
.badge-completed { background: #f6ffed; color: #52c41a; }

.book-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.book-card { display: flex; align-items: stretch; border: 2px solid #e8e8e8; border-radius: 6px; transition: all 0.2s; background: #fff; }
.book-card:hover { border-color: #1890ff; }
.book-card.active { border-color: #1890ff; background: #e6f7ff; }
.book-card-check { display: flex; align-items: center; padding: 0 10px; border-right: 1px solid #f0f0f0; }
.book-card-check input { width: 16px; height: 16px; cursor: pointer; }
.book-card-body { flex: 1; padding: 10px 12px; cursor: pointer; min-width: 180px; }
.book-card-title { font-weight: bold; font-size: 14px; }
.book-card-meta { font-size: 12px; color: #666; margin-top: 4px; }
.book-card-chapters { font-size: 12px; color: #999; margin-top: 4px; }
.book-card-actions { display: flex; align-items: center; padding: 0 10px; border-left: 1px solid #f0f0f0; gap: 4px; }

.book-detail { background: #fff; padding: 16px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.book-detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.book-meta { display: flex; gap: 16px; margin-bottom: 12px; font-size: 13px; color: #666; flex-wrap: wrap; }
.book-meta-edit { margin-bottom: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.book-meta-edit input { padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; }
.book-meta-edit input:focus { border-color: #1890ff; outline: none; }
.edit-link { font-size: 12px; margin-left: 4px; }
.thumb { width: 80px; height: 110px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 1px solid #e8e8e8; }
.thumb:hover { border-color: #1890ff; }

/* ====== 全本浏览 ====== */
.book-view { }
.book-meta-inline { display: flex; gap: 16px; font-size: 13px; color: #666; margin-top: 4px; }
.chapter-nav { background: #fff; padding: 10px 16px; border-radius: 6px; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chapter-link { padding: 4px 12px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; }
.chapter-link.active { background: #1890ff; color: #fff; border-color: #1890ff; }

.image-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.image-item { width: 130px; padding: 6px; border: 1px solid #e8e8e8; border-radius: 4px; cursor: pointer; text-align: center; transition: all 0.2s; background: #fff; }
.image-item:hover { border-color: #1890ff; transform: translateY(-2px); }
.image-item img { width: 100%; height: 170px; object-fit: cover; border-radius: 2px; }
.image-boundary { border-color: #faad14; border-width: 2px; background: #fffbe6; }
.image-checked { border-color: #52c41a; }
.image-moved { border-color: #ff4d4f; opacity: 0.6; }
.image-label { font-size: 11px; color: #666; margin-top: 2px; word-break: break-all; }
.image-chapter { font-size: 10px; color: #1890ff; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 20px; padding: 12px; }

/* ====== 弹窗 ====== */
.modal { position: fixed; inset: 0; display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal-content { position: relative; background: #fff; padding: 24px; border-radius: 8px; max-width: 90vw; max-height: 90vh; overflow: auto; z-index: 1; }
.modal-large { width: 800px; }
.modal-small { width: 420px; }
.modal-medium { width: 550px; }
.modal-close { position: absolute; top: 10px; right: 16px; font-size: 24px; cursor: pointer; color: #999; }
.modal-close:hover { color: #333; }
.modal-content img { max-width: 100%; max-height: 60vh; display: block; margin: 0 auto; }
.modal-info { margin-top: 12px; }
.modal-info p { margin: 4px 0; }
.modal-actions { margin-top: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.move-inline { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.move-inline label { font-size: 13px; white-space: nowrap; }
.move-inline input { width: 60px; padding: 3px 6px; border: 1px solid #d9d9d9; border-radius: 4px; }
.move-inline select { padding: 3px 6px; border: 1px solid #d9d9d9; border-radius: 4px; max-width: 200px; }
.move-form { margin-top: 12px; padding: 12px; background: #fafafa; border-radius: 4px; }
.move-form h4 { margin-bottom: 8px; }
.move-form label { display: block; margin-bottom: 6px; }
.move-form input { width: 120px; padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; margin-left: 8px; }
.move-form select { padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; margin-left: 8px; }

/* ====== 图片弹窗导航 ====== */
.modal-nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 40px; color: #fff; background: rgba(0,0,0,0.3); width: 50px; height: 80px; display: flex; align-items: center; justify-content: center; cursor: pointer; user-select: none; z-index: 2; border-radius: 4px; }
.modal-nav:hover { background: rgba(0,0,0,0.5); }
.modal-nav-left { left: 10px; }
.modal-nav-right { right: 10px; }
.modal-image-wrapper { position: relative; display: flex; align-items: center; justify-content: center; }
.modal-image-wrapper img { max-height: 65vh; }
.modal-counter { text-align: center; color: #999; font-size: 13px; margin-top: 8px; }

/* ====== 通用 ====== */
.empty { padding: 40px; text-align: center; color: #999; }
.loading { padding: 20px; text-align: center; color: #999; }

/* ====== 合并 & 转移 ====== */
.form-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.form-row label { font-size: 13px; }
.form-row input { padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; }
.form-row select { padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; }

.merge-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin: 4px 0; border: 1px solid #e8e8e8; border-radius: 4px; background: #fafafa; }
.merge-idx { width: 24px; height: 24px; border-radius: 50%; background: #1890ff; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; flex-shrink: 0; }
.merge-title { flex: 1; font-size: 13px; }
.merge-count { color: #999; font-size: 12px; }
.merge-arrows { display: flex; gap: 2px; }

/* ====== 册列表（可折叠） ====== */
.vol-group {
    margin-bottom: 20px;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    background: #fff;
}
.vol-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: #f8f9fb;
    cursor: pointer;
    user-select: none;
    border-bottom: 2px solid #e8e8e8;
    transition: background 0.15s;
}
.vol-header:hover { background: #e8ecf1; }
.vol-header.s-yellow { background: #fffbe6; border-left: 5px solid #faad14; }
.vol-header.s-blue { background: #e6f7ff; border-left: 5px solid #1890ff; }
.vol-header.s-green { background: #f6ffed; border-left: 5px solid #52c41a; }
.vol-toggle { width: 18px; font-size: 11px; color: #888; text-align: center; }
.vol-num { font-weight: 700; font-size: 16px; min-width: 75px; color: #333; }
.vol-status-label {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}
.s-yellow .vol-status-label { background: #fff7cc; color: #ad6800; }
.s-blue .vol-status-label { background: #bae7ff; color: #0050b3; }
.s-green .vol-status-label { background: #d9f7be; color: #389e0d; }
.vol-meta { color: #999; font-size: 12px; margin-left: auto; }
.vol-actions { flex-shrink: 0; }

.vol-books {
    padding: 10px 0;
    background: #fcfcfc;
}
.book-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    margin: 6px 16px;
    border-radius: 6px;
    border: 1px solid #eaeaea;
    background: #fff;
    font-size: 13px;
    transition: background 0.2s, border-color 0.2s;
}
.book-row:hover {
    background: #f0f7ff;
    border-color: #b3d8ff;
}
.book-order {
    color: #888;
    font-size: 12px;
    min-width: 45px;
    font-family: Consolas, monospace;
}
.book-title {
    flex: 2;
    color: #1a1a1a;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.book-author {
    flex: 1;
    color: #666;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.book-edition {
    flex: 1;
    color: #999;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.book-img-count {
    color: #666;
    font-size: 12px;
    min-width: 50px;
    text-align: right;
}
.btn-edit { color: #1890ff; font-size: 12px; text-decoration: none; cursor: pointer; font-weight: 500; }
.btn-edit:hover { text-decoration: underline; color: #40a9ff; }
.btn-enter { color: #52c41a; font-size: 12px; text-decoration: none; font-weight: 500; }
.btn-enter:hover { text-decoration: underline; color: #73d13d; }
.edit-form { display: flex; align-items: center; gap: 8px; flex: 1; }
.edit-form input { padding: 6px 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; }
.edit-form input:focus { border-color: #1890ff; outline: none; box-shadow: 0 0 0 2px rgba(24,144,255,0.15); }
.btn-secondary { background: #f5f5f5; color: #666; border: 1px solid #d9d9d9; }
.btn-secondary:hover { background: #e8e8e8; }