/* ========== index-setup.css ========== */
/* 角色设定页面（setup）的CSS样式 */
/* 从 public/index.php $page==='setup' 区域提取 */

/* ========== 项目选择列表 ========== */
.setup-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.setup-project-card {
    text-decoration: none;
    display: block;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.2s;
}

.setup-project-card-title {
    color: #333;
    margin-bottom: 8px;
}

.setup-project-card-meta {
    color: #666;
    font-size: 13px;
}

.setup-project-new {
    background: #fff;
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.setup-project-new-text {
    color: #888;
    font-size: 16px;
}

/* ========== 角色管理页面头部 ========== */
.setup-header-card {
    margin-bottom: 0;
    border-radius: 12px 12px 0 0;
}

.setup-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.setup-header-title {
    margin: 0;
    font-size: 22px;
}

.setup-header-desc {
    color: #666;
    margin-top: 4px;
    font-size: 14px;
}

.setup-header-create-btn {
    padding: 10px 20px;
    font-size: 15px;
}

/* ========== 搜索和筛选栏 ========== */
.setup-filter-bar {
    background: #fff;
    padding: 16px 24px;
    border: 1px solid #e2e8f0;
    border-top: none;
}

.setup-filter-row {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.setup-filter-search-wrap {
    flex: 1;
    min-width: 250px;
}

.setup-filter-input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

.setup-filter-select {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-width: 120px;
}

.setup-filter-btn {
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.setup-filter-btn-purple {
    border: 1px solid #4f46e5;
    background: #eef2ff;
    color: #4f46e5;
}

.setup-filter-btn-green {
    border: 1px solid #10b981;
    background: #ecfdf5;
    color: #10b981;
}

.setup-filter-btn-amber {
    border: 1px solid #f59e0b;
    background: #fffbeb;
    color: #f59e0b;
}

/* ========== 统计和视图切换栏 ========== */
.setup-stats-bar {
    background: #fff;
    padding: 12px 24px;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.setup-stats-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.setup-stats-count {
    color: #666;
    font-size: 14px;
}

.setup-stats-count b {
    color: #4f46e5;
}

.setup-view-toggle {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 2px;
}

.setup-view-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.setup-view-btn-active {
    background: #fff;
    color: #333;
}

.setup-view-btn-inactive {
    background: transparent;
    color: #666;
}

.setup-relations-link {
    color: #4f46e5;
    text-decoration: none;
    font-size: 14px;
    background: #eef2ff;
    padding: 6px 12px;
    border-radius: 6px;
}

.setup-stats-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.setup-batch-mode-btn {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #666;
    cursor: pointer;
    font-size: 13px;
}

.setup-stats-hint {
    color: #888;
    font-size: 12px;
}

/* ========== 批量操作工具栏 ========== */
.setup-batch-toolbar {
    background: #fef2f2;
    padding: 12px 24px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-bottom: 16px;
}

.setup-batch-toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.setup-batch-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.setup-batch-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.setup-batch-btn {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
}

.setup-batch-selected-count {
    color: #666;
    font-size: 13px;
}

.setup-batch-delete-btn {
    padding: 8px 16px;
    border: 1px solid #dc2626;
    border-radius: 6px;
    background: #dc2626;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.setup-batch-cancel-btn {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
}

/* ========== AI生成结果 ========== */
.setup-ai-result-card {
    border-left: 4px solid #4f46e5;
    margin-bottom: 20px;
}

.setup-ai-result-title {
    margin: 0 0 12px;
}

.setup-ai-result-text {
    font-size: 14px;
}

.setup-ai-result-hint {
    color: #888;
    font-size: 13px;
    margin-top: 12px;
}

/* ========== 空状态 ========== */
.setup-empty-state {
    text-align: center;
    padding: 40px;
}

.setup-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.setup-empty-title {
    color: #333;
    margin-bottom: 8px;
}

.setup-empty-desc {
    color: #888;
    margin-bottom: 20px;
}

/* ========== 角色卡片 ========== */
.setup-char-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.setup-char-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 批量选择复选框 */
.setup-char-batch-cb-wrap {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.setup-char-batch-cb {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #4f46e5;
}

/* 角色卡片头部 */
.setup-char-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.setup-char-name-row {
    flex: 1;
    min-width: 0;
}

.setup-char-name-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.setup-char-name {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.setup-char-role-tag {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.setup-char-age {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #888;
    font-size: 13px;
}

/* 角色卡片信息区块（通用） */
.setup-char-info-block {
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 8px;
}

.setup-char-info-block-desc {
    background: #fafafa;
    border: 1px solid #e5e7eb;
}

.setup-char-info-block-status {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.setup-char-info-block-nostatus {
    background: #fffbeb;
    border: 1px dashed #fcd34d;
}

.setup-char-info-block-personality {
    background: #fefce8;
    border: 1px solid #fef08a;
}

.setup-char-info-block-events {
    background: #f0fdf4;
    border: 1px solid #86efac;
}

.setup-char-info-block-relations {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
}

.setup-char-info-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
}

.setup-char-info-label-gap {
    font-size: 11px;
    color: #888;
    margin-bottom: 6px;
}

.setup-char-info-label-8 {
    font-size: 11px;
    color: #888;
    margin-bottom: 8px;
}

.setup-char-desc-text {
    color: #555;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

.setup-char-personality-text {
    font-size: 13px;
    color: #713f12;
    line-height: 1.5;
}

.setup-char-nostatus-text {
    font-size: 12px;
    color: #b45309;
}

.setup-char-nostatus-link {
    color: #b45309;
}

/* 状态标签 */
.setup-char-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.setup-char-status-tag {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
}

.setup-char-status-tag-level {
    background: #f3e8ff;
    color: #7c3aed;
    border: 1px solid #d8b4fe;
}

.setup-char-status-tag-location {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.setup-char-status-tag-behavior {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
}

.setup-char-status-tag-goal {
    background: #ecfeff;
    color: #0891b2;
    border: 1px solid #a5f3fc;
}

.setup-char-status-tag-skills {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #6ee7b7;
}

.setup-char-status-tag-equipment {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fcd34d;
}

.setup-char-status-tag-lastchapter {
    background: #eef2ff;
    color: #6366f1;
    border: 1px solid #a5b4fc;
}

/* 属性值区域 */
.setup-char-attrs-divider {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.setup-char-attrs-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 6px;
}

.setup-char-attr-tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* 关联剧情标签 */
.setup-char-event-tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

/* 人物关系标签 */
.setup-char-relation-tag {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #a5b4fc;
}

/* ========== 角色卡片底部 ========== */
.setup-char-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.setup-char-date {
    color: #999;
    font-size: 12px;
}

.setup-char-actions {
    display: flex;
    gap: 4px;
}

.setup-char-action-btn {
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
}

.setup-char-action-btn-delete {
    padding: 6px 8px;
    border: 1px solid #fecaca;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    color: #dc2626;
}

/* ========== 全屏弹窗（通用） ========== */
.setup-fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
}

.setup-fullscreen-modal-z1001 {
    z-index: 1001;
}

.setup-fullscreen-modal-z1002 {
    z-index: 1002;
}

.setup-fullscreen-content {
    background: #fff;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.setup-fullscreen-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.setup-fullscreen-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.setup-fullscreen-header-icon {
    font-size: 24px;
}

.setup-fullscreen-header-title {
    margin: 0;
    font-size: 18px;
}

.setup-fullscreen-header-subtitle {
    font-size: 12px;
    color: #888;
}

.setup-fullscreen-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #888;
}

.setup-fullscreen-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.setup-fullscreen-body-inner {
    max-width: 900px;
    margin: 0 auto;
}

.setup-fullscreen-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.setup-fullscreen-footer-info {
    font-size: 13px;
    color: #666;
}

.setup-fullscreen-footer-btn {
    padding: 12px 24px;
}

/* ========== 小型弹窗（确认/调试） ========== */
.setup-small-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1002;
    align-items: center;
    justify-content: center;
}

.setup-small-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    padding: 24px;
}

.setup-small-modal-title {
    margin: 0 0 16px;
    font-size: 16px;
    color: #333;
}

.setup-small-modal-body {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.setup-small-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ========== 调试弹窗（管理员） ========== */
.setup-debug-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 800px;
    max-width: 95%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
}

.setup-debug-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setup-debug-modal-header-title {
    margin: 0;
    font-size: 16px;
}

.setup-debug-modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
}

.setup-debug-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.setup-debug-section {
    margin-bottom: 16px;
}

.setup-debug-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 8px;
}

.setup-debug-pre {
    background: #f8fafc;
    padding: 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
}

.setup-debug-pre-tall {
    max-height: 200px;
}

.setup-debug-pre-response {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.setup-debug-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

/* ========== 角色表单 ========== */
.setup-form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.setup-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.setup-form-grid-2-mb {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.setup-form-group-no-margin {
    margin: 0;
}

.setup-form-label-sm {
    font-size: 12px;
}

.setup-form-required {
    color: #dc2626;
}

.setup-form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.setup-form-label-no-margin {
    margin: 0;
}

/* AI生成描述区域 */
.setup-ai-desc-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.setup-ai-desc-hint {
    font-size: 12px;
    color: #666;
    margin: 0 0 10px;
    line-height: 1.5;
}

.setup-ai-desc-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.setup-ai-desc-control-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.setup-ai-desc-control-label {
    font-size: 12px;
    color: #666;
    margin: 0;
    white-space: nowrap;
}

.setup-ai-desc-model-select {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
}

.setup-ai-desc-estimate-label {
    font-size: 12px;
    color: #666;
}

.setup-ai-desc-estimate-value {
    font-size: 13px;
    font-weight: 600;
    color: #166534;
}

.setup-ai-desc-debug-btn {
    padding: 6px 10px;
    background: #f3f4f6;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 11px;
    color: #666;
    cursor: pointer;
}

/* 当前状态区域 */
.setup-status-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.setup-status-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.setup-status-header-icon {
    font-size: 16px;
}

.setup-status-header-title {
    font-weight: 600;
    color: #4f46e5;
}

.setup-status-header-hint {
    font-size: 12px;
    color: #888;
}

.setup-status-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.setup-form-group-mb {
    margin: 0;
    margin-bottom: 12px;
}

/* 关系和事件选择 */
.setup-relation-add-row {
    display: flex;
    gap: 8px;
}

.setup-relation-char-select {
    flex: 1;
    padding: 8px;
    font-size: 13px;
}

.setup-relation-type-select {
    width: 120px;
    padding: 8px;
    font-size: 13px;
}

.setup-relation-add-btn {
    padding: 8px 12px;
    white-space: nowrap;
}

.setup-linked-events-select {
    padding: 8px;
    font-size: 13px;
}

/* 表单底部操作 */
.setup-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.setup-form-cancel-btn {
    padding: 12px 24px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.setup-form-save-btn {
    padding: 12px 24px;
}

/* ========== 状态速查弹窗 ========== */
.setup-quickview-filter-bar {
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #fafafa;
}

.setup-quickview-filter-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.setup-quickview-search-wrap {
    flex: 1;
    min-width: 250px;
}

.setup-quickview-select {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.setup-quickview-body-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* 状态速查表格 */
.setup-quickview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.setup-quickview-thead-row {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.setup-quickview-th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
}

.setup-quickview-th-center {
    padding: 12px 16px;
    text-align: center;
    font-weight: 600;
    color: #333;
}

.setup-quickview-tr {
    border-bottom: 1px solid #f1f5f9;
}

.setup-quickview-td {
    padding: 12px 16px;
}

.setup-quickview-td-center {
    padding: 12px 16px;
    text-align: center;
}

.setup-quickview-td-muted {
    padding: 12px 16px;
    color: #666;
}

.setup-quickview-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.setup-quickview-name-text {
    font-weight: 500;
}

.setup-quickview-role-tag {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    background: #f1f5f9;
    color: #666;
}

.setup-quickview-status-tag {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.setup-quickview-status-dead {
    background: #fef2f2;
    color: #dc2626;
}

.setup-quickview-status-alive {
    background: #f0fdf4;
    color: #166534;
}

/* 空状态和提示 */
.setup-quickview-empty {
    text-align: center;
    padding: 60px;
    color: #888;
}

.setup-quickview-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.setup-quickview-tip {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
    color: #92400e;
    font-size: 14px;
}

/* ========== 间隔 ========== */
.setup-spacer {
    height: 32px;
}

/* ========== 剧情大纲部分 ========== */
.setup-outline-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.setup-outline-header-title {
    margin: 0;
}

.setup-outline-toggle-icon {
    font-size: 18px;
    color: #888;
}

/* 数据状态提示 */
.setup-outline-status-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.setup-outline-status-tag {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
}

/* 已保存的AI大纲 */
.setup-outline-saved {
    background: #f0fdf4;
    border: 1px solid #86efac;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.setup-outline-saved-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.setup-outline-saved-title {
    font-weight: 600;
    color: #166534;
}

.setup-outline-saved-arrow {
    font-size: 12px;
    color: #888;
    margin-left: 8px;
}

.setup-outline-saved-meta {
    font-size: 12px;
    color: #666;
}

.setup-outline-saved-new-badge {
    color: #f59e0b;
    margin-left: 8px;
}

.setup-outline-saved-content {
    margin-top: 12px;
}

.setup-outline-saved-text {
    color: #666;
    font-size: 13px;
    white-space: pre-wrap;
    line-height: 1.8;
}

.setup-outline-saved-hint {
    color: #888;
    font-size: 12px;
    margin-top: 8px;
}

/* AI生成大纲按钮区域 */
.setup-outline-ai-box {
    background: #eff6ff;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.setup-outline-ai-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: end;
}

.setup-outline-ai-count {
    flex: 1;
    min-width: 80px;
}

.setup-outline-ai-hint-wrap {
    flex: 2;
    min-width: 150px;
}

.setup-outline-ai-label {
    font-size: 12px;
    color: #666;
}

.setup-outline-ai-select {
    padding: 8px;
    font-size: 13px;
}

.setup-outline-ai-input {
    padding: 8px;
    font-size: 13px;
}

.setup-outline-ai-chapter-hint {
    font-size: 12px;
    color: #888;
}

/* AI新生成结果 */
.setup-outline-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.setup-outline-result-title {
    font-weight: 600;
    color: #1e40af;
}

.setup-outline-result-saved-badge {
    font-size: 12px;
    color: #166534;
    background: #dcfce7;
    padding: 2px 8px;
    border-radius: 4px;
}

.setup-outline-result-text {
    color: #666;
    font-size: 13px;
    white-space: pre-wrap;
}

.setup-outline-result-hint {
    color: #888;
    font-size: 12px;
    margin-top: 8px;
}

.setup-outline-result-error {
    color: #dc2626;
}

/* ========== 删除表单内联 ========== */
.setup-delete-form-inline {
    display: inline;
}

/* ========== 人物关系图谱（JS动态创建） ========== */
.setup-mindmap-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    background: #fff;
    padding: 8px 12px;
}

.setup-mindmap-selector {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.setup-mindmap-selector-label {
    color: #666;
    font-size: 13px;
}

.setup-mindmap-char-select {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    min-width: 150px;
    cursor: pointer;
}

.setup-mindmap-rel-count {
    color: #888;
    font-size: 12px;
}

.setup-mindmap-canvas-wrap {
    overflow: auto;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

/* ========== 深色模式适配 ========== */
body.dark-mode .setup-project-card { background: #1a1a3e; border-color: #2a2a4a; }
body.dark-mode .setup-project-card-title { color: #e0e0e0; }
body.dark-mode .setup-project-card-meta { color: #aaa; }
body.dark-mode .setup-project-new { background: #16213e; border-color: #2a2a4a; }
body.dark-mode .setup-project-new-text { color: #888; }

body.dark-mode .setup-header-title { color: #e0e0e0; }
body.dark-mode .setup-header-desc { color: #aaa; }

body.dark-mode .setup-filter-bar { background: #16213e; border-color: #2a2a4a; }
body.dark-mode .setup-filter-input { background: #0f3460; color: #e0e0e0; border-color: #2a2a4a; }
body.dark-mode .setup-filter-select { background: #0f3460; color: #e0e0e0; border-color: #2a2a4a; }
body.dark-mode .setup-filter-btn-purple { background: #0a1a2e; border-color: #4f46e5; color: #a78bfa; }
body.dark-mode .setup-filter-btn-green { background: #0a2e1a; border-color: #10b981; color: #6ee7b7; }
body.dark-mode .setup-filter-btn-amber { background: #2e1a0a; border-color: #f59e0b; color: #fcd34d; }

body.dark-mode .setup-stats-bar { background: #16213e; border-color: #2a2a4a; }
body.dark-mode .setup-stats-count { color: #aaa; }
body.dark-mode .setup-view-toggle { background: #1a1a3e; }
body.dark-mode .setup-view-btn-active { background: #0f3460; color: #e0e0e0; }
body.dark-mode .setup-view-btn-inactive { color: #888; }
body.dark-mode .setup-relations-link { background: #0a1a2e; color: #a78bfa; }
body.dark-mode .setup-batch-mode-btn { background: #1a1a3e; border-color: #2a2a4a; color: #aaa; }
body.dark-mode .setup-stats-hint { color: #888; }

body.dark-mode .setup-batch-toolbar { background: #2e0a0a; border-color: #991b1b; }
body.dark-mode .setup-batch-selected-count { color: #aaa; }
body.dark-mode .setup-batch-btn { background: #1a1a3e; border-color: #2a2a4a; color: #ccc; }
body.dark-mode .setup-batch-cancel-btn { background: #1a1a3e; border-color: #2a2a4a; color: #ccc; }

body.dark-mode .setup-empty-title { color: #e0e0e0; }
body.dark-mode .setup-empty-desc { color: #888; }

body.dark-mode .setup-char-card { background: #16213e; border-color: #2a2a4a; }
body.dark-mode .setup-char-name { color: #e0e0e0; }
body.dark-mode .setup-char-age { color: #888; }
body.dark-mode .setup-char-info-block-desc { background: #1a1a3e; border-color: #2a2a4a; }
body.dark-mode .setup-char-info-block-status { background: #1a1a3e; border-color: #2a2a4a; }
body.dark-mode .setup-char-info-block-nostatus { background: #2e1a0a; border-color: #854d0e; }
body.dark-mode .setup-char-info-block-personality { background: #2e1a0a; border-color: #854d0e; }
body.dark-mode .setup-char-info-block-events { background: #0a2e1a; border-color: #166534; }
body.dark-mode .setup-char-info-block-relations { background: #0a1a2e; border-color: #1e40af; }
body.dark-mode .setup-char-info-label { color: #888; }
body.dark-mode .setup-char-info-label-gap { color: #888; }
body.dark-mode .setup-char-info-label-8 { color: #888; }
body.dark-mode .setup-char-desc-text { color: #ccc; }
body.dark-mode .setup-char-personality-text { color: #fcd34d; }
body.dark-mode .setup-char-nostatus-text { color: #fbbf24; }

body.dark-mode .setup-char-status-tag-level { background: #1a0a2e; color: #c4b5fd; border-color: #4c1d95; }
body.dark-mode .setup-char-status-tag-location { background: #0a1a2e; color: #93c5fd; border-color: #1e40af; }
body.dark-mode .setup-char-status-tag-behavior { background: #2e1a0a; color: #fbbf24; border-color: #854d0e; }
body.dark-mode .setup-char-status-tag-goal { background: #0a2e2e; color: #67e8f9; border-color: #0891b2; }
body.dark-mode .setup-char-status-tag-skills { background: #0a2e1a; color: #6ee7b7; border-color: #059669; }
body.dark-mode .setup-char-status-tag-equipment { background: #2e1a0a; color: #fcd34d; border-color: #854d0e; }
body.dark-mode .setup-char-status-tag-lastchapter { background: #0a1a2e; color: #a5b4fc; border-color: #4f46e5; }
body.dark-mode .setup-char-attr-tag { background: #2e1a0a; color: #fcd34d; border-color: #854d0e; }
body.dark-mode .setup-char-event-tag { background: #0a2e1a; color: #6ee7b7; border-color: #166534; }
body.dark-mode .setup-char-relation-tag { background: #0a1a2e; color: #a5b4fc; border-color: #4f46e5; }

body.dark-mode .setup-char-footer { border-top-color: #2a2a4a; }
body.dark-mode .setup-char-date { color: #888; }
body.dark-mode .setup-char-action-btn { background: #1a1a3e; border-color: #2a2a4a; color: #ccc; }
body.dark-mode .setup-char-action-btn-delete { background: #2e0a0a; border-color: #991b1b; color: #fca5a5; }

body.dark-mode .setup-fullscreen-content { background: #1a1a2e; }
body.dark-mode .setup-fullscreen-header { background: #16213e; border-bottom-color: #2a2a4a; }
body.dark-mode .setup-fullscreen-header-title { color: #e0e0e0; }
body.dark-mode .setup-fullscreen-header-subtitle { color: #888; }
body.dark-mode .setup-fullscreen-close-btn { color: #aaa; }
body.dark-mode .setup-fullscreen-body { color: #e0e0e0; }
body.dark-mode .setup-fullscreen-footer { background: #16213e; border-top-color: #2a2a4a; }
body.dark-mode .setup-fullscreen-footer-info { color: #aaa; }

body.dark-mode .setup-small-modal-content { background: #16213e; }
body.dark-mode .setup-small-modal-title { color: #e0e0e0; }
body.dark-mode .setup-small-modal-body { color: #aaa; }

body.dark-mode .setup-debug-modal-content { background: #16213e; }
body.dark-mode .setup-debug-modal-header { border-bottom-color: #2a2a4a; }
body.dark-mode .setup-debug-modal-header-title { color: #e0e0e0; }
body.dark-mode .setup-debug-modal-close-btn { color: #aaa; }
body.dark-mode .setup-debug-label { color: #e0e0e0; }
body.dark-mode .setup-debug-pre { background: #1a1a3e; border-color: #2a2a4a; color: #e0e0e0; }
body.dark-mode .setup-debug-pre-response { background: #0a2e1a; border-color: #166534; }
body.dark-mode .setup-debug-modal-footer { border-top-color: #2a2a4a; }

body.dark-mode .setup-ai-desc-box { background: #1a1a3e; border-color: #2a2a4a; }
body.dark-mode .setup-ai-desc-hint { color: #aaa; }
body.dark-mode .setup-ai-desc-control-label { color: #aaa; }
body.dark-mode .setup-ai-desc-model-select { background: #0f3460; color: #e0e0e0; border-color: #2a2a4a; }

body.dark-mode .setup-status-section { background: #1a1a3e; border-color: #2a2a4a; }
body.dark-mode .setup-status-header-hint { color: #888; }

body.dark-mode .setup-form-cancel-btn { background: #1a1a3e; border-color: #2a2a4a; color: #ccc; }
body.dark-mode .setup-form-actions { border-top-color: #2a2a4a; }

body.dark-mode .setup-outline-saved { background: #0a2e1a; border-color: #166534; }
body.dark-mode .setup-outline-saved-title { color: #6ee7b7; }
body.dark-mode .setup-outline-saved-text { color: #aaa; }
body.dark-mode .setup-outline-ai-box { background: #0a1a2e; border-color: #1e40af; }
body.dark-mode .setup-outline-ai-label { color: #aaa; }
body.dark-mode .setup-outline-ai-select { background: #0f3460; color: #e0e0e0; }
body.dark-mode .setup-outline-ai-input { background: #0f3460; color: #e0e0e0; }
body.dark-mode .setup-outline-result-title { color: #93c5fd; }
body.dark-mode .setup-outline-result-text { color: #aaa; }

body.dark-mode .setup-quickview-filter-bar { background: #16213e; border-bottom-color: #2a2a4a; }
body.dark-mode .setup-quickview-select { background: #0f3460; color: #e0e0e0; border-color: #2a2a4a; }
body.dark-mode .setup-quickview-thead-row { background: #1a1a3e; border-bottom-color: #2a2a4a; }
body.dark-mode .setup-quickview-th { color: #e0e0e0; }
body.dark-mode .setup-quickview-th-center { color: #e0e0e0; }
body.dark-mode .setup-quickview-tr { border-bottom-color: #2a2a4a; }
body.dark-mode .setup-quickview-td-muted { color: #aaa; }
body.dark-mode .setup-quickview-tip { background: #2e1a0a; border-color: #854d0e; color: #fcd34d; }
body.dark-mode .setup-quickview-empty { color: #888; }

body.dark-mode .setup-mindmap-fullscreen { background: #1a1a2e; }
body.dark-mode .setup-mindmap-selector-label { color: #aaa; }
body.dark-mode .setup-mindmap-char-select { background: #0f3460; color: #e0e0e0; border-color: #2a2a4a; }
body.dark-mode .setup-mindmap-canvas-wrap { background: linear-gradient(135deg, #1a1a3e, #16213e); }


/* ========== 响应式适配 ========== */
@media (max-width: 768px) {
    .setup-project-grid {
        grid-template-columns: 1fr;
    }
    .setup-header-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .setup-filter-row {
        flex-direction: column;
    }
    .setup-filter-search-wrap {
        min-width: 100%;
    }
    .setup-stats-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .setup-char-cards-grid {
        grid-template-columns: 1fr;
    }
    .setup-form-grid-3 {
        grid-template-columns: 1fr;
    }
    .setup-form-grid-2,
    .setup-form-grid-2-mb {
        grid-template-columns: 1fr;
    }
    .setup-status-grid-3 {
        grid-template-columns: 1fr;
    }
    .setup-batch-toolbar-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .setup-fullscreen-header {
        padding: 12px 16px;
    }
    .setup-fullscreen-body {
        padding: 16px;
    }
    .setup-fullscreen-footer {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
    }
    .setup-quickview-filter-inner {
        flex-direction: column;
    }
    .setup-quickview-search-wrap {
        min-width: 100%;
    }
    .setup-debug-modal-content {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
    }
    .setup-mindmap-selector {
        flex-direction: column;
        align-items: flex-start;
    }
    .setup-ai-desc-controls {
        flex-direction: column;
        align-items: flex-start;
    }
}
