/* =============================================================
   生产中心 · 独立前端样式（从 ops-channel.css 提取）
   ============================================================= */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial,
                 sans-serif;
    font-size: 14px;
    color: #333;
    background: #f5f6fa;
    line-height: 1.6;
}

/* ---- Page Wrapper ---- */
.pc-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* ---- PC Card（生产中心卡片容器） ---- */
.pc-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 18px;
}

/* ---- PC Channel Tab ---- */
.pc-ch-tab {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    border-bottom: 3px solid transparent;
    color: #999;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.pc-ch-tab:hover { color: #C9741A; }
.pc-ch-tab.active {
    border-bottom-color: #F18D24;
    color: #C9741A;
}

/* ---- Page / Section Container ---- */
.ops-page {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ---- Overview Cards ---- */
.ops-overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.ops-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border-left: 4px solid #F18D24;
    transition: box-shadow 0.2s;
}
.ops-card:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}
.ops-card .card-number {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a2e;
}
.ops-card .card-label {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}
.ops-card .card-trend {
    font-size: 12px;
    margin-top: 4px;
}
.ops-card .card-trend.up { color: #22c55e; }
.ops-card .card-trend.down { color: #ef4444; }

/* ---- Filter Bar ---- */
.ops-filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.ops-filter-bar select,
.ops-filter-bar input {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}
.ops-filter-bar select:focus,
.ops-filter-bar input:focus {
    border-color: #F18D24;
    outline: none;
}

/* ---- Diagnosis Cards ---- */
.ops-diagnosis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.ops-diagnosis-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.ops-diagnosis-card .diag-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ops-diagnosis-card .diag-body {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}
.ops-diagnosis-card .diag-body strong {
    color: #1a1a2e;
}
.ops-diagnosis-card .diag-severity {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}
.diag-severity.high {
    background: #fef2f2;
    color: #dc2626;
}
.diag-severity.medium {
    background: #fff7ed;
    color: #ea580c;
}
.diag-severity.low {
    background: #f0f9ff;
    color: #2563eb;
}

/* ---- Action Table ---- */
.ops-action-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}
.ops-action-table th,
.ops-action-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}
.ops-action-table th {
    background: #f8f9fa;
    color: #555;
    font-weight: 600;
}
.ops-action-table td {
    color: #333;
}
.ops-action-table .action-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}
.action-status.pending { background: #fef3c7; color: #b45309; }
.action-status.in_progress { background: #dbeafe; color: #1d4ed8; }
.action-status.done { background: #dcfce7; color: #16a34a; }

/* ---- Buttons ---- */
.ops-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.15s;
}
.ops-btn:hover { opacity: 0.8; }
.ops-btn.primary { background: #F18D24; color: #fff; }
.ops-btn.secondary { background: #e5e7eb; color: #374151; }
.ops-btn.danger { background: #ef4444; color: #fff; }
.ops-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- Empty State ---- */
.ops-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}
.ops-empty h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #666;
}
.ops-empty p {
    font-size: 14px;
    margin: 0;
}

/* ---- Loading / Error ---- */
.ops-loading {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}
.ops-error {
    text-align: center;
    padding: 40px 20px;
    color: #ef4444;
}

/* ---- OK / Success ---- */
.ops-ok {
    color: #52c41a;
    font-size: 13px;
}

/* ---- Toolbar ---- */
.ops-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    align-items: center;
}
.ops-toolbar .ops-btn {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ---- Channel Cards ---- */
.ops-channel-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.ops-channel-card {
    background: linear-gradient(135deg, #f8f9fa, #fff);
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}
.ops-channel-card:hover {
    border-color: #F18D24;
    box-shadow: 0 2px 8px rgba(241,141,36,0.15);
}
.ops-channel-card .ch-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
}
.ops-channel-card .ch-stats {
    font-size: 12px;
    color: #888;
}
.ops-channel-card .ch-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 6px;
}
.ch-badge.active { background: #dcfce7; color: #16a34a; }
.ch-badge.inactive { background: #f3f4f6; color: #9ca3af; }

/* ---- PC Video Tab ---- */
#pc-video-tab {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    margin-bottom: 18px;
}

/* =============================================================
   V2.5 新增组件样式：能力标签 / 模板推荐 / 设置面板
   ============================================================= */

/* ---- PC Capability Tabs ---- */
.pc-cap-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.pc-cap-tab {
    flex: 1;
    min-width: 140px;
    padding: 14px 16px;
    border: 2px solid #e8ecf1;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    font-family: inherit;
}
.pc-cap-tab:hover {
    border-color: #F18D24;
    box-shadow: 0 2px 10px rgba(241,141,36,0.12);
    transform: translateY(-1px);
}
.pc-cap-tab.active {
    border-color: #F18D24;
    background: linear-gradient(135deg, #FFF7ED, #FFF3E6);
    box-shadow: 0 2px 12px rgba(241,141,36,0.18);
}
.pc-cap-tab-icon {
    display: block;
    font-size: 24px;
    margin-bottom: 4px;
}
.pc-cap-tab-label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}
.pc-cap-tab.active .pc-cap-tab-label {
    color: #C9741A;
}
.pc-cap-tab-desc {
    display: block;
    font-size: 11px;
    color: #999;
    line-height: 1.3;
}

/* ---- PC Template Recommend Cards ---- */
.pc-tpl-card {
    background: #fff;
    transition: all 0.2s ease;
}
.pc-tpl-card:hover {
    border-color: #F18D24 !important;
    box-shadow: 0 2px 8px rgba(241,141,36,0.2);
}
#pc-tpl-recommend-list::-webkit-scrollbar {
    height: 4px;
}
#pc-tpl-recommend-list::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 2px;
}
#pc-tpl-recommend-list::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 2px;
}

/* ---- PC Settings Gear Button ---- */
.pc-gear-btn {
    padding: 6px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
    color: #666;
}
.pc-gear-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
    color: #333;
}

/* ---- PC Settings Panel ---- */
.pc-settings-panel {
    animation: pcSettingsIn 0.2s ease;
}
@keyframes pcSettingsIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---- PC Settings Tabs ---- */
.pc-settings-tab {
    padding: 10px 18px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    color: #999;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
    font-family: inherit;
}
.pc-settings-tab:hover {
    color: #C9741A;
}
.pc-settings-tab.active {
    border-bottom-color: #F18D24;
    color: #C9741A;
}

/* ---- PC Settings Body ---- */
.pc-settings-body {
    min-height: 300px;
    max-height: 56vh;
    overflow-y: auto;
}

/* =============================================================
   V2.6 新增组件样式：批量生产 / 数据统计 / 一键发布 / Toast
   ============================================================= */

/* ---- Toast 通知 ---- */
@keyframes pcToastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
#pc-toast {
    pointer-events: none;
    white-space: nowrap;
    max-width: 90vw;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- 一键发布下拉 ---- */
#pc-publish-select {
    transition: all 0.2s ease;
}
#pc-publish-select:hover {
    border-color: #C9741A !important;
    box-shadow: 0 2px 8px rgba(241,141,36,0.2);
}
#pc-publish-select:focus {
    outline: none;
    border-color: #C9741A !important;
}

