/**
 * 毕设助手模块 — 商业风格样式
 * 与全站 chrome 导航配合，模块主色 #F54A64
 */

/* ========== 模块设计令牌 ========== */
.jc-page {
    --jc-primary: #F54A64;
    --jc-primary-hover: #e03d56;
    --jc-primary-light: #fff0f2;
    --jc-primary-border: #ffd6de;
    --jc-bg: #f4f6f9;
    --jc-surface: #ffffff;
    --jc-border: #e8ecf1;
    --jc-border-dark: #d8dee6;
    --jc-text: #1d2129;
    --jc-text-secondary: #86909c;
    --jc-text-light: #c9cdd4;
    --jc-radius: 8px;
    --jc-radius-lg: 12px;
    --jc-shadow: 0 2px 12px rgba(29, 33, 41, 0.06);
    --jc-sidebar-w: 200px;

    min-height: 100vh;
    background: var(--jc-bg);
    font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    color: var(--jc-text);
}

.jc-page a {
    text-decoration: none;
    color: inherit;
}

/* 仅重置无样式按钮，避免覆盖主按钮背景 */
.jc-page button:not(.jc-btn-primary):not(.jc-btn-secondary):not(.jc-pill):not(.jc-platform-tag):not(.jc-tab):not(.design-tool-card) {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
}

.jc-page button {
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.jc-page .hidden {
    display: none !important;
}

/* ========== 整体布局（顶栏下方） ========== */
.jc-shell {
    display: flex;
    width: 100%;
    min-height: calc(100vh - var(--nav-h, 56px));
    /* 侧栏 + 间距 + 主内容：整体居中，避免侧栏贴左、与中间模块间距过大 */
    max-width: 1420px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
    gap: 20px;
    justify-content: flex-start;
    align-items: stretch;
}

/* ========== 模块侧栏 ========== */
.jc-sidebar {
    width: var(--jc-sidebar-w);
    min-width: var(--jc-sidebar-w);
    background: var(--jc-surface);
    border-right: 1px solid var(--jc-border);
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    flex-shrink: 0;
}

.jc-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.jc-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: var(--jc-text);
    font-size: 14px;
    transition: background 0.18s, color 0.18s;
}

.jc-nav-item i {
    font-size: 16px;
    color: var(--jc-text-secondary);
}

.jc-nav-item:hover {
    background: #f7f8fa;
    color: var(--jc-primary);
}

.jc-nav-item:hover i {
    color: var(--jc-primary);
}

/* 侧栏功能模块（与「开始改写」同级） */
.jc-nav-module {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: var(--jc-text);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}

.jc-nav-module:hover {
    background: #f7f8fa;
    color: var(--jc-primary);
}

.jc-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    flex-shrink: 0;
    font-size: 13px;
    color: #fff;
}

.jc-nav-icon--purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.jc-nav-icon--blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.jc-nav-icon--cyan { background: linear-gradient(135deg, #38bdf8, #0ea5e9); }
.jc-nav-icon--teal { background: linear-gradient(135deg, #2dd4bf, #14b8a6); }
.jc-nav-icon--orange { background: linear-gradient(135deg, #fb923c, #f97316); }
.jc-nav-icon--pink { background: linear-gradient(135deg, #f472b6, #ec4899); }
.jc-nav-icon--indigo { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.jc-nav-icon--green { background: linear-gradient(135deg, #34d399, #10b981); }
.jc-nav-icon--slate { background: linear-gradient(135deg, #94a3b8, #64748b); }

.jc-nav-module--records {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--jc-border);
}

/* 辅助降重页：技术支持悬浮改到左下角 */
.jc-page .after-sales-float {
    right: auto;
    left: 14px;
    bottom: 24px;
    align-items: flex-start;
}

@media (max-width: 1024px) {
    .jc-page .after-sales-float {
        left: 12px;
        bottom: 16px;
    }
}

@media (max-width: 480px) {
    .jc-page .after-sales-float {
        left: 10px;
        bottom: 12px;
    }
}

.jc-nav-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 14px;
    color: var(--jc-text);
}

.jc-nav-caret {
    margin-left: auto;
    font-size: 12px;
    color: var(--jc-text-secondary);
}

.jc-nav-sub-item {
    display: block;
    padding: 8px 14px 8px 38px;
    color: var(--jc-text-secondary);
    font-size: 13px;
    position: relative;
    transition: all 0.18s;
}

.jc-nav-sub-item:hover {
    color: var(--jc-primary);
    background: var(--jc-primary-light);
}

.jc-nav-sub-item.active {
    color: var(--jc-primary);
    background: var(--jc-primary-light);
    font-weight: 600;
}

.jc-nav-sub-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--jc-primary);
    border-radius: 0 2px 2px 0;
}

/* ========== 主内容区 ========== */
.jc-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 8px 16px 0;
    min-width: 0;
    overflow: hidden;
}

/* ========== 工具栏卡片（计费 + 配置） ========== */
.jc-toolbar-card {
    background: var(--jc-surface);
    border: 1px solid var(--jc-border);
    border-radius: var(--jc-radius-lg);
    box-shadow: var(--jc-shadow);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex-shrink: 0;
}

/* 计费行：左说明 + 右消耗/模式/用户 */
.jc-billing-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px 24px;
    flex-wrap: wrap;
}

.jc-billing-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    flex: 1;
    min-width: 280px;
}

.jc-billing-label {
    font-weight: 600;
    color: var(--jc-primary);
    font-size: 14px;
    white-space: nowrap;
}

.jc-billing-label::after {
    content: "：";
}

.jc-billing-rule {
    font-size: 12px;
    color: var(--jc-text-secondary);
    line-height: 1.5;
}

.jc-pricing-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jc-pricing-tag {
    padding: 3px 12px;
    background: #f7f8fa;
    border: 1px solid var(--jc-border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--jc-text-secondary);
    white-space: nowrap;
}

.jc-pricing-tag.active {
    background: var(--jc-primary);
    border-color: var(--jc-primary);
    color: #fff;
    font-weight: 500;
}

.jc-billing-right {
    display: flex;
    align-items: center;
    gap: 12px 16px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.jc-estimate {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 13px;
}

.jc-estimate-label {
    color: var(--jc-text-secondary);
    white-space: nowrap;
}

.jc-estimate-label::after {
    content: "：";
}

.jc-estimate-cost {
    color: var(--jc-primary);
    font-size: 15px;
    font-weight: 700;
}

.jc-mode-badge {
    padding: 4px 14px;
    background: var(--jc-primary-light);
    color: var(--jc-primary);
    border: 1px solid var(--jc-primary-border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.jc-user-info {
    font-size: 12px;
    color: var(--jc-text-secondary);
    white-space: nowrap;
}

.jc-user-info a {
    color: var(--jc-primary);
    font-weight: 500;
}

.jc-user-info.member {
    color: #00b42a;
    font-weight: 500;
}

.jc-toolbar-divider {
    height: 1px;
    background: var(--jc-border);
    margin: 0 -4px;
}

/* 配置行（单行紧凑布局，小屏换行） */
.jc-config-inline-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 28px;
}

.jc-config-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.jc-config-item--platform {
    flex: 1 1 360px;
}

.jc-config-item--range {
    flex: 0 1 auto;
}

.jc-config-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.jc-config-label {
    min-width: auto;
    font-weight: 600;
    font-size: 13px;
    color: var(--jc-text);
    white-space: nowrap;
    flex-shrink: 0;
}

.jc-pill-group {
    display: flex;
    gap: 8px;
}

.jc-pill {
    padding: 6px 22px;
    border-radius: 20px;
    border: 1px solid var(--jc-border-dark);
    color: var(--jc-text-secondary);
    background: var(--jc-surface);
    font-size: 13px;
    transition: all 0.18s;
}

.jc-pill:hover {
    border-color: var(--jc-primary);
    color: var(--jc-primary);
}

.jc-pill.active {
    background: var(--jc-primary);
    border-color: var(--jc-primary);
    color: #fff;
    font-weight: 500;
}

.jc-platform-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.jc-platform-tag {
    position: relative;
    padding: 6px 14px;
    border-radius: var(--jc-radius);
    border: 1px solid var(--jc-border-dark);
    color: var(--jc-text-secondary);
    background: var(--jc-surface);
    font-size: 13px;
    transition: all 0.18s;
}

.jc-platform-tag:hover {
    border-color: var(--jc-primary);
    color: var(--jc-primary);
}

.jc-platform-tag.active {
    background: var(--jc-primary);
    border-color: var(--jc-primary);
    color: #fff;
    font-weight: 500;
}

.jc-tag-badge {
    position: absolute;
    top: -8px;
    right: -6px;
    background: #ff4757;
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 4px;
    line-height: 1.3;
    font-weight: 500;
    pointer-events: none;
}

/* 滑块 */
.jc-slider-row {
    align-items: center;
}

.jc-slider-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 160px;
    max-width: 280px;
    position: relative;
}

.jc-slider-badge {
    position: absolute;
    top: -22px;
    left: 36%;
    background: #ff4757;
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    pointer-events: none;
}

.jc-slider-badge::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #ff4757;
}

#range-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--jc-primary) 50%, var(--jc-border) 50%);
    outline: none;
}

#range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--jc-primary);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(245, 74, 100, 0.35);
}

#range-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--jc-primary);
    border: none;
    cursor: pointer;
}

.jc-slider-value {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--jc-primary);
    color: #fff;
    border-radius: var(--jc-radius);
    font-size: 13px;
    font-weight: 700;
}

/* ========== 工作区 ========== */
.jc-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.jc-tab-bar {
    display: flex;
    gap: 0;
    margin-bottom: -1px;
    z-index: 1;
}

.jc-tab-bar--form {
    margin: 0 0 16px;
    border-bottom: 1px solid var(--jc-border);
}

.jc-thesis-direction-bar {
    margin-bottom: 8px;
}

.jc-thesis-polish-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    align-self: stretch;
    max-width: 506px;
    margin: -2px 0 4px;
}

.jc-thesis-polish-label {
    font-size: 12px;
    font-weight: 600;
    color: #4e5969;
    margin-right: 2px;
}

.jc-thesis-polish-radio {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    color: #4e5969;
    cursor: pointer;
    user-select: none;
}

.jc-thesis-polish-radio input[type="radio"] {
    width: 13px;
    height: 13px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--jc-primary, #e5484d);
    cursor: pointer;
}

.jc-thesis-polish-radio span {
    font-size: 12px;
    font-weight: 400;
}

.jc-thesis-polish-note {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    color: #86909c;
}

.jc-tab-bar--form .jc-tab {
    border-bottom: 2px solid transparent;
    border-radius: var(--jc-radius) var(--jc-radius) 0 0;
    background: transparent;
    margin-right: 2px;
}

.jc-tab-bar--form .jc-tab.active {
    border-bottom-color: var(--jc-primary);
    background: transparent;
}

.jc-thesis-form > .jc-tab-content {
    display: none;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    margin-bottom: 4px;
}

.jc-thesis-form > .jc-tab-content.active {
    display: block;
}

.jc-file-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--jc-text-secondary);
}