/* ---- 批量生产对话框 ---- */
#batch-input {
    font-family: 'Courier New', Consolas, monospace;
    line-height: 1.6;
    transition: border-color 0.2s;
}
#batch-input:focus {
    outline: none;
    border-color: #F18D24 !important;
    box-shadow: 0 0 0 2px rgba(241,141,36,0.1);
}
#batch-results {
    font-size: 12px;
}
#batch-results::-webkit-scrollbar {
    width: 4px;
}
#batch-results::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 2px;
}

/* ---- 数据统计卡片增强 ---- */
#pc-stats .ops-card {
    cursor: default;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#pc-stats .ops-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

/* =============================================================
   V3.0 4-Tab 架构样式：Header / TabBar / Bell / Footer / Analytics
   ============================================================= */

/* ---- PC Header ---- */
.pc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.pc-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pc-header-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
}
.pc-header-subtitle {
    font-size: 12px;
    color: #999;
    display: none;
}
@media (min-width: 640px) {
    .pc-header-subtitle { display: inline; }
}
.pc-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.pc-header-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #999;
    padding: 2px 10px;
    background: #f5f5f5;
    border-radius: 20px;
}
.pc-status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #52c41a;
}

/* ---- Bell Button ---- */
.pc-bell-btn {
    position: relative;
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    line-height: 1;
}
.pc-bell-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}
.pc-bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #f5222d;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(245,34,45,0.3);
}

/* ---- Tab Bar ---- */
.pc-tabbar {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid #e8ecf1;
    margin-bottom: 18px;
    background: #fff;
    border-radius: 12px 12px 0 0;
    padding: 0 4px;
    overflow-x: auto;
}
.pc-tab {
    padding: 10px 18px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #999;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    font-family: inherit;
}
.pc-tab:hover {
    color: #C9741A;
}
.pc-tab.active {
    border-bottom-color: #F18D24;
    color: #C9741A;
}

/* ---- Tab Content ---- */
.pc-tab-content {
    min-height: 400px;
}

/* ---- Footer ---- */
.pc-footer {
    text-align: center;
    padding: 24px 0 12px;
    font-size: 12px;
    color: #bbb;
    border-top: 1px solid #eee;
    margin-top: 28px;
}

/* ---- Notification Panel ---- */
#pc-notification-panel::-webkit-scrollbar {
    width: 4px;
}
#pc-notification-panel::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 2px;
}
#pc-notif-list::-webkit-scrollbar {
    width: 4px;
}
#pc-notif-list::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 2px;
}

/* ---- Analytics Tab Cards ---- */
.pc-an-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border-left: 4px solid #F18D24;
    flex: 1;
    min-width: 140px;
}
.pc-an-card .an-number {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a2e;
}
.pc-an-card .an-label {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

/* ---- PC Tab Content Overscroll ---- */
#pc-tab-content .pc-cap-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

/* =============================================================
   V3.0 发布总台样式：子Tab / 日历 / 队列 / 绩效 / 账号 / 向导
   ============================================================= */

/* ---- 发布子Tab ---- */
.pc-publish-subtab {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    color: #999;
    font-family: inherit;
    transition: color 0.15s, border-color 0.15s;
}
.pc-publish-subtab:hover {
    color: #C9741A;
}
.pc-publish-subtab.active {
    border-bottom-color: #F18D24;
    color: #C9741A;
}

/* ---- 发布日历 ---- */
.pc-cal-grid {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8ecf1;
    overflow: hidden;
}
.pc-cal-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 1px solid #e8ecf1;
}
.pc-cal-hd {
    padding: 10px 4px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #666;
}
.pc-cal-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    min-height: 280px;
}
.pc-cal-day {
    position: relative;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    border: 1px solid #f0f0f0;
    font-size: 14px;
    min-height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    transition: background 0.15s;
}
.pc-cal-day:hover {
    background: #f5f5f5;
}
.pc-cal-day.today {
    background: #FFF3E6;
    font-weight: 700;
}
.pc-cal-day.has-publish {
    font-weight: 600;
}
.pc-cal-day.selected {
    outline: 2px solid #F18D24;
    outline-offset: -2px;
    background: #FFF8F0;
}
.pc-cal-day.pc-cal-empty {
    background: #fafafa;
    cursor: default;
}
.pc-cal-num-text {
    font-size: 14px;
    color: #333;
}
.pc-cal-day.today .pc-cal-num-text {
    color: #C9741A;
}
.pc-cal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #F18D24;
    flex-shrink: 0;
}
.pc-cal-dot-multi {
    font-size: 9px;
    color: #F18D24;
    font-weight: 700;
    line-height: 1;
}

/* ---- 发布队列表格 ---- */
.pc-pub-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e8ecf1;
}
.pc-pub-table th,
.pc-pub-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}
.pc-pub-table th {
    background: #f8f9fa;
    font-weight: 700;
    color: #555;
    font-size: 12px;
}
.pc-pub-table tr:hover td {
    background: #fafafa;
}
.pc-pub-table .pq-title {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}
.pc-pub-table .pq-actions {
    white-space: nowrap;
    display: flex;
    gap: 4px;
}
.pq-act-btn {
    padding: 2px 10px !important;
    font-size: 11px !important;
}

/* ---- 状态 Badge ---- */
.pq-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}
.pq-draft { background: #f3f4f6; color: #6b7280; }
.pq-pending { background: #fef3c7; color: #b45309; }
.pq-approved { background: #dbeafe; color: #1d4ed8; }
.pq-rejected { background: #fef2f2; color: #dc2626; }
.pq-published { background: #dcfce7; color: #16a34a; }
.pq-unpub { background: #f3f4f6; color: #9ca3af; }
.pq-scheduled { background: #f3e8ff; color: #7c3aed; }
.pq-failed { background: #fef2f2; color: #dc2626; }

/* ---- 发布向导 Modal ---- */
.pc-wizard-modal {
    animation: pcSettingsIn 0.2s ease;
}
.pc-wizard-steps {
    overflow-x: auto;
}
.pc-wizard-connector {
    min-width: 12px;
    transition: background 0.3s;
}

/* ---- 素材选择卡片 ---- */
.pw-material-card {
    transition: all 0.15s ease;
}
.pw-material-card:hover {
    border-color: #F18D24 !important;
    box-shadow: 0 2px 8px rgba(241,141,36,0.15);
}
.pw-material-card.selected {
    border-color: #F18D24 !important;
    background: #FFF8F0 !important;
}

/* ---- 发布向导 Body 滚动条 ---- */
#pw-body::-webkit-scrollbar {
    width: 5px;
}
#pw-body::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}
#pw-body::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 3px;
}

/* ---- 发布日历详情滚动 ---- */
#pc-cal-detail::-webkit-scrollbar {
    width: 4px;
}
#pc-cal-detail::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 2px;
}

/* ---- 发布筛选栏 ---- */
.pc-pub-filter select:focus,
.pc-pub-filter input:focus {
    outline: none;
    border-color: #F18D24 !important;
    box-shadow: 0 0 0 2px rgba(241,141,36,0.1);
}

/* =============================================================
   V3.1 模板中心增强：收藏星标 / 卡片操作 / 筛选栏
   ============================================================= */

/* ---- 收藏星标按钮 ---- */
.pc-fav-star {
    transition: transform 0.15s ease, color 0.15s ease;
    line-height: 1;
}
.pc-fav-star:hover {
    transform: scale(1.25);
    color: #F18D24 !important;
}

/* ---- 模板网格卡片 ---- */
.pc-tpl-grid-card {
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.pc-tpl-grid-card:hover {
    border-color: #F18D24 !important;
    box-shadow: 0 2px 12px rgba(241,141,36,0.12) !important;
}

/* ---- 仅收藏按钮激活态 ---- */
#tpl-favs-only {
    transition: all 0.2s ease;
}

/* ---- 模板筛选行响应式 ---- */
#tpl-filter-row select,
#tpl-filter-row input {
    font-size: 12px;
}
#tpl-filter-row select:focus,
#tpl-filter-row input:focus {
    outline: none;
    border-color: #F18D24 !important;
    box-shadow: 0 0 0 2px rgba(241,141,36,0.1);
}

/* ---- 编辑按钮 hover ---- */
.ops-btn[data-tpl-edit]:hover {
    background: #bae7ff !important;
    border-color: #69c0ff !important;
}

/* =============================================================
   V3.1 新增：多渠道下拉 / 快速示例 / 对话气泡
   ============================================================= */

/* ---- 多渠道下拉选项 ---- */
.pc-ch-opt:hover {
    background: #FFF8F0 !important;
}
.pc-ch-opt input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* ---- 快速示例按钮 ---- */
.pc-quick-btn:hover {
    background: #FFF3E6 !important;
    border-color: #F18D24 !important;
    color: #C9741A !important;
}

/* ---- 对话气泡滚动 ---- */
#pc-chat {
    max-height: 400px;
    overflow-y: auto;
    padding: 4px 0;
}
#pc-chat::-webkit-scrollbar {
    width: 4px;
}
#pc-chat::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 2px;
}

/* ---- 多渠道触发按钮 ---- */
#pc-channel-trigger:hover {
    border-color: #F18D24 !important;
    box-shadow: 0 2px 8px rgba(241,141,36,0.12);
}

/* =============================================================
   V3.1 作品库增强样式：子标签 / 能力Badge / 批量操作 / 收藏 / 导出
   ============================================================= */

/* ---- 作品类型子标签 ---- */
.pc-works-type-tab {
    transition: all 0.2s ease;
}
.pc-works-type-tab:hover {
    border-color: #F18D24 !important;
    color: #C9741A !important;
}

/* ---- 作品卡片增强 ---- */
.works-card {
    transition: all 0.2s ease;
}
.works-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    border-color: #d0d0d0 !important;
}
.works-card .works-checkbox {
    accent-color: #F18D24;
}
.works-card .works-fav-btn:hover {
    transform: scale(1.2);
}

/* ---- 能力类型标签 ---- */
.pc-cap-badge {
    display: inline-block;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
}
.pc-cap-badge.production { background: #722ed1; }
.pc-cap-badge.upload { background: #1890ff; }
.pc-cap-badge.channel { background: #52c41a; }
.pc-cap-badge.batch { background: #fa8c16; }

/* ---- 批量操作栏 ---- */
#works-batch-bar {
    animation: pcBatchIn 0.25s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 24px;
    background: #FFF8F0;
    border-radius: 8px;
    margin: 0 0 10px;
    font-size: 13px;
}
#works-batch-bar button {
    padding: 4px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    transition: all 0.15s;
}
#works-batch-bar button:hover {
    border-color: #F18D24;
    color: #F18D24;
}
@keyframes pcBatchIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- T05: 多选选择按钮 ---- */
.works-select-btn {
    padding: 5px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    color: #555;
    transition: all 0.15s;
    white-space: nowrap;
}
.works-select-btn:hover {
    border-color: #F18D24;
    color: #F18D24;
}

/* ---- T05: 作品卡片checkbox ---- */
.works-card-checkbox {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 18px;
    height: 18px;
    display: none;
    accent-color: #F18D24;
    cursor: pointer;
    z-index: 3;
}
.works-card:hover .works-card-checkbox,
.batch-mode .works-card-checkbox {
    display: block;
}
.batch-mode .works-card {
    cursor: default;
}

/* ---- T05: 列表视图checkbox ---- */
.works-list-col-check {
    width: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}
.works-list-checkbox {
    position: static !important;
    display: block !important;
    width: 16px;
    height: 16px;
}

/* ---- 批量操作栏按钮 hover ---- */
#batch-fav:hover {
    background: #d4880f !important;
}
#batch-select-all:hover,
#batch-deselect-all:hover {
    background: #e5e7eb;
}

/* ---- 导出CSV按钮 ---- */
#wf-export:hover {
    background: #1890ff !important;
    color: #fff !important;
}

/* ---- 作品详情对话框增强 ---- */
#wd-copy-text:hover,
#wd-download-imgs:hover,
#wd-toggle-fav:hover {
    opacity: 0.85;
}

/* ---- 作品库响应式 ---- */
@media (max-width: 600px) {
    .pc-works-type-tabs {
        gap: 4px;
    }
    .pc-works-type-tab {
        padding: 5px 10px !important;
        font-size: 12px !important;
    }
    #works-filter {
        flex-direction: column;
    }
    #works-batch-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =============================================================
   V4 Phase 1 — 全局壳 / 菜单 / 工作台 样式
   ============================================================= */

/* ---- Shell 顶栏 V4：200px 导航 ---- */
.shell-topbar {
    height: 200px;
    background: linear-gradient(to right, #1a1a2e, #2C2C2A);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
/* ---- 导航容器 ---- */
.shell-nav {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}
/* ---- 顶部：Logo + 品牌 ---- */
.shell-nav-top {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 0 32px;
    min-height: 0;
}
.shell-nav-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.shell-nav-logo {
    font-size: 40px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.shell-nav-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.shell-nav-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
}
.shell-nav-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.5px;
}
/* ---- 底部：7 个导航菜单项 ---- */
.shell-nav-bottom {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 0 24px 0;
    height: 56px;
}
.shell-nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 10px 10px 0 0;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
}
.shell-nav-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}
.shell-nav-item.active {
    color: #F18D24;
    background: rgba(255,255,255,0.12);
}
.shell-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 3px;
    background: #F18D24;
    border-radius: 3px 3px 0 0;
}
.shell-nav-item-icon {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}
.shell-nav-item-label {
    line-height: 1;
}

/* ---- 保留旧 shell-btn 兼容其他引用 ---- */
.shell-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.shell-topbar-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}
.shell-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.shell-btn {
    padding: 5px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    color: #555;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.shell-btn:hover {
    background: #f8f9fa;
    border-color: #ccc;
}
.shell-btn-back {
    font-weight: 600;
}
.shell-btn-primary {
    background: #F18D24;
    color: #fff;
    border-color: #F18D24;
}
.shell-btn-primary:hover {
    background: #d97a1a;
    border-color: #d97a1a;
}
.shell-sep {
    color: #ddd;
    font-size: 12px;
}
.shell-version {
    font-size: 11px;
    color: #bbb;
    font-weight: 500;
}
.shell-pages {
    min-height: calc(100vh - 200px - 40px);
}
.shell-pages:last-child {
    min-height: calc(100vh - 200px);
}
.pc-shell-page {
    animation: pcPageIn 0.15s ease;
}
@keyframes pcPageIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.pc-shell-page-header {
    padding: 20px 24px 8px;
}
.pc-shell-page-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1a1a2e;
}
.pc-shell-page-header p {
    margin: 4px 0 0;
    font-size: 13px;
}