.jc-mode-option.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.jc-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.jc-stepper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.jc-stepper-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--jc-border-dark);
    border-radius: 8px;
    background: var(--jc-surface);
    color: var(--jc-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease;
}

.jc-stepper-btn:hover {
    border-color: var(--jc-primary);
    color: var(--jc-primary);
}

.jc-stepper-input {
    width: 72px;
    height: 36px;
    text-align: center;
    border: 1px solid var(--jc-border-dark);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--jc-text);
    background: var(--jc-surface);
}

.jc-stepper-unit {
    font-size: 13px;
    color: var(--jc-text-secondary);
}

.jc-file-detect-title {
    color: var(--jc-primary);
    font-weight: 600;
}

@media (max-width: 720px) {
    .jc-form-row-2 {
        grid-template-columns: 1fr;
    }
}

.jc-tab {
    padding: 10px 22px;
    border: 1px solid var(--jc-border);
    border-bottom: none;
    border-radius: var(--jc-radius) var(--jc-radius) 0 0;
    background: #f2f3f5;
    color: var(--jc-text-secondary);
    font-size: 13px;
    margin-right: 4px;
    transition: all 0.18s;
}

.jc-tab.active {
    background: var(--jc-surface);
    color: var(--jc-primary);
    font-weight: 600;
    border-bottom: 1px solid var(--jc-surface);
}

.jc-workspace-panels {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 0;
    border: 1px solid var(--jc-border);
    border-radius: 0 var(--jc-radius-lg) var(--jc-radius-lg) var(--jc-radius-lg);
    background: var(--jc-surface);
    box-shadow: var(--jc-shadow);
    overflow: hidden;
}

.jc-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.jc-panel-input {
    border-right: 1px solid var(--jc-border);
    display: flex;
    flex-direction: column;
}

.jc-tab-content {
    flex: 1;
    display: none;
    min-height: 0;
}

.jc-tab-content.active {
    display: flex;
    flex-direction: column;
}

#input-text,
#file-preview {
    flex: 1;
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.85;
    color: var(--jc-text);
    font-family: inherit;
    min-height: 220px;
    background: var(--jc-surface);
}

#input-text::placeholder,
#file-preview::placeholder {
    color: var(--jc-text-light);
}

.jc-file-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px;
    margin: 16px;
    border: 2px dashed var(--jc-border-dark);
    border-radius: var(--jc-radius-lg);
    color: var(--jc-text-secondary);
    cursor: pointer;
    transition: all 0.18s;
}

.jc-file-upload i {
    font-size: 36px;
    color: var(--jc-text-light);
}

.jc-file-upload:hover,
.jc-file-upload.dragover {
    border-color: var(--jc-primary);
    background: var(--jc-primary-light);
    color: var(--jc-primary);
}

.jc-file-upload:hover i {
    color: var(--jc-primary);
}

.jc-file-name {
    font-size: 13px;
    color: var(--jc-primary);
    font-weight: 500;
}

#tab-file {
    flex-direction: column;
}

#file-preview {
    border-top: 1px solid var(--jc-border);
    background: #fafbfc;
}

.jc-panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-top: 1px solid var(--jc-border);
    background: #fafbfc;
    flex-shrink: 0;
    gap: 12px;
}

.jc-footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.jc-rewrite-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--jc-primary);
    font-weight: 500;
}

.jc-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--jc-primary);
    animation: jc-pulse 1s ease-in-out infinite;
}

@keyframes jc-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.jc-char-count {
    color: var(--jc-text-secondary);
    font-size: 13px;
}

.jc-footer-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.jc-footer-actions .jc-btn-secondary {
    white-space: nowrap;
    flex: 0 0 auto;
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

.jc-btn-secondary {
    padding: 8px 16px;
    border: 1px solid var(--jc-border-dark) !important;
    border-radius: var(--jc-radius);
    background: var(--jc-surface) !important;
    color: var(--jc-text) !important;
    font-size: 13px;
    transition: all 0.18s;
}

.jc-btn-secondary:hover {
    border-color: var(--jc-primary);
    color: var(--jc-primary);
}

.jc-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 22px;
    background: var(--jc-primary) !important;
    color: #fff !important;
    border: 1px solid var(--jc-primary) !important;
    border-radius: var(--jc-radius);
    font-size: 14px;
    font-weight: 600;
    transition: background 0.18s, box-shadow 0.18s;
    box-shadow: 0 2px 8px rgba(245, 74, 100, 0.35);
    white-space: nowrap;
}

.jc-btn-primary i {
    font-size: 14px;
    color: #fff !important;
}

.jc-btn-primary:hover:not(:disabled) {
    background: var(--jc-primary-hover) !important;
    border-color: var(--jc-primary-hover) !important;
    box-shadow: 0 4px 12px rgba(245, 74, 100, 0.4);
}

.jc-btn-primary:disabled,
.jc-btn-primary.is-loading {
    opacity: 0.75;
    cursor: not-allowed;
    box-shadow: none;
}