/* ---- Shell 底栏（工作台 Tab） ---- */
.shell-bottombar {
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 8px;
    background: #f0f1f5;
    border-top: 1px solid #e0e0e0;
    position: sticky;
    bottom: 0;
    z-index: 1000;
}
.shell-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    flex: 1;
}
.shell-tab {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: #e4e5ea;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    transition: all 0.15s;
    white-space: nowrap;
    max-width: 180px;
}
.shell-tab:hover {
    background: #dcdde3;
    color: #333;
}
.shell-tab.active {
    background: #fff;
    color: #C9741A;
    font-weight: 600;
    border-bottom: 2px solid #F18D24;
}
.shell-tab-icon {
    font-size: 14px;
    flex-shrink: 0;
}
.shell-tab-label {
    overflow: hidden;
    text-overflow: ellipsis;
}
.shell-tab-dirty {
    font-size: 8px;
    color: #F18D24;
    flex-shrink: 0;
}
.shell-tab-close {
    font-size: 14px;
    color: #aaa;
    margin-left: 2px;
    flex-shrink: 0;
    line-height: 1;
    padding: 0 2px;
    border-radius: 2px;
}
.shell-tab-close:hover {
    color: #e55;
    background: rgba(0,0,0,0.06);
}

/* ---- 菜单页 ---- */
.menu-header {
    padding: 32px 24px 20px;
    text-align: center;
}
.menu-title {
    margin: 0;
    font-size: 28px;
    color: #1a1a2e;
    font-weight: 800;
}
.menu-subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    color: #999;
}
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    padding: 0 24px 24px;
    max-width: 1100px;
    margin: 0 auto;
}
.menu-card {
    position: relative;
    padding: 24px 20px 20px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e8ecf1;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}
.menu-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 4px;
    background: var(--card-color, #F18D24);
    border-radius: 14px 14px 0 0;
}
.menu-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-color: var(--card-color, #F18D24);
}
.menu-card-icon {
    font-size: 36px;
    margin-bottom: 10px;
}
.menu-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
}
.menu-card-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.5;
}
.menu-card-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #ddd;
    transition: color 0.2s;
}
.menu-card:hover .menu-card-arrow {
    color: var(--card-color, #F18D24);
}
.menu-card-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.menu-card-disabled:hover {
    transform: none;
    box-shadow: none;
}
.menu-card-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 10px;
    background: #f0f0f0;
    color: #999;
    font-size: 11px;
    border-radius: 10px;
}
/* 最近使用 */
.menu-recent {
    padding: 0 24px 20px;
    max-width: 1100px;
    margin: 0 auto;
}
.menu-recent-title {
    font-size: 14px;
    color: #666;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}
.menu-recent-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.menu-recent-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 13px;
}
.menu-recent-item:hover {
    border-color: #F18D24;
    background: #FFF8F0;
}
.menu-recent-icon { font-size: 16px; }
.menu-recent-label {
    color: #333;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.menu-recent-time {
    font-size: 11px;
    color: #bbb;
}
/* 快捷入口 */
.menu-quick-links {
    padding: 0 24px 24px;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}
.menu-quick-links a {
    color: #F18D24;
    text-decoration: none;
    font-size: 13px;
}
.menu-quick-links a:hover {
    text-decoration: underline;
}

/* ---- 工作台三栏布局 ---- */
.workspace-layout {
    display: flex;
    height: calc(100vh - 40px); /* V5: 72px sidebar + 40px bottombar, no topbar */
    overflow: hidden;
}
.workspace-panel-left {
    width: 240px;
    min-width: 180px;
    background: #fafbfc;
    border-right: 1px solid #e8ecf1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}
.workspace-canvas-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #e8ecf1;
    overflow: hidden;
}
.workspace-panel-right {
    width: 260px;
    min-width: 220px;
    background: #fafbfc;
    border-left: 1px solid #e8ecf1;
    overflow-y: auto;
    flex-shrink: 0;
    padding: 12px;
}

/* ---- 面板区域 ---- */
.panel-section {
    border-bottom: 1px solid #e8ecf1;
}
.panel-section-header {
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0f1f5;
    border-bottom: 1px solid #e0e0e0;
}
.add-el-btn {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    transition: all 0.15s;
}
.add-el-btn:hover {
    background: #FFF3E6;
    border-color: #F18D24;
    color: #C9741A;
}

/* ---- 图层列表 ---- */
.layer-panel-list {
    max-height: 300px;
    overflow-y: auto;
}
.layer-item {
    transition: background 0.1s;
}
.layer-item:hover {
    background: #f5f5f5;
}
.layer-item.active {
    background: #FFF3E0 !important;
    font-weight: 600;
}
.layer-panel-list::-webkit-scrollbar {
    width: 4px;
}
.layer-panel-list::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 2px;
}

/* ---- 缩放控制条 ---- */
.canvas-zoom-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}
.zoom-btn {
    padding: 3px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    color: #555;
    transition: all 0.15s;
}
.zoom-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}
.zoom-label {
    font-size: 12px;
    color: #666;
    min-width: 40px;
    text-align: center;
    font-weight: 600;
}

/* ---- 画布视口 ---- */
.canvas-viewport {
    flex: 1;
    overflow: auto;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #d5d7df;
}
.canvas-viewport::-webkit-scrollbar {
    width: 6px; height: 6px;
}
.canvas-viewport::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 3px;
}
.canvas-viewport::-webkit-scrollbar-track {
    background: #e8e8e8;
}

/* ---- 画布元素 ---- */
.canvas-element {
    transition: box-shadow 0.1s;
    box-sizing: border-box;
}
.canvas-element:hover {
    outline: 1px solid rgba(241,141,36,0.3);
    outline-offset: -1px;
}
.canvas-element.selected {
    outline: 1px solid rgba(241,141,36,0.5);
    outline-offset: -1px;
}

/* ---- 选中覆盖层 ---- */
.selection-overlay {
    pointer-events: none;
    box-sizing: border-box;
}

/* ---- 缩放手柄 ---- */
.resize-handle {
    transition: transform 0.1s;
    box-sizing: border-box;
}
.resize-handle:hover {
    transform: scale(1.3);
}

/* ---- 属性面板 ---- */
.property-panel-section {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.property-panel-section:last-child {
    border-bottom: none;
}
.panel-empty {
    animation: pcFadeIn 0.2s ease;
}
@keyframes pcFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.prop-val-tag {
    font-size: 11px;
    color: #999;
    background: #f5f5f5;
    padding: 1px 6px;
    border-radius: 3px;
}

/* ---- 右侧面板滚动条 ---- */
.workspace-panel-right::-webkit-scrollbar {
    width: 4px;
}
.workspace-panel-right::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 2px;
}

/* ---- 左侧面板滚动条 ---- */
.workspace-panel-left::-webkit-scrollbar {
    width: 4px;
}
.workspace-panel-left::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 2px;
}

/* =============================================================
   V4 Phase 2 — 素材面板 / 拖拽Ghost / 右键菜单 样式
   ============================================================= */

/* ---- 素材面板 Tab 栏 ---- */
.material-panel-tabs {
    display: flex;
    gap: 0;
    background: #f0f1f5;
    border-bottom: 1px solid #e0e0e0;
}
.material-panel-tab {
    flex: 1;
    padding: 8px 4px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    user-select: none;
}
.material-panel-tab:hover {
    color: #C9741A;
}
.material-panel-tab.active {
    color: #C9741A;
    border-bottom-color: #F18D24;
    background: #fff;
}

/* ---- 素材搜索栏 ---- */
.material-search-bar {
    padding: 8px;
}
.material-search-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
    background: #fff;
    outline: none;
    transition: border-color 0.15s;
}
.material-search-input:focus {
    border-color: #F18D24;
    box-shadow: 0 0 0 2px rgba(241,141,36,0.1);
}
.material-search-input::placeholder {
    color: #ccc;
}

/* ---- 素材网格 ---- */
.material-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 0 8px 8px;
}

/* ---- 素材项 ---- */
.material-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 60px;
    height: 60px;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 8px;
    cursor: grab;
    transition: all 0.15s ease;
    user-select: none;
}
.material-item:hover {
    border-color: #F18D24;
    box-shadow: 0 2px 8px rgba(241,141,36,0.15);
    transform: translateY(-1px);
}
.material-item:active {
    cursor: grabbing;
    transform: scale(0.95);
}
.material-item-icon {
    font-size: 18px;
    line-height: 1;
}
.material-item-label {
    font-size: 9px;
    color: #888;
    text-align: center;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 56px;
}
.material-empty {
    grid-column: 1 / -1;
    padding: 20px;
    text-align: center;
    color: #ccc;
    font-size: 12px;
}

/* ---- 拖拽幽灵 ---- */
.drag-ghost {
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: #fff;
    border: 2px dashed #F18D24;
    border-radius: 10px;
    opacity: 0.85;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    pointer-events: none;
    user-select: none;
}

/* ---- 右键菜单 ---- */
.context-menu {
    min-width: 140px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    padding: 4px 0;
    animation: contextMenuIn 0.12s ease;
    user-select: none;
}
@keyframes contextMenuIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}
.context-menu-item {
    padding: 7px 16px;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    transition: background 0.1s;
    white-space: nowrap;
}
.context-menu-item:hover {
    background: #FFF3E6;
    color: #C9741A;
}
.context-menu-danger {
    color: #e55;
}
.context-menu-danger:hover {
    background: #fef2f2;
    color: #dc2626;
}
.context-menu-sep {
    height: 1px;
    margin: 4px 8px;
    background: #f0f0f0;
}

/* ---- V4 响应式 ---- */
@media (max-width: 900px) {
    .workspace-layout {
        flex-direction: column;
    }
    .workspace-panel-left {
        width: 100%;
        max-height: 180px;
        border-right: none;
        border-bottom: 1px solid #e8ecf1;
    }
    .workspace-panel-right {
        width: 100%;
        max-height: 200px;
        border-left: none;
        border-top: 1px solid #e8ecf1;
    }
    .workspace-canvas-area {
        min-height: 300px;
    }
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
        padding: 0 12px 16px;
    }
    .menu-card {
        padding: 16px 14px;
    }
    .menu-card-icon {
        font-size: 28px;
    }
    .menu-card-title {
        font-size: 15px;
    }
}

/* =============================================================
   V4 Phase 2 — 一条龙 AI 生产页 (Dragon Page) 样式
   ============================================================= */

/* ---- Dragon 页面容器 ---- */
.dragon-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 32px 20px 40px;
}

/* ---- Dragon 生产卡片 ---- */
.dragon-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #e8ecf1;
    transition: box-shadow 0.2s;
}
.dragon-card:hover {
    box-shadow: 0 6px 30px rgba(0,0,0,0.12);
}
.dragon-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px 18px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #fafbfc, #fff);
}
.dragon-card-icon {
    font-size: 40px;
    line-height: 1;
    flex-shrink: 0;
}
.dragon-card-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
}
.dragon-card-desc {
    margin: 4px 0 0;
    font-size: 13px;
    color: #999;
}
.dragon-card-body {
    padding: 24px 28px 28px;
}

/* ---- Dragon 表单项 ---- */
.dragon-form-group {
    margin-bottom: 20px;
}
.dragon-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}
.dragon-input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: #fafbfc;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.dragon-input:focus {
    outline: none;
    border-color: #F18D24;
    box-shadow: 0 0 0 3px rgba(241,141,36,0.1);
    background: #fff;
}
.dragon-input::placeholder {
    color: #bbb;
}
.dragon-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* ---- Dragon 按钮行 ---- */
.dragon-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-top: 4px;
}
.dragon-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
}
.dragon-btn-primary {
    background: linear-gradient(135deg, #F18D24, #e07d1a);
    color: #fff;
    box-shadow: 0 2px 8px rgba(241,141,36,0.3);
}
.dragon-btn-primary:hover {
    background: linear-gradient(135deg, #e07d1a, #c96d12);
    box-shadow: 0 4px 14px rgba(241,141,36,0.4);
    transform: translateY(-1px);
}
.dragon-btn-primary:active {
    transform: translateY(0);
}
.dragon-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.dragon-btn-reset {
    background: #f3f4f6;
    color: #666;
}
.dragon-btn-reset:hover {
    background: #e5e7eb;
    color: #333;
}

/* ---- Dragon AI 结果区 ---- */
.dragon-output-section {
    margin-top: 28px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    border: 1px solid #e8ecf1;
    overflow: hidden;
}
.dragon-output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafbfc;
}
.dragon-output-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}
.dragon-output-count {
    font-size: 12px;
    color: #999;
    background: #f0f0f0;
    padding: 2px 10px;
    border-radius: 10px;
}
.dragon-ai-output {
    padding: 16px 28px 24px;
    max-height: 500px;
    overflow-y: auto;
}
.dragon-ai-output::-webkit-scrollbar {
    width: 5px;
}
.dragon-ai-output::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 3px;
}

/* ---- Dragon 结果项 ---- */
.dragon-result-item {
    padding: 16px 0;
    border-bottom: 1px solid #f5f5f5;
}
.dragon-result-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.dragon-result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.dragon-result-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #F18D24, #e07d1a);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}
.dragon-result-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
}
.dragon-result-body {
    padding-left: 36px;
}
.dragon-result-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 8px;
    white-space: pre-wrap;
}
.dragon-result-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #F18D24;
    text-decoration: none;
    font-weight: 600;
    padding: 4px 12px;
    border: 1px solid #F18D24;
    border-radius: 6px;
    transition: all 0.15s;
}
.dragon-result-link:hover {
    background: #FFF8F0;
    color: #c9741a;
    border-color: #c9741a;
}

/* ---- Dragon 空/错误状态 ---- */
.dragon-result-empty,
.dragon-result-error {
    text-align: center;
    padding: 32px 20px;
    color: #999;
}
.dragon-result-empty p,
.dragon-result-error p {
    margin: 8px 0 0;
    font-size: 14px;
}
.dragon-result-error {
    color: #ef4444;
}

/* ---- Dragon 页响应式 ---- */
@media (max-width: 640px) {
    .dragon-page {
        padding: 16px 12px 24px;
    }
    .dragon-card-header {
        padding: 18px 16px 14px;
    }
    .dragon-card-body {
        padding: 18px 16px 20px;
    }
    .dragon-card-icon {
        font-size: 30px;
    }
    .dragon-card-title {
        font-size: 17px;
    }
    .dragon-form-actions {
        flex-direction: column;
    }
    .dragon-btn {
        width: 100%;
        justify-content: center;
    }
    .dragon-ai-output {
        padding: 12px 16px 18px;
    }
}