/* 输出区 */
.jc-output-header {
    padding: 12px 16px;
    background: #f7f8fa;
    border-bottom: 1px solid var(--jc-border);
    color: var(--jc-text-secondary);
    font-size: 13px;
    font-weight: 500;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jc-output-hint {
    font-size: 12px;
    font-weight: 400;
    color: var(--jc-text-light);
}

.jc-result-text {
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.85;
    color: var(--jc-text);
    word-break: break-word;
    min-height: 220px;
}

.jc-result-text mark.hl-changed {
    background: rgba(255, 193, 7, 0.45);
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

.jc-output-body {
    flex: 1;
    overflow: auto;
    min-height: 0;
}

.jc-output-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 260px;
    color: var(--jc-text-light);
    gap: 12px;
}

.jc-output-empty i {
    font-size: 56px;
}

.jc-output-result {
    height: 100%;
    overflow: auto;
}

#result-text {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.85;
    color: var(--jc-text);
    margin: 0;
}

.jc-output-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 260px;
    gap: 14px;
    color: var(--jc-text-secondary);
}

.jc-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--jc-border);
    border-top-color: var(--jc-primary);
    border-radius: 50%;
    animation: jc-spin 0.75s linear infinite;
}

@keyframes jc-spin {
    to { transform: rotate(360deg); }
}

.jc-output-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.jc-output-footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.jc-footer-alerts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    width: 100%;
    font-size: 12px;
    line-height: 1.4;
}

.jc-footer-alerts.hidden {
    display: none !important;
}

.jc-output-footer-top .jc-footer-actions .jc-btn-secondary {
    padding: 8px 14px;
}

@media (max-width: 900px) {
    .jc-output-footer-top {
        flex-wrap: wrap;
    }

    .jc-output-footer-top .jc-footer-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

.jc-char-ratio {
    margin-left: 6px;
    font-size: 12px;
    color: var(--jc-text-secondary);
}

.jc-char-ratio--warn {
    color: #e03e3e;
}

.jc-char-ratio--ok {
    color: #10b981;
}

.jc-change-ratio {
    margin-left: 4px;
    font-size: 12px;
    color: var(--jc-text-secondary);
}

.jc-change-ratio--warn {
    color: #e03e3e;
}

.jc-change-ratio--ok {
    color: #10b981;
}

.jc-change-warn {
    font-size: 12px;
    color: #e03e3e;
    font-weight: 500;
}

.jc-length-warn {
    font-size: 12px;
    color: #e03e3e;
    font-weight: 500;
}

.jc-loading-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--jc-text-light);
}

.jc-result-meta {
    flex: 1;
    font-size: 12px;
    color: var(--jc-text-secondary);
    line-height: 1.5;
}

/* ========== 居中弹窗 ========== */
.jc-dialog {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.jc-dialog.hidden {
    display: none !important;
}

.jc-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(29, 33, 41, 0.45);
    backdrop-filter: blur(2px);
}

.jc-dialog-panel {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--jc-surface);
    border-radius: var(--jc-radius-lg);
    box-shadow: 0 12px 40px rgba(29, 33, 41, 0.18);
    padding: 28px 24px 22px;
    text-align: center;
    animation: jc-dialog-in 0.22s ease-out;
}

@keyframes jc-dialog-in {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.jc-dialog-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--jc-primary-light);
    color: var(--jc-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.jc-dialog-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--jc-text);
    margin: 0 0 10px;
}

.jc-dialog-message {
    font-size: 14px;
    color: var(--jc-text-secondary);
    line-height: 1.6;
    margin: 0 0 22px;
}

.jc-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.jc-dialog-actions .jc-btn-secondary,
.jc-dialog-actions .jc-btn-primary {
    min-width: 110px;
    justify-content: center;
}

.jc-dialog-icon--warn {
    background: #fff7e6;
    color: #fa8c16;
}

.jc-dialog-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 20px;
    padding: 10px 14px;
    background: #f7f8fa;
    border-radius: var(--jc-radius);
    font-size: 13px;
}

.jc-dialog-hint .bi-arrow-right {
    color: var(--jc-text-light);
    font-size: 12px;
}

.jc-dialog-tag {
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--jc-primary-light);
    color: var(--jc-primary);
    font-weight: 600;
    font-size: 12px;
}

.jc-dialog-tag--detected {
    background: #fff7e6;
    color: #fa8c16;
}

.jc-dialog-panel--hint {
    max-width: 420px;
    text-align: left;
}

.jc-dialog-panel--hint .jc-dialog-icon {
    margin-bottom: 14px;
}

.jc-dialog-panel--hint .jc-dialog-title {
    text-align: center;
}

.jc-dialog-checklist {
    list-style: none;
    margin: 0 0 22px;
    padding: 14px 16px;
    background: #fafbfc;
    border: 1px solid var(--jc-border);
    border-radius: var(--jc-radius);
}

.jc-dialog-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--jc-text);
    padding: 4px 0;
}

.jc-dialog-checklist li i {
    color: var(--jc-primary);
    font-size: 22px;
    line-height: 1.2;
    flex-shrink: 0;
    margin-left: -6px;
}

.jc-dialog-panel--hint .jc-dialog-actions {
    justify-content: center;
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .jc-shell {
        flex-direction: column;
        max-width: none;
        margin: 0;
        padding: 0;
        gap: 0;
    }

    .jc-sidebar {
        width: 100%;
        min-width: unset;
        flex-direction: row;
        padding: 8px 12px;
        border-right: none;
        border-bottom: 1px solid var(--jc-border);
    }

    .jc-sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        flex: 1;
    }

    .jc-nav-sub {
        display: flex;
        flex-direction: row;
    }

    .jc-nav-sub-item {
        padding: 8px 14px;
    }

    .jc-nav-sub-item.active::before {
        top: 0;
        bottom: auto;
        left: 0;
        right: 0;
        width: auto;
        height: 2px;
    }

    .jc-main {
        padding: 16px;
    }

    .jc-workspace-panels {
        grid-template-columns: 1fr;
    }

    .jc-panel-input {
        border-right: none;
        border-bottom: 1px solid var(--jc-border);
    }
}

@media (max-width: 768px) {
    .jc-billing-row {
        flex-direction: column;
    }

    .jc-billing-right {
        width: 100%;
        justify-content: space-between;
    }

    .jc-config-inline-row {
        gap: 12px 16px;
    }

    .jc-config-item,
    .jc-config-item--platform,
    .jc-config-item--range {
        flex: 1 1 100%;
    }

    .jc-slider-wrap {
        max-width: 100%;
        width: 100%;
    }
}

/* ========== 质量评分与对比展示 ========== */
.jc-quality-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--jc-border);
    background: #fafbfc;
}

.jc-quality-score-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
}