/* =================================================================
   批量生产页（文案 / 图片 / 视频）样式  [V4]
   设计语言对齐 .dragon-*，保证视觉一致、不再"简陋"
   ================================================================= */
.batch-page {
    max-width: 880px;
    margin: 0 auto;
    padding: 32px 20px 40px;
}

/* ---- 页头 ---- */
.batch-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}
.batch-header-icon {
    font-size: 40px;
    line-height: 1;
    flex-shrink: 0;
}
.batch-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
}
.batch-desc {
    margin: 4px 0 0;
    font-size: 13px;
    color: #999;
    line-height: 1.5;
}

/* ---- 表单卡片 ---- */
.batch-form-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    border: 1px solid #e8ecf1;
    padding: 24px 28px 28px;
    overflow: hidden;
}
.batch-form-group {
    margin-bottom: 20px;
}
.batch-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}
.batch-input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: #fafbfc;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.batch-input:focus {
    outline: none;
    border-color: #F18D24;
    box-shadow: 0 0 0 3px rgba(241,141,36,0.1);
    background: #fff;
}
.batch-input::placeholder {
    color: #bbb;
}
.batch-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* ---- 渠道选择网格 ---- */
.batch-channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.batch-channel-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    border: 1.5px solid #e8ecf1;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.18s ease;
    position: relative;
}
.batch-channel-card:hover {
    border-color: #f0c89a;
    background: #fffdf9;
}
.batch-channel-card:has(.batch-channel-check:checked) {
    border-color: #F18D24;
    background: #FFF8F0;
    box-shadow: 0 2px 10px rgba(241,141,36,0.12);
}
.batch-channel-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 16px;
    height: 16px;
    accent-color: #F18D24;
    cursor: pointer;
}
.batch-channel-icon {
    font-size: 24px;
    line-height: 1;
}
.batch-channel-label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}
.batch-channel-desc {
    font-size: 12px;
    color: #999;
    line-height: 1.4;
}

/* ---- 按钮行 ---- */
.batch-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-top: 4px;
}
.batch-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
}
.batch-btn-primary {
    background: linear-gradient(135deg, #F18D24, #e07d1a);
    color: #fff;
    box-shadow: 0 2px 8px rgba(241,141,36,0.3);
}
.batch-btn-primary:hover {
    background: linear-gradient(135deg, #e07d1a, #c96d12);
    box-shadow: 0 4px 14px rgba(241,141,36,0.4);
    transform: translateY(-1px);
}
.batch-btn-primary:active {
    transform: translateY(0);
}
.batch-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.batch-btn-reset {
    background: #f3f4f6;
    color: #666;
}
.batch-btn-reset:hover {
    background: #e5e7eb;
    color: #333;
}

/* ---- 产出结果区 ---- */
.batch-output-section {
    margin-top: 28px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    border: 1px solid #e8ecf1;
    overflow: hidden;
}
.batch-output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafbfc;
}
.batch-output-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}
.batch-progress {
    font-size: 12px;
    color: #999;
    background: #f0f0f0;
    padding: 2px 10px;
    border-radius: 10px;
}
.batch-results {
    padding: 16px 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---- 结果卡片 ---- */
.batch-result-card {
    border: 1px solid #eef0f3;
    border-radius: 12px;
    padding: 14px 16px;
    background: #fff;
}
.batch-result-card.ok {
    border-left: 3px solid #22c55e;
}
.batch-result-card.fail {
    border-left: 3px solid #ef4444;
    background: #fef7f7;
}
.batch-result-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.batch-result-icon {
    font-size: 18px;
}
.batch-result-channel {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.batch-result-status {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
}
.batch-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 4px 0;
}
.batch-result-error {
    font-size: 12px;
    color: #ef4444;
}
.batch-result-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.batch-result-thumb,
.batch-result-img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
}

/* ---- 物料包卡片 ---- */
.batch-package-card {
    border: 1px solid #F18D24;
    background: #FFF8F0;
    border-radius: 12px;
    padding: 14px 16px;
}
.batch-package-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #c9741a;
}
.batch-package-body {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

/* ---- 加载态 ---- */
.batch-loading {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ---- 侧栏工具按钮（通知 / 设置） ---- */
.shell-nav-tools {
    margin-top: auto;
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.shell-bell-btn,
.shell-gear-btn {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.18s ease;
    color: #fff;
}
.shell-bell-btn:hover,
.shell-gear-btn:hover {
    background: rgba(241,141,36,0.18);
    border-color: #F18D24;
}
.shell-bell-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ---- 批量页响应式 ---- */
@media (max-width: 640px) {
    .batch-page {
        padding: 16px 12px 24px;
    }
    .batch-form-card {
        padding: 18px 16px 20px;
    }
    .batch-header {
        gap: 12px;
    }
    .batch-header-icon {
        font-size: 30px;
    }
    .batch-title {
        font-size: 18px;
    }
    .batch-form-actions {
        flex-direction: column;
    }
    .batch-btn {
        width: 100%;
        justify-content: center;
    }
    .batch-results {
        padding: 12px 16px 18px;
    }
}

/* =============================================================
   V5 左侧竖排导航 + 创作页 + 工作台顶部操作栏
   ============================================================= */

/* ---- V5 Flex 布局 ---- */
.shell-layout {
    display: flex;
    height: 100vh;
}

/* ---- V5 左侧竖排导航 ---- */
.shell-sidebar {
    width: 72px;
    background: #2c3e50;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 12px;
    flex-shrink: 0;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
}

.shell-sidebar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    width: 100%;
    cursor: pointer;
    color: rgba(255,255,255,0.6);
    font-size: 11px;
    transition: all .15s;
    border: none;
    background: none;
    font-family: inherit;
}

.shell-sidebar-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.shell-sidebar-item.active {
    color: #F18D24;
    background: rgba(241,141,36,0.15);
}

.shell-sidebar-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

/* ---- V5 右侧内容区 ---- */
.shell-content {
    margin-left: 72px;
    flex: 1;
    overflow-y: auto;
}

/* ---- V5 shell-pages 高度适配 ---- */
.shell-pages {
    min-height: calc(100vh - 40px);
}

/* ---- 创作页 V5 ---- */
.create-page {
    padding: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.create-input-area {
    margin-bottom: 24px;
}

.create-goal-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    outline: none;
    transition: border-color .2s;
    resize: none;
    font-family: inherit;
    box-sizing: border-box;
}

.create-goal-input:focus {
    border-color: #F18D24;
}

/* ===== V7: 创作页渠道选择器（下拉菜单版） ===== */
.create-channel-select {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.create-channel-label {
  font-size: 13px;
  color: #666;
  font-weight: 500;
  white-space: nowrap;
}

.create-channel-dropdown {
  flex: 1;
  max-width: 280px;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  cursor: pointer;
  outline: none;
  transition: border-color .2s;
}
.create-channel-dropdown:focus {
  border-color: #F18D24;
}

.create-size-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.create-size-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.create-size-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
}
.create-size-label input[type="checkbox"] {
  accent-color: #F18D24;
}

.create-generate-btn {
    padding: 12px 32px;
    background: #F18D24;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
}

.create-generate-btn:hover {
    background: #d97a1a;
}

.create-generate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ---- AI 结果卡片 ---- */
.create-result-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
}

.create-result-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.create-result-body {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 16px;
}

.create-result-img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 16px;
}

.create-result-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.create-btn-secondary {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    transition: all .15s;
    font-family: inherit;
}