.jc-quality-score {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.jc-quality-score.score-pass { color: #52c41a; }
.jc-quality-score.score-warn { color: #faad14; }
.jc-quality-score.score-fail { color: #ff4d4f; }

.jc-quality-score-label {
    font-size: 11px;
    color: var(--jc-text-secondary);
    margin-top: 4px;
}

.jc-quality-info {
    flex: 1;
    min-width: 0;
}

.jc-quality-status {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.jc-quality-status.score-pass { color: #52c41a; }
.jc-quality-status.score-warn { color: #faad14; }
.jc-quality-status.score-fail { color: #ff4d4f; }

.jc-quality-rounds {
    font-size: 12px;
    color: var(--jc-text-secondary);
    margin-bottom: 6px;
}

.jc-quality-deductions {
    margin: 0;
    padding-left: 18px;
    font-size: 12px;
    color: var(--jc-text-secondary);
    line-height: 1.6;
}

.jc-compare-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    height: 100%;
    min-height: 260px;
}

.jc-compare-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border: 1px solid var(--jc-border);
    border-radius: var(--jc-radius);
    overflow: hidden;
}

.jc-compare-label {
    padding: 8px 12px;
    background: #f7f8fa;
    border-bottom: 1px solid var(--jc-border);
    font-size: 12px;
    font-weight: 600;
    color: var(--jc-text-secondary);
}

.jc-compare-text {
    flex: 1;
    overflow: auto;
    padding: 12px;
    font-size: 14px;
    line-height: 1.85;
    color: var(--jc-text);
    word-break: break-word;
}

.jc-compare-text mark.hl-dup {
    background: rgba(255, 77, 79, 0.25);
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

.jc-compare-text mark.hl-ai {
    background: rgba(250, 173, 20, 0.35);
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

.hl-failed-tag {
    display: inline-block;
    background: #ff4d4f;
    color: #fff;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: middle;
}

.hl-failed-block {
    border: 2px solid #ff4d4f;
    border-radius: var(--jc-radius);
    padding: 8px;
    margin: 8px 0;
    background: rgba(255, 77, 79, 0.04);
}

/* ========== 使用帮助 / FAQ ========== */
.jc-help-card {
    background: var(--jc-surface);
    border: 1px solid var(--jc-border);
    border-radius: var(--jc-radius-lg);
    box-shadow: var(--jc-shadow);
    margin-bottom: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.jc-help-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #fafbfc;
    border: none;
    color: var(--jc-text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.jc-help-toggle .bi-question-circle {
    color: var(--jc-primary);
    font-size: 16px;
}

.jc-help-caret {
    margin-left: auto;
    transition: transform 0.2s;
}

.jc-help-toggle.open .jc-help-caret {
    transform: rotate(180deg);
}

.jc-help-body {
    padding: 0 16px 16px;
    border-top: 1px solid var(--jc-border);
}

.jc-help-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 20px;
    padding-top: 14px;
}

.jc-help-item h4 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--jc-text);
}

.jc-help-item p {
    margin: 0;
    font-size: 12px;
    line-height: 1.65;
    color: var(--jc-text-secondary);
}

.jc-help-title {
    margin: 14px 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--jc-text);
}

.jc-help-list {
    margin: 0;
    padding-left: 18px;
    font-size: 12px;
    line-height: 1.75;
    color: var(--jc-text-secondary);
}

.jc-help-list li {
    margin-bottom: 4px;
}

.jc-help-card--static {
    padding: 14px 16px 16px;
}

.jc-help-card--static .jc-help-title {
    margin-top: 0;
}

.jc-char-hint {
    font-size: 12px;
    color: var(--jc-text-light);
}

.jc-char-count--ok #char-count {
    color: #16a34a;
}

.jc-char-count--warn #char-count {
    color: #d97706;
}

.jc-char-count--danger #char-count {
    color: #dc2626;
    font-weight: 700;
}

@media (max-width: 768px) {
    .jc-help-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .jc-compare-view {
        grid-template-columns: 1fr;
    }
}

/* ========== 毕业论文生成 ========== */
.jc-main--thesis {
    align-items: stretch;
}

.jc-thesis-section {
    width: 100%;
    max-width: 1148px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jc-thesis-toolbar {
    width: 100%;
}

.jc-nav-module.active {
    background: var(--jc-primary-light);
    color: var(--jc-primary);
    font-weight: 600;
}

.jc-thesis-panel {
    background: var(--jc-surface);
    border: 1px solid var(--jc-border);
    border-radius: var(--jc-radius-lg);
    box-shadow: var(--jc-shadow);
    padding: 18px 20px 20px;
    width: 100%;
    box-sizing: border-box;
}

.jc-thesis-panel .jc-panel-header {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--jc-border);
}

.jc-thesis-panel .jc-panel-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--jc-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.jc-thesis-panel .jc-panel-title i {
    color: var(--jc-primary);
}

.jc-thesis-panel .jc-panel-desc {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--jc-text-secondary);
    line-height: 1.55;
    max-width: none;
}

.jc-thesis-layout {
    display: grid;
    grid-template-columns: 557px 432px;
    gap: 22px;
    align-items: start;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
}

.jc-thesis-layout--single {
    grid-template-columns: min(720px, 100%);
    width: 100%;
}

.jc-thesis-layout--single .jc-thesis-form-col {
    width: 100%;
}

.jc-mode-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.jc-mode-option {
    display: block;
    cursor: pointer;
    margin: 0;
}

.jc-mode-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.jc-mode-option-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--jc-border-dark);
    border-radius: var(--jc-radius-md, 10px);
    background: var(--jc-surface);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.jc-mode-option-body strong {
    font-size: 14px;
    color: var(--jc-text);
    font-weight: 600;
}

.jc-mode-option-body em {
    font-style: normal;
    font-size: 12px;
    color: var(--jc-text-secondary);
    line-height: 1.4;
}

.jc-mode-option input:checked + .jc-mode-option-body {
    border-color: #0d9488;
    background: rgba(13, 148, 136, 0.06);
    box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.25);
}

@media (max-width: 720px) {
    .jc-mode-options {
        grid-template-columns: 1fr;
    }
}

.jc-thesis-form-col {
    min-width: 0;
}

.jc-thesis-preview-col {
    position: sticky;
    top: calc(var(--nav-h, 56px) + 16px);
}

.jc-thesis-preview-card {
    background: var(--jc-surface);
    border: 1px solid var(--jc-border-dark);
    border-radius: var(--jc-radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(29, 33, 41, 0.08);
}

.jc-thesis-preview-header {
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--jc-border);
    background: linear-gradient(180deg, #fff 0%, #f8f9fb 100%);
}

.jc-thesis-preview-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.jc-thesis-preview-heading-row .jc-thesis-preview-heading {
    margin: 0;
}

.jc-thesis-action-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.jc-btn-font-settings {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #99f6e4 !important;
    border-radius: 8px;
    background: #f0fdfa !important;
    color: #0f766e !important;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.jc-btn-font-settings i {
    font-size: 14px;
    color: #0d9488;
}

.jc-btn-font-settings:hover {
    background: #ccfbf1 !important;
    border-color: #0d9488 !important;
    color: #115e59 !important;
}

.jc-btn-font-settings--side {
    min-height: 30px;
    padding: 0 10px;
    font-size: 12px;
    flex-shrink: 0;
}

.jc-btn-font-settings--side i {
    font-size: 12px;
}

/* ========== 字体排版设置弹窗 ========== */
.jc-font-dialog-panel {
    width: min(980px, calc(100vw - 32px));
    max-width: 980px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}

.jc-font-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 14px;
    background:
        radial-gradient(1200px 180px at 0% 0%, rgba(13, 148, 136, 0.12), transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #f7faf9 100%);
    border-bottom: 1px solid var(--jc-border);
}

.jc-font-dialog-head-text .jc-dialog-title {
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
}

.jc-font-dialog-head-text .jc-dialog-title i {
    color: #0d9488;
}

.jc-font-dialog-order {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    color: #64748b;
}

.jc-font-dialog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 20px;
    background: #f8fafc;
    border-bottom: 1px solid var(--jc-border);
}

.jc-font-toc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.jc-font-toc-toggle input {
    margin: 0;
    accent-color: #0d9488;
}

.jc-font-dialog-tip {
    font-size: 12px;
    color: #94a3b8;
}

.jc-font-dialog-body {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    min-height: 0;
    flex: 1;
    overflow: hidden;
}

.jc-font-dialog-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 10px;
    background: #f1f5f9;
    border-right: 1px solid var(--jc-border);
    overflow-y: auto;
}

.jc-font-nav-item {
    appearance: none;
    border: none;
    background: transparent;
    text-align: left;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.jc-font-nav-item:hover {
    background: rgba(255, 255, 255, 0.8);
    color: #0f172a;
}

.jc-font-nav-item.active {
    background: #fff;
    color: #0d9488;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.jc-font-dialog-content {
    overflow-y: auto;
    padding: 14px 16px 18px;
    background: #fff;
}

.jc-font-pane-head {
    margin-bottom: 12px;
}

.jc-font-pane-head h4 {
    margin: 0 0 4px;
    font-size: 15px;
    color: #0f172a;
}

.jc-font-pane-head p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.jc-font-pane-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jc-font-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.jc-font-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.jc-font-card-label {
    font-size: 13px;
    color: #0f172a;
    font-weight: 700;
}

.jc-font-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px 12px;
    align-items: end;
}

.jc-font-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    min-width: 0;
}

.jc-font-field span {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

.jc-font-field select {
    width: 100%;
    height: 34px;
    padding: 0 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-size: 13px;
}

.jc-font-field select:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.jc-font-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
    user-select: none;
    align-self: end;
    padding-bottom: 8px;
}

.jc-font-check--bold {
    padding-bottom: 0;
}

.jc-font-check input {
    margin: 0;
    accent-color: #0d9488;
}