.create-btn-secondary:hover {
    background: #f5f5f5;
}

.create-btn-primary {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: #F18D24;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
}

.create-btn-primary:hover {
    background: #d97a1a;
}

/* ---- 工作台顶部操作栏 ---- */
.workspace-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
}

.workspace-topbar-title {
    font-size: 14px;
    font-weight: 600;
    margin-right: auto;
}

/* ---- V5 工作台高度适配（减去左侧导航） ---- */
.workspace-layout {
    height: calc(100vh - 72px - 40px);
}

/* =============================================================
   V6: 创作页类型选择器
   ============================================================= */
.create-type-section {
  margin-bottom: 20px;
}
.create-type-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
  font-weight: 500;
}
.create-type-tabs {
  display: flex;
  gap: 0;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}
.create-type-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: #fafafa;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  transition: all .15s;
  border-right: 1px solid #e0e0e0;
}
.create-type-tab:last-child {
  border-right: none;
}
.create-type-tab:hover {
  background: #f0f0f0;
}
.create-type-tab.active {
  background: #fff;
  color: #F18D24;
  font-weight: 600;
  box-shadow: inset 0 -2px 0 #F18D24;
}

/* ===== V6: 自建渠道 ===== */
.create-custom-channel-section {
  margin-bottom: 20px;
}
.create-custom-channel-add {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
.create-custom-input {
  flex: 1;
  padding: 6px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
  max-width: 300px;
}
.create-custom-input:focus {
  border-color: #F18D24;
}
.create-custom-channels {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.create-custom-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: #f5f5f5;
  border: 1px dashed #d9d9d9;
  border-radius: 14px;
  font-size: 12px;
  color: #555;
}
.create-custom-chip-del {
  margin-left: 4px;
  cursor: pointer;
  color: #999;
  font-size: 14px;
  line-height: 1;
}
.create-custom-chip-del:hover {
  color: #f00;
}

/* ===== V6: 结果卡片类型徽标 ===== */
.create-result-type-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
  background: #FFF3E6;
  color: #F18D24;
}
.create-result-html-preview {
  margin-top: 12px;
}
.create-result-html-preview summary {
  cursor: pointer;
  font-size: 13px;
  color: #1890ff;
  font-weight: 500;
}

/* ===== 作品库页面布局（修复排版） ===== */
.works-page {
  padding: 0;
  max-width: 100%;
}
.works-header {
  padding: 24px 24px 0;
}
.works-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #1a1a1a;
}
.works-subtitle {
  font-size: 13px;
  color: #888;
  margin: 0 0 20px;
}
.works-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 16px;
}
.works-search {
  flex: 1;
  min-width: 200px;
}
.works-search-input {
  width: 100%;
  padding: 8px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
  transition: border-color .2s;
}
.works-search-input:focus {
  border-color: #F18D24;
}
.works-filters {
  display: flex;
  gap: 8px;
}
.works-select {
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  background: #fff;
  cursor: pointer;
  color: #333;
}
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 0 24px 24px;
}
.works-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .2s, border-color .2s;
}
.works-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border-color: #d0d0d0;
}
.works-card-cover {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.works-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.works-card-cover-empty {
  color: #ccc;
  font-size: 32px;
}
.works-card-body {
  padding: 12px 14px;
}
.works-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.works-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #999;
  align-items: center;
}
.works-card-type,
.works-card-source {
  padding: 1px 8px;
  border-radius: 4px;
  background: #f0f0f0;
  color: #666;
}
.works-card-date {
  color: #bbb;
  margin-left: auto;
}
.works-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: #999;
  font-size: 14px;
}
.works-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: #999;
}
.works-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 24px 32px;
  flex-wrap: wrap;
}
.works-page-info {
  font-size: 12px;
  color: #999;
  margin-right: 12px;
}
.works-page-btn {
  padding: 6px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  transition: all .15s;
}
.works-page-btn:hover {
  border-color: #F18D24;
  color: #F18D24;
}
.works-page-btn.active {
  background: #F18D24;
  color: #fff;
  border-color: #F18D24;
}
.pro-advanced-panel { display: none; }

/* =============================================================
   V7: 工作台AI助手对话面板
   ============================================================= */

/* ---- AI 面板容器 ---- */
.ws-ai-panel {
  border-top: 1px solid #e8ecf1;
  margin-top: 12px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

/* ---- AI 面板头部（可点击折叠） ---- */
.ws-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: linear-gradient(135deg, #FFF7ED, #FFF3E6);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #C9741A;
  user-select: none;
  transition: background 0.15s;
}
.ws-ai-header:hover {
  background: linear-gradient(135deg, #FFEDD5, #FFE4CC);
}
.ws-ai-arrow {
  font-size: 11px;
  transition: transform 0.2s;
}

/* ---- AI 面板消息区 ---- */
.ws-ai-body {
  max-height: 300px;
  display: flex;
  flex-direction: column;
}
.ws-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  max-height: 220px;
  min-height: 80px;
  background: #fafbfc;
}
.ws-ai-messages::-webkit-scrollbar {
  width: 4px;
}
.ws-ai-messages::-webkit-scrollbar-thumb {
  background: #d9d9d9;
  border-radius: 2px;
}

/* ---- AI 消息气泡 ---- */
.ws-ai-msg {
  padding: 6px 10px;
  margin-bottom: 6px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
  animation: pcFadeIn 0.2s ease;
}
.ws-ai-msg-system {
  background: #fff;
  border: 1px solid #f0f0f0;
  color: #555;
}
.ws-ai-msg-user {
  background: #FFF3E6;
  border: 1px solid #FFE4CC;
  color: #333;
  font-weight: 500;
}

/* ---- AI 输入行 ---- */
.ws-ai-input-row {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid #f0f0f0;
  background: #fff;
}
.ws-ai-input {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.ws-ai-input:focus {
  border-color: #F18D24;
  box-shadow: 0 0 0 2px rgba(241,141,36,0.1);
}
.ws-ai-input::placeholder {
  color: #ccc;
}
.ws-ai-input:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}
.ws-ai-send {
  padding: 7px 14px;
  border: none;
  border-radius: 6px;
  background: #F18D24;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.ws-ai-send:hover {
  background: #d97a1a;
}
.ws-ai-send:active {
  background: #c96d12;
}

/* =============================================================
   作品库改造: 左侧文件夹树 + 星标 + 引擎标记
   ============================================================= */

/* ---- 作品页新布局（左树 + 中内容） ---- */
.works-layout {
  display: flex;
  gap: 0;
  min-height: 100%;
  flex: 1;
}

/* ---- 左侧文件夹树 ---- */
.works-sidebar {
  width: 220px;
  min-width: 220px;
  background: #f8f9fa;
  border-right: 1px solid #e8ecf1;
  padding: 12px 0;
  overflow-y: auto;
  user-select: none;
}

.ws-sidebar-title {
  font-size: 12px;
  font-weight: 700;
  color: #888;
  padding: 8px 16px 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ws-folder-list {
  display: flex;
  flex-direction: column;
}

.ws-folder-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  transition: background 0.12s;
  border-left: 3px solid transparent;
}

.ws-folder-item:hover {
  background: #eef0f4;
}

.ws-folder-item.active {
  background: #FFF3E6;
  border-left-color: #F18D24;
  color: #C9741A;
  font-weight: 600;
}

.ws-folder-item .ws-folder-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.ws-folder-item .ws-folder-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-folder-item .ws-folder-count {
  font-size: 11px;
  color: #aaa;
  margin-left: auto;
  padding-left: 4px;
}

.ws-folder-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 6px 16px;
}

.ws-folder-add {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 13px;
  color: #F18D24;
  transition: background 0.12s;
  font-weight: 500;
}

.ws-folder-add:hover {
  background: #FFF3E6;
}

/* ---- 右侧作品内容区 ---- */
.works-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ---- 面包屑 ---- */
.works-breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 24px 0;
  font-size: 13px;
  color: #888;
}

.works-breadcrumb a {
  color: #888;
  text-decoration: none;
  cursor: pointer;
}

.works-breadcrumb a:hover {
  color: #F18D24;
}

.works-breadcrumb .sep {
  color: #ccc;
  margin: 0 2px;
}

.works-breadcrumb .current {
  color: #333;
  font-weight: 600;
}

/* ---- 星标按钮（卡片右上角） ---- */
.works-card-top-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
  z-index: 2;
}

.works-fav-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  opacity: 0.4;
}

@media (hover: hover) {
  .works-card:hover .works-fav-btn { opacity: 1; }
}
@media (hover: none) {
  .works-fav-btn { opacity: 0.6; }
}

.works-fav-btn.active {
  opacity: 1;
  background: #FFF3E6;
}

.works-fav-btn:hover {
  transform: scale(1.15);
  background: #FFE4CC;
}

/* ---- 引擎标记 ---- */
.works-engine-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.4;
  white-space: nowrap;
}

.works-engine-badge.tongyi {
  background: #EBF5FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}

.works-engine-badge.html {
  background: #F0FFF4;
  color: #16A34A;
  border: 1px solid #BBF7D0;
}

.works-engine-badge.manual {
  background: #F5F5F5;
  color: #666;
  border: 1px solid #E5E5E5;
}

/* ---- 卡片容器相对定位（供星标/引擎标记绝对定位） ---- */
.works-card {
  position: relative;
}

/* ---- 新建文件夹对话框 ---- */
.ws-folder-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ws-folder-dialog {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 360px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.ws-folder-dialog h3 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}

.ws-folder-dialog input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 16px;
}

.ws-folder-dialog input:focus {
  border-color: #F18D24;
}

.ws-folder-dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.ws-folder-dialog-actions button {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.ws-folder-dialog-actions .btn-cancel {
  background: #f0f0f0;
  color: #666;
}

.ws-folder-dialog-actions .btn-confirm {
  background: #F18D24;
  color: #fff;
}

.ws-folder-dialog-actions .btn-cancel:hover {
  background: #e0e0e0;
}

.ws-folder-dialog-actions .btn-confirm:hover {
  background: #d97a1a;
}

/* =============================================================
   V8 Phase 2 — 作品库详情侧边栏 + 右键菜单 + 双视图切换
   ============================================================= */

/* ---- T03: 详情侧边栏 ---- */
.works-detail-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
  z-index: 1000;
  transition: right .3s ease;
  display: flex;
  flex-direction: column;
}
.works-detail-panel.open { right: 0; }
.works-detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
  z-index: 999;
  display: none;
}
.works-detail-overlay.show { display: block; }
.works-detail-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.works-detail-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 85%;
}
.works-detail-close {
  width: 28px;
  height: 28px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 28px;
  text-align: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.works-detail-close:hover {
  background: #e0e0e0;
}
.works-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.works-detail-body::-webkit-scrollbar {
  width: 4px;
}
.works-detail-body::-webkit-scrollbar-thumb {
  background: #d9d9d9;
  border-radius: 2px;
}
.works-detail-actions {
  padding: 12px 20px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.works-detail-actions .create-btn-primary,
.works-detail-actions .create-btn-secondary {
  font-size: 12px !important;
  padding: 7px 14px !important;
}
/* 详情面板标签 */
.works-detail-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 12px;
  color: #555;
  background: #f0f0f0;
  margin-right: 8px;
  margin-bottom: 4px;
}
.works-detail-tag.source {
  background: #FFF3E6;
  color: #F18D24;
}
.works-detail-tag.date {
  color: #999;
  background: #f5f5f5;
}

/* ---- T04: 右键菜单 ---- */
.works-context-menu {
  position: fixed;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  padding: 4px 0;
  z-index: 1001;
  min-width: 160px;
  animation: contextMenuIn 0.12s ease;
}
.works-context-item {
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.1s;
  color: #333;
}
.works-context-item:hover {
  background: #FFF8F0;
  color: #F18D24;
}
.works-context-item.danger {
  color: #e74c3c;
}
.works-context-item.danger:hover {
  background: #fef2f2;
  color: #dc2626;
}
.works-context-sep {
  height: 1px;
  margin: 4px 8px;
  background: #f0f0f0;
}

/* ---- T04: 视图切换按钮 ---- */
.works-view-toggle {
  display: flex;
  gap: 2px;
  background: #f0f0f0;
  border-radius: 6px;
  padding: 2px;
  flex-shrink: 0;
}
.works-view-btn {
  padding: 5px 10px;
  border: none;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  color: #888;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.works-view-btn:hover {
  color: #555;
}
.works-view-btn.active {
  background: #fff;
  color: #F18D24;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ---- T04: 列表视图 ---- */
.works-list-view {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 24px 24px;
}
.works-list-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.1s;
}
.works-list-item:hover {
  background: #fafafa;
}
.works-list-item:first-child {
  border-top: 1px solid #f0f0f0;
}
.works-list-col {
  padding: 0 8px;
  font-size: 13px;
}
.works-list-col-title {
  flex: 2;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #333;
}
.works-list-col-channel {
  width: 80px;
  color: #888;
  flex-shrink: 0;
}
.works-list-col-date {
  width: 100px;
  color: #999;
  font-size: 12px;
  flex-shrink: 0;
}
.works-list-col-type {
  width: 60px;
  flex-shrink: 0;
}
.works-list-fav {
  width: 30px;
  text-align: center;
  flex-shrink: 0;
  font-size: 14px;
}
.works-list-engine {
  width: 70px;
  flex-shrink: 0;
  text-align: center;
}

/* ---- 详情面板覆盖层防止body滚动 ---- */
body.works-detail-open {
  overflow: hidden;
}

/* ===== 作品库响应式适配 ===== */
@media (max-width: 900px) {
  .works-toolbar { gap: 6px; }
  .works-toolbar .works-select { flex: 1; min-width: 0; font-size: 12px; }
  .works-search-input { font-size: 12px; padding: 5px 10px; }
}

@media (max-width: 600px) {
  .works-toolbar { flex-wrap: wrap; }
  .works-toolbar .works-select { width: calc(50% - 40px); flex: none; }
  .works-grid { padding: 0 12px 16px; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .works-page-info { width: 100%; text-align: center; margin-bottom: 6px; }
  .works-pagination { flex-wrap: wrap; justify-content: center; }
  .works-list-col-date { width: 72px; }
  .works-detail-panel { width: calc(100vw - 20px); max-width: 400px; }
  .works-sidebar { width: 180px; min-width: 180px; }
}

@media (max-width: 400px) {
  .works-sidebar { width: 140px; min-width: 140px; }
  .ws-folder-name { font-size: 12px; }
  .works-grid { grid-template-columns: 1fr; }
}