.jc-font-dialog-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 20px 16px;
    border-top: 1px solid var(--jc-border);
    background: #f8fafc;
}

.jc-font-dialog-foot-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 720px) {
    .jc-font-dialog-body {
        grid-template-columns: 1fr;
    }

    .jc-font-dialog-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--jc-border);
        padding: 10px;
    }

    .jc-font-nav-item {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .jc-font-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.jc-thesis-preview-heading {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #1a1d24;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.02em;
}

.jc-thesis-preview-heading i {
    color: var(--jc-primary);
}

.jc-thesis-preview-title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1d24;
    line-height: 1.55;
    word-break: break-word;
}

.jc-thesis-preview-title--empty {
    color: #86909c;
    font-weight: 500;
}

.jc-thesis-preview-hint {
    margin: 0;
    font-size: 12px;
    color: #646a73;
    line-height: 1.5;
}

.jc-thesis-preview-body {
    padding: 12px 16px 16px;
    max-height: calc(100vh - var(--nav-h, 56px) - 200px);
    overflow-y: auto;
    background: #fff;
}

.jc-thesis-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0;
}

.jc-thesis-form .jc-form-group {
    gap: 6px;
}

.jc-outline-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.jc-outline-item {
    font-size: 13px;
    line-height: 1.8;
    color: #4e5969;
    padding: 2px 0;
    word-break: break-word;
}

.jc-outline-item--l1 {
    font-weight: 700;
    font-size: 14px;
    color: #1a1d24;
    margin-top: 10px;
    padding-top: 2px;
}

.jc-outline-item--l1:first-child {
    margin-top: 0;
}

.jc-outline-item--l2 {
    padding-left: 16px;
    color: #3d4550;
}

.jc-outline-item--l3 {
    padding-left: 32px;
    font-size: 12.5px;
    color: #4e5969;
}

.jc-outline-item--dynamic {
    color: #c41e3a;
    font-weight: 500;
}

.jc-outline-item--placeholder {
    color: #a8adb5;
    font-style: normal;
}

/* ========== 开题报告结构预览 ========== */
.jc-sample-docs {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff7f8 0%, #f8fafc 100%);
    border: 1px dashed var(--jc-primary-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.jc-sample-docs-label {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--jc-primary);
}

.jc-sample-docs-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.jc-sample-doc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--jc-border-dark);
    background: #fff;
    color: #1a1d24 !important;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.jc-sample-doc-link i {
    color: var(--jc-primary);
    flex: 0 0 auto;
}

.jc-sample-doc-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jc-sample-doc-link:hover {
    border-color: var(--jc-primary);
    box-shadow: 0 2px 8px rgba(245, 74, 100, 0.12);
    color: var(--jc-primary) !important;
}

button.jc-sample-doc-link {
    cursor: pointer;
    font-family: inherit;
}

.jc-sample-doc-link--video i {
    color: #0f766e;
}

.jc-dialog-panel--video {
    width: min(1100px, calc(100vw - 24px));
    max-width: min(1100px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    padding: 12px 14px 14px;
    text-align: left;
    overflow: auto;
}

.jc-video-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.jc-video-dialog-head .jc-dialog-title {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    text-align: left;
}

.jc-video-frame {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #0b1220;
    border: 1px solid #1f2937;
}

.jc-video-frame video {
    display: block;
    width: 100%;
    height: min(82vh, 720px);
    max-height: min(82vh, 720px);
    background: #000;
    object-fit: contain;
}

.jc-thesis-preview-body:has(.jc-proposal-outline) {
    max-height: none;
    overflow: visible;
    padding: 6px 10px 10px;
}

.jc-proposal-outline {
    list-style: none !important;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    counter-reset: none;
}

.jc-proposal-outline-item {
    --i: 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 4px 8px;
    list-style: none !important;
    border-radius: 7px;
    background: linear-gradient(135deg, #fff 0%, #fafbfc 100%);
    border: 1px solid var(--jc-border);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    animation: jc-proposal-outline-in 0.28s ease both;
    animation-delay: calc(var(--i) * 20ms);
}

.jc-proposal-outline-item::marker,
.jc-proposal-outline-item::before {
    content: none !important;
    display: none !important;
}

.jc-proposal-outline-item:hover {
    border-color: var(--jc-primary-border);
    box-shadow: 0 2px 8px rgba(245, 74, 100, 0.08);
}

.jc-proposal-outline-no {
    flex: 0 0 auto;
    min-width: 22px;
    height: 22px;
    padding: 0 3px;
    box-sizing: border-box;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(145deg, #ff6b81 0%, var(--jc-primary) 100%);
    box-shadow: 0 1px 4px rgba(245, 74, 100, 0.25);
    line-height: 1;
}

.jc-proposal-outline-text {
    flex: 1;
    min-width: 0;
    padding-top: 0;
    font-size: 12px;
    font-weight: 600;
    color: #1a1d24;
    line-height: 1.3;
    word-break: break-word;
}

.jc-proposal-outline-sep {
    font-style: normal;
    font-weight: 600;
    color: #1a1d24;
    margin-right: 1px;
}

.jc-proposal-outline-hint {
    font-weight: 500;
    font-size: 11px;
    color: #8a919c;
}

@keyframes jc-proposal-outline-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .jc-proposal-outline-item {
        animation: none;
    }
}

/* ========== 毕设选题 ========== */
.jc-topic-form {
    max-width: 920px;
}

.jc-topic-form-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 14px;
}

.jc-topic-tag-groups {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jc-topic-tag-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-start;
}

.jc-topic-tag-group-title {
    font-size: 12px;
    font-weight: 700;
    color: #86909c;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.jc-topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jc-topic-tag {
    display: inline-flex;
    align-items: center;
    gap: 0;
    cursor: pointer;
    user-select: none;
}

.jc-topic-tag input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.jc-topic-tag span {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--jc-border-dark);
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #3d4550;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.jc-topic-tag input:checked + span {
    border-color: var(--jc-primary);
    background: var(--jc-primary-light);
    color: var(--jc-primary);
}

.jc-mode-options--compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.jc-mode-options--compact .jc-mode-option-body {
    padding: 8px 10px;
    text-align: center;
}

.jc-mode-options--compact .jc-mode-option-body em {
    display: none;
}

.jc-topic-result-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jc-topic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 4px 0 8px;
}

.jc-topic-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 14px 12px;
    border-radius: 12px;
    border: 1px solid var(--jc-border);
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
    box-shadow: 0 2px 10px rgba(29, 33, 41, 0.04);
}

.jc-topic-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.jc-topic-card-idx {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(145deg, #34d399, #10b981);
}

.jc-topic-card-diff {
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    padding: 3px 10px;
    border: 1px solid transparent;
}

.jc-topic-card-diff.is-easy {
    color: #047857;
    background: #ecfdf5;
    border-color: #6ee7b7;
}

.jc-topic-card-diff.is-medium {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #93c5fd;
}

.jc-topic-card-diff.is-hard {
    color: #be123c;
    background: #fff1f2;
    border-color: #fda4af;
}

.jc-topic-card.is-easy {
    border-color: #a7f3d0;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.08);
}

.jc-topic-card.is-medium {
    border-color: #bfdbfe;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.08);
}

.jc-topic-card.is-hard {
    border-color: #fecdd3;
    box-shadow: 0 2px 10px rgba(225, 29, 72, 0.1);
}

.jc-topic-card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    color: #1a1d24;
    word-break: break-word;
}

.jc-topic-card-meta {
    margin: 0;
    font-size: 12px;
    color: #86909c;
    line-height: 1.4;
}

.jc-topic-detail-btn {
    align-self: flex-start;
    margin-top: 2px;
}

.jc-dialog-panel--wide {
    /* 覆盖 .jc-dialog-panel 的 max-width: 400px，与选题结果区同宽 */
    width: min(1148px, calc(100vw - 48px));
    max-width: min(1148px, calc(100vw - 48px));
    /* 明确限高，避免内容把弹窗撑出视口后底部卡片盖住上方文字 */
    max-height: calc(100vh - 40px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(29, 33, 41, 0.18);
}

.jc-topic-detail-panel {
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}

/* 选题详情：短内容垂直居中；超高时弹层本身也可滚，避免裁切 */
#detail-dialog.jc-dialog {
    align-items: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#detail-dialog .jc-dialog-panel--wide {
    margin-top: auto;
    margin-bottom: auto;
}

.jc-topic-detail-banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px 10px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 55%, #f0fdf4 100%);
    border-bottom: 1px solid var(--jc-border);
    flex-shrink: 0;
}

.jc-topic-detail-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--jc-primary);
    margin-bottom: 4px;
}

.jc-topic-detail-banner .jc-dialog-title {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    word-break: break-word;
    color: #1a1d24;
    max-width: 860px;
}

.jc-topic-detail-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.jc-topic-detail-close {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--jc-border);
    background: #fff;
    color: #4e5969;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.jc-topic-detail-close:hover {
    background: #fff1f0;
    color: var(--jc-primary);
}

.jc-topic-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 16px 0;
    flex-shrink: 0;
}

.jc-topic-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #4e5969;
    font-size: 12px;
    font-weight: 600;
}

.jc-topic-pill--diff.is-easy {
    background: #ecfdf5;
    color: #059669;
}

.jc-topic-pill--diff.is-medium {
    background: #eff6ff;
    color: #2563eb;
}

.jc-topic-pill--diff.is-hard {
    background: #fff1f0;
    color: #e11d48;
}

.jc-topic-pill--tag {
    background: #fff5f5;
    color: var(--jc-primary);
    border: 1px solid rgba(244, 114, 132, 0.25);
}

.jc-topic-detail-body {
    padding: 8px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    flex: 1 1 auto;
    /* 扣掉头图 + 标签行，保证内容区可独立滚动（不依赖父级 height 是否被 max-height 钳住） */
    max-height: calc(100vh - 40px - 118px);
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.jc-topic-detail-bottom {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 0.9fr;
    gap: 8px;
    align-items: start;
    flex-shrink: 0;
    /* 与功能模块同属文档流，禁止叠在上方文字上 */
    position: relative;
    z-index: 0;
}

.jc-topic-detail-card {
    border: 1px solid var(--jc-border);
    border-radius: 12px;
    background: #fff;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(29, 33, 41, 0.03);
    min-width: 0;
    position: relative;
    z-index: 0;
}

.jc-topic-detail-card--full {
    width: 100%;
    flex-shrink: 0;
}

.jc-topic-detail-card--half {
    /* 占单列 */
}

.jc-topic-detail-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    background: #f7f8fa;
    border-bottom: 1px solid var(--jc-border);
}

.jc-topic-detail-card-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #fb7185, #f43f5e);
    color: #fff;
    font-size: 11px;
}

.jc-topic-detail-card-head h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #1a1d24;
}

.jc-topic-detail-card-body {
    padding: 8px 10px;
    max-height: none;
    overflow: visible;
}

.jc-topic-role-cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.jc-topic-role-block {
    padding: 10px 12px;
    border-radius: 8px;
    background: #fafbfc;
    border: 1px solid #eef0f3;
}

.jc-topic-role-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--jc-primary);
    margin-bottom: 6px;
}

.jc-topic-role-summary {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.55;
    color: #3d4550;
}

.jc-topic-feat-ol {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #e5e8ec;
}

.jc-topic-feat-ol li strong {
    color: #1f2937;
}

.jc-topic-feat-details,
.jc-topic-feat-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px dashed #e5e8ec;
    margin: 0;
    padding-left: 18px;
    list-style: disc;
}

.jc-topic-feat-list {
    list-style: disc;
}

.jc-topic-feat-row {
    font-size: 12px;
    line-height: 1.65;
    color: #3d4550;
}

.jc-topic-feat-name {
    font-weight: 700;
    color: #1f2937;
}

.jc-topic-feat-desc {
    color: #4b5563;
}

.jc-topic-num-list {
    margin: 0;
    padding-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.jc-topic-num-list li {
    font-size: 11px;
    line-height: 1.35;
    color: #3d4550;
}

.jc-topic-highlight-list {
    gap: 3px;
}

.jc-topic-highlight-list li {
    font-size: 11px;
    line-height: 1.4;
}

.jc-topic-stack-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.jc-topic-stack-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 4px 6px;
    border-radius: 6px;
    background: #f7f8fa;
    border: 1px solid #eef0f3;
}

.jc-topic-stack-label {
    font-size: 10px;
    font-weight: 700;
    color: #86909c;
    letter-spacing: 0.02em;
}

.jc-topic-stack-value {
    font-size: 11px;
    font-weight: 600;
    color: #1a1d24;
    line-height: 1.3;
    word-break: break-word;
}

.jc-topic-flow-text {
    margin: 0;
    font-size: 11px;
    line-height: 1.55;
    color: #3d4550;
}

.jc-topic-empty {
    margin: 0;
    color: #86909c;
    font-size: 13px;
}

@media (max-width: 900px) {
    .jc-topic-form-row,
    .jc-topic-grid,
    .jc-topic-detail-bottom,
    .jc-topic-role-cols {
        grid-template-columns: 1fr;
    }

    .jc-dialog-panel--wide {
        width: min(1148px, calc(100vw - 20px));
        max-width: min(1148px, calc(100vw - 20px));
        max-height: calc(100vh - 24px);
        overflow: hidden;
    }

    .jc-topic-detail-body {
        max-height: calc(100vh - 24px - 130px);
    }

    .jc-topic-detail-card-body {
        max-height: none;
    }
}

.jc-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jc-form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.jc-form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--jc-text);
}

.jc-required {
    color: var(--jc-primary);
}

.jc-form-input,
.jc-form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--jc-border);
    border-radius: var(--jc-radius);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.jc-form-input--medium {
    max-width: 100%;
}

.jc-form-textarea--compact {
    max-width: 100%;
    min-height: 60px;
    resize: vertical;
}

.jc-form-input--role {
    width: 120px;
    max-width: 120px;
    flex: 0 0 120px;
    padding: 8px 10px;
}

.jc-form-hint {
    font-size: 12px;
    color: var(--jc-text-secondary);
    line-height: 1.4;
}

.jc-form-optional {
    font-size: 12px;
    font-weight: 500;
    color: #86909c;
    margin-left: 4px;
}

.jc-form-input:focus,
.jc-form-textarea:focus {
    outline: none;
    border-color: var(--jc-primary);
    box-shadow: 0 0 0 2px var(--jc-primary-light);
}

.jc-roles-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jc-role-block {
    padding: 10px 12px;
    border: 1px solid var(--jc-border);
    border-radius: var(--jc-radius);
    background: #f8f9fb;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 100%;
}

.jc-role-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--jc-text);
    flex: 0 0 auto;
}

.jc-role-block .jc-form-textarea {
    max-width: 100%;
}

.jc-role-header {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.jc-role-header .jc-form-input--role {
    flex: 0 0 auto;
}

.jc-btn-sm {
    padding: 6px 10px;
    font-size: 12px;
}

.jc-form-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 6px;
    margin-top: 4px;
}

.jc-form-actions--center {
    align-items: center;
    width: 100%;
}

.jc-form-actions--center .jc-thesis-agreement {
    align-self: stretch;
    max-width: 506px;
    margin-bottom: 2px;
}

.jc-generate-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.jc-form-actions .jc-btn-generate {
    width: auto;
    min-width: 200px;
    max-width: 280px;
    flex: 0 0 auto;
    justify-content: center;
}

.jc-thesis-cost-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #dc2626;
    font-weight: 500;
}

.jc-form-group--sql {
    margin-bottom: 4px;
}

.jc-form-textarea--sql {
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.5;
    min-height: 88px;
}

.jc-sql-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.jc-sql-import-btn {
    cursor: pointer;
    margin: 0;
}

.jc-sql-file-input {
    display: none;
}

.jc-sql-preview {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--jc-text-secondary);
    min-height: 0;
}

.jc-sql-preview--ok {
    color: #0d9488;
}

.jc-sql-preview--err {
    color: #dc2626;
}

.jc-thesis-x6-host {
    position: fixed;
    left: 0;
    top: 0;
    width: 1280px;
    height: 800px;
    opacity: 0.01;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

.jc-thesis-x6-wrap {
    width: 1280px;
    height: 800px;
}

.jc-btn-generate {
    min-width: 160px;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 22px;
}

.jc-btn-generate:disabled {
    opacity: 0.7;
    cursor: wait;
}

.jc-dialog-panel--progress {
    max-width: 420px;
    text-align: center;
    padding: 28px 28px 24px;
}

.jc-progress-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.jc-progress-track {
    width: 100%;
    height: 10px;
    margin: 18px 0 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.jc-progress-bar {
    height: 100%;
    width: 28%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0d9488 0%, #14b8a6 55%, #2dd4bf 100%);
    transition: width 0.35s ease;
}

.jc-progress-bar.is-indeterminate {
    animation: jc-progress-slide 1.35s ease-in-out infinite;
}

.jc-progress-bar.is-done {
    width: 100% !important;
    animation: none;
}

@keyframes jc-progress-slide {
    0% { margin-left: -30%; width: 28%; }
    50% { margin-left: 35%; width: 40%; }
    100% { margin-left: 105%; width: 28%; }
}

.jc-progress-hint {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.jc-btn-generate--diagram {
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    border-color: transparent;
    color: #fff;
}

.jc-btn-generate--diagram:hover:not(:disabled) {
    filter: brightness(1.05);
}

.jc-btn-price {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.25);
    vertical-align: middle;
}

.jc-thesis-pack-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--jc-text-secondary);
    max-width: 506px;
}

.jc-thesis-agreement {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 557px;
    cursor: pointer;
    user-select: none;
}

.jc-thesis-agreement input[type="checkbox"] {
    margin-top: 3px;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    accent-color: var(--jc-primary);
    cursor: pointer;
}

.jc-thesis-agreement span {
    font-size: 12px;
    line-height: 1.65;
    color: #646a73;
}

.jc-thesis-agreement:hover span {
    color: #4e5969;
}

.jc-thesis-result {
    padding: 8px 4px 16px;
}

.jc-thesis-meta {
    color: var(--jc-text-secondary);
    font-size: 14px;
}

.jc-thesis-outline {
    margin: 16px 0;
    font-size: 13px;
}

.jc-thesis-outline summary {
    cursor: pointer;
    color: var(--jc-primary);
    font-weight: 600;
}

.jc-thesis-outline ol {
    margin: 12px 0 0;
    padding-left: 24px;
    line-height: 1.8;
    color: var(--jc-text-secondary);
}

.jc-loading-block {
    text-align: center;
    padding: 48px 24px;
}

.jc-loading-title {
    font-size: 16px;
    font-weight: 600;
    margin: 16px 0 8px;
}

.jc-loading-hint {
    font-size: 13px;
    color: var(--jc-text-secondary);
}

/* 生成记录列表 */
.jc-main--records {
    align-items: stretch;
}

.jc-records-section {
    width: 100%;
    max-width: 1148px;
}

.jc-records-panel {
    background: var(--jc-surface);
    border: 1px solid var(--jc-border);
    border-radius: var(--jc-radius-lg);
    box-shadow: var(--jc-shadow);
    padding: 18px 20px 20px;
    width: 100%;
    box-sizing: border-box;
}

.jc-records-panel .jc-panel-header {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--jc-border);
}

.jc-records-panel .jc-panel-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--jc-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.jc-records-panel .jc-panel-title i {
    color: var(--jc-primary);
}

.jc-records-panel .jc-panel-desc {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--jc-text-secondary);
    line-height: 1.55;
}

.jc-records-list {
    overflow-x: auto;
}

.jc-records-pager {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--jc-border);
}

.jc-records-pager.hidden {
    display: none;
}

.jc-records-empty {
    margin: 0;
    padding: 16px 0;
    font-size: 14px;
    color: var(--jc-text-secondary);
}

.jc-records-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.jc-records-table th,
.jc-records-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--jc-border, #e8e8e8);
    text-align: left;
    vertical-align: middle;
}

.jc-records-table th {
    font-weight: 600;
    color: var(--jc-text-secondary);
    white-space: nowrap;
}

.jc-record-row--highlight {
    animation: jc-record-highlight 4s ease-out;
}

@keyframes jc-record-highlight {
    0%, 15% {
        background: #fff0f2;
    }
    100% {
        background: transparent;
    }
}

.jc-record-title {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jc-record-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}

.jc-record-status--generating {
    background: #fff7e6;
    color: #d48806;
}

.jc-record-status--completed {
    background: #f6ffed;
    color: #389e0d;
}

.jc-record-status--failed {
    background: #fff2f0;
    color: #cf1322;
}

.jc-record-status--expired {
    background: #f5f5f5;
    color: #8c8c8c;
}

.jc-record-pending {
    color: #d48806;
    font-size: 12px;
}

.jc-record-expired {
    color: #8c8c8c;
    font-size: 12px;
}

.jc-record-error {
    color: #cf1322;
    font-size: 12px;
    cursor: help;
}

.jc-record-expire-hint {
    font-size: 11px;
    color: #8c8c8c;
    margin-top: 2px;
}

.jc-record-error-hint {
    color: #cf1322;
    max-width: 280px;
    word-break: break-word;
    white-space: normal;
}

@media (max-width: 1020px) {
    .jc-thesis-section {
        max-width: 100%;
    }

    .jc-thesis-layout {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .jc-thesis-preview-col {
        position: static;
    }

    .jc-thesis-preview-body {
        max-height: 360px;
    }

    .jc-thesis-preview-body:has(.jc-proposal-outline) {
        max-height: none;
        overflow: visible;
    }

    .jc-thesis-agreement {
        max-width: 100%;
    }
}

/* ========== 模块中心（小方块入口） ========== */
.jc-shell--hub {
    background: var(--jc-bg);
}

.jc-shell--hub .jc-sidebar {
    background: var(--jc-bg);
    border-right-color: var(--jc-border);
}

.jc-main--home {
    overflow: auto;
    max-width: 100%;
    background: var(--jc-bg);
}

.jc-hub-header {
    padding: 4px 4px 8px;
}

.jc-hub-title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: var(--jc-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.jc-hub-title i {
    color: var(--jc-primary);
    font-size: 22px;
}

.jc-hub-desc {
    margin: 0;
    font-size: 13px;
    color: var(--jc-text-secondary);
    line-height: 1.5;
}

.jc-hub-grid.design-tools-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.jc-page .design-tool-icon.tool-color-pink {
    background: linear-gradient(145deg, #f472b6, #ec4899);
    box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
}

.jc-page .design-tool-icon.tool-color-green {
    background: linear-gradient(145deg, #10b981, #059669);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

/* 未开发功能：外观与其他卡片一致，点击提示暂未开发 */
.jc-page button.design-tool-card.jc-hub-card--soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 8px 12px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    color: inherit;
    width: 100%;
    min-width: 0;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.jc-page button.design-tool-card.jc-hub-card--soon:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    border-color: rgba(245, 74, 100, 0.25);
}

.jc-page button.design-tool-card.jc-hub-card--soon .design-tool-desc {
    color: var(--jc-text-secondary);
}

@media (max-width: 1100px) {
    .jc-hub-grid.design-tools-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .jc-hub-grid.design-tools-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ========== 计算机亮点介绍 ========== */
.jc-main--highlights {
    padding-bottom: 32px;
}

.jc-hl-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 2px;
    padding: 8px 2px 14px;
    border-bottom: 1px solid #e8edf3;
    margin-bottom: 18px;
    position: relative;
    z-index: 2;
}

.jc-hl-filter {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 550;
    padding: 8px 12px;
    border-radius: 0;
    cursor: pointer;
    position: relative;
    line-height: 1.4;
    pointer-events: auto;
    user-select: none;
}

.jc-hl-filter:hover {
    color: #2563eb;
}

.jc-hl-filter.is-active {
    color: #2563eb;
    font-weight: 700;
}

.jc-hl-filter.is-active::after {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 2px;
    height: 2px;
    background: #2563eb;
    border-radius: 2px;
}

.jc-hl-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.jc-hl-card {
    position: relative;
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 16px 14px 14px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    min-height: 168px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.jc-hl-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.jc-hl-card.jc-hl-card--hide {
    display: none !important;
}

.jc-hl-card-top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.jc-hl-thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #fff;
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.jc-hl-thumb i {
    font-size: 14px;
    opacity: 0.92;
}

.jc-hl-thumb-text {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.1;
    max-width: 52px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jc-hl-thumb--security { background: linear-gradient(145deg, #0ea5e9, #0369a1); }
.jc-hl-thumb--ai { background: linear-gradient(145deg, #8b5cf6, #6d28d9); }
.jc-hl-thumb--ml { background: linear-gradient(145deg, #f59e0b, #d97706); }
.jc-hl-thumb--data { background: linear-gradient(145deg, #10b981, #047857); }
.jc-hl-thumb--perf { background: linear-gradient(145deg, #6366f1, #4338ca); }
.jc-hl-thumb--comm { background: linear-gradient(145deg, #14b8a6, #0f766e); }
.jc-hl-thumb--biz { background: linear-gradient(145deg, #f43f5e, #be123c); }
.jc-hl-thumb--special { background: linear-gradient(145deg, #f97316, #c2410c); }

.jc-hl-meta {
    min-width: 0;
    flex: 1;
}

.jc-hl-title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 750;
    color: #0f172a;
    line-height: 1.35;
}

.jc-hl-stars {
    display: flex;
    gap: 2px;
    color: #fbbf24;
    font-size: 12px;
    margin-bottom: 4px;
}

.jc-hl-label {
    font-size: 12px;
    font-weight: 650;
    color: #10b981;
}

.jc-hl-desc {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.65;
    color: #64748b;
}

.jc-hl-desc strong {
    color: #334155;
    font-weight: 650;
}

.jc-hl-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
    padding: 40px 0;
}

.jc-hl-empty.jc-hl-empty--hide {
    display: none !important;
}

@media (max-width: 1200px) {
    .jc-hl-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .jc-hl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .jc-hl-grid {
        grid-template-columns: 1fr;
    }
}

/* —— 参考文献联网检索（对齐毕业论文布局） —— */
.jc-dialog-body {
    font-size: 14px;
    line-height: 1.6;
    color: var(--jc-text-secondary, #64748b);
    margin: 0 0 16px;
}

.jc-ref-section {
    gap: 12px;
}

.jc-ref-layout {
    display: grid;
    grid-template-columns: minmax(0, 557px) minmax(260px, 432px);
    gap: 22px;
    align-items: start;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
}

.jc-ref-examples {
    margin: 18px 0 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jc-ref-examples-title {
    font-size: 13px;
    font-weight: 600;
    color: #4e5969;
    display: flex;
    align-items: center;
    gap: 6px;
}

.jc-ref-example-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: 1px solid var(--jc-border-dark, #e5e6eb);
    border-radius: 10px;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.jc-ref-example-chip:hover {
    border-color: #86909c;
    background: #f2f3f5;
}

.jc-ref-example-chip strong {
    font-size: 13px;
    color: #1d2129;
}

.jc-ref-example-chip span {
    font-size: 12px;
    color: #86909c;
    line-height: 1.45;
}

.jc-ref-tips-card {
    height: 100%;
}

.jc-ref-tips-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jc-ref-tip {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fafbfc;
    border: 1px solid var(--jc-border);
}

.jc-ref-tip-num {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--jc-primary);
    background: var(--jc-primary-light);
}

.jc-ref-tip strong {
    display: block;
    font-size: 13px;
    color: var(--jc-text);
    margin-bottom: 2px;
}

.jc-ref-tip p {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    color: var(--jc-text-secondary);
}

.jc-ref-result-panel {
    margin-top: 0;
}

.jc-ref-result-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
}

.jc-ref-result-heading {
    min-width: 0;
    flex: 1;
}

.jc-ref-result-heading .jc-panel-title {
    margin: 0;
}

.jc-ref-result-heading .jc-panel-desc {
    margin: 6px 0 0;
}

.jc-ref-save-tip {
    margin: 8px 0 0;
    font-size: 13px;
    color: #0f766e;
    line-height: 1.5;
}

.jc-ref-save-tip a {
    color: #0f766e;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.jc-ref-result-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.jc-ref-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.jc-ref-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.jc-ref-stat--zh {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

.jc-ref-stat--en {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.jc-ref-markdown {
    white-space: pre-wrap;
    word-break: break-word;
    background: linear-gradient(180deg, #fafbfc 0%, #f4f6f8 100%);
    border: 1px solid var(--jc-border);
    border-radius: 12px;
    padding: 16px 18px;
    font-size: 13px;
    line-height: 1.75;
    color: #334155;
    max-height: 240px;
    overflow: auto;
    margin: 0 0 16px;
    font-family: "PingFang SC", "Microsoft YaHei", Consolas, monospace;
}

.jc-ref-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jc-ref-card {
    border: 1px solid var(--jc-border);
    border-radius: 12px;
    padding: 14px 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(29, 33, 41, 0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.jc-ref-card:hover {
    border-color: #fecdd3;
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.06);
}

.jc-ref-card-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.55;
    color: #0f172a;
}

.jc-ref-card-meta {
    margin: 0 0 8px;
    font-size: 12px;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

.jc-ref-lang {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
}

.jc-ref-lang--zh {
    background: #fff1f2;
    color: #be123c;
}

.jc-ref-lang--en {
    background: #eff6ff;
    color: #1d4ed8;
}

.jc-ref-lang--biz {
    background: #ecfdf5;
    color: #047857;
}

.jc-ref-gb-block {
    margin: 0 0 18px;
    border: 1px solid var(--jc-border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(29, 33, 41, 0.05);
}

.jc-ref-gb-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 10px 16px;
    background: linear-gradient(180deg, #fff 0%, #f8f9fb 100%);
    border-bottom: 1px solid var(--jc-border);
}

.jc-ref-gb-label {
    padding: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--jc-text);
    background: none;
    border: none;
}

.jc-ref-format-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 3px;
    border-radius: 10px;
    background: #f1f5f9;
}

.jc-ref-format-tab {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.jc-ref-format-tab:hover {
    color: var(--jc-primary);
}

.jc-ref-format-tab.active {
    background: #fff;
    color: var(--jc-primary);
    box-shadow: 0 1px 3px rgba(29, 33, 41, 0.1);
}

.jc-ref-format-hint {
    padding: 8px 16px 0;
    font-size: 12px;
    color: #64748b;
}

.jc-ref-gb-list {
    padding: 14px 18px 18px;
    max-height: none;
    overflow: visible;
    background: #fffef9;
}

.jc-ref-gb-line {
    margin: 0 0 10px;
    font-family: "宋体", SimSun, "Songti SC", serif;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    color: #1a1a1a;
    word-break: break-word;
    text-indent: 0;
    padding-left: 0;
}

.jc-ref-gb-line:last-child {
    margin-bottom: 0;
}

.jc-ref-source-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid #fda4af;
    background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
    color: #be123c;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.3;
    box-shadow: 0 1px 2px rgba(190, 18, 60, 0.12);
}

.jc-ref-source-btn:hover {
    background: linear-gradient(180deg, #ffe4e6 0%, #fecdd3 100%);
    color: #9f1239;
    text-decoration: none;
}

.jc-ref-source-btn i {
    font-size: 13px;
}

.jc-ref-detail-label {
    margin: 4px 0 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--jc-text);
}

.jc-ref-cite {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

.jc-ref-cite-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.jc-ref-cite-head strong {
    font-size: 12px;
    color: #0f172a;
}

.jc-ref-cite-badge {
    font-size: 11px;
    font-weight: 650;
    color: #0f766e;
    background: #ccfbf1;
    padding: 2px 8px;
    border-radius: 6px;
}

.jc-ref-cite-badge--meta {
    color: #9a3412;
    background: #ffedd5;
}

.jc-ref-cite--empty {
    background: #fff7ed;
    border-color: #fdba74;
}

.jc-ref-cite--empty .jc-ref-cite-text {
    color: #9a3412;
}

.jc-ref-cite-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: #334155;
}

.jc-ref-card-comment {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: #475569;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.jc-ref-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 12px;
    font-weight: 600;
    vertical-align: middle;
}

@media (max-width: 1024px) {
    .jc-ref-layout {
        grid-template-columns: 1fr;
        width: 100%;
    }
}
